TWI822258B - Method and electiacal device for automatical generating text data and for revising text data - Google Patents

Method and electiacal device for automatical generating text data and for revising text data Download PDF

Info

Publication number
TWI822258B
TWI822258B TW111130822A TW111130822A TWI822258B TW I822258 B TWI822258 B TW I822258B TW 111130822 A TW111130822 A TW 111130822A TW 111130822 A TW111130822 A TW 111130822A TW I822258 B TWI822258 B TW I822258B
Authority
TW
Taiwan
Prior art keywords
sentence
text
sentences
adjusted
words
Prior art date
Application number
TW111130822A
Other languages
Chinese (zh)
Other versions
TW202409891A (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 TW111130822A priority Critical patent/TWI822258B/en
Application granted granted Critical
Publication of TWI822258B publication Critical patent/TWI822258B/en
Publication of TW202409891A publication Critical patent/TW202409891A/en

Links

Images

Landscapes

  • Machine Translation (AREA)
  • Electric Propulsion And Braking For Vehicles (AREA)

Abstract

A method for automatically generating text data by an electronic device is provided. The method includes receiving a plurality of text parameters, generating the text data including a plurality of sentences based on the text parameters, determining whether the text data includes an adjusting sentence set to be adjusted, and adjusting the adjusting sentence when the adjusting sentence exists, wherein the determining further includes obtaining a plurality of sentence phrases and their word classes from a specific sentence based on a first language model to determine whether the specific sentence is set as the adjusting sentence; and obtaining a plurality of neighboring phrases and their word classes from a plurality of neighboring sentences based on the first language model to determine a sentence relationship based on a second language model for determining whether one of the neighboring sentences is set as the adjusted sentence.

Description

文本自動生成方法與文本修改方法及其電子裝置 Automatic text generation method and text modification method and electronic device thereof

本發明涉及文本自動處理的領域,特別地,涉及一種文本自動生成的方法以及其電子裝置。 The present invention relates to the field of automatic text processing, and in particular, to a method for automatic text generation and an electronic device thereof.

雖然現在的各種文本生成技術日新月異,但現有的文本生成技術對於可供訓練的資料較少的特殊領域而言,仍會因訓練資料過少而無法使用大量文本進行模型訓練,導致生成語句不夠通順或前後文不連貫,而需要大量額外的時間進行修正。舉例來說:若要生成一份氣候相關的說明文件,可能會因使用者身邊的氣候相關文件的內容與數量較少,導致文本生成技術所需的訓練文本資訊不足,進而生成的文本會有語句不通順或前後文不連貫的狀況。 Although various text generation technologies are improving with each passing day, existing text generation technologies are still unable to use a large amount of text for model training due to too little training data for special fields with less training data, resulting in insufficient smoothness of generated sentences. Or the context is inconsistent and requires a lot of extra time to correct. For example: if you want to generate a climate-related explanation document, the content and quantity of climate-related documents around the user may be small, resulting in insufficient training text information required by the text generation technology, and the generated text will be The sentence is not fluent or the context is incoherent.

本發明是鑒於上述問題而完成的,提供一種通過至少一個電子裝置所進行的文本自動生成方法以及其電子裝置。 The present invention is completed in view of the above problems, and provides a method for automatically generating text through at least one electronic device and an electronic device thereof.

為了解決上述問題,該文本自動生成方法包括:接收多個文本參數;依據該多個文本參數生成一文本資訊,其中該文本資訊包括多個句 子;確認該多個句子中是否存在有一待調整句,其中該待調整句的該確認包括:透過一第一語言模型,從該多個句子中的特定一個句子取得多個單句詞彙以及各自的分詞詞性,並依據該多個單句詞彙的該多個分詞詞性,確認是否將該特定一個句子設定為該待調整句;及透過該第一語言模型,從該多個句子中的多個相鄰句子取得多個鄰近詞彙以及各自的分詞詞性,並依據該多個鄰近詞彙的該多個分詞詞性,透過一第二語言模型確認該多個相鄰句子之間的一句子關聯性,基於該句子關聯性確認是否將該多個相鄰句子中的其中一個句子設定為該待調整句;及當該文本資訊被確認為存在有該待調整句時,則調整該待調整句以完成該文本資訊。 In order to solve the above problem, the automatic text generation method includes: receiving multiple text parameters; generating text information based on the multiple text parameters, wherein the text information includes multiple sentences sub; confirming whether there is a sentence to be adjusted in the plurality of sentences, wherein the confirmation of the sentence to be adjusted includes: through a first language model, obtaining a plurality of single-sentence vocabulary and their respective words from a specific sentence in the plurality of sentences. Part-of-speech participles, and based on the plurality of part-partial speech parts of the plurality of single-sentence words, confirm whether the specific sentence is set as the sentence to be adjusted; and through the first language model, from the plurality of adjacent sentences in the plurality of sentences The sentence obtains multiple adjacent words and respective participles of speech, and based on the multiple participles of the multiple adjacent words, a sentence correlation between the multiple adjacent sentences is confirmed through a second language model, based on the sentence Relevance confirms whether one of the plurality of adjacent sentences is set as the sentence to be adjusted; and when the text information is confirmed to have the sentence to be adjusted, the sentence to be adjusted is adjusted to complete the text information .

在一實施例中,所述方法還包括:依據該特定一個句子中該多個單句詞彙的該多個分詞詞性的分布,取得一語法關係;及依據該語法關係,確認是否將該特定一個句子設定為該待調整句。 In one embodiment, the method further includes: obtaining a grammatical relationship based on the distribution of the plurality of word participles of the plurality of single-sentence words in the specific sentence; and based on the grammatical relationship, confirming whether the specific sentence is Set as the sentence to be adjusted.

在一實施例中,所述方法還包括:接收多個語法結構;依據該多個語法結構與該語法關係,確認該特定一個句子的一句構完整度;以及依據該句構完整度,確認該特定一個句子是否為該待調整句。 In one embodiment, the method further includes: receiving a plurality of grammatical structures; confirming the sentence structure completeness of the specific sentence based on the multiple grammatical structures and the grammatical relationship; and confirming the sentence structure completeness based on the sentence structure. Whether a specific sentence is the sentence to be adjusted.

在一實施例中,所述方法還包括:依據該多個鄰近詞彙的該多個分詞詞性,從該多個鄰近詞彙中篩選出多個目標詞彙;及針對該多個目標詞彙進行一關聯性分析,產生該多個相鄰句子的該句子關聯性。 In one embodiment, the method further includes: filtering out a plurality of target words from the plurality of adjacent words according to the plurality of word participles of the plurality of adjacent words; and performing a correlation on the plurality of target words. Analyze and generate the sentence relevance of the multiple adjacent sentences.

在一實施例中,所述方法還包括:依據該第二語言模型,確認該多個目標詞彙之間的多個詞彙關聯性;及依據該多個詞彙關聯性,確認該多個目標詞彙之間是否存在至少一組關聯詞彙。 In one embodiment, the method further includes: confirming a plurality of lexical correlations between the plurality of target words according to the second language model; and confirming a plurality of lexical correlations between the plurality of target words according to the plurality of lexical correlations. Whether there is at least one set of related words between

在一實施例中,所述方法還包括:當該多個目標詞彙之間存在該至少一組關聯詞彙時,依據該至少一組關聯詞彙確認該多個相鄰句子之間的該句子關聯性;及當該多個目標詞彙之間不存在該至少一組關聯詞彙 時,確認該多個相鄰句子之間的該句子關聯性,並確認該多個相鄰句子中的該其中一個句子為該待調整句。 In one embodiment, the method further includes: when there is at least one group of related words between the plurality of target words, confirming the sentence correlation between the plurality of adjacent sentences based on the at least one group of related words. ; and when there is no at least one set of related words between the plurality of target words. When, confirm the sentence relevance between the plurality of adjacent sentences, and confirm that one of the plurality of adjacent sentences is the sentence to be adjusted.

在一實施例中,當該至少兩個相鄰句子的數量為3個以上時,該其中一個句子為該多個句子中的一中間句子。 In one embodiment, when the number of the at least two adjacent sentences is more than 3, one of the sentences is an intermediate sentence among the plurality of sentences.

在一實施例中,所述方法還包括:當該文本資訊被確認為存在有該待調整句時,基於該文本參數判斷是否重新生成的新句子來取代該待調整句或直接刪除該待調整句,其中該文本資訊以及該重新生成的新句子皆基於一文本模型以及該文本參數所生成。 In one embodiment, the method further includes: when the text information is confirmed to contain the sentence to be adjusted, determining whether to regenerate a new sentence to replace the sentence to be adjusted or directly delete the sentence to be adjusted based on the text parameters. sentence, wherein the text information and the regenerated new sentence are generated based on a text model and the text parameters.

在一實施例中,所述電子裝置包括儲存器和至少一個處理器,所述儲存器中儲存有至少一個指令,所述至少一個指令被所述至少一個處理器執行時實現所述文本自動生成方法。 In one embodiment, the electronic device includes a storage and at least one processor, at least one instruction is stored in the storage, and when the at least one instruction is executed by the at least one processor, the text is automatically generated. method.

本發明是鑒於上述問題而完成的,提供一種通過至少一個電子裝置所進行的文本修改方法以及其電子裝置。 The present invention is completed in view of the above problems, and provides a text modification method performed by at least one electronic device and its electronic device.

為了解決上述問題,該文本修改方法包括:接收一文本資訊以及一文本參數,其中該文本資訊包括多個句子;確認該多個句子中是否存在有一待調整句,其中該待調整句的該確認包括:透過一第一語言模型,從該多個句子中的特定一個句子取得多個單句詞彙以及各自的分詞詞性,並依據該多個單句詞彙的該多個分詞詞性,確認是否將該特定一個句子設定為該待調整句;及透過該第一語言模型,從該多個句子中的多個相鄰句子取得多個鄰近詞彙以及各自的分詞詞性,並依據該多個鄰近詞彙的該多個分詞詞性,透過一第二語言模型確認該多個相鄰句子之間的一句子關聯性,基於該句子關聯性確認是否將該多個相鄰句子中的其中一個句子設定為該待調整句;及當該文本資訊被確認為存在有該待調整句時,基於該文本參數判斷是否需要生成一新句子以取代該待調整句。 In order to solve the above problem, the text modification method includes: receiving a text information and a text parameter, wherein the text information includes multiple sentences; confirming whether there is a sentence to be adjusted in the multiple sentences, wherein the confirmation of the sentence to be adjusted is The method includes: using a first language model to obtain a plurality of single-sentence words and their respective part-of-speech parts from a specific sentence among the plurality of sentences, and based on the plurality of part-word parts of speech of the multiple single-sentence words, confirm whether the specific one is The sentence is set as the sentence to be adjusted; and through the first language model, a plurality of adjacent words and their respective parts of speech are obtained from a plurality of adjacent sentences in the plurality of sentences, and based on the plurality of adjacent words Part-of-speech segmentation, confirming a sentence correlation between the plurality of adjacent sentences through a second language model, and confirming whether to set one of the plurality of adjacent sentences as the sentence to be adjusted based on the sentence correlation; And when it is confirmed that the text information contains the sentence to be adjusted, it is determined based on the text parameters whether a new sentence needs to be generated to replace the sentence to be adjusted.

在一實施例中,所述方法還包括:依據該特定一個句子中該多個單句詞彙的該多個分詞詞性的分布,取得一語法關係;及依據該語法關係,確認是否將該特定一個句子設定為該待調整句。 In one embodiment, the method further includes: obtaining a grammatical relationship based on the distribution of the plurality of word participles of the plurality of single-sentence words in the specific sentence; and based on the grammatical relationship, confirming whether the specific sentence is Set as the sentence to be adjusted.

在一實施例中,所述方法還包括:接收多個語法結構;依據該多個語法結構與該語法關係,確認該特定一個句子的一句構完整度;以及依據該句構完整度,確認該特定一個句子是否為該待調整句。 In one embodiment, the method further includes: receiving a plurality of grammatical structures; confirming the sentence structure completeness of the specific sentence based on the multiple grammatical structures and the grammatical relationship; and confirming the sentence structure completeness based on the sentence structure. Whether a specific sentence is the sentence to be adjusted.

在一實施例中,所述方法還包括:依據該多個鄰近詞彙的該多個分詞詞性,從該多個鄰近詞彙中篩選出多個目標詞彙;及針對該多個目標詞彙進行一關聯性分析,產生該多個相鄰句子的該句子關聯性。 In one embodiment, the method further includes: filtering out a plurality of target words from the plurality of adjacent words according to the plurality of word participles of the plurality of adjacent words; and performing a correlation on the plurality of target words. Analyze and generate the sentence relevance of the multiple adjacent sentences.

在一實施例中,所述方法還包括:依據該第二語言模型,確認該多個目標詞彙之間的多個詞彙關聯性;及依據該多個詞彙關聯性,確認該多個目標詞彙之間是否存在至少一組關聯詞彙。 In one embodiment, the method further includes: confirming a plurality of lexical correlations between the plurality of target words according to the second language model; and confirming a plurality of lexical correlations between the plurality of target words according to the plurality of lexical correlations. Whether there is at least one set of related words between

在一實施例中,所述方法還包括:當該多個目標詞彙之間存在該至少一組關聯詞彙時,依據該至少一組關聯詞彙確認該多個相鄰句子之間的該句子關聯性;及當該多個目標詞彙之間不存在該至少一組關聯詞彙時,確認該多個相鄰句子之間的該句子關聯性,並確認該多個相鄰句子中的該其中一個句子為該待調整句。 In one embodiment, the method further includes: when there is at least one group of related words between the plurality of target words, confirming the sentence correlation between the plurality of adjacent sentences based on the at least one group of related words. ; and when there is no at least one group of related words between the multiple target words, confirm the sentence relevance between the multiple adjacent sentences, and confirm that one of the multiple adjacent sentences is The sentence needs to be adjusted.

在一實施例中,當該至少兩個相鄰句子的數量為3個以上時,該其中一個句子為該多個句子中的一中間句子。 In one embodiment, when the number of the at least two adjacent sentences is more than 3, one of the sentences is an intermediate sentence among the plurality of sentences.

在一實施例中,所述方法還包括:當該文本資訊被確認為存在有該待調整句時,基於該文本參數判斷是否重新生成的新句子來取代該待調整句或直接刪除該待調整句,其中該文本資訊以及該重新生成的新句子皆基於一文本模型以及該文本參數所生成。 In one embodiment, the method further includes: when the text information is confirmed to contain the sentence to be adjusted, determining whether to regenerate a new sentence to replace the sentence to be adjusted or directly delete the sentence to be adjusted based on the text parameters. sentence, wherein the text information and the regenerated new sentence are generated based on a text model and the text parameters.

在一實施例中,所述電子裝置包括儲存器和至少一個處理器,所述儲存器中儲存有至少一個指令,所述至少一個指令被所述至少一個處理器執行時實現所述文本修改方法。 In one embodiment, the electronic device includes a storage and at least one processor, at least one instruction is stored in the storage, and when the at least one instruction is executed by the at least one processor, the text modification method is implemented. .

通過上述方式,文本自動生成方法或文本修改方法可透過第一語言模型以及第二語言模型,來確定該文本資訊中的不通順且不流暢的句子,並可確認該文本資訊的文句之間不連貫的地方,以補強文本生成的模型缺乏足夠的訓練文本時會發生之問題。因此,本發明之技術可分析並校正不夠通順或前後文不連貫的句子,使得輸出的文章可在符合所需主題的情況下,仍能維持通順的內容,進而確實減少後續校正文章內容所需的時間。 Through the above method, the automatic text generation method or the text modification method can determine the irregular and unfluent sentences in the text information through the first language model and the second language model, and can confirm that there are inconsistencies between the sentences in the text information. Coherence, a problem that occurs when a model that reinforces text generation lacks sufficient training text. Therefore, the technology of the present invention can analyze and correct sentences that are not smooth enough or have incoherent context, so that the output article can still maintain smooth content while complying with the required theme, thereby reducing the subsequent correction of article content. required time.

另一方面,通過上述方式,文本自動生成方法以及文本修改方法亦可透過第一語言模型以及第二語言模型下,依據不同的使用對象與使用情境選用不同的訓練文本,藉此使生成的文本能更加匹配實際所需的使用對象與使用情境。另外,甚至於可針對一個現成的文本資訊進行修改,使原本對應於一個使用對象的文本資訊,可以轉換成對應提供給另一個不同使用對象的文本資訊。 On the other hand, through the above method, the automatic text generation method and the text modification method can also select different training texts according to different usage objects and usage scenarios under the first language model and the second language model, thereby making the generated text It can better match the actual required use objects and usage situations. In addition, it is even possible to modify a ready-made text information, so that the text information originally corresponding to one user object can be converted into text information corresponding to another different user object.

10、20:文本系統 10, 20: Text system

11、21、31:電子裝置 11, 21, 31: Electronic devices

111、211、311:接收裝置 111, 211, 311: receiving device

112、212、312:傳送裝置 112, 212, 312: Transmission device

12、22:網路設備 12, 22: Network equipment

121、221:接收單元 121, 221: receiving unit

122、222:傳送單元 122, 222: Transmission unit

123、313:儲存器 123, 313: Storage

124、314:處理器 124, 314: Processor

1000:文本處理程序 1000: Text processing program

1100:文本生成模組 1100:Text generation module

1200:語句處理模組 1200: Statement processing module

1210:句內處理模組 1210: Intra-sentence processing module

1220:句間處理模組 1220: Inter-sentence processing module

231:第一處理伺服器 231:First processing server

232:第二處理伺服器 232: Secondary processing server

23n:第n處理伺服器 23n:nth processing server

400、500、600、700:方法 400, 500, 600, 700: Method

S410-S440、S510-S530、S610-S630、S710-S740:步驟 S410-S440, S510-S530, S610-S630, S710-S740: steps

為了更清楚地說明本申請實施方式或現有技術中的技術方案,下面將對實施方式或現有技術描述中所需要使用的附圖作簡單地介紹,顯而易見地,下面描述中的附圖僅僅是本申請的一些實施方式,對於本領域普通技術人員來講,在不付出創造性勞動的前提下,還可以根據這些附圖獲得其他的附圖。 In order to more clearly explain the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the purpose of describing the embodiments or the prior art. For some embodiments of the application, those of ordinary skill in the art can also obtain other drawings based on these drawings without exerting creative efforts.

圖1A是本發明一種通過至少一個電子裝置進行文本自動生成方法及/或文本修改方法的文本系統的方框圖。 1A is a block diagram of a text system according to the present invention that performs an automatic text generation method and/or a text modification method through at least one electronic device.

圖1B是本發明一種進行文本自動生成方法及/或文本修改方法的網路設備的方框圖。 FIG. 1B is a block diagram of a network device that performs an automatic text generation method and/or a text modification method according to the present invention.

圖2是本發明另一種通過至少一個電子裝置進行文本自動生成方法及/或文本修改方法的文本系統的方框圖。 FIG. 2 is a block diagram of another text system according to the present invention that performs an automatic text generation method and/or a text modification method through at least one electronic device.

圖3是本發明一種進行文本自動生成方法及/或文本修改方法的電子裝置的方框圖。 FIG. 3 is a block diagram of an electronic device for performing an automatic text generation method and/or a text modification method according to the present invention.

圖4是本發明提供一種通過至少一個電子裝置進行的文本自動生成方法的流程圖。 FIG. 4 is a flow chart of a method for automatically generating text through at least one electronic device according to the present invention.

圖5是本發明提供一種通過至少一個電子裝置進行的文本修改方法的流程圖。 FIG. 5 is a flow chart of a text modification method provided by at least one electronic device according to the present invention.

圖6是本發明提供一種通過至少一個電子裝置進行的句內分析方法的流程圖。 FIG. 6 is a flow chart of an intra-sentence analysis method provided by the present invention through at least one electronic device.

圖7是本發明提供一種通過至少一個電子裝置進行的句間分析方法的流程圖。 FIG. 7 is a flow chart of an inter-sentence analysis method provided by the present invention through at least one electronic device.

以下敘述含有與本發明中的示例性實施例相關的特定資訊。本發明中的附圖和其隨附的詳細敘述僅為示例性實施例。然而,本發明並不局限於此些示例性實施例。本領域技術人員將會想到本發明的其他變化與實施例。除非另有說明,否則附圖中的相同或對應的元件可由相同或對應的附圖標號指示。此外,本發明中的附圖與例示通常不是按比例繪製的,且非旨在與實際的相對尺寸相對應。 The following description contains specific information related to exemplary embodiments of the present invention. The drawings and detailed description accompanying this disclosure are merely exemplary embodiments. However, the present invention is not limited to these exemplary embodiments. Other variations and embodiments of the invention will occur to those skilled in the art. Unless otherwise stated, the same or corresponding elements in the drawings may be designated by the same or corresponding reference numerals. Furthermore, the drawings and illustrations in this disclosure are generally not to scale and are not intended to correspond to actual relative sizes.

出於一致性和易於理解的目的,在示例性附圖中藉由標號以標示相同特徵(雖在一些示例中並未如此標示)。然而,不同實施方式中的特徵在其他方面可能不同,因此不應狹義地局限於附圖所示的特徵。 For purposes of consistency and ease of understanding, identical features are identified by reference numbers in the illustrative drawings (although in some examples they are not). However, features in different embodiments may differ in other respects and therefore should not be narrowly limited to those shown in the drawings.

針對「至少一個實施方式」、「一實施方式」、「多個實施方式」、「不同的實施方式」、「一些實施方式」、「本實施方式」等用語,可指示如此描述的本發明實施方式可包括特定的特徵、結構或特性,但並不是本發明的每個可能的實施方式都必須包括特定的特徵、結構或特性。此外,重複地使用短語「在一實施方式中」、「在本實施方式」並不一定是指相同的實施方式,儘管它們可能相同。此外,諸如「實施方式」之類的短語與「本發明」關聯使用,並不意味本發明的所有實施方式必須包括特定特徵、結構或特性,並且應該理解為「本發明的至少一些實施方式」包括所述的特定特徵、結構或特性。術語「耦接」被定義為連接,無論是直接還是間接地透過中間元件作連接,且不一定限於實體連接。當使用術語「包括」時,意思是「包括但不限於」,其明確地指出所述的組合、群組、系列和均等物的開放式包含或關係。 Terms such as "at least one embodiment", "an embodiment", "multiple embodiments", "different embodiments", "some embodiments", "this embodiment", etc. may indicate the implementation of the invention so described. Modes may include specific features, structures, or characteristics, but not every possible embodiment of the invention must include a particular feature, structure, or characteristic. Furthermore, repeated use of the phrases "in one embodiment" and "in this embodiment" do not necessarily refer to the same embodiment, although they may be. Furthermore, phrases such as "embodiments" used in connection with "the present invention" do not mean that all embodiments of the invention must include a particular feature, structure or characteristic, and should be understood to mean "at least some embodiments of the invention" ” includes the specific features, structures or characteristics described. The term "coupled" is defined as a connection, whether directly or indirectly through intervening components, and is not necessarily limited to physical connections. When the term "includes" is used, it means "including but not limited to," which expressly indicates the open inclusion or relationship of stated combinations, groups, series, and equivalents.

另外,基於解釋和非限制的目的,闡述了諸如功能實體、技術、協定、標準等的具體細節以提供對所描述的技術的理解。在其他示例中,省略了眾所周知的方法、技術、系統、架構等的詳細描述,以避免說明敘述被不必要的細節混淆。 Additionally, for purposes of explanation and not limitation, specific details such as functional entities, technologies, protocols, standards, etc. are set forth to provide an understanding of the described technologies. In other examples, detailed descriptions of well-known methods, techniques, systems, architectures, etc. are omitted to avoid obscuring the narrative with unnecessary detail.

本發明的說明書及上述附圖中的術語「第一」、「第二」和「第三」等是用於區別不同物件,而非用於描述特定順序。此外,術語「包括」以及它們任何變形,意圖在於覆蓋不排他的包含。例如包含了一系列步驟或模組的過程、方法、系統、產品或設備沒有限定於已列出的步 驟或模組,而是可選地還包括沒有列出的步驟或模組,或可選地還包括對於這些過程、方法、產品或設備固有的其它步驟或模組。 The terms "first", "second" and "third" in the description of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than describing a specific sequence. Furthermore, the term "includes" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that consists of a sequence of steps or modules is not limited to the steps listed. steps or modules, but optionally also includes steps or modules not listed, or optionally also includes other steps or modules that are inherent to the process, method, product, or apparatus.

本領域技術人員將立即認識到本發明中敘述的任何運算功能或演算法可由硬體、軟體或軟體和硬體的組合實施方式。所敘述的功能可對應的模組可為軟體、硬體、韌體或其任何組合。軟體實施方式可包含儲存在諸如記憶體或其他類型的儲存器的電腦可讀媒體上的電腦可執行指令。例如,具有通信處理能力的一個或多個微處理器或通用電腦可用對應的可執行指令程式設計和執行所敘述的網路功能或演算法。處理器、微處理器或通用電腦可由專用積體電路ASIC(Applications Specific Integrated Circuitry)、可程式設計化邏輯陣列和/或使用一個或多個數位訊號處理器DSP(Digital Signal Processor)形成。儘管在本說明書中敘述的若干示例性實施方式傾向在電腦硬體上安裝和執行的軟體,但是,實施方式以韌體或硬體或硬體和軟體的組合的替代示例性實施方式亦在本發明的範圍內。 Those skilled in the art will immediately recognize that any computing function or algorithm described in this invention may be implemented by hardware, software, or a combination of software and hardware. The modules corresponding to the described functions may be software, hardware, firmware, or any combination thereof. Software implementations may include computer-executable instructions stored on computer-readable media such as memory or other types of storage. For example, one or more microprocessors or general purpose computers with communications processing capabilities may be programmed with corresponding executable instructions to design and execute the described network functions or algorithms. A processor, microprocessor or general-purpose computer may be formed by an Application Specific Integrated Circuit (ASIC), a programmable logic array, and/or use one or more Digital Signal Processors (DSP). Although several of the exemplary embodiments described in this specification are directed to software installed and executed on computer hardware, alternative exemplary embodiments in which the embodiments are implemented in firmware or hardware or a combination of hardware and software are also contemplated herein. within the scope of the invention.

儲存裝置可為電腦可讀媒體,其包括但不限於隨機存取記憶體RAM(Random Access Memory)、唯讀記憶體ROM(Read Only Memory)、可擦可程式設計唯讀記憶體EPROM(Erasable Programmable Read-Only Memory)、電可擦可程式設計唯讀記憶體EEPROM(Electrically Erasable Programmable Read-Only Memory)、快閃記憶體、光碟唯讀記憶體CD ROM(Compact Disc Read-Only Memory)、磁盒、磁帶、磁碟記憶體或任何其他能夠儲存電腦可讀指令的等效介質。 The storage device can be a computer-readable medium, including but not limited to RAM (Random Access Memory), ROM (Read Only Memory), and EPROM (Erasable Programmable Memory). Read-Only Memory), electrically erasable programmable read-only memory EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, compact disc read-only memory CD ROM (Compact Disc Read-Only Memory), magnetic cartridge , magnetic tape, disk memory, or any other equivalent medium capable of storing computer-readable instructions.

