TWM629035U - Character generator - Google Patents
Character generator Download PDFInfo
- Publication number
- TWM629035U TWM629035U TW111201143U TW111201143U TWM629035U TW M629035 U TWM629035 U TW M629035U TW 111201143 U TW111201143 U TW 111201143U TW 111201143 U TW111201143 U TW 111201143U TW M629035 U TWM629035 U TW M629035U
- Authority
- TW
- Taiwan
- Prior art keywords
- candidate
- processing module
- generated
- string
- generation
- Prior art date
Links
Images
Abstract
一種用於生成多個文字的文字生成裝置,該文字生成裝置接收到一包含一生成條件的生成請求後,將該生成條件編碼為一固定格式的待生成輸入資料,根據該待生成輸入資料利用一文字生成模型生成N個候選文字,將該等N個候選文字加入該候選字串,以更新該候選字串,對於每一個評分條件,根據該候選字串及該評分條件,獲得一相關於該候選字串的評分,判定該至少一評分之總分是否大於一評分閥值,當判定該至少一評分之總分大於該評分閥值時,判定該候選字串是否符合一生成終止條件,當判定該候選字串符合該生成終止條件時,輸出該候選字串。A character generation device for generating a plurality of characters, after the character generation device receives a generation request including a generation condition, encodes the generation condition into input data to be generated in a fixed format, and uses the input data to be generated according to the input data to be generated. A character generation model generates N candidate characters, and adds the N candidate characters to the candidate character string to update the candidate character string. For each scoring condition, according to the candidate character string and the scoring condition, obtain a The score of the candidate string, determine whether the total score of the at least one score is greater than a scoring threshold, when it is determined that the total score of the at least one score is greater than the scoring threshold, determine whether the candidate string meets a generation termination condition, when When it is determined that the candidate string meets the generation termination condition, the candidate string is output.
Description
本新型是有關於一種用於生成文字的文字生成裝置,特別是指一種用於生成符合條件之多個文字的文字生成裝置。The present invention relates to a character generation device for generating characters, in particular to a character generation device for generating a plurality of characters that meet conditions.
當商業公司在產生行銷文案時,除了要了解客戶對於文案的喜好,亦需要知道文案中哪些文字能夠吸引客戶注意,且在網路時代中,客戶接觸的數位通路眾多,文案的需求也較以往的紙本廣告大幅增加,然而,要根據大量的文案產出最佳的行銷文案,其現有的方法是仰賴業務專家,依照產品特質與行銷目的,以人工的方式產生行銷文案,此方法缺點有二,第一是所產出的行銷文案會因為不同的業務專家而有品質差異,連帶會影響行銷結果,第二是為了產生最佳行銷文案,勢必得需閱讀大量的文案及找靈感,便會花費很多時間,因此,若是能提供一個可以快速且精準地生成能夠吸引客戶注意的最佳行銷文案,便能降低時間及人力成本。When commercial companies generate marketing copy, in addition to understanding customers’ preferences for copy, they also need to know which words in the copy can attract customers’ attention. In the Internet age, customers are exposed to many digital channels, and the demand for copy is also higher than before. However, to produce the best marketing copy based on a large amount of copywriting, the existing method is to rely on business experts to manually generate marketing copy according to product characteristics and marketing purposes. The disadvantages of this method are: Second, the first is that the quality of the produced marketing copy will be different due to different business experts, which will jointly affect the marketing results. The second is that in order to generate the best marketing copy, it is bound to have to read a lot of copywriting and find inspiration. It can take a lot of time, so if you can provide a quick and accurate generation of the best marketing copy that will catch the customer's attention, you can reduce time and labor costs.
因此,本新型之目的,即在提供一種可即時且自動地生成符合條件的多個文字之文字生成裝置。Therefore, the purpose of the present invention is to provide a character generation device that can instantly and automatically generate a plurality of characters that meet the conditions.
於是本發明文字生成裝置,用於生成多個文字,該文字生成裝置包含一輸出模組、一儲存模組,及一處理模組。Therefore, the character generating device of the present invention is used for generating a plurality of characters, and the character generating device includes an output module, a storage module, and a processing module.
該輸出模組用於輸出該等文字。The output module is used to output the text.
該儲存模組用於儲存一用於生成多個文字的文字生成模型、至少一用於評分所生成之文字的評分條件,及一初始值為空的候選字串。The storage module is used for storing a character generation model for generating a plurality of characters, at least one scoring condition for scoring the generated characters, and a candidate character string whose initial value is empty.
該處理模組電連接該輸出模組及該儲存模組。The processing module is electrically connected to the output module and the storage module.
其中,該處理模組接收到一包含一生成條件的生成請求後,將該生成條件編碼為一固定格式的待生成輸入資料,該生成條件包括一待生成產品類別,及一指示出該待生成產品類別是否有優惠的待生成優惠屬性,該處理模組根據該待生成輸入資料利用該文字生成模型生成N個候選文字,並將該等N個候選文字加入該儲存模組存有的該候選字串,以更新該候選字串,對於每一評分條件,該處理模組根據該儲存模組儲存的該候選字串及該評分條件,獲得一相關於該候選字串的評分,並判定該至少一評分之總分是否大於一評分閥值,當該處理模組判定該至少一評分之總分大於該評分閥值時,判定該候選字串是否符合一生成終止條件,當該處理模組判定該候選字串符合該生成終止條件時,該處理模組經由該輸出模組輸出該候選字串。Wherein, after receiving a generation request including a generation condition, the processing module encodes the generation condition into input data to be generated in a fixed format, the generation condition includes a product category to be generated, and a Whether the product category has a preferential to-be-generated preferential attribute, the processing module uses the text generation model to generate N candidate characters according to the to-be-generated input data, and adds the N candidate characters to the candidate stored in the storage module. character string to update the candidate character string, for each scoring condition, the processing module obtains a score related to the candidate character string according to the candidate character string and the scoring condition stored in the storage module, and determines the Whether the total score of at least one score is greater than a score threshold, when the processing module determines that the total score of the at least one score is greater than the score threshold, it is determined whether the candidate string meets a generation termination condition, when the processing module determines whether the candidate string meets a generation termination condition. When it is determined that the candidate character string meets the generation termination condition, the processing module outputs the candidate character string through the output module.
本新型的功效在於:藉由該文字生成裝置生成N個候選文字並加入該候選字串,且根據該候選字串利用該至少一評分條件獲得該總分,並判定該總分是否大於該評分閥值,當判定大於時,判定該候選字串是否符合生成終止條件,當判定符合時,輸出該等候選字串,藉此利用該至少一評分條件對所生成的N個候選文字評分以即時且自動地生成符合條件的字句。The function of the present invention is: generating N candidate characters by the character generating device and adding the candidate character string, obtaining the total score according to the candidate character string using the at least one scoring condition, and determining whether the total score is greater than the score Threshold, when it is determined that it is greater than the threshold, it is determined whether the candidate character string meets the generation termination condition, and when it is determined that the candidate character string is met, the candidate character string is output, thereby using the at least one scoring condition to score the generated N candidate characters to instantly And automatically generate matching words.
參閱圖1,本新型文字生成裝置之實施例,適用於生成多個文字,並包含一輸出模組1、一儲存模組2,及一電連接該輸出模組1及該儲存模組2的處理模組3。Referring to FIG. 1 , an embodiment of the novel character generating device is suitable for generating multiple characters, and includes an
該輸出模組1用於輸出多個文字。The
該儲存模組2用於儲存一用於生成該等文字的文字生成模型、至少一用於評分所生成之文字的評分條件、多個特定關鍵字、一初始值為空的候選字串、多個與金融相關的訓練語句、多個服務產品類別,及多個與優惠相關的優惠關鍵字,每一訓練語句對應有一待設定產品類別,及一待設定優惠屬性,每一服務產品類別包含多個產品類別關鍵字。The
參閱圖1,該文字生成裝置可為一平板電腦、一筆記型電腦、一伺服器或一個人電腦,但不以此為限。Referring to FIG. 1 , the text generating device may be a tablet computer, a notebook computer, a server or a personal computer, but not limited thereto.
以下將藉由一文字生成方法來說明該文字生成裝置的運作細節,並依序包含一用於建立該文字生成模型的模型建立程序,及一用於生成該等文字的字串生成程序。The operation details of the text generating device will be described below through a text generating method, and sequentially include a model building program for building the text generation model, and a string generating program for generating the text.
該模型建立程序包含一步驟61、一步驟62、一步驟63、一步驟64、一步驟65、一步驟66,及一步驟67。The model building procedure includes a
該字串生成程序包含一步驟71、一步驟72、一步驟73、一步驟74、一步驟75、一步驟76、一步驟77、一步驟78,及一步驟79。The string generating procedure includes a
參閱圖1與圖2,該模型建立程序包含以下步驟。Referring to Figures 1 and 2, the model building procedure includes the following steps.
在步驟61中,對於每一訓練語句,該處理模組3判定該儲存模組2存有的該訓練語句中是否存在對應該等服務產品類別中之一目標產品類別下的該等產品類別關鍵字之任一者。當判定該訓練語句中存在對應該目標產品下的該等產品類別關鍵字之任一者時,流程進行步驟62。當判定該訓練語句中不存在對應該目標產品下的該等產品類別關鍵字之任一者時,流程結束(亦即,不繼續進行優惠屬性設定)。In
在步驟62中,對於每一訓練語句,該處理模組3將該訓練語句所對應的該待設定產品類別設定為該目標產品類別。In
在步驟63中,對於每一訓練語句,該處理模組3判定該訓練語句中是否存在該等優惠關鍵字之任一者。當判定該訓練語句中存在該等優惠關鍵字之任一者時,流程進行步驟64。當判定該訓練語句中不存在該等優惠關鍵字之任一者時,流程進行步驟65。In
在步驟64中,對於每一訓練語句,該處理模組3將該訓練語句所對應的該待設定優惠屬性設定為有優惠的優惠屬性。In
在步驟65中,對於每一訓練語句,該處理模組3將該訓練語句所對應的該待設定優惠屬性設定為無優惠的優惠屬性。In
在步驟66中,對於每一訓練語句,該處理模組3根據該訓練語句、該訓練語句對應的目標產品類別,及該訓練語句對應的優惠屬性,編碼為一固定格式的訓練資料。In
舉例來說,該等訓練語句之其中一者若為一起來換匯吧,且對應的目標產品類別及優惠屬性分別為外幣及無,則編碼後的固定格式之訓練資料為<PRODUCT>外幣<DISCOUNT>無<SLOGAN>一起來換匯吧。For example, if one of these training sentences is to exchange foreign currency together, and the corresponding target product category and preferential attribute are foreign currency and none, then the encoded training data in a fixed format is <PRODUCT>foreign currency< DISCOUNT>No <SLOGAN> Let's exchange currency together.
在步驟67中,該處理模組3根據該等訓練資料,利用一機器學習演算法,建立該文字生成模型。其中,該機器學習演算法可為變換器神經網路(Transformer Neural Network)。In
參閱圖1與圖3,該字串生成程序包含以下步驟。Referring to FIG. 1 and FIG. 3 , the string generation process includes the following steps.
在步驟71中,該處理模組3接收到一包含一生成條件的生成請求後,將該生成條件編碼為該固定格式的待生成輸入資料,該生成條件包括一待生成產品類別,及一指示出該待生成產品類別是否有優惠的待生成優惠屬性。其中,該待生成產品類別為該等服務產品類別之其中一者。In
在步驟72中,該處理模組3根據該待生成輸入資料利用該儲存模組2存有的該文字生成模型生成N個候選文字。其中N可為20,但不以此為限。In
參閱圖1與圖4,值得特別說明的是,步驟72包含以下子步驟。Referring to FIG. 1 and FIG. 4 , it is worth noting that
在步驟721中,該處理模組3根據該待生成輸入資料利用該文字生成模型生成一個候選文字。In
在步驟722中,該處理模組3判定所有執行步驟721所生成的所有候選文字之一總字數是否大於等於N。當判定該總字數不大於等於N時,流程進行步驟723。當判定該總字數大於等於N時,流程進行步驟724。In
在步驟723中,該處理模組3將所有執行步驟721所生成的所有候選文字組合於該待生成輸入資料之後以作為又一待生成輸入資料,且流程回到步驟721。In
在步驟724中,該處理模組3將所有執行步驟721所生成的所有候選文字依序排列以獲得該等N個候選文字。In
在步驟73中,該處理模組3將該等N個候選文字加入該儲存模組2存有的該候選字串,以更新該候選字串。In
在步驟74中,對於每一評分條件,該處理模組3根據該儲存模組2儲存的該候選字串及該評分條件,獲得一相關於該候選字串的評分。In
參閱圖1與圖5,值得特別說明的是,該儲存模組2存有的該至少一評分條件包含用於判定該候選字串是否符合一語法規則、用於判定該候選字串中是否存在該等特定關鍵字之任一者,及用於判定該候選字串是否符合該生成條件之待生成產品類別,且步驟74包含以下子步驟。Referring to FIG. 1 and FIG. 5 , it is worth noting that the at least one scoring condition stored in the
在步驟741中,對於相關於該語法規則的該評分條件,該處理模組3將該候選字串進行一詞性標註,以獲得一相關於該候選字串的詞性標記結果。In
在步驟742中,該處理模組3判定該詞性標記結果是否符合該語法規則,以獲得相關於該候選字串的該評分。其中,該語法規則可為該候選字串中不可以連接詞(例如,和、並)作結尾,但不以此為限,且當該處理模組3判定該詞性標記結果符合該語法規則時所獲的該評分例如,3分,高於當判定不符合該語法規則時所獲得的該評分例如,1分。值得特別說明的是,在其他實施方式中,該語法規則亦可為判定該候選字串中之特殊關鍵字後是否存在關聯關鍵字,此時,該處理模組3即無須進行步驟741,而是判定該候選字串是否存在如,利率、利息、折扣等的該特殊關鍵字,且當判定存在該特殊關鍵字時,判定該特殊關鍵字之後是否存在如,9折、8%等的關聯關鍵字,但不以此為限;又或者,該語法規則亦可為判定該候選字串中是否相鄰出現金融相關詞彙,此時,該處理模組3即無須進行步驟741,而是判定該候選字串中是否相鄰出現金融相關詞彙(例如,888元888元),但不以此為限。In
在步驟743中,對於相關於該等特定關鍵字的該評分條件,該處理模組3判定該候選字串中是否存在該等特定關鍵字之任一者,以獲得相關於該候選字串的該評分。其中,該等特定關鍵字可為吸引客戶之詞彙(例如,優惠或折扣),但不以此為限,且當該處理模組3判定該候選字串中存在該等特定關鍵字之任一者時所獲的該評分例如,3分,高於當判定不存在該等特定關鍵字之任一者時所獲得的該評分例如,1分。值得特別說明的是,在其他實施方式中,該等特定關鍵字亦可為相關於公司規範的詞彙(例如,競爭公司的名稱或不雅文字等),且當該處理模組3判定該候選字串中存在該等特定關鍵字之任一者時所獲的該評分例如,1分,低於當判定不存在該等特定關鍵字之任一者時所獲得的該評分例如,3分,但不以此為限。In
在步驟744中,對於相關於該生成條件的該評分條件,該處理模組3判定該候選字串中是否存在對應該待生成產品類別下的該等產品類別關鍵字之任一者,以判定該候選字串是否符合該生成條件之待生成產品類別,進而獲得相關於該候選字串的該評分。其中,當該處理模組3判定該候選字串符合該待生成產品類別時所獲的該評分例如,3分,高於當判定不符合該待生成產品類別時所獲得的該評分例如,1分。In
在步驟75中,該處理模組3判定該至少一評分之總分是否大於一評分閥值。當該處理模組3判定該總分大於該評分閥值時,流程進行步驟76。當判定該總分不大於該評分閥值時,流程進行步驟78。In
在步驟76中,該處理模組3判定該候選字串是否符合一生成終止條件。當判定該候選字串符合該生成終止條件時,流程進行步驟77。當判定該候選字串不符合該生成終止條件時,流程進行步驟79。其中,該生成終止條件可為判定該候選字串中是否存有一相關於句尾(EOS, End of Sentence)的終止符號(例如,句號),或判定該候選字串之字數是否等於一輸出字數閥值,但不以此為限。In
在步驟77中,該處理模組3經由該輸出模組1輸出該候選字串。In
在步驟78中,該處理模組3清空該儲存模組2儲存的該候選字串,並將該待生成輸入資料設定為步驟71的該待生成輸入資料,且流程回到步驟72。In
在步驟79中,該處理模組3將該等N個候選文字組合於該待生成輸入資料之後以作為另一待生成輸入資料,且流程回到步驟72。In
綜上所述,本新型文字生成裝置,藉由該處理模組3根據該生成條件利用該文字生成模型生成N個候選文字並加入該候選字串,且根據該儲存模組2存有的該候選字串、該語法規則、該等特定關鍵字,及該生成條件之待生成產品類別,獲得相關於該候選字串的該總分,並判定該總分是否大於該評分閥值,當判定大於時,判定該候選字串是否符合生成終止條件,當判定符合時,輸出該等候選字串,藉此利用該至少一評分條件對所生成的N個候選文字評分以即時且自動地生成符合條件的字句,便能降低時間及人力成本,故確實能達成本新型的目的。To sum up, in the novel character generation device of the present invention, the processing module 3 uses the character generation model to generate N candidate characters according to the generation conditions and adds the candidate character string, and according to the The candidate string, the grammar rule, the specific keywords, and the product category to be generated for the generation condition, obtain the total score related to the candidate string, and determine whether the total score is greater than the scoring threshold, when determining When it is greater than , determine whether the candidate character string meets the generation termination condition, and when it is determined that the candidate character string is met, output the candidate character string, thereby using the at least one scoring condition to score the generated N candidate characters to instantly and automatically generate a matching Conditional words can reduce time and labor costs, so it can indeed achieve the purpose of this new model.
惟以上所述者,僅為本新型之實施例而已,當不能以此限定本新型實施之範圍,凡是依本新型申請專利範圍及專利說明書內容所作之簡單的等效變化與修飾,皆仍屬本新型專利涵蓋之範圍內。However, the above are only examples of the present invention, which should not limit the scope of the present invention. Any simple equivalent changes and modifications made according to the scope of the patent application for this new model and the contents of the patent specification are still within the scope of the present invention. within the scope of this new patent.
1:輸出模組
2:儲存模組
3:處理模組
61~67:步驟
71~79:步驟
721~724:步驟
741~744:步驟
1: output module
2: storage module
3:
本新型之其他的特徵及功效,將於參照圖式的實施方式中清楚地呈現,其中: 圖1是一方塊圖,說明本新型文字生成裝置之實施例; 圖2是一流程圖,說明利用本新型文字生成裝置之實施例實現一文字生成方法的一模型建立程序; 圖3是一流程圖,說明利用本新型文字生成裝置之實施例實現該文字生成方法的一字串生成程序; 圖4是一流程圖,說明該文字生成裝置如何逐字生成文字;及 圖5是一流程圖,說明該文字生成裝置如何獲得評分。 Other features and effects of the present invention will be clearly presented in the embodiments with reference to the drawings, wherein: FIG. 1 is a block diagram illustrating an embodiment of the novel character generation device of the present invention; FIG. 2 is a flow chart illustrating a model building procedure for realizing a character generation method using an embodiment of the novel character generation device; FIG. 3 is a flow chart illustrating a string generation program for realizing the character generation method using an embodiment of the novel character generation device; FIG. 4 is a flow chart illustrating how the text generating device generates text character by character; and FIG. 5 is a flow chart illustrating how the text generating apparatus obtains the score.
1:輸出模組 1: output module
2:儲存模組 2: storage module
3:處理模組 3: Processing modules
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW111201143U TWM629035U (en) | 2022-01-27 | 2022-01-27 | Character generator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW111201143U TWM629035U (en) | 2022-01-27 | 2022-01-27 | Character generator |
Publications (1)
Publication Number | Publication Date |
---|---|
TWM629035U true TWM629035U (en) | 2022-07-01 |
Family
ID=83437340
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW111201143U TWM629035U (en) | 2022-01-27 | 2022-01-27 | Character generator |
Country Status (1)
Country | Link |
---|---|
TW (1) | TWM629035U (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI823242B (en) * | 2022-01-27 | 2023-11-21 | 中國信託商業銀行股份有限公司 | Text generation method and device |
-
2022
- 2022-01-27 TW TW111201143U patent/TWM629035U/en unknown
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI823242B (en) * | 2022-01-27 | 2023-11-21 | 中國信託商業銀行股份有限公司 | Text generation method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20240078386A1 (en) | Methods and systems for language-agnostic machine learning in natural language processing using feature extraction | |
WO2021012645A1 (en) | Method and device for generating pushing information | |
CN108363790A (en) | For the method, apparatus, equipment and storage medium to being assessed | |
US10949753B2 (en) | Causal modeling and attribution | |
US20080215555A1 (en) | Hybrid Approach for Query Recommendation in Conversation Systems | |
JP2012160201A (en) | Review processing method and system | |
CN112507248A (en) | Tourist attraction recommendation method based on user comment data and trust relationship | |
WO2020199600A1 (en) | Sentiment polarity analysis method and related device | |
CN110134799B (en) | BM25 algorithm-based text corpus construction and optimization method | |
US11126783B2 (en) | Output apparatus and non-transitory computer readable medium | |
CN111737961B (en) | Method and device for generating story, computer equipment and medium | |
CN110874536A (en) | Corpus quality evaluation model generation method and bilingual sentence pair inter-translation quality evaluation method | |
CN111930792A (en) | Data resource labeling method and device, storage medium and electronic equipment | |
CN112487151A (en) | File generation method and device, storage medium and electronic equipment | |
CN112328857A (en) | Product knowledge aggregation method and device, computer equipment and storage medium | |
TWM629035U (en) | Character generator | |
CN112417155B (en) | Court trial query generation method, device and medium based on pointer-generation Seq2Seq model | |
Jin et al. | Towards improving coherence and diversity of slogan generation | |
CN113392218A (en) | Training method of text quality evaluation model and method for determining text quality | |
CN112632950A (en) | PPT generation method, device, equipment and computer-readable storage medium | |
CN113051894A (en) | Text error correction method and device | |
CN110222181B (en) | Python-based film evaluation emotion analysis method | |
CN111274384B (en) | Text labeling method, equipment and computer storage medium thereof | |
TWI823242B (en) | Text generation method and device | |
TWM638301U (en) | Computing device for generating marketing copywriting |