TWI687825B - Method and system for mapping from natural language to color combination - Google Patents

Method and system for mapping from natural language to color combination Download PDF

Info

Publication number
TWI687825B
TWI687825B TW107143241A TW107143241A TWI687825B TW I687825 B TWI687825 B TW I687825B TW 107143241 A TW107143241 A TW 107143241A TW 107143241 A TW107143241 A TW 107143241A TW I687825 B TWI687825 B TW I687825B
Authority
TW
Taiwan
Prior art keywords
vocabulary
color
similarity
word
similar
Prior art date
Application number
TW107143241A
Other languages
Chinese (zh)
Other versions
TW202022649A (en
Inventor
周遵儒
彭雅芳
Original Assignee
國立臺灣師範大學
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 國立臺灣師範大學 filed Critical 國立臺灣師範大學
Priority to TW107143241A priority Critical patent/TWI687825B/en
Application granted granted Critical
Publication of TWI687825B publication Critical patent/TWI687825B/en
Publication of TW202022649A publication Critical patent/TW202022649A/en

Links

Images

Abstract

The present invention provides a method and a system for mapping from natural language to color combination. The method and system include: dividing an inputted description sentence into a plurality of phrases; expanding each of the plurality of phrases into a cognate glossary having a plurality of cognate words by a word embedding module and merging a plurality of cognate glossaries into an overall words expending collection; calculating a word similarity between each cognate word in the overall words expending collection and predefined color-related words and ranking the word similarities with a high and low value order to select at least one color-related word having a higher word similarity; and outputting a color combination which is predefined and corresponded to the selected at least one color-related word.

Description

對應自然語言至色彩組合之方法與系統 Method and system corresponding to natural language to color combination

本發明係關於一種從口語化的語言對應得到色彩意象詞彙及其色彩組合之方法與系統,詳言之,係關於一種對應自然語言至色彩組合之方法與系統。 The invention relates to a method and system for obtaining color image vocabulary and color combination from colloquial language correspondence. In detail, it relates to a method and system corresponding to natural language to color combination.

色彩經由反射等進入人眼並與感覺連結,一般情況下色彩對人們有普遍的、共通的感受反應,在設計領域中經常使用某個顏色來傳達目標意象,如何有效率地運用配色來傳達訊息已成為熱門且重要的研究議題。 Color enters the human eye through reflection, etc. and connects with the sense. Generally, color has a common and common feeling response to people. In the design field, a color is often used to convey the target image. How to use color matching to communicate the message efficiently Has become a hot and important research topic.

色彩基於個人的記憶形成色彩與意象的連結,雖然人們對於色彩有經驗或文化上的差異,但一般情況下仍有普遍的、共通的感受反應,例如紅色常使人聯想到火焰而產生熱情的形象、綠色常使人聯想到自然而產生舒適的意象。每個顏色都具備不同的情感特徵,稱之為色彩意象。 Color is based on personal memory to form the connection between color and image. Although people have experience or cultural differences in color, there are still general and common feelings and reactions. For example, red often reminds people of flames and generates passion Image and green often make people think of nature and produce comfortable images. Each color has different emotional characteristics, called color images.

關於色彩與意象,在色彩研究領域中有各樣不同的詮釋方法,在既有的技術中也有相關的探討,其研究結果大致上分為四類,第一類單色色彩及意象的對應,例如美國專利公開號第US 2006/0248081 A1號之「Color selection method and system using semantic color names」;第二類是藉由圖片對應顏色或意象,例如中國發明專利公開號第CN 101546343 A號之「一種匹配探頭顏色的方法、裝置和系統」,中華民國發明專利公告號第I 534647號之「自訂圖片樣版系統」,及中國發明專利公開號第CN 107168968 A號之「面向情感的圖像色彩提取方法及系统」;第三類是以色相為主的調和配色,例如美國發明專利公開號第US 2018/0158123 A1號之「Home decor color matching」;第四類是僅有資料庫沒有自動化的方法,例如中華民國發明專利公告號第I228669號之「建立意象尺度分析表之方法」、及中華民國發明專利公告號第I459220號之「色彩意象預測系統及方法」等。 Regarding color and imagery, there are different interpretation methods in the field of color research, and there are related discussions in existing technologies. The research results are roughly divided into four categories. The first type corresponds to monochromatic color and imagery. For example, US Patent Publication No. US 2006/0248081 A1 "Color selection method and system using semantic color names"; the second type is corresponding to the color or image by the picture, for example, "A method, device and system for matching the color of the probe" of China Invention Patent Publication No. CN 101546343 A, Republic of China Invention Patent Bulletin No. I 534647 "Custom Picture Template System", and Chinese Invention Patent Publication No. CN 107168968 A "Emotion-oriented Image Color Extraction Method and System"; the third category is based on hue Harmonic color matching, for example, "Home decor color matching" of US Patent Publication No. US 2018/0158123 A1; the fourth category is the only database without automation methods, such as "establishment of the Republic of China Invention Patent No. I228669" Method of Image Scale Analysis Table", and "Color Image Prediction System and Method" of the Republic of China Invention Patent Announcement No. I459220.

由上可知,在既有技術中欠缺關於自然語言中對應至色彩意象詞彙再進一步對應至色彩組合的自動對應方法,因此,協助人們可快速由口語化的語言找出其對應之色彩組合,為目前本領域亟待解決之議題。 It can be seen from the above that in the existing technology, there is a lack of an automatic correspondence method corresponding to the color image vocabulary in natural language and further corresponding to the color combination. Therefore, it helps people to quickly find the corresponding color combination from the spoken language. Issues urgently needed to be resolved in this field.

為解決上述問題,本發明係提供一種對應自然語言至色彩組合之方法,係包括:經過分詞模組以將敘述語句區分為多個詞彙;將各該多個詞彙透過詞嵌入(word embedding)模型擴展為具有多個相近詞彙的相近詞彙組;彙整該多個詞彙的該相近詞彙組成為總詞彙擴展集;計算該總詞彙擴展集的各該相近詞彙與預設之色彩意象詞彙的詞彙相似度;基於數值高低排序該詞彙相似度;選出該詞 彙相似度排序較高的至少一個該色彩意象詞彙;以及輸出所選出之至少一個該色彩意象詞彙所預設對應的色彩組合。 In order to solve the above problems, the present invention provides a method corresponding to natural language to color combination, which includes: a word segmentation module to divide the narrative sentence into multiple words; and embedding each of the multiple words through a word embedding model Expand into similar vocabulary groups with multiple similar vocabularies; aggregate the similar vocabularies of the multiple vocabularies into a total vocabulary expansion set; calculate the vocabulary similarity between each of the similar vocabulary of the total vocabulary expansion set and the preset color image vocabulary ; Sort the vocabulary similarity based on numerical value; select the word At least one color image vocabulary with a higher similarity ranking is output; and at least one selected color combination corresponding to the preset color image vocabulary is output.

如前述之方法,其中,該分詞模組係結巴(Jieba)中文分詞演算法。 As in the aforementioned method, wherein the word segmentation module is a Chinese word segmentation algorithm of Jieba (Jieba).

如前述之方法,其中,該詞嵌入模型係藉由word2vec演算法所訓練的淺而雙層的神經網路建構而成。 As in the aforementioned method, the word embedding model is constructed by a shallow, two-layer neural network trained by the word2vec algorithm.

如前述之方法,其中,該總詞彙擴展集係透過下列方程式計算:

Figure 107143241-A0101-12-0003-2
,其中,E(R)為該總詞彙擴展集,r i 為該多個詞彙,藉由該Word2vec演算法擴展為m組的該相近詞彙組e(r i ),且共有p個相近詞彙α。 As in the aforementioned method, wherein the total vocabulary expansion set is calculated by the following equation:
Figure 107143241-A0101-12-0003-2
, Where E(R) is the total vocabulary expansion set, and r i is the multiple vocabularies, which are expanded into m groups of similar vocabulary groups e ( r i ) by the Word2vec algorithm, and there are p similar vocabularies α .

如前述之方法,其中,該計算該總詞彙擴展集的各該相近詞彙與預設之色彩意象詞彙的詞彙相似度,其係透過相似度方程式S k 計算,該相似度方程式S k

Figure 107143241-A0101-12-0003-1
,其中,c k 為該色彩意象詞彙,該總詞彙擴展集中有l個該相近詞彙α l l為從1至psim(c k l )為ck與αl所計算出的詞彙相似度。 The method as described above, wherein the computing of the total extension word set to the close similarity of each vocabulary word with a preset vocabulary of color images, through which the similarity-based computing equation S k, S k equation is based on the similarity
Figure 107143241-A0101-12-0003-1
, Where c k is the color image vocabulary, the total vocabulary expansion set has l the similar vocabulary α l , l is from 1 to p , and sim ( c k l ) is calculated by c k and α l Vocabulary similarity.

如前述之方法,其中,該色彩組合為基於色相及色調排列組合的RGB色彩組合。 As in the aforementioned method, wherein the color combination is an RGB color combination based on hue and tone arrangement combination.

本發明另提供一種對應自然語言至色彩組合之系統,係包括:分詞模組,用以將敘述語句區分為多個詞彙;擴展模組,用以將各該多個詞彙透過詞嵌入(word embedding)模型擴展為具有多個相近詞彙的相近詞彙組,並彙整該多個詞彙的該相近詞彙組成為總詞彙擴展集;語意對應模組,用以計算該總詞彙擴展集的各該相近詞彙與預設之色彩意象詞彙的詞彙相似度,並基於數值高低排序該詞彙相似度,以選出該詞彙相似度排序最高的至少一個該色彩意象詞彙;以及色彩建構模組,輸出所選出之至少一個該色彩意象詞彙預設對應的色彩組合。 The present invention also provides a system corresponding to natural language to color combination, which includes: a word segmentation module to divide the narrative sentence into multiple words; an expansion module to embed each of the multiple words through word embedding ) The model is expanded into similar vocabulary groups with multiple similar vocabularies, and the similar vocabularies of the multiple vocabulary are combined to form a total vocabulary expansion set; a semantic correspondence module is used to calculate each similar vocabulary and Preset the lexical similarity of the color image vocabulary, and sort the vocabulary similarity based on the numerical value to select at least one of the color image vocabulary with the highest similarity of the vocabulary; and the color construction module to output at least one of the selected The color image vocabulary presets the corresponding color combination.