本發明各裝置之間的耦接可採用定制的協議或遵循現有標準或事實標準,包括但不限於乙太網、IEEE 802.11或IEEE 802.15系列、無線USB或電信標準(包括但不限於GSM(Global System for Mobile Communications,全球移動通信系統)、CDMA2000(Code Division Multiple Access,碼分多址技術)、TD-SCDMA(Time Division-Synchronization Code Division Multiple Access,時分同步的碼分多址技術)、WiMAX(World Interoperability for Microwave Access,全球微波接入互通性)、3GPP-LTE(Long Term Evolution,長期演進技術)或TD-LTE(Time Division Long Term Evolution,時分長期演進技術))。此外,本發明各裝置亦可各自包括被配置為將數據傳輸和/或儲存到電腦可讀介質並且從電腦可讀介質接收數據的任何設備。再者,本發明各裝置可包括電腦系統介面,該電腦系統介面可以使數據能夠儲存在存放裝置上或從存放裝置接收數據。例如:本發明各裝置可包括支援周邊元件連接(Peripheral Component Interconnec,PCI)和高速周邊元件連接(Peripheral Component Interconnect Express,PCIe)匯流排協定的晶片集、專用匯流排協定、通用序列匯流排(Universal Serial Bus,USB)協議、I2C、或任何其他可用於互連對等設備的邏輯和物理結構。 The coupling between the devices of the present invention can adopt customized protocols or follow existing standards or de facto standards, including but not limited to Ethernet, IEEE 802.11 or IEEE 802.15 series, wireless USB or telecommunications standards (including but not limited to GSM (Global) System for Mobile Communications, Global System for Mobile Communications), CDMA2000 (Code Division Multiple Access, code division multiple access technology), TD-SCDMA (Time Division-Synchronization Code Division Multiple Access, time division synchronization code division multiple access technology), WiMAX (World Interoperability for Microwave Access, global microwave access interoperability), 3GPP-LTE (Long Term Evolution, long-term evolution technology) or TD-LTE (Time Division Long Term Evolution, time division long-term evolution technology)). In addition, each apparatus of the present invention may also each include any device configured to transmit and/or store data to and receive data from a computer-readable medium. Furthermore, each device of the present invention may include a computer system interface that enables data to be stored on or received from the storage device. For example, each device of the present invention may include a chip set supporting peripheral component interconnect (Peripheral Component Interconnect, PCI) and high-speed peripheral component interconnect (Peripheral Component Interconnect Express, PCIe) bus protocols, dedicated bus protocols, and universal serial bus (Universal serial bus). Serial Bus (USB) protocol, I2C, or any other logical and physical structure that can be used to interconnect peer devices.

以下結合附圖實施例對本發明作進一步詳細描述。 The present invention will be described in further detail below with reference to the embodiments of the drawings.

請參閱圖1A,圖1A是本發明一種通過至少一個電子裝置進行文本自動生成方法及/或文本修改方法的文本系統10的方框圖。在一實施方式中,文本系統10包括電子裝置11以及網路設備12。電子裝置11可進一步包括接收裝置111以及傳送裝置112。在一實施方式中,在執行該文本自動生成方法或該文本修改方法時,接收裝置111可用於接收來自使用者所輸入的資訊。在一實施方式中,在執行該文本自動生成方法或該文本修改方法時,接收裝置111與傳送裝置112可與網路設備12進行耦接,藉此從傳送裝置112傳送資訊給網路設備12以及透過接收裝置111接收來自網路設備12 的資訊。在一實施方式中,當文本系統10完成該文本自動生成方法或該文本修改方法後,電子裝置11可與網路設備12停止耦接。 Please refer to FIG. 1A . FIG. 1A is a block diagram of a text system 10 that performs an automatic text generation method and/or a text modification method through at least one electronic device according to the present invention. In one embodiment, the text system 10 includes an electronic device 11 and a network device 12 . The electronic device 11 may further include a receiving device 111 and a transmitting device 112 . In one embodiment, when executing the automatic text generation method or the text modification method, the receiving device 111 may be used to receive information input from a user. In one embodiment, when executing the automatic text generation method or the text modification method, the receiving device 111 and the transmitting device 112 can be coupled with the network device 12 to thereby transmit information from the transmitting device 112 to the network device 12 and receiving data from the network device 12 through the receiving device 111 information. In one embodiment, after the text system 10 completes the automatic text generation method or the text modification method, the electronic device 11 may stop coupling with the network device 12 .

請參閱圖1B,圖1B是本發明一種進行文本自動生成方法及/或文本修改方法的網路設備12的方框圖。網路設備12可以包括但不限於單個網路服務器、多個網路服務器組成的伺服器組或基於雲計算(Cloud Computing)的由大量主機或網路服務器構成的雲。網路設備12所處的網路包括但不限於互聯網、廣域網路、都會區網路、局域網、虛擬私人網路(Virtual Private Network,VPN)等。網路設備12包括接收單元121、傳送單元122、儲存器123以及處理器124。 Please refer to FIG. 1B . FIG. 1B is a block diagram of a network device 12 that performs an automatic text generation method and/or a text modification method according to the present invention. The network device 12 may include, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of hosts or network servers based on cloud computing. The network where the network device 12 is located includes but is not limited to the Internet, wide area network, metropolitan area network, local area network, virtual private network (Virtual Private Network, VPN), etc. The network device 12 includes a receiving unit 121, a transmitting unit 122, a storage 123 and a processor 124.

處理器124與儲存器123相互耦接。儲存器123儲存多個指令,以供處理器124依據儲存器123所儲存的該多個指令,執行該文本自動生成方法或該文本修改方法。為完成本發明之該文本自動生成方法或該文本修改方法,儲存器123儲存了文本處理程序1000。在所述實施方式中,文本處理程序1000進一步包括文本生成模組1100以及語句處理模組1200。文本生成模組1100可用於生成包括多個句子的文本資訊,以及生成新的句子以插入到該文本資訊中。語句處理模組1200可用於判斷該文本資訊的該多個句子中是否存在著需要調整的句子,並將其設置待調整句。語句處理模組1200進一步包括句內處理模組1210以及句間處理模組1220。句內處理模組1210可針對該文本資訊中的每一個單一句子進行分析,以逐一確認每一個單一句子是否被設定為該待調整句。句間處理模組1220可針對該文本資訊中的多個相鄰句子進行分析,以確認該相鄰句子之間是否存在有需要設置為該待調整句的句子。 The processor 124 and the storage 123 are coupled to each other. The storage 123 stores a plurality of instructions for the processor 124 to execute the automatic text generation method or the text modification method according to the plurality of instructions stored in the storage 123 . In order to complete the automatic text generation method or the text modification method of the present invention, the storage 123 stores a text processing program 1000. In the embodiment, the text processing program 1000 further includes a text generation module 1100 and a sentence processing module 1200. The text generation module 1100 can be used to generate text information including multiple sentences, and generate new sentences to be inserted into the text information. The sentence processing module 1200 can be used to determine whether there are sentences that need to be adjusted among the multiple sentences of the text information, and set the sentences to be adjusted. The sentence processing module 1200 further includes an intra-sentence processing module 1210 and an inter-sentence processing module 1220. The intra-sentence processing module 1210 can analyze each single sentence in the text information to confirm whether each single sentence is set as the sentence to be adjusted. The inter-sentence processing module 1220 can analyze multiple adjacent sentences in the text information to confirm whether there is a sentence between the adjacent sentences that needs to be set as the sentence to be adjusted.

接收單元121以及傳送單元122可利用自訂協議或遵循現有標準或實際標準,包括但不限於乙太網、IEEE 802.11或IEEE 802.15系列、無 線USB或電信標準(包括但不限於GSM、CDMA2000、TD-SCDMA、WiMAX、3GPP-LTE或TD-LTE),以藉此與電子裝置11的接收裝置111以及傳送裝置112之間進行資料傳輸。在一實施方式中,該傳輸的資料可包括文本資訊以及針對該文本資訊所設定的多個文本參數。 The receiving unit 121 and the transmitting unit 122 may use customized protocols or follow existing standards or actual standards, including but not limited to Ethernet, IEEE 802.11 or IEEE 802.15 series, wireless USB or telecommunications standards (including but not limited to GSM, CDMA2000, TD-SCDMA, WiMAX, 3GPP-LTE or TD-LTE) to transmit data with the receiving device 111 and the transmitting device 112 of the electronic device 11 . In one implementation, the transmitted data may include text information and a plurality of text parameters set for the text information.

請參閱圖2,圖2是本發明另一種通過至少一個電子裝置進行文本自動生成方法及/或文本修改方法的文本系統20的方框圖。在一實施方式中,文本系統20包括電子裝置21、網路設備22以及至少一個處理伺服器。在一實施方式中,該至少一個處理伺服器的數量可以是n個,數值n可以為1、2、3等大於零的正整數。在一實施方式中,該至少一個處理伺服器可包括第一處理伺服器231、第二處理伺服器232、…以及第n處理伺服器23n。 Please refer to FIG. 2. FIG. 2 is a block diagram of another text system 20 of the present invention that performs an automatic text generation method and/or a text modification method through at least one electronic device. In one embodiment, the text system 20 includes an electronic device 21, a network device 22, and at least one processing server. In one embodiment, the number of the at least one processing server may be n, and the value n may be a positive integer greater than zero, such as 1, 2, 3, or the like. In one embodiment, the at least one processing server may include a first processing server 231, a second processing server 232, ... and an nth processing server 23n.

電子裝置21可進一步包括接收裝置211以及傳送裝置212。在一實施方式中,在執行該文本自動生成方法或該文本修改方法時,接收裝置211可用於接收來自使用者所輸入的資訊。在一實施方式中,在執行該文本自動生成方法或該文本修改方法時,接收裝置211與傳送裝置212可與網路設備22進行耦接,藉此從傳送裝置212傳送資訊給網路設備22以及透過接收裝置211接收來自網路設備22的資訊。在一實施方式中,當文本系統20完成該文本自動生成方法或該文本修改方法後,電子裝置21可與網路設備22停止耦接。 The electronic device 21 may further include a receiving device 211 and a transmitting device 212 . In one embodiment, when executing the automatic text generation method or the text modification method, the receiving device 211 may be used to receive information input from a user. In one embodiment, when executing the automatic text generation method or the text modification method, the receiving device 211 and the transmitting device 212 can be coupled with the network device 22, thereby transmitting information from the transmitting device 212 to the network device 22. and receiving information from the network device 22 through the receiving device 211. In one embodiment, after the text system 20 completes the automatic text generation method or the text modification method, the electronic device 21 may stop coupling with the network device 22 .

網路設備22可進一步包括接收單元221以及傳送單元222。在一實施方式中,在執行該文本自動生成方法或該文本修改方法時,接收單元221可用於接收來自電子裝置21的使用者輸入資訊。在一實施方式中,在執行該文本自動生成方法或該文本修改方法時,接收單元221與傳送單元222可與該至少一個處理伺服器進行耦接,藉此從傳送單元222傳送資訊給 該至少一個處理伺服器以及透過接收單元221接收來自該至少一個處理伺服器的資訊。在一實施方式中,傳送單元222亦可傳送該文本自動生成方法或該文本修改方法的處理結果給電子裝置21。在一實施方式中,當文本系統20完成該文本自動生成方法或該文本修改方法後,網路設備22可與電子裝置21以及該至少一個處理伺服器停止耦接。 The network device 22 may further include a receiving unit 221 and a transmitting unit 222. In one embodiment, when executing the automatic text generation method or the text modification method, the receiving unit 221 may be used to receive user input information from the electronic device 21 . In one embodiment, when executing the automatic text generation method or the text modification method, the receiving unit 221 and the transmitting unit 222 may be coupled to the at least one processing server, thereby transmitting information from the transmitting unit 222 to The at least one processing server receives information from the at least one processing server through the receiving unit 221 . In one embodiment, the transmitting unit 222 can also transmit the processing results of the automatic text generation method or the text modification method to the electronic device 21 . In one embodiment, after the text system 20 completes the text automatic generation method or the text modification method, the network device 22 may stop coupling with the electronic device 21 and the at least one processing server.

該至少一個處理伺服器可各自包括對應的處理元件(圖未示出)、儲存元件(圖未示出)、接收元件(圖未示出)以及傳送元件(圖未示出)。在一實施方式中,在執行該文本自動生成方法或該文本修改方法時,該至少一個處理伺服器的各個接收元件以及傳送元件可各自與網路設備22耦接,並藉此接收網路設備22所傳送的資訊並回傳處理後的結果給網路設備22。此外,在該至少一個處理伺服器的各自接收元件接收到來自該網路設備22的資訊後,各個處理元件會依據對應的儲存元件中所儲存的處理程序,利用所接收的資訊來產生對應的處理結果。在一實施方式中,當該至少一個處理伺服器完成各自的處理並回傳處理結果給網路設備22後,該至少一個處理伺服器可與網路設備22停止耦接。 The at least one processing server may each include a corresponding processing component (not shown), a storage component (not shown), a receiving component (not shown), and a transmitting component (not shown). In one embodiment, when executing the text automatic generation method or the text modification method, each receiving element and transmitting element of the at least one processing server can be coupled to the network device 22, and thereby receive the network device 22. 22 and return the processed results to the network device 22. In addition, after the respective receiving components of the at least one processing server receive the information from the network device 22, each processing component will use the received information to generate the corresponding processing program according to the processing program stored in the corresponding storage component. Process the results. In one embodiment, after the at least one processing server completes its respective processing and returns the processing results to the network device 22, the at least one processing server may stop coupling with the network device 22.

請合併參閱圖1B以及圖2,文本處理程序1000可被分拆為多個子程序,並將該多個子程序分散在網路設備22以及該至少一個處理伺服器中。在一實施方式中,網路設備22另具有一程序分配模組(圖未示出)。該程序分配模組用於依據該多個子程序的分散狀況,來分派傳送單元222應將所需傳送的資訊傳送給哪一個接收對象。 Please refer to FIG. 1B and FIG. 2 together. The text processing program 1000 can be split into multiple subroutines, and the multiple subroutines are dispersed in the network device 22 and the at least one processing server. In one embodiment, the network device 22 also has a program distribution module (not shown). The program allocation module is used to allocate which receiving object the transmission unit 222 should transmit the required transmission information to according to the distribution status of the multiple subprograms.

在一實施方式中,網路設備22的該子程序僅包括該程序分配模組,而該至少一處理伺服器可各自包括文本生成模組1100、句內處理模組1210以及句間處理模組1220中的至少一個。舉例來說,當數值n等於3時,第一處理伺服器231的該子程序包括文本生成模組1100,第二處理伺服器 232的該子程序包括句內處理模組1210,而第n處理伺服器23n的該子程序包括句間處理模組1220。在另一實施方式中,當數值n等於2時,第一處理伺服器231的該子程序包括文本生成模組1100,第n處理伺服器23n的該子程序包括句內處理模組1210以及句間處理模組1220。換言之,第n處理伺服器23n的該子程序包括語句處理模組1200。在又一實施方式中,當數值n等於2時,第一處理伺服器231的該子程序包括文本生成模組1100以及句內處理模組1210,而第n處理伺服器23n的該子程序包括句間處理模組1220,或第n處理伺服器23n的該子程序同時包括文本生成模組1100以及句間處理模組1220,藉此句內處理模組1210以及句間處理模組1220在不同的處理伺服器完成判斷後,可直接透過各自對應的文本生成模組1100對該文本資訊進行調整。另外,在一實施方式中,當數值n等於1時,第一處理伺服器231的該子程序包括文本生成模組1100、句內處理模組1210以及句間處理模組1220。換言之,第一處理伺服器231的該子程序包括文本生成模組1100以及語句處理模組1200。 In one embodiment, the subroutine of the network device 22 only includes the program distribution module, and the at least one processing server may each include a text generation module 1100, an intra-sentence processing module 1210, and an inter-sentence processing module. At least one of 1220. For example, when the value n is equal to 3, the subroutine of the first processing server 231 includes the text generation module 1100, and the second processing server 231 The subroutine of 232 includes an intra-sentence processing module 1210, and the subroutine of the nth processing server 23n includes an inter-sentence processing module 1220. In another embodiment, when the value n is equal to 2, the subroutine of the first processing server 231 includes the text generation module 1100, and the subroutine of the nth processing server 23n includes the intra-sentence processing module 1210 and the sentence processing module 1210. Intermediate processing module 1220. In other words, the subroutine of the nth processing server 23n includes the statement processing module 1200. In yet another embodiment, when the value n is equal to 2, the subroutine of the first processing server 231 includes the text generation module 1100 and the intra-sentence processing module 1210, and the subroutine of the nth processing server 23n includes The inter-sentence processing module 1220, or the subroutine of the n-th processing server 23n includes both the text generation module 1100 and the inter-sentence processing module 1220, whereby the intra-sentence processing module 1210 and the inter-sentence processing module 1220 are configured in different After the processing server completes the judgment, it can directly adjust the text information through its corresponding text generation module 1100. In addition, in one embodiment, when the value n is equal to 1, the subroutine of the first processing server 231 includes a text generation module 1100, an intra-sentence processing module 1210, and an inter-sentence processing module 1220. In other words, the subroutine of the first processing server 231 includes the text generation module 1100 and the sentence processing module 1200.

在一實施方式中,網路設備22的該子程序除了包括該程序分配模組外亦可包括其他模組。換言之,文本生成模組1100、句內處理模組1210以及句間處理模組1220可各自分散於網路設備22以及該至少一個處理伺服器。舉例來說,當數值n等於2時,網路設備22的該子程序包括文本生成模組1100,第一處理伺服器231的該子程序包括句內處理模組1210,或第一處理伺服器231的該子程序同時包括文本生成模組1100以及句內處理模組1210,第n處理伺服器23n的該子程序包括句間處理模組1220,或第n處理伺服器23n的該子程序同時包括文本生成模組1100以及句間處理模組1220。在另一實施方式中,當數值n等於1時,網路設備22的該子程序包括文本生成模組1100,第一處理伺服器231的該子程序包括語句處理模組 1200,或第一處理伺服器231的該子程序同時包括文本生成模組1100以及語句處理模組1200。在又一實施方式中,當數值n等於1時,網路設備22的該子程序包括語句處理模組1200,第一處理伺服器231的該子程序包括文本生成模組1100。在上述所有實施方式中,僅為表示文本處理程序1000中的各個模組可分拆並分散到網路設備22以及該至少一個處理伺服器中。然而,實際的分散方式並不限於上述所舉例的分散方式,亦可透過其他的分散方式來分散各個模組在不同處理裝置上的負荷量。 In one embodiment, the subroutine of the network device 22 may also include other modules in addition to the program distribution module. In other words, the text generation module 1100, the intra-sentence processing module 1210, and the inter-sentence processing module 1220 can each be distributed in the network device 22 and the at least one processing server. For example, when the value n is equal to 2, the subroutine of the network device 22 includes the text generation module 1100, and the subroutine of the first processing server 231 includes the intra-sentence processing module 1210, or the first processing server The subroutine of 231 includes both the text generation module 1100 and the intra-sentence processing module 1210, the subroutine of the nth processing server 23n includes the inter-sentence processing module 1220, or the subroutine of the nth processing server 23n simultaneously It includes a text generation module 1100 and an inter-sentence processing module 1220. In another embodiment, when the value n is equal to 1, the subroutine of the network device 22 includes the text generation module 1100, and the subroutine of the first processing server 231 includes a statement processing module. 1200, or the subroutine of the first processing server 231 includes both the text generation module 1100 and the statement processing module 1200. In yet another embodiment, when the value n is equal to 1, the subroutine of the network device 22 includes the statement processing module 1200, and the subroutine of the first processing server 231 includes the text generation module 1100. In all the above embodiments, it only means that each module in the text processing program 1000 can be detached and distributed to the network device 22 and the at least one processing server. However, the actual dispersion method is not limited to the above-exemplified dispersion method, and other dispersion methods can also be used to distribute the load of each module on different processing devices.

在一實施方式中,文本處理程序1000中的各個模組,亦可能由電子裝置21自行處理。在一實施方式中,電子裝置21具有一儲存裝置(圖未示出)來儲存至少其中一個子程序。舉例來說,電子裝置21可具有文本處理程序1000,以自行生成該文本資訊,並透過傳送裝置212來傳送給該網路設備22。在另一實施方式中,電子裝置21可具有語句處理模組1200當中的至少一個模組,以將從網路設備22或其他來源所提供的該文本資訊進行語句處理。 In one implementation, each module in the text processing program 1000 may also be processed by the electronic device 21 itself. In one embodiment, the electronic device 21 has a storage device (not shown) to store at least one of the subroutines. For example, the electronic device 21 may have a text processing program 1000 to generate the text information by itself and transmit it to the network device 22 through the transmission device 212 . In another embodiment, the electronic device 21 may have at least one module among the sentence processing modules 1200 to perform sentence processing on the text information provided from the network device 22 or other sources.

請參閱圖3,圖3是本發明一種進行文本自動生成方法及/或文本修改方法的電子裝置31的方框圖。在一實施方式中,電子裝置31包括行動電話、平板電腦、臺式電腦、筆記型電腦或其他電子設備等,在此不作限定。電子裝置31包括接收裝置311、傳送裝置312、儲存器313以及處理器314。 Please refer to FIG. 3. FIG. 3 is a block diagram of an electronic device 31 that performs an automatic text generation method and/or a text modification method according to the present invention. In one embodiment, the electronic device 31 includes a mobile phone, a tablet computer, a desktop computer, a notebook computer, or other electronic equipment, which is not limited here. The electronic device 31 includes a receiving device 311 , a transmitting device 312 , a storage 313 and a processor 314 .

處理器314與儲存器313相互耦接。儲存器313儲存多個指令,以供處理器314依據儲存器313所儲存的該多個指令,執行該文本自動生成方法或該文本修改方法。請合併參考圖1B以及圖3,為完成本發明之該文本自動生成方法或該文本修改方法,儲存器313可單獨儲存了文本處理程序1000。在所述實施方式中,圖3所述的文本處理程序1000與圖1B所述的文 本處理程序1000相同。意即,電子裝置31可藉由內存的文本處理程序1000自行完成該文本自動生成方法或該文本修改方法。 The processor 314 and the storage 313 are coupled to each other. The storage 313 stores a plurality of instructions for the processor 314 to execute the automatic text generation method or the text modification method according to the plurality of instructions stored in the storage 313 . Please refer to FIG. 1B and FIG. 3 together. In order to complete the automatic text generation method or the text modification method of the present invention, the storage 313 can separately store the text processing program 1000. In the embodiment, the text processing program 1000 shown in FIG. 3 is the same as the text processing program 1000 shown in FIG. 1B. This handler is the same as 1000. That is to say, the electronic device 31 can complete the automatic text generation method or the text modification method by itself through the text processing program 1000 in the memory.

接收裝置311以及傳送裝置312可利用自訂協議或遵循現有標準或實際標準,包括但不限於乙太網、IEEE 802.11或IEEE 802.15系列、無線USB或電信標準(包括但不限於GSM、CDMA2000、TD-SCDMA、WiMAX、3GPP-LTE或TD-LTE),以藉此與其他電子裝置進行資料傳輸。在一實施方式中,該傳輸的資料可包括該文本自動生成方法或該文本修改方法所需的多個語言模型或訓練該多個語言模型所各自需要的多個模型訓練集。在一實施方式中,接收裝置311亦可接收來自使用者的輸入資訊。 The receiving device 311 and the transmitting device 312 may utilize customized protocols or follow existing standards or actual standards, including but not limited to Ethernet, IEEE 802.11 or IEEE 802.15 series, wireless USB or telecommunications standards (including but not limited to GSM, CDMA2000, TD -SCDMA, WiMAX, 3GPP-LTE or TD-LTE) to transmit data with other electronic devices. In one embodiment, the transmitted data may include multiple language models required by the automatic text generation method or the text modification method, or multiple model training sets required for training the multiple language models. In one embodiment, the receiving device 311 can also receive input information from the user.

圖4是本發明提供一種通過至少一個電子裝置進行的文本自動生成方法400的流程圖。因為存在多種用於執行所述文本自動生成方法400的方式,因此圖4所示的文本自動生成方法400僅是示例。文本自動生成方法400可使用圖1A、圖1B、圖2及圖3所展示的配置或其他配置方式來執行,並且在說明文本自動生成方法400的同時,請合併參考圖1A、圖1B、圖2及圖3中的各種元件。圖4中顯示的每個步驟可表示所執行的一個或多個過程、方法或子程式,且每個步驟的順序可任意的調整,並不使文本自動生成方法400的本質脫離文本自動生成方法400的技術方案的範圍。 FIG. 4 is a flow chart of a method 400 for automatically generating text through at least one electronic device according to the present invention. Because there are multiple ways to perform the automatic text generation method 400, the automatic text generation method 400 shown in FIG. 4 is only an example. The automatic text generation method 400 can be executed using the configuration shown in FIGS. 1A, 1B, 2, and 3 or other configurations. While describing the automatic text generation method 400, please refer to FIGS. 1A, 1B, and FIG. 2 and the various components in Figure 3. Each step shown in Figure 4 may represent one or more processes, methods or subroutines executed, and the order of each step may be adjusted arbitrarily, without making the essence of the automatic text generation method 400 deviate from the automatic text generation method. 400 range of technical solutions.

在步驟S410中,接收多個文本參數。 In step S410, multiple text parameters are received.

在一實施方式中,使用者向電子裝置輸入文本參數,以利文本生成模組1100可依據該文本參數來產生文本資訊。在一實施方式中,當該文本生成模組1100位於網路設備12時,電子裝置11可藉由接收裝置111接收該文本參數,並藉由傳送裝置112提供給該網路設備12。在另一實施方式中,當該文本生成模組1100位於第一處理伺服器231時,電子裝置21可藉由接收裝置211接收該文本參數,並藉由傳送裝置212提供給該網路設備 22的接收單元221,並透過傳送單元222提供給第一處理伺服器231。在又一實施方式中,當該文本生成模組1100位於電子裝置31本身時,電子裝置31可藉由接收裝置311接收該文本參數後,進行後續的步驟。 In one embodiment, the user inputs text parameters into the electronic device so that the text generation module 1100 can generate text information based on the text parameters. In one embodiment, when the text generation module 1100 is located in the network device 12, the electronic device 11 can receive the text parameters through the receiving device 111 and provide them to the network device 12 through the transmitting device 112. In another embodiment, when the text generation module 1100 is located in the first processing server 231, the electronic device 21 can receive the text parameter through the receiving device 211 and provide it to the network device through the transmitting device 212. 22 of the receiving unit 221 and provided to the first processing server 231 through the transmitting unit 222. In another embodiment, when the text generation module 1100 is located on the electronic device 31 itself, the electronic device 31 can receive the text parameters through the receiving device 311 and then perform subsequent steps.

在步驟S420中,依據該多個文本參數生成一文本資訊,其中該文本資訊包括多個句子。 In step S420, a text information is generated according to the plurality of text parameters, wherein the text information includes a plurality of sentences.