如前述之系統,其中,該分詞模組係具有結巴(Jieba)中文分詞演算法。 As in the aforementioned system, wherein the word segmentation module has a Chinese word segmentation algorithm (Jieba).

如前述之系統,其中,該擴展模組的該詞嵌入模型係藉由word2vec演算法所訓練的淺而雙層的神經網路建構而成。 As in the aforementioned system, wherein the word embedding model of the expansion module is constructed by a shallow, two-layer neural network trained by the word2vec algorithm.

如前述之系統,其中,該總詞彙擴展集係透過下列方程式計算:

Figure 107143241-A0101-12-0004-3
,其中,E(R)為該總詞彙擴展集,r i 為該多個詞彙,藉由該Word2vec演算法擴展為m組的該相近詞彙組e(r i ),且共有p個相近詞彙α。 As in the aforementioned system, where the total vocabulary expansion set is calculated by the following equation:
Figure 107143241-A0101-12-0004-3
, Where E(R) is the total vocabulary expansion set, and r i is the multiple vocabularies, which are expanded into m groups of similar vocabulary groups e ( r i ) by the Word2vec algorithm, and there are p similar vocabularies α .

如前述之系統,其中,該語意對應模組係藉由相似度方程式S k 計算該總詞彙擴展集的各該相近詞彙與該預設之 色彩意象詞彙的詞彙相似度,該相似度方程式S k

Figure 107143241-A0101-12-0005-4
,其中,c k 為該色彩意象詞彙,該總詞彙擴展集中有l個該相近詞彙α l l為從1至psim(c k l )為ck與αl所計算出的詞彙相似度。 Close to each of the word preceding the system, wherein the system module corresponding to semantic similarity equation S k by calculating the total words and extended set of the predetermined color image vocabulary word similarity, the similarity equation S k system
Figure 107143241-A0101-12-0005-4
, Where c k is the color image vocabulary, the total vocabulary expansion set has l the similar vocabulary α l , l is from 1 to p , and sim ( c k l ) is calculated by c k and α l Vocabulary similarity.