在一實施方式中,當文本生成模組1100收到該文本參數後,文本生成模組1100會依據該文本參數並透過一文本模型而生成該文本資訊。在一實施方式中,該文本模型可透過第一神經網路架構所建立,該第一神經網路架構可為變換器基底模型(Transformer-based Model)。舉例來說,該第一神經網路架構可為生成型已訓練變換GPT(Generative Pre-trained Transformer)模型,例如:GPT-1、GPT-2以及GPT-3。在一實施方式中,該文本參數可為一關鍵字詞、一關鍵句或文本需求字數等參數,用以限制所生成的該文本資訊的內容或字數。 In one embodiment, after the text generation module 1100 receives the text parameter, the text generation module 1100 generates the text information based on the text parameter and through a text model. In one implementation, the text model can be established through a first neural network architecture, and the first neural network architecture can be a Transformer-based Model. For example, the first neural network architecture may be a generative pre-trained transformer (GPT) model, such as GPT-1, GPT-2, and GPT-3. In one implementation, the text parameter may be a keyword, a key sentence, or a required number of words in the text, which are used to limit the content or number of words of the generated text information.

在一實施方式中,該文本模型可透過事先提供一第一訓練資料集給該第一神經網路架構進行訓練。在一實施方式中,該第一訓練資料集可依據使用者的需求事先選擇需要的主題來準備。在一實施方式中,若所選之主題的資料豐富,即可訓練出較完整的該文本模型,使該文本模型可生成較完整且通順的文章。然而,若所選的主題訊息較少,將導致訓練出來的該文本模型不易產生完整且通順的文章。 In one implementation, the text model can be trained by providing a first training data set to the first neural network architecture in advance. In one implementation, the first training data set can be prepared by selecting the required topics in advance according to the user's needs. In one implementation, if the selected topic has abundant information, a more complete text model can be trained, so that the text model can generate a more complete and fluent article. However, if the selected topic contains less information, it will be difficult for the trained text model to produce a complete and smooth article.

在一實施方式中,就算所選主題訊息較少,導致訓練出來的該文本模型無法產生完整且通順的文章時,文本自動生成方法400仍可靠後續步驟的判斷與調整,來產生完整且通順的文章。在一實施方式中,若所選之主題的資料豐富,訓練出來的該文本模型亦可產生完整且通順的文章 時,文本自動生成方法400仍可靠後續步驟的判斷與調整,來將已生成的該文本資訊進一步的調整成另一種樣態,來適應另一種文本需求。 In one embodiment, even if the selected topic information is small and the trained text model cannot generate a complete and smooth article, the automatic text generation method 400 can still rely on the judgment and adjustment of subsequent steps to generate a complete and smooth article. Shun article. In one implementation, if the selected topic has rich data, the trained text model can also generate a complete and fluent article. At this time, the automatic text generation method 400 can still rely on the judgment and adjustment in subsequent steps to further adjust the generated text information into another form to adapt to another text requirement.

在步驟S430中,確認該多個句子中是否存在有一待調整句。 In step S430, it is confirmed whether there is a sentence to be adjusted among the plurality of sentences.

在一實施方式中,當語句處理模組1200收到該文本資訊後,語句處理模組1200會依據第一語言模型及/或第二語言模型來判斷該多個句子中是否存在有需要調整的句子。在一實施方式中,該第一語言模型可透過第二神經網路架構所建立,而該第二語言模型可透過第三神經網路架構所建立。在一實施方式中,該第二神經網路架構可為循環神經網路RNN(Recurrent Neural Network),而該第三神經網路架構可為循環神經網路NN(Neural Network)。 In one embodiment, after the sentence processing module 1200 receives the text information, the sentence processing module 1200 determines whether there are any errors in the sentences that need to be adjusted based on the first language model and/or the second language model. sentence. In one implementation, the first language model can be established through a second neural network architecture, and the second language model can be established through a third neural network architecture. In one embodiment, the second neural network architecture may be a Recurrent Neural Network (RNN), and the third neural network architecture may be a Recurrent Neural Network (NN).

在一實施方式中,語句處理模組1200可透過該第一語言模型分別針對該文本資訊中的每一個句子進行分析。在一實施方式中,語句處理模組1200可透過該第一語言模型逐一對每一個句子進行分析。若確認其中一個句子為該待調整句後,可直接刪除該待調整句,或透過文本生成模組1100重新生成一個句子來取代該待調整句。在一實施方式中,語句處理模組1200仍可透過該第一語言模型,針對重新生成的句子再次判斷是否須設定為該待調整句。 In one implementation, the sentence processing module 1200 can analyze each sentence in the text information through the first language model. In one implementation, the sentence processing module 1200 can analyze each sentence one by one through the first language model. If one of the sentences is confirmed to be the sentence to be adjusted, the sentence to be adjusted can be deleted directly, or a sentence to be adjusted can be regenerated through the text generation module 1100 to replace the sentence to be adjusted. In one implementation, the sentence processing module 1200 can still use the first language model to determine again whether the regenerated sentence needs to be set as the sentence to be adjusted.

在一實施方式中,語句處理模組1200可透過該第二語言模型分別針對該文本資訊中的多個相鄰句子進行分析。在一實施方式中,該多個相鄰句子可以為兩個相鄰句子。在另一實施方式中,該多個相鄰句子可以為三個或更多連續的句子。當語句處理模組1200確認該多個相鄰句子出現句意不連續的情況時,語句處理模組1200可設定其中一個句子為該待調整句後,可直接刪除該待調整句,或透過文本生成模組1100重新生成一個句子來取代該待調整句。在一實施方式中,當該多個相鄰句子為兩個相鄰句 子時,語句處理模組1200可預先設定應選取前方句子或後方句子作為該待調整句。在一實施方式中,當該多個相鄰句子為三個連續句子時,語句處理模組1200可預先設定應選取前方句子、中間句子或後方句子作為該待調整句。在一實施方式中,語句處理模組1200仍可透過該第一語言模型及/或該第二語言模型,針對重新生成的句子再次判斷是否須設定為該待調整句。 In one embodiment, the sentence processing module 1200 can analyze multiple adjacent sentences in the text information through the second language model. In one implementation, the plurality of adjacent sentences may be two adjacent sentences. In another embodiment, the plurality of adjacent sentences may be three or more consecutive sentences. When the sentence processing module 1200 confirms that the sentence meanings of the multiple adjacent sentences are discontinuous, the sentence processing module 1200 can set one of the sentences as the sentence to be adjusted, and then directly delete the sentence to be adjusted, or through the text The generation module 1100 regenerates a sentence to replace the sentence to be adjusted. In one embodiment, when the plurality of adjacent sentences are two adjacent sentences At this time, the sentence processing module 1200 can preset that the previous sentence or the following sentence should be selected as the sentence to be adjusted. In one embodiment, when the plurality of adjacent sentences are three consecutive sentences, the sentence processing module 1200 can preset to select the previous sentence, the middle sentence or the following sentence as the sentence to be adjusted. In one embodiment, the sentence processing module 1200 can still use the first language model and/or the second language model to determine again whether the regenerated sentence needs to be set as the sentence to be adjusted.

在一實施方式中,語句處理模組1200可視文本需求僅使用該第一語言模型來判斷單一句子是否需要修正。在另一實施方式中,語句處理模組1200可視文本需求僅使用該第二語言模型來判斷多個相鄰句子之間是否需要修正。在又一實施方式中,語句處理模組1200可視文本需求依序使用該第一語言模型以及該第二語言模型來判斷該文本資訊是否需要修正。 In one embodiment, the visual text requirement of the sentence processing module 1200 only uses the first language model to determine whether a single sentence needs to be modified. In another embodiment, the visual text requirement of the sentence processing module 1200 only uses the second language model to determine whether correction is needed between multiple adjacent sentences. In yet another embodiment, the sentence processing module 1200 uses the first language model and the second language model sequentially according to text requirements to determine whether the text information needs to be modified.

在一實施方式中,若語句處理模組1200使用該第一語言模型以及該第二語言模型來判斷該文本資訊是否需要修正時,語句處理模組1200可先使用該第一語言模型來逐一判斷每個句子本身是否需要修正,當該文本資訊的該多個句子皆完成該第一語言模型的判斷後,語句處理模組1200可再使用該第二語言模型來逐一判斷相鄰句子之間是否需要修正。 In one embodiment, if the sentence processing module 1200 uses the first language model and the second language model to determine whether the text information needs to be modified, the sentence processing module 1200 can first use the first language model to determine one by one. Whether each sentence itself needs to be modified, after the multiple sentences of the text information have completed the judgment of the first language model, the sentence processing module 1200 can then use the second language model to judge one by one whether there are differences between adjacent sentences. Needs correction.

在另一實施方式中,若語句處理模組1200使用該第一語言模型以及該第二語言模型來判斷該文本資訊是否需要修正時,語句處理模組1200可先使用該第一語言模型來判斷前面兩個句子本身是否需要修正,而後語句處理模組1200可再使用該第二語言模型來判斷該前面兩個句子之間是否需要修正。接著,語句處理模組1200可先使用該第一語言模型來判斷該前面兩個句子後的下一個句子本身是否需要修正後,再使用該第二語言模型來判斷該前面兩個句子中的後面句子與該下一個句子之間是否需要修 正。在所述實施方式中,可透過句子內分析與句子間的分析交替使用下,來使該文本資訊完整與通順。 In another embodiment, if the sentence processing module 1200 uses the first language model and the second language model to determine whether the text information needs to be modified, the sentence processing module 1200 can first use the first language model to determine Whether the first two sentences themselves need to be modified, then the sentence processing module 1200 can then use the second language model to determine whether the first two sentences need to be modified. Then, the sentence processing module 1200 can first use the first language model to determine whether the next sentence after the previous two sentences needs to be modified, and then use the second language model to determine the latter of the previous two sentences. Is there any need to modify between the sentence and the next sentence? just. In the above embodiment, intra-sentence analysis and inter-sentence analysis can be used alternately to make the text information complete and smooth.

在步驟S440中,當該文本資訊被確認為存在有該待調整句時,則調整該待調整句以完成該文本資訊。 In step S440, when it is confirmed that the sentence to be adjusted exists in the text information, the sentence to be adjusted is adjusted to complete the text information.

在一實施方式中,當該文本資訊被確認為存在有該待調整句時,文本生成模組1100可直接刪除該待調整句,亦或生成一個新句子來取代該待調整句,以完成該文本資訊。 In one embodiment, when the text information is confirmed to contain the sentence to be adjusted, the text generation module 1100 can directly delete the sentence to be adjusted, or generate a new sentence to replace the sentence to be adjusted, to complete the process. Text information.

在一實施方式中,若文本生成模組1100欲以生成新句子的方式來取代該待調整句時,文本生成模組1100可直接刪除該待調整句後,文本生成模組1100進一步依據該文本參數判斷是否需要生成該新句子。在一實施方式中,若該文本參數包括該文本需求字數時,文本生成模組1100可判斷刪除該待調整句後的該文本資訊的字數與該文本需求字數之間的差異是否超過一預設字數閾值。在一實施方式中,若該差異超過該預設字數閾值時,文本生成模組1100可將該待調整句的前面至少一句及/或後面至少一句作為關鍵句,並利用該文本模型來生成該新句子,以取代原該待調整句的位置。在另一實施方式中,該關鍵句可包括該待調整句的前面兩句或後面兩句。在又一實施方式中,該關鍵句可包括該待調整句的前面兩句以及後面一句。若該差異不超過該預設字數閾值時,文本生成模組1100可不生成新的句子。 In one embodiment, if the text generation module 1100 wants to generate a new sentence to replace the sentence to be adjusted, the text generation module 1100 can directly delete the sentence to be adjusted, and then the text generation module 1100 further based on the text The parameter determines whether the new sentence needs to be generated. In one embodiment, if the text parameter includes the required word count of the text, the text generation module 1100 may determine whether the difference between the word count of the text information after deleting the sentence to be adjusted and the required word count of the text exceeds A preset word count threshold. In one embodiment, if the difference exceeds the preset word count threshold, the text generation module 1100 can use at least one sentence before and/or at least one sentence after the sentence to be adjusted as a key sentence, and use the text model to generate The new sentence replaces the original sentence to be adjusted. In another embodiment, the key sentence may include the first two sentences or the last two sentences of the sentence to be adjusted. In another embodiment, the key sentence may include the first two sentences and the last sentence of the sentence to be adjusted. If the difference does not exceed the preset word count threshold, the text generation module 1100 may not generate a new sentence.

在一實施方式中,當該文本資訊完成調整以形成一文本文件後,該文本文件可回傳給電子裝置。在一實施方式中,若該文本資訊在網路設備12完成,則網路設備12回傳給電子裝置11。若該文本資訊在第n處理伺服器23n完成,則第n處理伺服器23n會先回傳給網路設備22,藉此傳 回給電子裝置21。若該文本資訊在電子裝置31完成,則電子裝置31直接取得該文本文件。 In one embodiment, after the text information is adjusted to form a text file, the text file can be sent back to the electronic device. In one embodiment, if the text information is completed on the network device 12, the network device 12 returns it to the electronic device 11. If the text information is completed on the nth processing server 23n, the nth processing server 23n will first send it back to the network device 22, thereby transmitting back to the electronic device 21. If the text information is completed on the electronic device 31, the electronic device 31 directly obtains the text file.

在一實施方式中,由於當該新句子生成時,該新句子仍需重新經過語句處理模組1200的分析,因此經語句處理模組1200分析認為該文本文件的全部內容已不具有該待調整句時,該文本資訊即完成調整,並形成該文本文件。 In one embodiment, when the new sentence is generated, the new sentence still needs to be analyzed by the sentence processing module 1200 again. Therefore, after analysis by the sentence processing module 1200, it is determined that the entire content of the text file no longer has the content to be adjusted. When the sentence is executed, the text information is adjusted and the text file is formed.

通過上述方式,文本自動生成方法400可透過第一語言模型及/或第二語言模型,來確定所生成的該文本資訊中的不通順且不流暢的句子,並可確認該文本資訊的文句之間不連貫的地方,以補強文本生成的模型缺乏足夠的訓練文本時會發生之問題。 In the above manner, the automatic text generation method 400 can determine the irregular and unfluent sentences in the generated text information through the first language model and/or the second language model, and can confirm the sentences of the text information. Problems that occur when the model of text generation lacks sufficient training text to reinforce the incoherence between text.

圖5是本發明提供一種通過至少一個電子裝置進行的文本修改方法500的流程圖。因為存在多種用於執行所述文本修改方法500的方式,因此圖5所示的文本修改方法500僅是示例。文本修改方法500可使用圖1A、圖1B、圖2及圖3所展示的配置或其他配置方式來執行,並且在說明文本修改方法500的同時,請合併參考圖1A、圖1B、圖2及圖3中的各種元件。圖5中顯示的每個步驟可表示所執行的一個或多個過程、方法或子程式,且每個步驟的順序可任意的調整,並不使文本修改方法500的本質脫離文本修改方法500的技術方案的範圍。 FIG. 5 is a flow chart of a text modification method 500 provided by the present invention through at least one electronic device. Because there are multiple ways to perform the text modification method 500, the text modification method 500 shown in Figure 5 is only an example. The text modification method 500 may be executed using the configuration shown in FIGS. 1A, 1B, 2 and 3 or other configurations. While describing the text modification method 500, please refer to FIGS. 1A, 1B, 2 and 3. Various components in Figure 3. Each step shown in FIG. 5 may represent one or more processes, methods or subroutines that are executed, and the order of each step may be adjusted arbitrarily without departing from the essence of the text modification method 500 . Scope of technical solutions.

在步驟S510中,接收一文本參數以及包括多個句子的一文本資訊。 In step S510, a text parameter and text information including a plurality of sentences are received.

在一實施方式中,當使用者欲修改原已持有的該文本資訊時,使用者可向電子裝置輸入該文本參數,以利文本生成模組1100可依據該文本參數來調整該文本資訊。在一實施方式中,當該文本生成模組1100位於網路設備12時,電子裝置11可藉由接收裝置111接收該文本參數,並藉由 傳送裝置112提供該文本參數與該文本資訊給該網路設備12。在另一實施方式中,當該文本生成模組1100位於第一處理伺服器231時,電子裝置21可藉由接收裝置211接收該文本參數,並藉由傳送裝置212提供該文本參數與該文本資訊給該網路設備22的接收單元221,並透過傳送單元222提供該文本參數與該文本資訊給第一處理伺服器231。在又一實施方式中,當該文本生成模組1100位於電子裝置31本身時,電子裝置31可藉由接收裝置311接收該文本參數後,進行後續的步驟。 In one embodiment, when the user wants to modify the text information originally held, the user can input the text parameters to the electronic device, so that the text generation module 1100 can adjust the text information according to the text parameters. In one embodiment, when the text generation module 1100 is located in the network device 12, the electronic device 11 can receive the text parameter through the receiving device 111, and through The transmitting device 112 provides the text parameters and the text information to the network device 12 . In another embodiment, when the text generation module 1100 is located in the first processing server 231, the electronic device 21 can receive the text parameters through the receiving device 211, and provide the text parameters and the text through the transmitting device 212. The information is provided to the receiving unit 221 of the network device 22, and the text parameter and the text information are provided to the first processing server 231 through the transmitting unit 222. In another embodiment, when the text generation module 1100 is located on the electronic device 31 itself, the electronic device 31 can receive the text parameters through the receiving device 311 and then perform subsequent steps.

在步驟S520中,確認該多個句子中是否存在有一待調整句。 In step S520, it is confirmed whether there is a sentence to be adjusted among the plurality of sentences.

在一實施方式中,步驟S520可與文本自動生成方法400的步驟S430完全相同。在一實施方式中,當語句處理模組1200收到該文本資訊後,語句處理模組1200會依據第一語言模型及/或第二語言模型來判斷該多個句子中是否存在有需要調整的句子。在一實施方式中,該第一語言模型可透過第二神經網路架構所建立,而該第二語言模型可透過第三神經網路架構所建立。在一實施方式中,該第二神經網路架構可為循環神經網路RNN(Recurrent Neural Network),而該第三神經網路架構可為循環神經網路NN(Neural Network)。 In one implementation, step S520 may be completely identical to step S430 of the automatic text generation method 400. In one embodiment, after the sentence processing module 1200 receives the text information, the sentence processing module 1200 determines whether there are any errors in the sentences that need to be adjusted based on the first language model and/or the second language model. sentence. In one implementation, the first language model can be established through a second neural network architecture, and the second language model can be established through a third neural network architecture. In one embodiment, the second neural network architecture may be a Recurrent Neural Network (RNN), and the third neural network architecture may be a Recurrent Neural Network (NN).

在一實施方式中,語句處理模組1200可透過該第一語言模型分別針對該文本資訊中的每一個句子進行分析。在一實施方式中,語句處理模組1200可透過該第一語言模型逐一對每一個句子進行分析。若確認其中一個句子為該待調整句後,可直接刪除該待調整句,或透過文本生成模組1100重新生成一個句子來取代該待調整句。在一實施方式中,語句處理模組1200仍可透過該第一語言模型,針對重新生成的句子再次判斷是否須設定為該待調整句。 In one embodiment, the sentence processing module 1200 can analyze each sentence in the text information through the first language model. In one implementation, the sentence processing module 1200 can analyze each sentence one by one through the first language model. If one of the sentences is confirmed to be the sentence to be adjusted, the sentence to be adjusted can be deleted directly, or a sentence to be adjusted can be regenerated through the text generation module 1100 to replace the sentence to be adjusted. In one implementation, the sentence processing module 1200 can still use the first language model to determine again whether the regenerated sentence needs to be set as the sentence to be adjusted.

在一實施方式中,語句處理模組1200可透過該第二語言模型分別針對該文本資訊中的多個相鄰句子進行分析。當語句處理模組1200確認該多個相鄰句子出現句意不連續的情況時,語句處理模組1200可設定其中一個句子為該待調整句後,可直接刪除該待調整句,或透過文本生成模組1100重新生成一個句子來取代該待調整句。在一實施方式中,語句處理模組1200仍可透過該第一語言模型及/或該第二語言模型,針對重新生成的句子再次判斷是否須設定為該待調整句。 In one embodiment, the sentence processing module 1200 can analyze multiple adjacent sentences in the text information through the second language model. When the sentence processing module 1200 confirms that the sentence meanings of the multiple adjacent sentences are discontinuous, the sentence processing module 1200 can set one of the sentences as the sentence to be adjusted, and then directly delete the sentence to be adjusted, or through the text The generation module 1100 regenerates a sentence to replace the sentence to be adjusted. In one embodiment, the sentence processing module 1200 can still use the first language model and/or the second language model to determine again whether the regenerated sentence needs to be set as the sentence to be adjusted.

在步驟S530中,當該文本資訊被確認為存在有該待調整句時,基於該文本參數判斷是否需要生成一新句子以取代該待調整句。 In step S530, when it is confirmed that the sentence to be adjusted exists in the text information, it is determined based on the text parameters whether a new sentence needs to be generated to replace the sentence to be adjusted.

在一實施方式中,當該文本資訊被確認為存在有該待調整句時,文本生成模組1100可依據該文本參數來判斷是否直接刪除該待調整句,亦或生成一個新句子來取代該待調整句,以完成該文本資訊。 In one embodiment, when the text information is confirmed to contain the sentence to be adjusted, the text generation module 1100 can determine whether to directly delete the sentence to be adjusted based on the text parameters, or to generate a new sentence to replace the sentence. The sentence needs to be adjusted to complete the text information.

在一實施方式中,若該文本參數包括一文本需求字數時,文本生成模組1100可判斷刪除該待調整句後的該文本資訊的字數與該文本需求字數之間的差異是否超過一預設字數閾值。在一實施方式中,若該差異超過該預設字數閾值時,文本生成模組1100可將該待調整句的前面至少一句及/或後面至少一句作為關鍵句,並利用該文本模型來生成該新句子,以取代原該待調整句的位置。在另一實施方式中,該關鍵句可包括該待調整句的前面兩句或後面兩句。在又一實施方式中,該關鍵句可包括該待調整句的前面兩句以及後面一句。若該差異不超過該預設字數閾值時,文本生成模組1100可不生成新的句子。 In one embodiment, if the text parameter includes a text required word count, the text generation module 1100 may determine whether the difference between the word count of the text information after deleting the sentence to be adjusted and the text required word count exceeds A preset word count threshold. In one embodiment, if the difference exceeds the preset word count threshold, the text generation module 1100 can use at least one sentence before and/or at least one sentence after the sentence to be adjusted as a key sentence, and use the text model to generate The new sentence replaces the original sentence to be adjusted. In another embodiment, the key sentence may include the first two sentences or the last two sentences of the sentence to be adjusted. In another embodiment, the key sentence may include the first two sentences and the last sentence of the sentence to be adjusted. If the difference does not exceed the preset word count threshold, the text generation module 1100 may not generate a new sentence.

在一實施方式中,當該文本資訊完成調整以形成一文本文件後,該文本文件可回傳給電子裝置。在一實施方式中,若該文本資訊在網路設備12完成,則網路設備12回傳給電子裝置11。若該文本資訊在第n處 理伺服器23n完成,則第n處理伺服器23n會先回傳給網路設備22,藉此傳回給電子裝置21。若該文本資訊在電子裝置31完成,則電子裝置31直接取的該文本文件。 In one embodiment, after the text information is adjusted to form a text file, the text file can be sent back to the electronic device. In one embodiment, if the text information is completed on the network device 12, the network device 12 returns it to the electronic device 11. If the text information is at the nth position If the processing server 23n completes, the nth processing server 23n will first send back to the network device 22, thereby sending back to the electronic device 21. If the text information is completed in the electronic device 31, the electronic device 31 directly obtains the text file.

在一實施方式中,由於當該新句子生成時,該新句子仍需重新經過語句處理模組1200的分析,因此經語句處理模組1200分析認為該文本文件的全部內容已不具有該待調整句時,該文本資訊即完成調整,並形成該文本文件。 In one embodiment, when the new sentence is generated, the new sentence still needs to be analyzed by the sentence processing module 1200 again. Therefore, after analysis by the sentence processing module 1200, it is determined that the entire content of the text file no longer has the content to be adjusted. When the sentence is executed, the text information is adjusted and the text file is formed.

圖6是本發明提供一種通過至少一個電子裝置進行的句內分析方法600的流程圖。因為存在多種用於執行所述句內分析方法600的方式,因此圖6所示的句內分析方法600僅是示例。句內分析方法600可使用圖1A、圖1B、圖2及圖3所展示的配置或其他配置方式來執行,並且在說明句內分析方法600的同時,請合併參考圖1A、圖1B、圖2及圖3中的各種元件。圖6中顯示的每個步驟可表示所執行的一個或多個過程、方法或子程式,且每個步驟的順序可任意的調整,並不使句內分析方法600的本質脫離句內分析方法600的技術方案的範圍。在一實施方式中,句內分析方法600可用於文本自動生成方法400中的步驟S430中。在另一實施方式中,句內分析方法600可用於文本修改方法500中的步驟S520中。 FIG. 6 is a flow chart of an intra-sentence analysis method 600 performed by at least one electronic device according to the present invention. Because there are multiple ways to perform the intra-sentence analysis method 600, the intra-sentence analysis method 600 shown in Figure 6 is only an example. The intra-sentence analysis method 600 can be executed using the configuration shown in FIGS. 1A, 1B, 2, and 3 or other configurations. While describing the intra-sentence analysis method 600, please refer to FIGS. 1A, 1B, and FIG. 2 and the various components in Figure 3. Each step shown in Figure 6 may represent one or more processes, methods, or subroutines that are executed, and the order of each step may be adjusted arbitrarily without departing from the essence of the intra-sentence analysis method 600. 600 range of technical solutions. In one embodiment, the intra-sentence analysis method 600 can be used in step S430 of the automatic text generation method 400. In another implementation, the intra-sentence analysis method 600 may be used in step S520 of the text modification method 500.

在步驟S610中,接收包括多個句子的一文本資訊。 In step S610, text information including a plurality of sentences is received.

在一實施方式中,無論是文本自動生成方法400或是文本修改方法500,語句處理模組1200中的句內處理模組1210皆須先取得該文本資訊。在一實施方式中,在實施文本自動生成方法400時,該文本資訊是透過文本生成模組1100,並依據一文本參數以及一文本模型所產生。在一實施方式中,在實施文本修改方法500時,該文本資訊可以是文本生成模組 1100所生成,亦可是從網路上所取來的文本資訊,或是使用者自行輸入的文本資訊。 In one embodiment, whether it is the automatic text generation method 400 or the text modification method 500, the intra-sentence processing module 1210 in the sentence processing module 1200 must first obtain the text information. In one embodiment, when implementing the automatic text generation method 400, the text information is generated through the text generation module 1100 and based on a text parameter and a text model. In one embodiment, when implementing the text modification method 500, the text information may be a text generation module The text information generated by 1100 can also be text information taken from the Internet, or text information input by the user.

在一實施方式中,若句內處理模組1210位於網路設備12時,則該文本資訊可由網路設備12中的文本生成模組1100產生,或直接透過電子裝置11提供。在另一實施方式中,若句內處理模組1210位於該至少一個處理伺服器中的其中一個(例如:第二處理伺服器232)時,則該文本資訊可由文本生成模組1100所在的電子設備(例如:網路設備22以及該至少一個處理伺服器中的一個)來產生,或由電子裝置21透過網路設備22直接提供。在又一實施方式中,若句內處理模組1210位於電子裝置31時,則該文本資訊可由文本生成模組1100所產生,或直接從電子裝置31中來取得。 In one embodiment, if the intra-sentence processing module 1210 is located in the network device 12, the text information can be generated by the text generation module 1100 in the network device 12, or directly provided through the electronic device 11. In another embodiment, if the intra-sentence processing module 1210 is located in one of the at least one processing server (for example, the second processing server 232), the text information can be generated by the electronic system where the text generation module 1100 is located. Devices (such as the network device 22 and one of the at least one processing server) are generated, or provided directly by the electronic device 21 through the network device 22 . In another embodiment, if the intra-sentence processing module 1210 is located in the electronic device 31 , the text information can be generated by the text generation module 1100 or directly obtained from the electronic device 31 .

在步驟S620中,透過一第一語言模型,從該多個句子中的特定一個句子取得多個單句詞彙以及各自的分詞詞性。 In step S620, through a first language model, a plurality of single-sentence words and their respective part-of-speech parts are obtained from a specific sentence among the plurality of sentences.

在一實施方式中,句內處理模組1210會逐一針對該多個句子進行分析,以確認該多個句子中是否存在有待調整句。因此,句內處理模組1210可先針對該多個句子中的第一個句子進行分析,而後接著對第二個句子進行分析,直到所有的句子都完成分析並完成該文本資訊的調整。 In one embodiment, the intra-sentence processing module 1210 analyzes the multiple sentences one by one to confirm whether there are sentences to be adjusted in the multiple sentences. Therefore, the intra-sentence processing module 1210 may first analyze the first sentence among the plurality of sentences, and then analyze the second sentence until all sentences are analyzed and the text information is adjusted.

在一實施方式中,句內處理模組1210可透過該第一語言模型,針對該特定一個句子進行分詞處理,藉此取得該特定一個句子中的該多個單句詞彙。此外,句內處理模組1210可透過該第一語言模型,同時取得該多個單句詞彙各自的分詞詞性。 In one embodiment, the intra-sentence processing module 1210 can perform word segmentation processing on the specific sentence through the first language model, thereby obtaining the plurality of single-sentence words in the specific sentence. In addition, the intra-sentence processing module 1210 can obtain the part-of-speech of each of the plurality of single-sentence words at the same time through the first language model.

在一實施方式中,該第一語言模型可透過神經網路架構所建立。在一實施方式中,該神經網路架構可為循環神經網路RNN(Recurrent Neural Network)。在一實施方式中,該神經網路架構可整合Electra Small 模型、雙仿射(BiAffine)模型以及條件隨機域CRF(Condition Random Field)模型來取得該多個單句詞彙以及其各自的分詞詞性。 In one implementation, the first language model can be established through a neural network architecture. In one implementation, the neural network architecture may be a Recurrent Neural Network (RNN). In one embodiment, the neural network architecture can integrate Electra Small model, biaffine (BiAffine) model and conditional random field CRF (Condition Random Field) model to obtain the multiple single-sentence words and their respective word segmentation parts of speech.

在一實施方式中,該第一語言模型可透過事先提供語言訓練資料集給該神經網路架構進行訓練。在一實施方式中,該語言訓練資料集可依據預期後續會接收到的該文本資訊事先選擇需要的主題來訓練以外,仍需額外提供大量不限主題的訓練文本供該神經網路架構進行訓練,以利該第一語言模型正確的進行分詞,並且對分詞結果所產生的該多個單句詞彙給予正確的詞性判斷。 In one implementation, the first language model can be trained by providing a language training data set to the neural network architecture in advance. In one implementation, the language training data set can select the required topics for training in advance based on the text information expected to be received later, and a large amount of training texts with no limit on topics are still required for the neural network architecture to train. , so that the first language model can correctly perform word segmentation and give correct part-of-speech judgments to the plurality of single-sentence words generated by the word segmentation results.

在一實施方式中,若該文本資訊是透過文本自動生成方法400的一文本模型產生時,該文本模型所使用的一文本訓練集可直接作為該語言訓練資料集中的一部分,以利該第一語言模型可辨識出該文本資訊所屬主題在使用的字詞。在一實施方式中,該語言訓練資料集中所包括的額外大量訓練文本,則不限於主題的內容。透過大量訓練文本的輔助,使該第一語言模型在辨識字詞與判斷詞性時,可不受該文本資訊的主題限制,而正確的理解句構中各個詞彙的意義與詞性。 In one embodiment, if the text information is generated through a text model of the automatic text generation method 400, a text training set used by the text model can be directly used as a part of the language training data set to facilitate the first The language model identifies the words used in the topic of the text information. In one embodiment, the additional large amount of training texts included in the language training data set are not limited to the content of the topic. With the assistance of a large amount of training text, the first language model can correctly understand the meaning and part-of-speech of each word in the sentence structure without being restricted by the subject of the text information when identifying words and determining part-of-speech.

在一實施方式中,該多個單句詞彙的該多個分詞詞性可包括主詞(施事主語或主語)、動詞以及受詞(受事主語或賓語)。在一實施方式中,該多個分詞詞性更可包括謂語、賓語、表語、定語、狀語、補語以及中心語等語法關係的詞類。 In one embodiment, the plurality of participle parts of speech of the plurality of single-sentence words may include subjects (agent subjects or subjects), verbs, and objects (object subjects or objects). In one embodiment, the plurality of participle parts of speech may further include parts of speech with grammatical relationships such as predicate, object, predicate, attributive, adverbial, complement, and head.

在步驟S630中,依據該多個單句詞彙的該多個分詞詞性,確認是否將該特定一個句子設定為該待調整句。 In step S630, it is confirmed whether the specific sentence is set as the sentence to be adjusted based on the plurality of word participles of the plurality of single-sentence words.

在一實施方式中,句內處理模組1210依據該特定一個句子中該多個單句詞彙的該多個分詞詞性的分布,取得該特定一個句子的一語法關係。舉例來說:該特定一個句子的該多個分詞詞性的排序依序為主語、動 詞、賓語(間接賓語)以及賓語(直接賓語)時,該特定一個句子的該語法關係即可由主語、動詞、賓語以及賓語來表示。在一實施方式中,該特定一個句子的該語法關係可用於確認是否將該特定一個句子設定為該待調整句。 In one embodiment, the intra-sentence processing module 1210 obtains a grammatical relationship of the specific sentence based on the distribution of the plurality of word participles of the plurality of single-sentence words in the specific sentence. For example: the order of the plurality of participles of a specific sentence is subject, verb When words, objects (indirect objects) and objects (direct objects) are used, the grammatical relationship of a specific sentence can be represented by subject, verb, object and object. In one embodiment, the grammatical relationship of the specific sentence can be used to confirm whether the specific sentence is set as the sentence to be adjusted.

在一實施方式中,句內處理模組1210可接收多個語法結構。在一實施方式中,該多個語法結構為預設容許的語法關係。因此,句內處理模組1210可依據該特定一個句子的該語法關係與該多個語法結構的一比對結果,確認該特定一個句子的一句構完整度。在一實施方式中,句內處理模組1210可依據該句構完整度,確認該特定一個句子是否為該待調整句。 In one embodiment, the intra-sentence processing module 1210 may receive multiple grammatical structures. In one embodiment, the plurality of grammatical structures are preset allowed grammatical relationships. Therefore, the intra-sentence processing module 1210 can confirm the completeness of the sentence structure of the specific sentence based on a comparison result between the grammatical relationship of the specific sentence and the plurality of grammatical structures. In one embodiment, the intra-sentence processing module 1210 can determine whether the specific sentence is the sentence to be adjusted based on the completeness of the sentence structure.

在一實施方式中,當該多個語法結構與該特定一個句子的該語法關係皆不相同時,句內處理模組1210可認定該特定一個句子的該句構完整度不足,而設定該特定一個句子為該待調整句。在一實施方式中,當該多個語法結構中的其中一個與該特定一個句子的該語法關係相同時,句內處理模組1210可認定該特定一個句子具有足夠的該句構完整度,而認定該特定一個句子不為該待調整句。 In one embodiment, when the multiple grammatical structures are different from the grammatical relationship of the specific sentence, the intra-sentence processing module 1210 may determine that the completeness of the sentence structure of the specific sentence is insufficient, and set the specific sentence. One sentence is the sentence to be adjusted. In one embodiment, when one of the plurality of grammatical structures is the same as the grammatical relationship of the specific sentence, the intra-sentence processing module 1210 may determine that the specific sentence has sufficient completeness of the sentence structure, and It is determined that the specific sentence is not the sentence to be adjusted.