如前述之系統,其中,該色彩建構模組的該色彩組合係透過Python程式語言所撰寫的為基於色相及色調排列組合的RGB色彩組合。 As in the aforementioned system, wherein the color combination of the color construction module is an RGB color combination based on hue and tone arrangement combination written in the Python programming language.

由本發明的方法或系統,使用者輸入欲查詢色彩意象詞彙的敘述語句,即可自動得到相近意義的該色彩意象詞彙及其色彩組合,並提供相應的RGB數值;透過本發明色彩意象詞彙至色彩組合的自動轉換,輔助或建議設計領域配色決策,如產品設計、服裝設計、室內設計、平面設計及網頁設計等。 By the method or system of the present invention, the user enters the narrative sentence of the color image vocabulary to be queried, and the color image vocabulary and its color combination of similar meaning can be automatically obtained, and the corresponding RGB values are provided; through the color image vocabulary of the present invention to the color The automatic conversion of the combination can assist or suggest color matching decisions in the design field, such as product design, clothing design, interior design, graphic design and web design.

10‧‧‧系統 10‧‧‧System

11‧‧‧分詞模組 11‧‧‧ Word Segment Module

111‧‧‧結巴中文分詞演算法 111‧‧‧Stutter Chinese word segmentation algorithm

13‧‧‧擴展模組 13‧‧‧Expansion module

131‧‧‧詞嵌入模型 131‧‧‧ word embedding model

15‧‧‧語意對應模組 15‧‧‧ Semantic Correspondence Module

17‧‧‧色彩建構模組 17‧‧‧ Color Construction Module

R‧‧‧敘述語句 R‧‧‧ Narrative sentences

21‧‧‧總詞彙擴展集 21‧‧‧Expanded vocabulary

23‧‧‧色彩意象詞彙 23‧‧‧ color image vocabulary

25‧‧‧色彩組合 25‧‧‧ color combination

S01~S08‧‧‧步驟 S01~S08‧‧‧Step

第1圖是本發明之對應自然語言至色彩組合之系統的系統架構示意圖。 FIG. 1 is a schematic diagram of the system architecture of the system corresponding to natural language to color combination of the present invention.

第2圖是本發明之對應自然語言至色彩組合之方法的步驟流程示意圖。 FIG. 2 is a schematic flowchart of steps of the method of the present invention corresponding to natural language to color combination.

提供下列具體實施例以說明本發明,彼等熟悉該領域者於閱讀本說明書之發明後無疑地可理解優點及功效。 The following specific examples are provided to illustrate the present invention, and those who are familiar with this field can undoubtedly understand the advantages and effects after reading the invention of this specification.

其應理解,於本說明書及附隨圖式中所描述之結構、 比例、尺寸等係僅揭露以配合本說明書之內容,以使彼等熟悉該領域者容易理解及閱讀,而非意圖將本發明限制於具體情況,亦不具有技術上之實質意向。對該結構之任何修飾、比例關係之改變、或尺寸之調整應包含於本說明書之揭露範疇內而不影響本說明書之可生產效能及可達成目標。相對關係的改變或調整而沒有實質上改變技術內容,其亦應認定為落入實施的範疇內。 It should be understood that the structure described in this specification and the accompanying drawings, The proportions, sizes, etc. are disclosed only to match the content of this specification, so that those familiar with the field can easily understand and read, and are not intended to limit the present invention to specific situations and have no technical intent. Any modifications to the structure, changes in the proportional relationship, or adjustments in dimensions should be included in the scope of disclosure of this specification without affecting the manufacturability and achievement of this specification. Changes or adjustments in the relative relationship without substantially changing the technical content should also be deemed to fall within the scope of implementation.

請參照第1圖所示,本發明係提供一種對應自然語言至色彩組合之系統,其中,該系統10係包括分詞模組11、擴展模組13、語意對應模組15、及色彩建構模組17,其可由具有處理器、記憶體或儲存裝置之電腦所建構。 Please refer to FIG. 1, the present invention provides a system corresponding to natural language to color combination, wherein the system 10 includes a word segmentation module 11, an expansion module 13, a semantic correspondence module 15, and a color construction module 17. It can be constructed by a computer with a processor, memory or storage device.

使用者可透過任何介面,輸入自然語言的中文敘述語句、任意詞彙、或色彩意象詞彙等內容,該分詞模組11係透過結巴(Jieba)中文分詞演算法111,將所輸入的內容區分為多個詞彙。 Users can input natural language Chinese narrative sentences, arbitrary vocabulary, or color image vocabulary through any interface. The word segmentation module 11 uses Jieba Chinese word segmentation algorithm 111 to distinguish the input content into multiple Vocabulary.

該擴展模組13透過詞嵌入(word embedding)模型131,將該多個詞彙的各者擴展為具有多個相近詞彙的相近詞彙組,並彙整該多個詞彙的該相近詞彙組計算為總詞彙擴展集21,其中,該詞嵌入模型131係藉由word2vec演算法所訓練的淺而雙層的神經網路建構而成。 The expansion module 13 uses a word embedding model 131 to expand each of the plurality of vocabularies into a similar vocabulary group having a plurality of similar vocabularies, and aggregates the similar vocabulary groups of the plurality of vocabularies into a total vocabulary In extension set 21, the word embedding model 131 is constructed by a shallow and double-layer neural network trained by the word2vec algorithm.

該語意對應模組15係透過相似度方程式,以計算該總詞彙擴展集21的各該相近詞彙與預設之色彩意象詞彙23的詞彙相似度,並基於數值高低排序該詞彙相似度,以選出該詞彙相似度排序較高的至少一個色彩意象詞彙23。 The semantic correspondence module 15 calculates the vocabulary similarity between each similar word of the total vocabulary extension set 21 and the preset color image vocabulary 23 through the similarity equation, and sorts the vocabulary similarity based on the numerical value to select The vocabulary similarity ranks at least one color image vocabulary 23 with a high rank.