在一實施方式中,當該多個語法結構與該特定一個句子的該語法關係皆不相同時,句內處理模組1210可從該多個語法結構中,選擇一個與該特定一個句子的該語法關係最接近的一特定語法結構,並將該特定一個句子的該語法關係與該特定語法結構進行比較,若兩者間的差異僅在於一個虛詞,則句內處理模組1210可認定該特定一個句子具有足夠的該句構完整度,而認定該特定一個句子不為該待調整句。反之,如若兩者間的差異超過一個虛詞,則句內處理模組1210可認定該特定一個句子的該句構完整度不足,而設定該特定一個句子為該待調整句。在所述實施方式中,該虛詞可以是作為定詞或狀詞等的形容詞、副詞、介詞、助詞以及嘆詞等。 In one embodiment, when the grammatical relationship between the multiple grammatical structures and the specific sentence is different, the intra-sentence processing module 1210 can select one of the multiple grammatical structures that is consistent with the specific sentence. A specific grammatical structure with the closest grammatical relationship, and compares the grammatical relationship of the specific sentence with the specific grammatical structure. If the difference between the two is only a function word, the intra-sentence processing module 1210 can determine that the specific grammatical structure A sentence has sufficient structural integrity of the sentence, and it is determined that the specific sentence is not the sentence to be adjusted. On the contrary, if the difference between the two is more than one function word, the intra-sentence processing module 1210 may determine that the sentence structure of the specific sentence is insufficient and set the specific sentence as the sentence to be adjusted. In the embodiment, the function word may be an adjective, an adverb, a preposition, an auxiliary, an interjection, etc. that serve as attributives or adverbials.

在一實施方式中,該多個語法結構的事先設定,亦可依據該文本資訊的需求來決定。舉例來說:該文本資訊的需求是用於兒童讀物,則選用的該多個語法結構,可考慮以最簡單的多個語法結構來組成。此外,若在特定領域的文本需求時,亦可針對該特定領域的慣用語法結構進行增補(尤其是針對並非一般常用的語法結構,但屬於特定領域慣用的語法結構),以避免該文本資訊中的句子被不當的標註。 In one implementation, the preset settings of the plurality of grammatical structures may also be determined based on the requirements of the text information. For example: if the text information is required to be used in children's books, then the multiple grammatical structures selected can be composed of the simplest multiple grammatical structures. In addition, if the text in a specific field requires supplements, the idiomatic grammatical structures in the specific field can also be supplemented (especially the grammatical structures that are not commonly used, but are idiomatic in the specific field) to prevent the text information from being included in the text. Sentences were marked inappropriately.

在一實施方式中,當該特定一個句子被認定不為該待調整句時,句內處理模組1210可繼續確認下一個句子,直到該文本資訊的該多個句子皆完成確認。在一實施方式中,當該特定一個句子被認定為該待調整句時,該待調整句可被直接刪除,亦或生成一個新句子來取代該待調整句,以完成該文本資訊。 In one embodiment, when the specific sentence is determined not to be the sentence to be adjusted, the intra-sentence processing module 1210 can continue to confirm the next sentence until the multiple sentences of the text information are all confirmed. In one implementation, when the specific sentence is determined to be the sentence to be adjusted, the sentence to be adjusted can be directly deleted, or a new sentence can be generated to replace the sentence to be adjusted to complete the text information.

在一實施方式中,當該特定一個句子被認定為該待調整句時,句內處理模組1210可提供該待調整句給一文本生成模組1100。文本生成模組1100可判斷刪除該待調整句後的該文本資訊的字數與一文本需求字數之間的差異是否超過一預設字數閾值。在一實施方式中,若該差異超過該預設字數閾值時,文本生成模組1100可將該待調整句的前面至少一句及/或後面至少一句作為關鍵句,並利用該文本模型來生成該新句子,以取代原該待調整句的位置。若該差異不超過該預設字數閾值時,文本生成模組1100可不生成新的句子。 In one embodiment, when the specific sentence is determined to be the sentence to be adjusted, the intra-sentence processing module 1210 may provide the sentence to be adjusted to a text generation module 1100. The text generation module 1100 may determine whether the difference between the word count of the text information after deleting the sentence to be adjusted and the word count of a text requirement exceeds a preset word count threshold. In one embodiment, if the difference exceeds the preset word count threshold, the text generation module 1100 can use at least one sentence before and/or at least one sentence after the sentence to be adjusted as a key sentence, and use the text model to generate The new sentence replaces the original sentence to be adjusted. If the difference does not exceed the preset word count threshold, the text generation module 1100 may not generate a new sentence.

在一實施方式中,由於當該新句子生成時,該新句子仍需重新經過句內處理模組1210的分析,因此經句內處理模組1210分析認為該新句子不須被設定為該待調整句時,句內處理模組1210可接續分析該文本資訊中後續的句子。 In one embodiment, when the new sentence is generated, the new sentence still needs to be analyzed by the intra-sentence processing module 1210 again. Therefore, the intra-sentence processing module 1210 analyzes and determines that the new sentence does not need to be set as the pending sentence. When adjusting a sentence, the intra-sentence processing module 1210 may continue to analyze subsequent sentences in the text information.

在一實施方式中,該文本參數可包括該文本需求字數、該預設字數閾值以及/或可指示預設哪些多個語法結構的一結構指示等。該文本參數可透過該電子裝置提供給句內處理模組1210。 In one embodiment, the text parameters may include the required word count of the text, the preset word count threshold, and/or a structure indication indicating which grammatical structures are preset, etc. The text parameters may be provided to the in-sentence processing module 1210 through the electronic device.

圖7是本發明提供一種通過至少一個電子裝置進行的句間分析方法700的流程圖。因為存在多種用於執行所述句間分析方法700的方式,因此圖7所示的句間分析方法700僅是示例。句間分析方法700可使用圖1A、圖1B、圖2及圖3所展示的配置或其他配置方式來執行,並且在說明句間分析方法700的同時,請合併參考圖1A、圖1B、圖2及圖3中的各種元件。圖7中顯示的每個步驟可表示所執行的一個或多個過程、方法或子程式,且每個步驟的順序可任意的調整,並不使句間分析方法700的本質脫離句間分析方法700的技術方案的範圍。在一實施方式中,句間分析方法700可用於文本自動生成方法400中的步驟S430中。在另一實施方式中,句間分析方法700可用於文本修改方法500中的步驟S520中。在另一實施方式中,句間分析方法700可與句內分析方法600接續使用或交替使用,以形成一語句分析方法。 FIG. 7 is a flow chart of an inter-sentence analysis method 700 provided by the present invention through at least one electronic device. Because there are multiple ways to perform the inter-sentence analysis method 700, the inter-sentence analysis method 700 shown in FIG. 7 is only an example. The inter-sentence analysis method 700 can be executed using the configuration shown in FIGS. 1A, 1B, 2, and 3 or other configurations. While describing the inter-sentence analysis method 700, please refer to FIGS. 1A, 1B, and FIG. 2 and the various components in Figure 3. Each step shown in Figure 7 may represent one or more processes, methods or subroutines executed, and the order of each step may be adjusted arbitrarily without departing from the essence of the inter-sentence analysis method 700. 700 range of technical solutions. In one implementation, the inter-sentence analysis method 700 can be used in step S430 of the automatic text generation method 400. In another implementation, the inter-sentence analysis method 700 may be used in step S520 of the text modification method 500. In another embodiment, the inter-sentence analysis method 700 can be used sequentially or alternately with the intra-sentence analysis method 600 to form a sentence analysis method.

在步驟S710中,接收包括多個句子的一文本資訊。 In step S710, text information including a plurality of sentences is received.

在一實施方式中,無論是文本自動生成方法400或是文本修改方法500,語句處理模組1200中的句間處理模組1220皆須先取得該文本資訊。在一實施方式中,在實施文本自動生成方法400時,該文本資訊是透過文本生成模組1100,並依據一文本參數以及一文本模型所產生。在一實施方式中,在實施文本修改方法500時,該文本資訊可以是文本生成模組1100所生成,亦可是從網路上所取來的文本資訊,或是使用者自行輸入的文本資訊。 In one embodiment, whether it is the automatic text generation method 400 or the text modification method 500, the inter-sentence processing module 1220 in the sentence processing module 1200 must first obtain the text information. In one embodiment, when implementing the automatic text generation method 400, the text information is generated through the text generation module 1100 and based on a text parameter and a text model. In one embodiment, when implementing the text modification method 500, the text information may be generated by the text generation module 1100, may be text information obtained from the Internet, or may be text information input by the user.

在一實施方式中,若句間處理模組1220位於網路設備12時,則該文本資訊可由網路設備12中的文本生成模組1100產生,或直接透過電子裝置11提供。在另一實施方式中,若句間處理模組1220位於該至少一個處理伺服器中的其中一個(例如:第二處理伺服器232)時,則該文本資訊可由文本生成模組1100所在的電子設備(例如:網路設備22以及該至少一個處理伺服器中的一個)來產生,或由電子裝置21透過網路設備22直接提供。在又一實施方式中,若句間處理模組1220位於電子裝置31時,則該文本資訊可由文本生成模組1100所產生,或直接從電子裝置31中來取得。 In one embodiment, if the inter-sentence processing module 1220 is located in the network device 12, the text information can be generated by the text generation module 1100 in the network device 12, or directly provided through the electronic device 11. In another embodiment, if the inter-sentence processing module 1220 is located in one of the at least one processing server (for example: the second processing server 232), then the text information can be generated by the electronic system where the text generation module 1100 is located. Devices (such as the network device 22 and one of the at least one processing server) are generated, or provided directly by the electronic device 21 through the network device 22 . In another embodiment, if the inter-sentence processing module 1220 is located in the electronic device 31 , the text information can be generated by the text generation module 1100 or directly obtained from the electronic device 31 .

在步驟S720中,透過一第一語言模型,從該多個句子中的多個相鄰句子取得多個鄰近詞彙以及各自的分詞詞性。 In step S720, a first language model is used to obtain a plurality of adjacent words and respective part-of-speech parts from a plurality of adjacent sentences in the plurality of sentences.

在一實施方式中,句間處理模組1220會逐步針對該多個句子進行分析,以確認該多個句子中是否存在有待調整句。因此,句間處理模組1220可先針對該多個句子中的前幾個相鄰句子進行分析,而後接著從該前幾個相鄰句子中移除最前面的句子,並新加入後續的句子以再次進行分析,直到所有的句子都經過句間處理模組1220的分析,並完成該文本資訊的調整。 In one implementation, the inter-sentence processing module 1220 will gradually analyze the multiple sentences to confirm whether there are sentences to be adjusted in the multiple sentences. Therefore, the inter-sentence processing module 1220 may first analyze the first few adjacent sentences in the plurality of sentences, and then remove the first sentence from the first few adjacent sentences and add the subsequent sentences. The analysis is performed again until all sentences have been analyzed by the inter-sentence processing module 1220, and the adjustment of the text information is completed.

在一實施方式中,句間處理模組1220可透過該第一語言模型,針對該多個相鄰句子進行分詞處理,藉此取得該多個相鄰句子中的該多個鄰近詞彙。此外,句間處理模組1220可透過該第一語言模型,同時取得該多個鄰近詞彙各自的分詞詞性。在一實施方式中,當句內分析方法600與句間分析方法700一併執行時,句內處理模組1210所取得的多個單句詞彙以及對應的分詞詞性可直接暫存於一暫存器(圖未示出)中,以供句間處理模組1220直接對應到該多個相鄰句子,以確定該多個鄰近詞彙以及其分詞詞性。 In one embodiment, the inter-sentence processing module 1220 can perform word segmentation processing on the adjacent sentences through the first language model, thereby obtaining the adjacent words in the adjacent sentences. In addition, the inter-sentence processing module 1220 can simultaneously obtain the part-of-speech of each of the plurality of adjacent words through the first language model. In one embodiment, when the intra-sentence analysis method 600 and the inter-sentence analysis method 700 are executed together, the plurality of single-sentence vocabulary and corresponding part-of-speech words obtained by the intra-sentence processing module 1210 can be directly stored in a temporary register. (not shown), so that the inter-sentence processing module 1220 directly corresponds to the multiple adjacent sentences to determine the multiple adjacent words and their part-of-speech participles.

在一實施方式中,該第一語言模型可透過神經網路架構所建立。在一實施方式中,該神經網路架構可為循環神經網路RNN。在一實施方式中,該神經網路架構可整合Electra Small模型、BiAffine模型以及CRF模型來取得該多個鄰近詞彙以及其各自的分詞詞性。 In one implementation, the first language model can be established through a neural network architecture. In one embodiment, the neural network architecture may be a recurrent neural network RNN. In one implementation, the neural network architecture can integrate the Electra Small model, the BiAffine model and the CRF model to obtain the plurality of adjacent words and their respective word segmentation parts of speech.

在一實施方式中,在句內分析方法600所使用的第一語言模型可與句間分析方法700所使用的該第一語言模型相同。換言之,在句內分析方法600所使用的語言訓練資料集可與句間分析方法700中的第一語言模型所使用的第一語言訓練資料集相同。在一實施方式中,該第一語言訓練資料集可依據預期後續會接收到的該文本資訊事先選擇需要的主題來訓練以外,仍需額外提供大量不限主題的訓練文本供該神經網路架構進行訓練,以利該第一語言模型正確的進行分詞,並且對分詞結果所產生的該多個鄰近詞彙給予正確的詞性判斷。 In one embodiment, the first language model used in the intra-sentence analysis method 600 may be the same as the first language model used in the inter-sentence analysis method 700 . In other words, the language training data set used in the intra-sentence analysis method 600 may be the same as the first language training data set used by the first language model in the inter-sentence analysis method 700 . In one implementation, the first language training data set can be trained in advance by selecting the required topics based on the text information expected to be received later. A large amount of training texts with no limit on topics are still required for the neural network architecture. Training is performed to facilitate the first language model to correctly perform word segmentation and provide correct part-of-speech judgments for the plurality of adjacent words generated as a result of the word segmentation.

在一實施方式中,若該文本資訊是透過文本自動生成方法400的一文本模型產生時,該文本模型所使用的一文本訓練集可直接作為該第一語言訓練資料集中的一部分。在一實施方式中,該第一語言訓練資料集所包括的額外大量訓練文本,則不限於主題的內容。透過大量訓練文本的輔助,使該第一語言模型在辨識字詞與判斷詞性時,可不受該文本資訊的主題限制,而正確的理解句構中各個詞彙的意義與詞性。 In one embodiment, if the text information is generated through a text model of the automatic text generation method 400, a text training set used by the text model can be directly used as a part of the first language training data set. In one embodiment, the additional large amount of training text included in the first language training data set is not limited to the content of the topic. With the assistance of a large amount of training text, the first language model can correctly understand the meaning and part-of-speech of each word in the sentence structure without being restricted by the subject of the text information when identifying words and determining part-of-speech.

在一實施方式中,該多個鄰近詞彙的該多個分詞詞性可包括主詞(施事主語或主語)、動詞以及受詞(受事主語或賓語)。在一實施方式中,該多個分詞詞性更可包括謂語、賓語、表語、定語、狀語、補語以及中心語等語法關係的詞類。 In one embodiment, the plurality of participle parts of speech of the plurality of adjacent words may include subjects (agent subjects or subjects), verbs, and objects (object subjects or objects). In one embodiment, the plurality of participle parts of speech may further include parts of speech with grammatical relationships such as predicate, object, predicate, attributive, adverbial, complement, and head.

在步驟S730中,依據該多個鄰近詞彙的該多個分詞詞性,透過一第二語言模型確認該多個相鄰句子之間的一句子關聯性。 In step S730, a sentence correlation between the plurality of adjacent sentences is confirmed through a second language model based on the plurality of word participles of the plurality of adjacent words.

在一實施方式中,句間處理模組1220依據該多個鄰近詞彙的該多個分詞詞性,從該多個鄰近詞彙中篩選出多個目標詞彙,並針對該多個目標詞彙進行一關聯性分析,產生該多個相鄰句子的該句子關聯性。 In one embodiment, the inter-sentence processing module 1220 selects a plurality of target words from the plurality of adjacent words according to the plurality of word participles of the plurality of adjacent words, and performs a correlation on the plurality of target words. Analyze and generate the sentence relevance of the multiple adjacent sentences.

在一實施方式中,句間處理模組1220可預先儲存多個欲選詞性,並將該多個鄰近詞彙的該多個分詞詞性與該多個欲選詞性進行比較。當該多個鄰近詞彙的該多個分詞詞性中存有與該多個欲選詞性相同的狀況時,將屬於該多個欲選詞性的該多個鄰近詞彙視為該多個目標詞彙。舉例來說:假設該多個鄰近詞彙的該多個分詞詞性包括主語、謂語、賓語、定語以及狀語,而該多個欲選詞性為主語、動詞謂語以及賓語,則句間處理模組1220從該多個鄰近詞彙中,將作為主語、動詞謂語及賓語的詞彙視為該多個目標詞彙。在一實施方式中,該多個欲選詞性可為主語及賓語。 In one embodiment, the inter-sentence processing module 1220 may pre-store a plurality of desired parts of speech, and compare the plurality of word participles of the plurality of adjacent words with the plurality of desired parts of speech. When the plurality of word participles of the plurality of adjacent words have the same situation as the plurality of desired parts of speech, the plurality of adjacent words belonging to the plurality of desired parts of speech are regarded as the plurality of target words. For example: assuming that the plurality of participle parts of speech of the plurality of adjacent words include subjects, predicates, objects, attributives and adverbials, and the plurality of desired parts of speech are subjects, verb predicates and objects, then the inter-sentence processing module 1220 From the plurality of adjacent words, words serving as subjects, verb predicates and objects are regarded as the plurality of target words. In one embodiment, the plurality of desired parts of speech can be subjects and objects.

在一實施方式中,句間處理模組1220依據該第二語言模型,確認該多個目標詞彙之間的多個詞彙關聯性,並依據該多個詞彙關聯性,確認該多個目標詞彙之間是否存在至少一組關聯詞彙。在一實施方式中,該第二語言模型亦可透過另一神經網路架構所建立。在一實施方式中,該另一神經網路架構可為循環神經網路NN(Neural Network)。在一實施方式中,該另一神經網路架構能以Skip-Gram模型來取得該多個鄰近詞彙之間是否存在有詞彙之間的關聯。 In one embodiment, the inter-sentence processing module 1220 confirms a plurality of word correlations between the plurality of target words based on the second language model, and confirms a plurality of word correlations between the plurality of target words based on the plurality of word correlations. Whether there is at least one set of related words between In one implementation, the second language model can also be established through another neural network architecture. In one implementation, the other neural network architecture may be a recurrent neural network NN (Neural Network). In one embodiment, the other neural network architecture can use a Skip-Gram model to obtain whether there is a word-to-word association between the plurality of adjacent words.

在一實施方式中,在該第一語言模型所使用的該第一語言訓練資料集可與該第二語言模型所使用的第二語言訓練資料集相同。換言之,該第二語言模型所使用的該第二語言訓練資料集可依據預期後續會接收到的該文本資訊事先選擇需要的主題來訓練以外,仍需額外提供大量不限主題的的訓練文本供該神經網路架構進行訓練,以利該第二語言模型正確的 進行關聯性的判斷,並且對該多個目標詞彙之間的該多個詞彙關聯性給予正確的判斷。 In one embodiment, the first language training data set used in the first language model may be the same as the second language training data set used in the second language model. In other words, the second language training data set used by the second language model can not only select the required topics for training in advance based on the text information expected to be received subsequently, but also needs to provide a large amount of training texts with no limit on topics. The neural network architecture is trained to facilitate the second language model to correctly A correlation judgment is made, and a correct judgment is made on the plurality of vocabulary correlations between the plurality of target words.