該色彩建構模組17輸出該至少一個色彩意象詞彙23預設對應的色彩組合25,其中,該色彩建構模組17的該色彩組合25係透過繪圖工具模組Matplotlib所建立的函式庫,其是Python程式語言及其數值數學擴展包NumPy的可視化操作界面,使基於色相及色調排列組合的RGB值繪製於x-y座標軸上並顯示該色色塊及相應數值,並可儲存為png圖檔。 The color construction module 17 outputs the at least one color image vocabulary 23 corresponding to the preset color combination 25, wherein the color combination 25 of the color construction module 17 is a function library created by the drawing tool module Matplotlib, which It is the visual operation interface of the Python programming language and its numerical mathematics expansion package NumPy, which draws RGB values based on hue and hue arrangement and combination on the xy coordinate axis and displays the color blocks and corresponding values, and can be saved as a png image file.

藉由前述的系統10計算轉換後,使用者所輸入的任何中文語句或詞彙,皆能在該分詞模組11區分為多個詞彙後,由該擴展模組13擴展為相近詞意的相近詞彙組,透過該語意對應模組15計算經過彙整的該總詞彙擴展集21得到最相近的多個色彩意象詞彙23、再透過該色彩建構模組17輸出該多個色彩意象詞彙23所對應的一或多個色彩組合25,該色彩組合25包括相應的RGB數值,前述的系統10可自動將自然語言轉換為色彩組合25,得以輔助或建議設計領域配色決策,如產品設計、服裝設計、室內設計、平面設計及網頁設計等。 After the conversion is calculated by the aforementioned system 10, any Chinese sentence or vocabulary entered by the user can be divided into multiple vocabularies by the word segmentation module 11, and then expanded by the expansion module 13 into similar vocabularies of similar word meanings Group, calculate the aggregated vocabulary expansion set 21 through the semantic correspondence module 15 to obtain the most similar multiple color image vocabulary 23, and then output the corresponding one of the multiple color image vocabulary 23 through the color construction module 17 Or multiple color combinations 25, which include corresponding RGB values, the aforementioned system 10 can automatically convert natural language into color combinations 25, which can assist or suggest color matching decisions in the design field, such as product design, clothing design, interior design , Graphic design and web design.

請參照第2圖所示,本發明復提供一種對應自然語言至色彩組合之方法,包括: Referring to FIG. 2, the present invention provides a method corresponding to natural language to color combination, including:

在步驟S01中,輸入敘述語句R,其係輸入設計需求的自然語言建構下的敘述語句R。 In step S01, a narrative sentence R is input, which is a narrative sentence R under the natural language structure of the design requirement.

在步驟S02中,經過分詞模組以將該敘述語句R區分為多個詞彙,其中,該分詞模組係透過結巴(Jieba)中文分詞演算法將該敘述語句R轉換成多個詞彙r1,r2,…,ri…, rmIn step S02, the word segmentation module is used to distinguish the narration sentence R into multiple vocabularies, wherein the word segmentation module converts the narration sentence R into multiple vocabulary r 1 through the Jieba Chinese word segmentation algorithm r 2 ,...,r i …, r m .

在步驟S03中,將各該多個詞彙透過詞嵌入(word embedding)模型擴展為具有多個相近詞彙的相近詞彙組;其中,該詞嵌入模型係藉由Word2vec演算法所訓練的淺而雙層的神經網路建構而成,其將經過分詞的詞彙ri,擴展為與詞彙ri最相近的n個相近詞彙以成為相近詞彙組e(ri)={e1,e2,…,en}。 In step S03, each of the plurality of vocabularies is expanded to a similar vocabulary group having a plurality of similar vocabularies through a word embedding model; wherein, the word embedding model is a shallow and double layer trained by the Word2vec algorithm The neural network is constructed by expanding the word segmented word r i into n similar words that are closest to the word r i to become a similar word group e(r i )={e 1 ,e 2 ,..., e n }.

在步驟S04中,彙整該多個詞彙的該相近詞彙組成為總詞彙擴展集,其中,該總詞彙擴展集係透過下式計算:

Figure 107143241-A0101-12-0008-6
,其中,E(R)為總詞彙擴展集,ri為多個詞彙,藉由該word2vec演算法擴展為m組的該相近詞彙組e(ri),且共有p個相近詞彙α。 In step S04, the similar vocabularies that aggregate the plurality of vocabularies form a total vocabulary expansion set, where the total vocabulary expansion set is calculated by the following formula:
Figure 107143241-A0101-12-0008-6
, Where E(R) is the total vocabulary expansion set, and r i is a plurality of vocabulary, which is expanded into m groups of similar vocabulary groups e(r i ) by the word2vec algorithm, and there are p similar vocabularies α .

在步驟S05中,計算該總詞彙擴展集的各該相近詞彙與預設之色彩意象詞彙的詞彙相似度,其係透過相似度方程式Sk得到詞彙相似度,該相似度方程式Sk如下式:

Figure 107143241-A0101-12-0008-5
,其中,c k 為該色彩意象詞彙c k ,該總詞彙擴展集中有l個該相近詞彙α l l為從1至psim(c k l )為ck與αl所計算出的詞彙相似度。 In Step S05, calculating the total of each of the similar word set and a preset vocabulary extension of Color Image vocabulary word similarity which in similarity obtained through the similarity-based equation S k, S k of the similarity equation is the following equation:
Figure 107143241-A0101-12-0008-5
, Where c k is the color image vocabulary c k , there are l the similar vocabulary α l in the total vocabulary expansion set, l is from 1 to p , and sim ( c k l ) is calculated by c k and α l Vocabulary similarity.

在步驟S06,基於數值高低排序該詞彙相似度;以及在步驟S07,選出該詞彙相似度排序較高的至少一個該色 彩意象詞彙,例如,將所計算出的詞彙相似度經過由高至低的排序後,將數值最高的前三者所代表的色彩意象詞彙cx1、cx2、cx3作為所需的結果。 In step S06, sort the vocabulary similarity based on the numerical value; and in step S07, select at least one color image vocabulary with a higher sorted vocabulary similarity. For example, the calculated vocabulary similarity is passed from high to low After sorting, the color image vocabulary c x1 , c x2 , c x3 represented by the top three with the highest numerical value is used as the desired result.