在一實施方式中,依據該文本資訊的使用對象與使用場合,該第一語言模型所使用的該第一語言訓練資料集可與該第二語言模型所使用的第二語言訓練資料集略為不同。若該文本資訊的使用對象以及使用場合屬於在特殊專業技術領域的正式場合時,第二語言訓練資料集則比該第一語言訓練資料集需要更多該特殊專業技術領域的訓練文本,以利正確的判斷該多個目標詞彙之間的該多個詞彙關聯性(尤其是該文本資料的來源並非文本生成模組1100時,其詞彙的來源會更廣更深)。然而,若該文本資訊的使用情境是在正式場合給兒童使用(例如:兒童展覽場域)時,第二語言訓練資料集則比該第一語言訓練資料集需要更多特殊專業技術領域的其他兒童讀物作為輔助,以避免技術字詞之間過度艱深難聯想的關聯性,影響兒童的閱讀的順暢度。 In one implementation, depending on the usage objects and usage occasions of the text information, the first language training data set used by the first language model may be slightly different from the second language training data set used by the second language model. . If the object and occasion of use of the text information belong to formal occasions in a special professional and technical field, the second language training data set needs more training texts in the special professional and technical field than the first language training data set to facilitate Correctly determine the multiple word correlations between the multiple target words (especially when the source of the text data is not the text generation module 1100, the source of the words will be broader and deeper). However, if the use context of the text information is for children to be used in formal occasions (for example, children's exhibition venues), the second language training data set will require more special expertise in other fields than the first language training data set. Children's books are used as supplements to avoid overly difficult and difficult-to-associate connections between technical words, which may affect children's reading fluency.

在一實施方式中,句間處理模組1220可依據該多個欲選詞性,針對分屬不同句子的該多個目標詞彙進行該多個詞彙關聯性的判斷,而產生不同句子之間的詞彙的多個關聯值。舉例來說,句間處理模組1220可針對該多個目標詞彙中同屬謂語且分屬不同句子的詞彙進行該多個詞彙關聯性判斷。在一實施方式中,句間處理模組1220可針對該多個目標詞彙中同屬主語且分屬不同句子的詞彙進行該多個詞彙關聯性判斷,並針對該多個目標詞彙中同屬賓語且分屬不同句子的詞彙進行該多個詞彙關聯性判斷。在一實施方式中,句間處理模組1220可僅針對該多個目標詞彙中屬於主語或賓語且分屬不同句子的詞彙合併進行該多個詞彙關聯性判斷。在一實施方式中,每一個該多個關聯值皆使用了至少兩個該多個目標詞彙來進行分析。 In one embodiment, the inter-sentence processing module 1220 can determine the relevance of the plurality of words for the plurality of target words belonging to different sentences according to the plurality of desired parts of speech, thereby generating words between different sentences. multiple associated values. For example, the inter-sentence processing module 1220 can perform the plurality of word correlation judgments on the words in the plurality of target words that belong to the same predicate and belong to different sentences. In one embodiment, the inter-sentence processing module 1220 can perform the multiple word correlation judgments on the words that belong to the same subject in the multiple target words and belong to different sentences, and determine the relevance of the words in the multiple target words that belong to the same object. And the vocabulary belonging to different sentences is judged on the relevance of the multiple words. In one embodiment, the inter-sentence processing module 1220 can only perform the word correlation determination on the words that belong to the subject or the object and belong to different sentences among the target words. In one embodiment, each of the plurality of associated values uses at least two of the plurality of target words for analysis.

在一實施方式中,句間處理模組1220可依據該多個關聯值,確認該多個目標詞彙之間是否存在至少一組關聯詞彙。在一實施方式中,句間處理模組1220所判斷出的關聯值可在一範圍區間中。當該多個關聯值中的特定一個關聯值大於一詞彙關聯閾值時,形成該特定一個關聯值的多個特定目標詞彙則被視為一組關聯詞彙。然而當該多個關聯值皆不大於該詞彙關聯閾值時,該多個目標詞彙則被視為並非關聯詞彙。在一實施方式中,該詞彙關聯閾值的大小亦可依據使用對象而定。舉例來說:針對兒童的使用,則可考量字詞了解的程度而提高該詞彙關聯性的要求,避免因字詞之間深層意義上的關聯過於艱深導致不理解前後句的關聯性。至於在特殊專業技術領域的正式場合,則可在權衡實際需求下,選擇適當的該詞彙關聯閾值。在一實施方式中,該範圍區間可為0-10,而該詞彙關聯閾值可為6。 In one embodiment, the inter-sentence processing module 1220 can determine whether there is at least one group of related words between the plurality of target words based on the plurality of related values. In one implementation, the correlation value determined by the inter-sentence processing module 1220 may be within a range. When a specific associated value among the multiple associated values is greater than a word association threshold, the multiple specific target words forming the specific associated value are regarded as a group of associated words. However, when none of the plurality of correlation values is greater than the word correlation threshold, the plurality of target words are regarded as not being related words. In one implementation, the size of the word association threshold can also be determined according to the usage object. For example: for use by children, the degree of understanding of the words can be considered to increase the requirements for the relevance of the vocabulary, so as to avoid not understanding the relevance of the preceding and following sentences because the deep-seated connection between the words is too difficult. As for formal occasions in special professional and technical fields, the appropriate association threshold of the word can be selected after weighing the actual needs. In one implementation, the range interval may be 0-10, and the word association threshold may be 6.

在一實施方式中,當該多個目標詞彙之間存在至少一組關聯詞彙時,句間處理模組1220可依據該至少一組關聯詞彙確認該多個相鄰句子之間的該句子關聯性。由於一組關聯詞彙是基於該關聯值而決定,而該關聯值的計算需擷取不同句子中的該多個目標詞彙,因此該組關聯詞彙中的該多個目標詞彙應分屬不同句子,以協助判斷該多個相鄰句子之間的句子關聯性。 In one embodiment, when there is at least one group of related words between the plurality of target words, the inter-sentence processing module 1220 can confirm the sentence correlation between the plurality of adjacent sentences based on the at least one group of related words. . Since a set of associated words is determined based on the associated value, and the calculation of the associated value requires capturing the multiple target words in different sentences, the multiple target words in the set of associated words should belong to different sentences. To help determine the sentence relevance between the multiple adjacent sentences.

在一實施方式中,句間處理模組1220可直接計算該多個相鄰句子中該至少一組關聯詞彙的數量,並將該數量與一關聯數量閾值及/或重複數量閾值進行比較。若該多個相鄰句子中該至少一組關聯詞彙的數量不小於該關聯數量閾值,則可認定該多個相鄰句子具有一句子關聯度。若該多個相鄰句子中該至少一組關聯詞彙的數量小於該關聯數量閾值,則可認定該多個相鄰句子不具有該句子關聯度。在一實施方式中,該關聯數量閾 值可為2。若該多個相鄰句子中該至少一組關聯詞彙的數量等於或大於一重複數量閾值,則可認定該多個相鄰句子之間可能重複性過高,而確定該多個相鄰句子之間具有句子高重複度。若該多個相鄰句子中該至少一組關聯詞彙的數量小於該重複數量閾值,則可認定該多個相鄰句子之間不會有過高的重複性,而確定該多個相鄰句子之間不具有該句子高重複度。在一實施方式中,該重複數量閾值可為4。在一實施方式中,句間處理模組1220可直接加總該至少一組關聯詞彙的該關聯度,來判斷該多個相鄰句子之間是否具有該句子關聯度及/或該句子高重複度。在所述實施方式中,該加總的結果會直接受到該至少一組關聯詞彙的數量的影響。因此,針對數量結果的該關聯數量閾值以及該重複數量閾值可與針對加總結果的一關聯加總閾值以及一重複加總閾值間有對應關係。 In one embodiment, the inter-sentence processing module 1220 can directly calculate the number of the at least one group of related words in the plurality of adjacent sentences, and compare the number with a related number threshold and/or a repetition number threshold. If the number of the at least one group of related words in the plurality of adjacent sentences is not less than the association quantity threshold, it can be determined that the plurality of adjacent sentences have a sentence correlation degree. If the number of the at least one group of related words in the plurality of adjacent sentences is less than the association quantity threshold, it can be determined that the plurality of adjacent sentences do not have the sentence correlation degree. In one embodiment, the association number threshold The value can be 2. If the number of at least one group of related words in the multiple adjacent sentences is equal to or greater than a repetition quantity threshold, it can be determined that the repetition between the multiple adjacent sentences may be too high, and the number of the multiple adjacent sentences is determined. There is a high degree of repetition of sentences in between. If the number of the at least one group of related words in the multiple adjacent sentences is less than the repetition number threshold, it can be determined that there will not be excessive repetition between the multiple adjacent sentences, and it is determined that the multiple adjacent sentences There is no high degree of repetition of the sentence between them. In one implementation, the repetition number threshold may be 4. In one embodiment, the inter-sentence processing module 1220 can directly sum up the correlation degree of the at least one group of related words to determine whether there is the sentence correlation degree between the plurality of adjacent sentences and/or the sentence is highly repetitive. Spend. In the embodiment, the summing result is directly affected by the number of the at least one group of associated words. Therefore, the associated quantity threshold and the repetition quantity threshold for the quantity result may have a corresponding relationship with an associated summing threshold and a repetition summing threshold for the summing result.

在一實施方式中,句間處理模組1220可依據該句子關聯度及/或該句子高重複度,來確定該多個相鄰句子之間的該句子關聯性。 In one embodiment, the inter-sentence processing module 1220 can determine the sentence correlation between the plurality of adjacent sentences based on the sentence correlation and/or the sentence high repetition degree.

在一實施方式中,當該多個目標詞彙之間不存在該至少一組關聯詞彙時,句間處理模組1220可直接確認該多個相鄰句子之間不具有句子關聯性。 In one embodiment, when there is no at least one set of related words between the plurality of target words, the inter-sentence processing module 1220 can directly confirm that there is no sentence correlation between the plurality of adjacent sentences.

在步驟S740中,基於該句子關聯性確認是否將該多個相鄰句子中的其中一個句子設定為該待調整句。 In step S740, it is confirmed whether one of the plurality of adjacent sentences is set as the sentence to be adjusted based on the sentence correlation.

在一實施方式中,當句間處理模組1220確認該多個相鄰句子之間不具有句子關聯性,句間處理模組1220可將該多個相鄰句子中的其中一個句子設定為該待調整句。 In one embodiment, when the inter-sentence processing module 1220 confirms that there is no sentence correlation between the plurality of adjacent sentences, the inter-sentence processing module 1220 can set one of the plurality of adjacent sentences to Sentence to be adjusted.

在一實施方式中,句間處理模組1220可依據該句子關聯度及/或該句子高重複度,來確定該多個相鄰句子之間的該句子關聯性。因此,句 間處理模組1220可依據該句子關聯度及該句子高重複度中的至少一個,來確認是否將該多個相鄰句子中的其中一個句子設定為該待調整句。 In one embodiment, the inter-sentence processing module 1220 can determine the sentence correlation between the plurality of adjacent sentences based on the sentence correlation and/or the sentence high repetition degree. Therefore, sentence The interprocessing module 1220 may determine whether to set one of the plurality of adjacent sentences as the sentence to be adjusted based on at least one of the sentence relevance and the sentence high repetition.

在一實施方式中,當句間處理模組1220確認該多個相鄰句子之間具有該句子關聯度且不具有該句子高重複度時,句間處理模組1220可確認該多個相鄰句子中沒有該待調整句而需要修改。在一實施方式中,當句間處理模組1220確認該多個相鄰句子之間不具有該句子關聯度時,句間處理模組1220可將該多個相鄰句子中的其中一個句子設定為該待調整句。在一實施方式中,當句間處理模組1220確認該多個相鄰句子之間具有該句子高重複度時,句間處理模組1220可將該多個相鄰句子中的其中一個句子設定為該待調整句。 In one embodiment, when the inter-sentence processing module 1220 confirms that the multiple adjacent sentences have the sentence relevance and do not have the high degree of repetition of the sentences, the inter-sentence processing module 1220 can confirm that the multiple adjacent sentences The sentence does not contain the sentence to be adjusted and needs to be modified. In one embodiment, when the inter-sentence processing module 1220 confirms that there is no sentence correlation between the plurality of adjacent sentences, the inter-sentence processing module 1220 may set one of the plurality of adjacent sentences to This is the sentence to be adjusted. In one embodiment, when the inter-sentence processing module 1220 confirms that there is a high degree of repetition of the sentence between the plurality of adjacent sentences, the inter-sentence processing module 1220 can set one of the plurality of adjacent sentences. This is the sentence to be adjusted.

在一實施方式中,當該多個相鄰句子的數量為2時,該其中一個句子為該多個句子中的一後方句子。在另一實施方式中,當該多個相鄰句子的數量為2時,該其中一個句子為該多個句子中的一前方句子。在一實施方式中,當該多個相鄰句子的數量為3個以上時,該其中一個句子為該多個句子中的一前方句子、一中間句子或一後方句子。 In one embodiment, when the number of adjacent sentences is 2, one of the sentences is a subsequent sentence among the plurality of sentences. In another embodiment, when the number of adjacent sentences is 2, one of the sentences is a previous sentence in the plurality of sentences. In one embodiment, when the number of adjacent sentences is more than three, one of the sentences is a preceding sentence, a middle sentence or a following sentence among the plurality of sentences.

在一實施方式中,當該多個相鄰句子被確認為不具有該待調整句時,句間處理模組1220可從該多個相鄰句子中移除最前面的句子,並加入該多個相鄰句子後的下一個句子,以進行另一組該多個相鄰句子之間的分析,直到該文本資訊的該多個句子皆完成確認。在一實施方式中,當該多個相鄰句子中的其中一個句子被認定為該待調整句時,該待調整句可被直接刪除,亦或生成一個新句子來取代該待調整句,以完成該文本資訊。 In one embodiment, when the plurality of adjacent sentences is confirmed not to have the sentence to be adjusted, the inter-sentence processing module 1220 may remove the frontmost sentence from the plurality of adjacent sentences and add the plurality of adjacent sentences. The next sentence after the adjacent sentences is used to perform another set of analysis between the adjacent sentences until the multiple sentences of the text information are all confirmed. In one embodiment, when one of the plurality of adjacent sentences is determined to be the sentence to be adjusted, the sentence to be adjusted can be directly deleted, or a new sentence can be generated to replace the sentence to be adjusted. Complete this text message.

在一實施方式中,當該文本資訊被確認為存在有該待調整句時,基於該文本參數判斷是否重新生成的新句子來取代該待調整句或直接刪除該待調整句,其中該文本資訊以及該重新生成的新句子皆基於該文本 模型以及該文本參數所生成。在一實施方式中,當該多個相鄰句子中的其中一個句子被認定為該待調整句時,文本生成模組1100可判斷刪除該待調整句後的該文本資訊的字數與該文本參數中的一文本需求字數之間的差異是否超過一預設字數閾值。在一實施方式中,若該差異超過該預設字數閾值時,文本生成模組1100可將該待調整句的前面至少一句及/或後面至少一句作為關鍵句,並利用該文本模型來生成該新句子,以取代原該待調整句的位置。若該差異不超過該預設字數閾值時,文本生成模組1100可不生成新的句子。 In one embodiment, when the text information is confirmed to contain the sentence to be adjusted, it is determined based on the text parameters whether to regenerate a new sentence to replace the sentence to be adjusted or to directly delete the sentence to be adjusted, wherein the text information and the regenerated new sentences are all based on the text model and the text parameters generated. In one embodiment, when one of the plurality of adjacent sentences is determined to be the sentence to be adjusted, the text generation module 1100 can determine the number of words of the text information after deleting the sentence to be adjusted and the number of words in the text. Whether the difference in word count required for a text in the parameter exceeds a preset word count threshold. In one embodiment, if the difference exceeds the preset word count threshold, the text generation module 1100 can use at least one sentence before and/or at least one sentence after the sentence to be adjusted as a key sentence, and use the text model to generate The new sentence replaces the original sentence to be adjusted. If the difference does not exceed the preset word count threshold, the text generation module 1100 may not generate a new sentence.

在一實施方式中,由於當該新句子生成時,該新句子仍需重新經過句間處理模組1220的分析,因此經句間處理模組1220分析認為該新句子不須被設定為該待調整句時,句間處理模組1220可接續分析該文本資訊中後續的句子。在一實施方式中,由於當該新句子生成時,該新句子亦可交由句內處理模組1210進行句內分析方法600,因此經句內處理模組1210以及句間處理模組1220分析認為該新句子不須被設定為該待調整句時,句內處理模組1210以及句間處理模組1220可接續分析該文本資訊中後續的句子。 In one embodiment, when the new sentence is generated, the new sentence still needs to be analyzed by the inter-sentence processing module 1220 again, so the analysis by the inter-sentence processing module 1220 determines that the new sentence does not need to be set as the pending sentence. When adjusting sentences, the inter-sentence processing module 1220 can continue to analyze subsequent sentences in the text information. In one embodiment, when the new sentence is generated, the new sentence can also be submitted to the intra-sentence processing module 1210 to perform the intra-sentence analysis method 600, so the intra-sentence processing module 1210 and the inter-sentence processing module 1220 analyze When it is considered that the new sentence does not need to be set as the sentence to be adjusted, the intra-sentence processing module 1210 and the inter-sentence processing module 1220 can continue to analyze subsequent sentences in the text information.

在一實施方式中,該文本參數可包括該文本需求字數、該預設字數閾值、可指示預設哪些多個語法結構的一結構指示、可指示預先儲存那些多個欲選詞性的一詞性指示、可指示該詞彙關聯閾值的一關聯指示、可指示該關聯數量閾值及該重複數量閾值的一數量指示以及/或可指示該關聯加總閾值及該重複加總閾值的一加總指示等。該文本參數可透過該電子裝置提供給句間處理模組1220。 In one embodiment, the text parameter may include the required number of words in the text, the preset word number threshold, a structure indication that may indicate which grammatical structures are preset, and a structure indication that may indicate which plurality of desired parts of speech are stored in advance. Part-of-speech indication, an association indication that can indicate the lexical association threshold, a quantity indication that can indicate the association quantity threshold and the repetition quantity threshold, and/or a summation indication that can indicate the association sum threshold and the repetition sum threshold. wait. The text parameters can be provided to the inter-sentence processing module 1220 through the electronic device.

在一實施方式中,本發明所使用的各種神經網絡可透過高斯誤差線性單元GELU(Gaussian Error Linear Unit)來作為激活函數。 In one implementation, the various neural networks used in the present invention can use a Gaussian Error Linear Unit (GELU) as the activation function.

以上所述,以上實施例僅用以說明本發明的技術方案,而非對其限制;儘管參照前述實施例對本發明進行了詳細的說明,本領域的普通技術人員應當理解:其依然可以對前述各實施例所記載的技術方案進行修改,或者對其中部分技術特徵進行等同替換;而這些修改或者替換,並不使相應技術方案的本質脫離本發明各實施例技術方案的範圍。 As mentioned above, the above embodiments are only used to illustrate the technical solution of the present invention, but not to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the foregoing. The technical solutions described in each embodiment may be modified, or some of the technical features may be equivalently replaced; however, these modifications or substitutions do not cause the essence of the corresponding technical solutions to depart from the scope of the technical solutions of each embodiment of the present invention.

綜上所述,本發明符合發明專利要件,爰依法提出專利申請。惟,以上所述者僅為本發明之較佳實施方式,舉凡熟悉本案技藝之人士,在爰依本案創作精神所作之等效修飾或變化,皆應包含於以下之申請專利範圍內。 To sum up, this invention meets the requirements for an invention patent and a patent application should be filed in accordance with the law. However, the above are only preferred embodiments of the present invention. Any equivalent modifications or changes made by those familiar with the art of this application in accordance with the creative spirit of this application should be included in the scope of the following patent applications.

400:方法 400:Method

S410-S440:步驟 S410-S440: Steps

Claims (14)

一種通過至少一個電子裝置所進行的文本自動生成方法,該文本自動生成方法包括:接收多個文本參數;依據該多個文本參數生成一文本資訊,其中該文本資訊包括多個句子;確認該多個句子中是否存在有一待調整句,其中該待調整句的該確認包括:透過一第一語言模型,從該多個句子中的特定一個句子取得多個單句詞彙以及各自的分詞詞性,並依據該多個單句詞彙的該多個分詞詞性,確認是否將該特定一個句子設定為該待調整句;透過該第一語言模型,從該多個句子中的多個相鄰句子取得多個鄰近詞彙以及各自的分詞詞性;依據該多個鄰近詞彙的該多個分詞詞性,從該多個鄰近詞彙中篩選出多個目標詞彙;透過一第二語言模型,針對該多個目標詞彙進行一關聯性分析,確認該多個目標詞彙之間的多個詞彙關聯性;依據該多個詞彙關聯性,確認該多個目標詞彙之間是否存在至少一組關聯詞彙,來確認該多個相鄰句子之間的一句子關聯性;及基於該句子關聯性確認是否將該多個相鄰句子中的其中一個句子設定為該待調整句;及當該文本資訊被確認為存在有該待調整句時,則調整該待調整句以完成該文本資訊。 A text automatic generation method performed by at least one electronic device. The text automatic generation method includes: receiving a plurality of text parameters; generating a text information based on the plurality of text parameters, wherein the text information includes a plurality of sentences; confirming the plurality of text parameters. Whether there is a sentence to be adjusted in a sentence, wherein the confirmation of the sentence to be adjusted includes: using a first language model to obtain multiple single-sentence vocabulary and respective part-of-speech parts from a specific sentence in the multiple sentences, and based on The plurality of word participles of the plurality of single-sentence words are used to confirm whether the specific sentence is set as the sentence to be adjusted; through the first language model, a plurality of adjacent words are obtained from the plurality of adjacent sentences in the plurality of sentences. and respective part-of-speech participles; based on the multiple part-parts of speech of the multiple adjacent words, select a plurality of target words from the multiple adjacent words; through a second language model, perform a correlation on the multiple target words Analyze and confirm multiple word correlations between the multiple target words; based on the multiple word correlations, confirm whether there is at least one group of related words between the multiple target words to confirm the relationship between the multiple adjacent sentences. There is a sentence correlation between; and based on the sentence correlation, it is confirmed whether one of the multiple adjacent sentences is set as the sentence to be adjusted; and when the text information is confirmed to have the sentence to be adjusted, Then adjust the sentence to be adjusted to complete the text information. 如請求項1所述的文本自動生成方法,更包括: 依據該特定一個句子中該多個單句詞彙的該多個分詞詞性的分布,取得一語法關係;及依據該語法關係,確認是否將該特定一個句子設定為該待調整句。 The automatic text generation method described in request item 1 further includes: Obtain a grammatical relationship based on the distribution of the plurality of word participles of the plurality of single-sentence words in the specific sentence; and based on the grammatical relationship, confirm whether the specific sentence is set as the sentence to be adjusted. 如請求項2所述的文本自動生成方法,更包括:接收多個語法結構;依據該多個語法結構與該語法關係,確認該特定一個句子的一句構完整度;以及依據該句構完整度,確認該特定一個句子是否為該待調整句。 The method for automatically generating text as described in claim 2 further includes: receiving multiple grammatical structures; confirming the completeness of a specific sentence based on the multiple grammatical structures and the grammatical relationship; and based on the completeness of the sentence structure. , confirm whether the specific sentence is the sentence to be adjusted. 如請求項1所述的文本自動生成方法,更包括:當該多個目標詞彙之間存在該至少一組關聯詞彙時,依據該至少一組關聯詞彙確認該多個相鄰句子之間的該句子關聯性;及當該多個目標詞彙之間不存在該至少一組關聯詞彙時,確認該多個相鄰句子之間的該句子關聯性,並確認該多個相鄰句子中的該其中一個句子為該待調整句。 The automatic text generation method as described in claim 1, further comprising: when there is at least one group of related words between the plurality of target words, confirming the relationship between the plurality of adjacent sentences based on the at least one group of related words. Sentence correlation; and when there is no at least one group of related words between the plurality of target words, confirm the sentence correlation between the plurality of adjacent sentences, and confirm the one among the plurality of adjacent sentences. One sentence is the sentence to be adjusted. 如請求項1所述的文本自動生成方法,其中:當該至少兩個相鄰句子的數量為3個以上時,該其中一個句子為該多個句子中的一中間句子。 The automatic text generation method as described in claim 1, wherein: when the number of the at least two adjacent sentences is more than 3, the one sentence is an intermediate sentence among the plurality of sentences. 如請求項1所述的文本自動生成方法,更包括:當該文本資訊被確認為存在有該待調整句時,基於該文本參數判斷是否重新生成的新句子來取代該待調整句或直接刪除該待調整句,其中該文本資訊以及該重新生成的新句子皆基於一文本模型以及該文本參數所生成。 The automatic text generation method as described in request item 1 further includes: when the text information is confirmed to contain the sentence to be adjusted, determining whether to regenerate a new sentence based on the text parameters to replace the sentence to be adjusted or to delete it directly In the sentence to be adjusted, the text information and the regenerated new sentence are generated based on a text model and the text parameters. 一種電子裝置,其特徵在於,該電子裝置包括儲存器和至少一個處理器,所述儲存器中儲存有至少一個指令,所述至少一個指令被所述至少一個處理器執行時實現如請求項1至6中任意一項所述的文本自動生成方法。 An electronic device, characterized in that the electronic device includes a storage and at least one processor, at least one instruction is stored in the storage, and when the at least one instruction is executed by the at least one processor, it implements claim 1 To the automatic text generation method described in any one of 6. 一種通過至少一個電子裝置所進行的文本修改方法,該文本修改方法包括:接收一文本資訊以及一文本參數,其中該文本資訊包括多個句子;確認該多個句子中是否存在有一待調整句,其中該待調整句的該確認包括:透過一第一語言模型,從該多個句子中的特定一個句子取得多個單句詞彙以及各自的分詞詞性,並依據該多個單句詞彙的該多個分詞詞性,確認是否將該特定一個句子設定為該待調整句;透過該第一語言模型,從該多個句子中的多個相鄰句子取得多個鄰近詞彙以及各自的分詞詞性;依據該多個鄰近詞彙的該多個分詞詞性,從該多個鄰近詞彙中篩選出多個目標詞彙;透過一第二語言模型,針對該多個目標詞彙進行一關聯性分析,確認該多個目標詞彙之間的多個詞彙關聯性;依據該多個詞彙關聯性,確認該多個目標詞彙之間是否存在至少一組關聯詞彙,來確認該多個相鄰句子之間的一句子關聯性;及基於該句子關聯性確認是否將該多個相鄰句子中的其中一個句子設定為該待調整句;及當該文本資訊被確認為存在有該待調整句時,基於該文本參數判斷是否需要生成一新句子以取代該待調整句。 A text modification method performed by at least one electronic device. The text modification method includes: receiving a text information and a text parameter, wherein the text information includes a plurality of sentences; confirming whether there is a sentence to be adjusted in the plurality of sentences, The confirmation of the sentence to be adjusted includes: using a first language model to obtain a plurality of single-sentence vocabulary and their respective part-of-speech parts from a specific sentence among the plurality of sentences, and based on the plurality of word segmentations of the plurality of single-sentence vocabulary Part of speech, confirm whether the specific sentence is set as the sentence to be adjusted; through the first language model, obtain multiple adjacent words and respective part of speech from multiple adjacent sentences in the multiple sentences; based on the multiple The multiple word participles of adjacent words are used to select multiple target words from the multiple adjacent words; through a second language model, a correlation analysis is performed on the multiple target words to confirm the relationship between the multiple target words. Multiple lexical correlations; based on the multiple lexical correlations, confirm whether there is at least one group of related words between the multiple target words, to confirm a sentence correlation between the multiple adjacent sentences; and based on the Sentence correlation confirms whether one of the multiple adjacent sentences is set as the sentence to be adjusted; and when the text information is confirmed to have the sentence to be adjusted, it is determined based on the text parameters whether a new sentence needs to be generated. sentence to replace the sentence to be adjusted. 如請求項8所述的文本修改方法,更包括:依據該特定一個句子中該多個單句詞彙的該多個分詞詞性的分布,取得一語法關係;及依據該語法關係,確認是否將該特定一個句子設定為該待調整句。 The text modification method as described in claim 8 further includes: obtaining a grammatical relationship based on the distribution of the plurality of word participles of the plurality of single-sentence words in the specific sentence; and based on the grammatical relationship, confirming whether the specific A sentence is set as the sentence to be adjusted. 如請求項9所述的文本修改方法,更包括:接收多個語法結構;依據該多個語法結構與該語法關係,確認該特定一個句子的一句構完整度;以及依據該句構完整度,確認該特定一個句子是否為該待調整句。 The text modification method as described in claim 9 further includes: receiving multiple grammatical structures; confirming the completeness of the sentence structure of the specific sentence based on the multiple grammatical structures and the grammatical relationship; and based on the completeness of the sentence structure, Confirm whether the specific sentence is the sentence to be adjusted. 如請求項8所述的文本修改方法,更包括:當該多個目標詞彙之間存在該至少一組關聯詞彙時,依據該至少一組關聯詞彙確認該多個相鄰句子之間的該句子關聯性;及當該多個目標詞彙之間不存在該至少一組關聯詞彙時,確認該多個相鄰句子之間的該句子關聯性,並確認該多個相鄰句子中的該其中一個句子為該待調整句。 The text modification method according to claim 8, further comprising: when there is at least one group of related words between the plurality of target words, confirming the sentence between the plurality of adjacent sentences based on the at least one group of related words. Correlation; and when there is no at least one group of related words between the plurality of target words, confirm the sentence correlation between the plurality of adjacent sentences, and confirm the one of the plurality of adjacent sentences. The sentence is the sentence to be adjusted. 如請求項8所述的文本修改方法,其中:當該至少兩個相鄰句子的數量為3個以上時,該其中一個句子為該多個句子中的一中間句子。 The text modification method as described in claim 8, wherein: when the number of the at least two adjacent sentences is more than 3, the one sentence is an intermediate sentence among the plurality of sentences. 如請求項8所述的文本修改方法,更包括:當該新句子生成時,以該新句子取代該待調整句,其中該新句子是依據一文本模型而生成;以及當該新句子未生成時,直接刪除該待調整句。 The text modification method as described in claim 8, further comprising: when the new sentence is generated, replacing the sentence to be adjusted with the new sentence, wherein the new sentence is generated based on a text model; and when the new sentence is not generated , directly delete the sentence to be adjusted. 一種電子裝置,其特徵在於,該電子裝置包括儲存器和至少一個處理器,所述儲存器中儲存有至少一個指令,所述至少一個指令被所述至少一個處理器執行時實現如請求項8至13中任意一項所述的文本修改方法。 An electronic device, characterized in that the electronic device includes a storage and at least one processor, at least one instruction is stored in the storage, and when the at least one instruction is executed by the at least one processor, it implements claim 8 to the text modification method described in any one of 13.
TW111130822A 2022-08-16 2022-08-16 Method and electiacal device for automatical generating text data and for revising text data TWI822258B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111130822A TWI822258B (en) 2022-08-16 2022-08-16 Method and electiacal device for automatical generating text data and for revising text data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111130822A TWI822258B (en) 2022-08-16 2022-08-16 Method and electiacal device for automatical generating text data and for revising text data

Publications (2)

Publication Number Publication Date
TWI822258B true TWI822258B (en) 2023-11-11
TW202409891A TW202409891A (en) 2024-03-01

Family

ID=89722436

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111130822A TWI822258B (en) 2022-08-16 2022-08-16 Method and electiacal device for automatical generating text data and for revising text data

Country Status (1)

Country Link
TW (1) TWI822258B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107357775A (en) * 2017-06-05 2017-11-17 百度在线网络技术(北京)有限公司 The text error correction method and device of Recognition with Recurrent Neural Network based on artificial intelligence
CN113254585A (en) * 2021-05-31 2021-08-13 冠传网络科技(南京)有限公司 Optimal generation method of text-pushing text and electronic equipment
TW202209164A (en) * 2020-08-20 2022-03-01 國立高雄大學 Automatic program generation system
US20220253472A1 (en) * 2021-02-08 2022-08-11 Axios Media Inc. System and method for text processing for summarization and optimization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107357775A (en) * 2017-06-05 2017-11-17 百度在线网络技术(北京)有限公司 The text error correction method and device of Recognition with Recurrent Neural Network based on artificial intelligence
TW202209164A (en) * 2020-08-20 2022-03-01 國立高雄大學 Automatic program generation system
US20220253472A1 (en) * 2021-02-08 2022-08-11 Axios Media Inc. System and method for text processing for summarization and optimization
CN113254585A (en) * 2021-05-31 2021-08-13 冠传网络科技(南京)有限公司 Optimal generation method of text-pushing text and electronic equipment

Also Published As

Publication number Publication date
TW202409891A (en) 2024-03-01

Similar Documents

Publication Publication Date Title
US10229188B2 (en) Automatic corpus expansion using question answering techniques
US10242670B2 (en) Syntactic re-ranking of potential transcriptions during automatic speech recognition
WO2022062798A1 (en) Rpa and ai-based table information extraction method and apparatus, device and medium
US9514417B2 (en) Cloud-based plagiarism detection system performing predicting based on classified feature vectors
US11423089B2 (en) System and method for determining application programming interface and object bindings on natural language processed inputs
US11416539B2 (en) Media selection based on content topic and sentiment
US11010566B2 (en) Inferring confidence and need for natural language processing of input data
US10235350B2 (en) Detect annotation error locations through unannotated document segment partitioning
WO2023045184A1 (en) Text category recognition method and apparatus, computer device, and medium
US20190163838A1 (en) Method and system for processing multimodal user queries
US11594054B2 (en) Document lineage management system
EP3186804A1 (en) Method for text processing
US11516159B2 (en) Systems and methods for providing a comment-centered news reader
US10289465B2 (en) Generating tailored error messages
US20230394595A1 (en) Expanding semantic classes via user feedback
US10699078B2 (en) Comment-centered news reader
CN110287498B (en) Hierarchical translation method, device and storage medium
Balagopalan et al. Cross-language aphasia detection using optimal transport domain adaptation
TWI822258B (en) Method and electiacal device for automatical generating text data and for revising text data
EP3186707B1 (en) Method of and system for processing a user-generated input command
Channell et al. Automated grammatical tagging of child language samples
CN109522541B (en) Out-of-service sentence generation method and device
TWM638178U (en) Electiacal device for automatical generating text data and electiacal device for revising text data
US11436505B2 (en) Data curation for corpus enrichment
CN114341867B (en) Translation method, translation device, translation client, translation server and translation storage medium