在步驟S08中,輸出所選出之至少一個該色彩意象詞彙所預設對應的色彩組合,其中,本發明的具體實施例為,該色彩組合係以Munsell所列的11個色相(Hue)為基礎,如紅、橙、黃、黃綠、綠、藍綠、藍、藍紫、紫、紫紅及無彩色,再以不同的色調(Tone)排列的12種調性,如銳調、強調、明調、淡調、最淡調、淡弱調、弱調、澀調、鈍調、濃調、暗調及最暗調,總共得出130個色彩,每一個色彩組合各有9組的RBG三色組合,總計包含1170個RBG三色組合。 In step S08, output at least one selected color combination corresponding to the preset color image vocabulary, wherein the specific embodiment of the present invention is that the color combination is based on the 11 hues (Hue) listed by Munsell , Such as red, orange, yellow, yellow-green, green, blue-green, blue, blue-violet, purple, magenta and achromatic, and then arranged in 12 different tones (Tone), such as sharp tone, emphasis, bright Tone, light tone, lightest tone, weak tone, weak tone, astringent tone, dull tone, dark tone, dark tone and darkest tone, a total of 130 colors are obtained, each color combination has 9 groups of RBG three Color combinations, including a total of 1170 RBG three-color combinations.

所選出的至少一個該色彩意象詞彙所預設對應的色彩組合,可使用繪圖工具模組Matplotlib的函式庫,其由Python程式語言及數值擴展包NumPy的可視化操作界面,作為RGB值的定義與陣列運算,並令其儲存為png圖檔,以將該色彩意象詞彙對應輸出所屬的RBG三色組合。 At least one of the selected color combinations corresponding to the color image vocabulary can be selected by using the function library of the drawing tool module Matplotlib. The visual operation interface of the Python programming language and numerical expansion package NumPy serves as the definition and the RGB value. Array operation and save it as a png image file to output the RBG three-color combination to which the color image vocabulary corresponds.

本發明所預設的色彩意象詞彙以及其所對應的色彩組合,是基於學者小林重順所建立的色彩意象座標(Color Image Scale),其說明色彩及意象的關聯,而後也用類似的方法研究了RBG三色組合及其對應的色彩意象詞彙,此被廣大的運用於日常生活中的配色需求,尤其是在設計領域。 The color image vocabulary preset by the present invention and the corresponding color combination are based on the color image scale established by scholar Kobayashi Koshun, which illustrates the relationship between color and image, and then used a similar method to study The RBG three-color combination and its corresponding color image vocabulary are widely used in the color matching needs of daily life, especially in the design field.

為了使色彩意象詞彙可輕易轉換成相對應之色彩組 合,具體上,本發明將學者小林重順的《Color Image Scale》一書對於人類感知及顏色的關聯為基礎,統整此書中的180個色彩意象及其39個擴充詞,經統整為後成為222個色彩意象詞彙,並利用word2vec作為自然語言處理的工具,將相近於色彩意象詞彙的任意詞彙彙整、建構、並訓練得到詞嵌入(word embedding)模型131。 In order to make the color image vocabulary easily convert into the corresponding color group To be specific, the present invention is based on the relationship between the book "Color Image Scale" by scholar Kobayashi's "Color Image Scale" for human perception and color, and the 180 color images and 39 expansion words in this book are unified. In order to become 222 color image vocabulary, and use word2vec as a natural language processing tool, any word similar to color image vocabulary is assembled, constructed, and trained to obtain a word embedding model 131.

以下說明本發明的示範實施例: The following describes an exemplary embodiment of the present invention:

在步驟S01中,輸入敘述語句R=「不在乎天長地久只在乎曾經擁有」。 In step S01, enter the narrative sentence R = "Don't care forever, only care about once owned".

在步驟S02中,經過分詞模組以將該敘述語句R區分為多個詞彙,其中,該分詞模組透過結巴(Jieba)中文分詞演算法,將敘述語句R轉換成分詞後的多個詞彙ri,例如「不在乎」、「天長地久」、「只在乎」、「曾經」、及「擁有」。 In step S02, the word segmentation module is used to distinguish the narration sentence R into multiple vocabularies. The word segmentation module converts the narration sentence R into a plurality of vocabulary r through the Jieba Chinese word segmentation algorithm i , such as "don't care", "forever", "only care", "once", and "own".

在步驟S03中,將該多個詞彙的各者透過前述的詞嵌入(word embedding)模型擴展為相近詞彙組,亦即,將各該詞彙ri擴展為與自身詞彙ri最相近的n個相近詞彙以成為相近詞彙組e(ri)={e1,e2,…,en}如下:例如將「不在乎」擴展成「不在意」、「不介意」、「無所謂」、「沒錯」、「且說」、「看不出」、「沒見過」、「聽不懂」、「不算什麼」、及「搞不懂」等相近詞彙組。 In step S03, each of the plurality of vocabularies is expanded to a similar vocabulary group through the aforementioned word embedding model, that is, each of the vocabularies r i is expanded to the n closest to its own vocabulary r i Similar vocabulary to become similar vocabulary group e(r i )={e 1 ,e 2 ,…,e n } as follows: For example, expand “don’t care” to “don’t care”, “don’t mind”, “don’t care”, “yes "," and "speak", "can't see", "have never seen", "do not understand", "do not count", and "do not understand" and other similar vocabulary group.

例如將「天長地久」擴展成「金枝玉葉」、「未了情」、「綺夢」、「金玉滿堂」、「未了緣」、「江山美人」、「似水流年」、「彩雲飛」、「喜迎春」、及「溫兆倫」等相近詞彙組。 For example, expand ``Eternal Time'' into ``Jinzhiyuye'', ``Weiqing'', ``Qimeng'', ``Jinyumantang'', ``Weiyuan'', ``Jiangshan Beauty'', ``Like the Water'', ``Caiyunfei'', `` Similar vocabulary groups like "Happy Spring" and "Wen Zhaolun".

例如將「只在乎」擴展成「愛你愛」、「敢不敢」、「煞 到」、「我賴」、「很愛很愛」、「金倫」、「我問」、「我管」、「請原諒」、及「要定」等相近詞彙組。 For example, expand "only care" into "love you love", "dare", "sharp" Similar phrases such as "to", "I Lai", "I love very much", "Jinlun", "I ask", "I control", "Please forgive", and "To be determined".

例如將「曾經」擴展成「曾」、「還曾」、「並曾」、「曾多次」、「曾一度」、「從未」、「從沒」、「經常」、「多次」、及「從來沒」等相近詞彙組。 For example, expand "once" to "once", "return", "and once", "once", "once", "never", "never", "frequent", "many" , And "never" and other similar vocabulary groups.

例如將「擁有」擴展成「具有」、「有著」、「有着」、「具備」、「持有」、「享有」、「保有」、「有」、「帶有」、及「展現出」等相近詞彙組。 For example, expand "own" to "have", "have", "have", "have", "have", "have", "have", "have", "have", and "show" Similar vocabulary.

在步驟S04中,彙整該多個詞彙的各者的該相近詞彙組計算為總詞彙擴展集,其中,該總詞彙擴展集為E(R)={「不在意」、「不介意」、「無所謂」…「保有」、「有」、「帶有」、「展現出」}。 In step S04, the similar vocabulary group of each of the plurality of vocabularies is calculated as a total vocabulary expansion set, where the total vocabulary expansion set is E(R)={"don't care", "do not mind", " It doesn't matter"... "hold", "have", "with", "show"}.

在步驟S05中,透過相似度方程式以計算該總詞彙擴展集的各該相近詞彙與各個預設之色彩意象詞彙的詞彙相似度,該相似度方程式Sk如下式:

Figure 107143241-A0101-12-0011-7
,其中,c k 為該色彩意象詞彙c k ,該總詞彙擴展集中有l個該相近詞彙α l l為從1至psim(c k ,α l )為ck與αl所計算出的詞彙相似度,經過計算如下:S1=sim(楚楚動人,E(R))=0.5658。 In step S05, the similarity equations are used to calculate the lexical similarity between each similar word of the total vocabulary expansion set and each preset color image vocabulary. The similarity equation S k is as follows:
Figure 107143241-A0101-12-0011-7
, Where c k is the color image vocabulary c k , there are l the similar vocabulary α l in the total vocabulary expansion set, l is from 1 to p , and sim ( c k , α l ) is calculated by c k and α l The similarity of the vocabulary is calculated as follows: S 1 =sim(chuchu, E(R))=0.5658.

S2=sim(浪漫,E(R))=0.5334。 S 2 =sim(romantic, E(R))=0.5334.

S3=sim(清爽,E(R))=0.5019。 S 3 =sim(fresh, E(R))=0.5019.

...... ...

S223=sim(坦誠,E(R))=0.5159。 S 223 =sim(candid, E(R))=0.5159.

在步驟S06中,基於數值高低排序該詞彙相似度,詞彙相似度S1,S2,S3,…,S223排序後為:S132=sim(瀟灑,E(R))=0.6240。 In step S06, the vocabulary similarity is sorted based on the numerical value, and the vocabulary similarity S 1 , S 2 , S 3 , ..., S 223 is sorted as follows: S 132 =sim(dashing, E(R))=0.6240.

S20=sim(灑脫,E(R))=0.6144。 S 20 =sim(free and easy, E(R))=0.6144.

S131=sim(酸酸,E(R))=0.6103。 S 131 =sim(acid, E(R))=0.6103.

...... ...

在步驟S07中,選出至少一個該詞彙相似度排序較高的該色彩意象詞彙,例如,將所計算出的Sk相似度經過由高至低的排序後,將數值最高的前三者所代表的色彩意象詞彙c132,c20,c131,也就是「瀟灑」、「灑脫」、「酸酸」輸出。 In step S07, at least one color image vocabulary with a higher similarity degree of the vocabulary is selected, for example, after the calculated S k similarity is sorted from high to low, the top three with the highest value are represented The color image vocabulary c 132 , c 20 , c 131 , that is, "chic", "free and easy", "acid" output.

步驟S08,輸出所選出至少一個該色彩意象詞彙所預設對應的色彩組合,由前述的1170個RBG三色組合中,檢索出對應於「瀟灑」、「灑脫」、「酸酸」這三個色彩意象詞彙所對應的RGB三色組合。 Step S08, output at least one selected color combination corresponding to the preset color image vocabulary. From the aforementioned 1170 RBG three-color combinations, the three corresponding to "chic", "free and easy" and "acid" are retrieved The RGB three-color combination corresponding to the color image vocabulary.

經由上述,由使用者所輸入的「不在乎天長地久只在乎曾經擁有」的自然語言的敘述語句,經過本發明的方法或系統得到「瀟灑」、「灑脫」、「酸酸」這三個色彩意象詞彙,藉此,一般使用者的自然語言口語化的敘述語句,透過本發明之方法與系統可連結於設計師所慣用的專業色彩意象詞彙,以建立二者之間的關聯性,並進一步讓設計師或自動化的設計演算模組藉此進行適當的色彩計畫,完成後續的設計或配色。 Through the above, the narrative sentences of the natural language input by the user, "don't care forever and only for once", through the method or system of the present invention, the three color image words of "chic", "free and easy" and "acid" are obtained In this way, the spoken narrative sentences of natural language of general users can be connected to the professional color image vocabulary used by designers through the method and system of the present invention to establish the relationship between the two and further let the design The designer or automated design calculation module can use this to carry out appropriate color planning to complete the subsequent design or color matching.

上列詳細說明係針對本發明之一可行實施例之具體說明,惟該實施例並非用以限制本發明之專利範圍,凡未脫離本發明技藝精神所為之等效實施或變更,均應包含於本案之專利範圍中。 The above detailed description is a specific description of a feasible embodiment of the present invention, but this embodiment is not intended to limit the patent scope of the present invention, and any equivalent implementation or change without departing from the technical spirit of the present invention should be included in The patent scope of this case.

綜上所述,本案不但在技術思想上確屬創新,並能較習用物品增進上述多項功效,應以充分符合新穎性及進步性之法定發明專利要件,爰依法提出申請,懇請 貴局核准本件發明專利申請案,以勵發明,至感德便。 To sum up, this case is not only innovative in terms of technical ideas, but also can improve the above-mentioned multiple functions compared to conventional articles. It should be based on the legal requirements for patents for inventions that fully meet the novelty and progress. You must file an application according to law and urge your office to approve this document. Invention patent application, in order to encourage invention, to feel good.

S01~S08‧‧‧步驟 S01~S08‧‧‧Step

Claims (10)

一種對應自然語言至色彩組合之方法,係包括:經過分詞模組將敘述語句區分為多個詞彙;將各該多個詞彙透過詞嵌入(word embedding)模型擴展為具有多個相近詞彙的相近詞彙組;彙整該多個詞彙的該相近詞彙組成為總詞彙擴展集,且該總詞彙擴展集係透過下列方程式計算:
Figure 107143241-A0305-02-0017-1
,其中,E(R)為該總詞彙擴展集,r i 為該多個詞彙,藉由word2vec演算法擴展為m組的該相近詞彙組e(r i ),且共有p個相近詞彙α;計算該總詞彙擴展集的各該相近詞彙與預設之色彩意象詞彙的詞彙相似度,其係透過相似度方程式S k 計算,該相似度方程式S k
Figure 107143241-A0305-02-0017-2
,其中,c k 為該色彩意象詞彙,該總詞彙擴展集中有l個該相近詞彙α l l為從1至psim(c k l )為ck與αl所計算出的詞彙相似度;基於數值高低排序該詞彙相似度;選出該詞彙相似度排序較高的至少一個該色彩意象詞彙;以及輸出所選出之至少一個該色彩意象詞彙所預設對 應的色彩組合。
A method corresponding to natural language to color combination includes: dividing a narrative sentence into multiple words through a word segmentation module; expanding each of the multiple words into a close word with multiple close words through a word embedding model Group; the similar words that aggregate the multiple words form a total vocabulary expansion set, and the total vocabulary expansion set is calculated by the following equation:
Figure 107143241-A0305-02-0017-1
, Where E(R) is the total vocabulary expansion set, r i is the multiple vocabulary, which is expanded into m groups of similar vocabulary groups e ( r i ) by the word2vec algorithm, and there are p similar vocabularies α ; calculating a total extension word set to the close similarity of each vocabulary word with a preset vocabulary of color images, through which the similarity-based computing equation S k, S k equation is based on the similarity
Figure 107143241-A0305-02-0017-2
, Where c k is the color image vocabulary, the total vocabulary expansion set has l the similar vocabulary α l , l is from 1 to p , and sim ( c k l ) is calculated by c k and α l Vocabulary similarity; sort the vocabulary similarity based on numerical value; select at least one color image vocabulary with a higher similarity of the vocabulary; and output at least one selected color combination corresponding to the preset color image vocabulary.
根據申請專利範圍第1項所述的方法,其中,該分詞模組係透過結巴(Jieba)中文分詞演算法將該敘述語句區分為多個詞彙。 According to the method described in item 1 of the patent application scope, wherein the word segmentation module divides the narrative sentence into multiple vocabularies through a Chinese word segmentation algorithm of Jieba. 根據申請專利範圍第1項所述的方法,其中,該詞嵌入模型係藉由word2vec演算法所訓練的淺而雙層的神經網路建構而成。 The method according to item 1 of the patent application scope, wherein the word embedding model is constructed by a shallow, two-layer neural network trained by the word2vec algorithm. 根據申請專利範圍第3項所述的方法,其中,該色彩組合為基於色相及色調排列組合的RGB色彩組合。 The method according to item 3 of the patent application scope, wherein the color combination is an RGB color combination based on hue and hue arrangement combination. 一種對應自然語言至色彩組合之系統,係包括:分詞模組,用以將敘述語句區分為多個詞彙;擴展模組,用以將各該多個詞彙透過詞嵌入(word embedding)模型擴展為具有多個相近詞彙的相近詞彙組,並彙整該多個詞彙的該相近詞彙組成為總詞彙擴展集;語意對應模組,用以計算該總詞彙擴展集的各該相近詞彙與預設之色彩意象詞彙的詞彙相似度,並基於數值高低排序該詞彙相似度,以選出該詞彙相似度排序最高的至少一個該色彩意象詞彙;以及色彩建構模組,用以輸出所選出之至少一個該色彩意象詞彙預設對應的色彩組合。 A system corresponding to natural language to color combination includes: a word segmentation module to divide the narrative sentence into multiple words; an expansion module to expand each of the multiple words through a word embedding model to Similar vocabulary groups with multiple similar vocabularies, and merging the similar vocabularies of the multiple vocabularies into a total vocabulary expansion set; a semantic correspondence module for calculating the respective vocabulary of the total vocabulary expansion set and the preset color The vocabulary similarity of the image vocabulary, and sort the vocabulary similarity based on the numerical value to select at least one of the color image vocabularies with the highest ranking of the vocabulary similarity; and a color construction module to output at least one selected color image The color combination corresponding to the vocabulary preset. 根據申請專利範圍第5項所述的系統,其中,該分詞模組係透過結巴(Jieba)中文分詞演算法將敘述語句區分為多個詞彙。 According to the system described in item 5 of the patent application scope, the word segmentation module divides the narrative sentence into multiple vocabulary through the Chinese word segmentation algorithm of Jieba. 根據申請專利範圍第5項所述的系統,其中,該擴展模組的該詞嵌入模型係藉由word2vec演算法所訓練的淺而雙層的神經網路建構而成。 The system according to item 5 of the patent application scope, wherein the word embedding model of the expansion module is constructed by a shallow and double-layer neural network trained by the word2vec algorithm. 根據申請專利範圍第7項所述的系統,其中,該總詞彙擴展集係透過下列方程式計算:
Figure 107143241-A0305-02-0019-3
,其中,E(R)為該總詞彙擴展集,r i 為該多個詞彙,藉由該Word2vec演算法擴展為m組的該相近詞彙組e(r i ),且共有p個相近詞彙α
The system according to item 7 of the patent application scope, wherein the total vocabulary expansion set is calculated by the following equation:
Figure 107143241-A0305-02-0019-3
, Where E(R) is the total vocabulary expansion set, and r i is the multiple vocabularies, which are expanded into m groups of similar vocabulary groups e ( r i ) by the Word2vec algorithm, and there are p similar vocabularies α .
根據申請專利範圍第8項所述的系統,其中,該語意對應模組係藉由相似度方程式S k 計算該總詞彙擴展集的各該相近詞彙與該預設之色彩意象詞彙的詞彙相似度,該相似度方程式S k
Figure 107143241-A0305-02-0019-4
,其中,c k 為該色彩意象詞彙,該總詞彙擴展集中有l個該相近詞彙α l l為從1至psim(c k l )為ck與αl所計算出的詞彙相似度。
A system according to item 8 of the patent range, wherein the system module corresponding to semantic similarity equation S k by calculating the total of each of the extended set of words similar to the words of the predetermined vocabulary word similarity Color Image , The similarity equation S k system
Figure 107143241-A0305-02-0019-4
, Where c k is the color image vocabulary, the total vocabulary expansion set has l the similar vocabulary α l , l is from 1 to p , and sim ( c k l ) is calculated by c k and α l Vocabulary similarity.
根據申請專利範圍第5項所述的系統,其中,該色彩建構模組的該色彩組合係透過Python程式語言所撰寫的為基於色相及色調排列組合的RGB色彩。 The system according to item 5 of the patent application scope, wherein the color combination of the color construction module is an RGB color based on hue and tone arrangement combination written in the Python programming language.
TW107143241A 2018-12-03 2018-12-03 Method and system for mapping from natural language to color combination TWI687825B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW107143241A TWI687825B (en) 2018-12-03 2018-12-03 Method and system for mapping from natural language to color combination

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW107143241A TWI687825B (en) 2018-12-03 2018-12-03 Method and system for mapping from natural language to color combination

Publications (2)

Publication Number Publication Date
TWI687825B true TWI687825B (en) 2020-03-11
TW202022649A TW202022649A (en) 2020-06-16

Family

ID=70767256

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107143241A TWI687825B (en) 2018-12-03 2018-12-03 Method and system for mapping from natural language to color combination

Country Status (1)

Country Link
TW (1) TWI687825B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254638A (en) * 2021-05-08 2021-08-13 北方民族大学 Product image determination method, computer equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11436771B2 (en) 2020-11-20 2022-09-06 International Business Machines Corporation Graph-based color description generation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201344471A (en) * 2012-04-20 2013-11-01 Wen-Guey Kuo System and method of predicting color imagery
TWI537752B (en) * 2015-08-25 2016-06-11 國立臺灣師範大學 A conversion system for colors corresponding to emotional words and method thereof
CN105740565A (en) * 2016-02-16 2016-07-06 合肥学院 Natural language processing based automobile styling derivation method
EP2252045B1 (en) * 2009-05-12 2016-12-14 Xerox Corporation Color management system and method using natural language description of color differences
CN106547740A (en) * 2016-11-24 2017-03-29 四川无声信息技术有限公司 Text message processing method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2252045B1 (en) * 2009-05-12 2016-12-14 Xerox Corporation Color management system and method using natural language description of color differences
TW201344471A (en) * 2012-04-20 2013-11-01 Wen-Guey Kuo System and method of predicting color imagery
TWI459220B (en) * 2012-04-20 2014-11-01 Wen Guey Kuo System and method of predicting color imagery
TWI537752B (en) * 2015-08-25 2016-06-11 國立臺灣師範大學 A conversion system for colors corresponding to emotional words and method thereof
TW201709089A (en) * 2015-08-25 2017-03-01 國立臺灣師範大學 A conversion system for colors corresponding to emotional words and method thereof
CN105740565A (en) * 2016-02-16 2016-07-06 合肥学院 Natural language processing based automobile styling derivation method
CN106547740A (en) * 2016-11-24 2017-03-29 四川无声信息技术有限公司 Text message processing method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254638A (en) * 2021-05-08 2021-08-13 北方民族大学 Product image determination method, computer equipment and storage medium

Also Published As

Publication number Publication date
TW202022649A (en) 2020-06-16

Similar Documents

Publication Publication Date Title
WO2021004228A1 (en) Generation of recommendation reason
Barker Negotiating taste
Qian et al. Retrieve-then-adapt: Example-based automatic generation for proportion-related infographics
US10025978B2 (en) Assigning of topical icons to documents to improve file navigation
Mast et al. Probabilistic reference and grounding with PRAGR for dialogues with robots
CN110297907A (en) Generate method, computer readable storage medium and the terminal device of interview report
TWI687825B (en) Method and system for mapping from natural language to color combination
CN110851601A (en) Cross-domain emotion classification system and method based on layered attention mechanism
JP2021068053A (en) Generating device and generating program
WO2020231513A1 (en) Automatic generation of stylized icons
Sabzalipour et al. Translation Strategies of Proper Nouns in Children’ s Literature
US11403339B2 (en) Techniques for identifying color profiles for textual queries
Carvalho et al. Automatic description of SVG images for the visually impaired: a Gestaltic approach
Noori et al. Designing a University web site by considering users' emotion and using Kansei engineering
Padden Methods of research on sign language grammars
Ji et al. Design and Application of Mapping Model for Font Recommendation System Based on Contents Emotion Analysis
CN106203504B (en) A kind of network sentiment classification method based on optimal interval distribution ridge regression
Van Hooland et al. Unsupervised machine learning for archival collections: Possibilities and limits of topic modeling and word embedding
Sartori et al. Computational modeling of affective qualities of abstract paintings
CN109933663A (en) Intention assessment algorithm based on embedding method
KR102301653B1 (en) Custom calligraphy ordering system for furniture
CN110689079B (en) Processing method, processing device and electronic equipment
Hall et al. Visual Style Elements in Human–System Interface Design for Nuclear Power Operations: Does Style Affect Performance and Preference?
WO2023073807A1 (en) Information processing device, information processing method, and information processing program
KR102594629B1 (en) Apparatus for including speaking scoring artificial intelligence model to evaluate responses of answer to evaluation question