[go: up one dir, main page]

JP2022116979A - Text generation device, program and text generation method - Google Patents

Text generation device, program and text generation method Download PDF

Info

Publication number
JP2022116979A
JP2022116979A JP2021013425A JP2021013425A JP2022116979A JP 2022116979 A JP2022116979 A JP 2022116979A JP 2021013425 A JP2021013425 A JP 2021013425A JP 2021013425 A JP2021013425 A JP 2021013425A JP 2022116979 A JP2022116979 A JP 2022116979A
Authority
JP
Japan
Prior art keywords
sentence
text
sentences
unit
generation device
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2021013425A
Other languages
Japanese (ja)
Inventor
程 張
Cheng Zhang
賢佑 追立
Kensuke Oitate
亘 木ノ下
Wataru Kinoshita
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Information and Telecommunication Engineering Ltd
Original Assignee
Hitachi Information and Telecommunication Engineering Ltd
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 Hitachi Information and Telecommunication Engineering Ltd filed Critical Hitachi Information and Telecommunication Engineering Ltd
Priority to JP2021013425A priority Critical patent/JP2022116979A/en
Publication of JP2022116979A publication Critical patent/JP2022116979A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Machine Translation (AREA)

Abstract

【課題】 分析していない文章であっても入力データとして受け付け、不自然でない表現を大量に効率的に学習できる教師データを生成する技術を提供する。【解決手段】文章生成装置であって、自然言語の文章を解析して意味情報をモデル化する言語理解部と、該文章の話題情報をモデル化するアノテーション推定部と、自然言語の文章に係る意味情報と話題情報とを用いて文章を生成する文章生成部と、生成した文章を評価して、自然言語の文章と類似し、かつ、不自然でない文章を教師データとして抽出して出力する文章評価部と、を備える。【選択図】図1A technique is provided that accepts even unanalyzed sentences as input data and generates teacher data that enables efficient learning of a large amount of expressions that are not unnatural. Kind Code: A1 A text generation device includes a language understanding unit that analyzes a natural language text to model semantic information, an annotation estimation unit that models topic information of the text, and a A sentence generation unit that generates sentences using semantic information and topic information, and a sentence that evaluates the generated sentences and extracts and outputs sentences that are similar to natural language sentences and are not unnatural as teacher data. and an evaluation unit. [Selection drawing] Fig. 1

Description

本発明は、文章生成装置、プログラムおよび文章生成方法に関する。 The present invention relates to a sentence generation device, a program, and a sentence generation method.

特許文献1には、自然言語処理により、少量のアノテーション付テキストデータを機械的に拡張して、アノテーションラベルと矛盾せず、かつ、テキストとして不自然でない、大量のアノテーション付テキストデータを得ることができる、アノテーション付テキストデータの拡張方法の開示がある。 In Patent Document 1, natural language processing is used to mechanically expand a small amount of annotated text data to obtain a large amount of annotated text data that is consistent with annotation labels and is not unnatural as text. There is a disclosure of a method for extending annotated text data that can be used.

特開2019-185551号公報JP 2019-185551 A

上記特許文献1に記載された技術は、入力されるテキストデータには出現する文脈(出現する記事のジャンル)があらかじめアノテーションラベルとして付与されている必要があるため入力データの準備に手間がかかり、自然言語処理は無限に近い言語表現を学習する必要が高いことを考慮すると、充分とはいえない。 The technology described in Patent Document 1 requires that text data to be input have the context in which it appears (the genre of the article in which it appears) as an annotation label in advance. Considering that natural language processing requires learning nearly infinite language expressions, it is not sufficient.

本発明の目的は、分析していない文章であっても入力データとして受け付け、不自然でない表現を大量に効率的に学習できる教師データを生成する技術を提供することにある。 SUMMARY OF THE INVENTION It is an object of the present invention to provide a technique for accepting even unanalyzed sentences as input data and generating teaching data that enables efficient learning of a large amount of natural expressions.

本願は、上記課題の少なくとも一部を解決する手段を複数含んでいるが、その例を挙げるならば、以下のとおりである。上記課題を解決すべく、本発明の一態様に係る文章生成装置は、自然言語の文章を解析して意味情報をモデル化する言語理解部と、該文章の話題情報をモデル化するアノテーション推定部と、前記自然言語の文章に係る前記意味情報と前記話題情報とを用いて文章を生成する文章生成部と、生成した前記文章を評価して、前記自然言語の文章と類似し、かつ、不自然でない前記文章を教師データとして抽出して出力する文章評価部と、を備える。 The present application includes a plurality of means for solving at least part of the above problems, and examples thereof are as follows. In order to solve the above problems, a sentence generation device according to an aspect of the present invention includes a language understanding unit that analyzes sentences in a natural language and models semantic information, and an annotation estimation unit that models topic information of the sentences. and a text generation unit that generates a text using the semantic information and the topic information related to the text in the natural language, and evaluates the generated text to determine whether it is similar to the text in the natural language and is inappropriate. and a sentence evaluation unit that extracts and outputs the unnatural sentence as teacher data.

また、上記の文章生成装置において、前記言語理解部は、前記自然言語の文章および前記生成した文章の各々をトークンに区切って各々の文章の文章意味ベクトルを取得し、前記文章評価部は、前記各々の文章の前記文章意味ベクトル間の比較を行って類似度を算出し類似を判定するものであってもよい。 Further, in the above sentence generation device, the language understanding unit divides each of the natural language sentence and the generated sentence into tokens to obtain a sentence semantic vector of each sentence, and the sentence evaluation unit obtains the sentence semantic vector of each sentence. The similarity may be determined by comparing the sentence semantic vectors of each sentence to calculate the degree of similarity.

また、上記の文章生成装置において、前記アノテーション推定部は、前記自然言語の文章および前記生成した文章の各々をトークンに区切って各々の文章のアノテーションベクトルを取得し、前記文章評価部は、前記各々の文章の前記アノテーションベクトル間の比較を行って類似度を算出し類似を判定するものであってもよい。 Further, in the text generation device described above, the annotation estimation unit divides each of the natural language text and the generated text into tokens to obtain annotation vectors of each text, and the text evaluation unit obtains an annotation vector of each text. The similarity may be determined by calculating the degree of similarity by comparing the annotation vectors of the sentences.

また、上記の文章生成装置において、前記文章評価部は、入力文章を受け付けると文章の自然性スコアを算出するよう学習済みの文章自然性評価モデルを用いて、生成した前記文章の自然性スコアを算出して不自然でないか否かを判定するものであってもよい。 Further, in the above sentence generation device, the sentence evaluation unit calculates the naturalness score of the generated sentence using a sentence naturalness evaluation model that has been trained to calculate the naturalness score of the sentence when the input sentence is received. It may be calculated and determined whether or not it is unnatural.

また、上記の文章生成装置において、前記文章評価部は、前記教師データを出力する際に、生成した前記文章ごとに前記自然言語の文章との類似度または自然性スコアをグラフとして出力するものであってもよい。 Further, in the above sentence generation device, the sentence evaluation unit outputs a similarity score or a naturalness score of each generated sentence to the natural language sentence as a graph when outputting the training data. It can be.

また、上記の文章生成装置において、前記グラフは、前記類似度または前記自然性スコアを軸の一つに含む2次元以上のグラフであってもよい。 Further, in the sentence generation device described above, the graph may be a two-dimensional or more graph including the degree of similarity or the naturalness score as one of its axes.

また、上記の文章生成装置において、前記教師データを、所定の自然言語の対話処理を行う学習済みモデルの学習に用いるものであってもよい。 Further, in the sentence generation device described above, the teacher data may be used for learning of a trained model that performs predetermined natural language dialogue processing.

また、本発明に係る文章生成プログラムは、コンピュータを、文章生成装置として機能させるプログラムであって、前記コンピュータのプロセッサに、自然言語の文章を解析して意味情報をモデル化する言語理解ステップと、該文章の話題情報をモデル化するアノテーション推定ステップと、前記自然言語の文章に係る前記意味情報と前記話題情報とを用いて文章を生成する文章生成ステップと、生成した前記文章を評価して、前記自然言語の文章と類似し、かつ、不自然でない前記文章を教師データとして抽出して出力する文章評価ステップと、を実施させることを特徴とする。 Further, a text generation program according to the present invention is a program that causes a computer to function as a text generation device, wherein a processor of the computer is provided with a language understanding step of analyzing a natural language text and modeling semantic information, An annotation estimation step of modeling topic information of the sentence; a sentence generation step of generating a sentence using the semantic information and the topic information relating to the sentence in the natural language; and evaluating the generated sentence, and a sentence evaluation step of extracting and outputting the sentence similar to the natural language sentence and not unnatural as teacher data.

また、本発明に係る文章生成方法は、コンピュータを文章生成装置として用いる文章生成方法であって、前記コンピュータに、自然言語の文章を解析して意味情報をモデル化する言語理解ステップと、該文章の話題情報をモデル化するアノテーション推定ステップと、前記自然言語の文章に係る前記意味情報と前記話題情報とを用いて文章を生成する文章生成ステップと、生成した前記文章を評価して、前記自然言語の文章と類似し、かつ、不自然でない前記文章を教師データとして抽出して出力する文章評価ステップと、を実施させることを特徴とする。 Further, a text generation method according to the present invention is a text generation method using a computer as a text generation device, wherein the computer is provided with a language understanding step of analyzing a text of a natural language to model semantic information; a sentence generation step of generating a sentence using the semantic information and the topic information relating to the sentence in the natural language; and evaluating the generated sentence to evaluate the natural language and a sentence evaluation step of extracting and outputting the sentence similar to the sentence of the language and not unnatural as teacher data.

本発明によれば、分析していない文章であっても入力データとして受け付け、不自然でない表現を大量に効率的に学習できる教師データを生成する技術を提供することができる。上記した以外の課題、構成及び効果は、以下の実施形態の説明により明らかにされる。 According to the present invention, it is possible to provide a technique that accepts even unanalyzed sentences as input data and generates teacher data that enables efficient learning of a large amount of expressions that are not unnatural. Problems, configurations, and effects other than those described above will be clarified by the following description of the embodiments.

本発明の実施形態に係る文章生成システムの構成例を示す図である。It is a figure which shows the structural example of the sentence production|generation system which concerns on embodiment of this invention. 入力文記憶部に格納されるデータ構造例を示す図である。It is a figure which shows the example of a data structure stored in an input sentence memory|storage part. 生成文記憶部に格納されるデータ構造例を示す図である。FIG. 4 is a diagram showing an example data structure stored in a generated sentence storage unit; 文章生成装置のハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of a sentence production|generation apparatus. 文章増幅処理のフローの例を示す図である。It is a figure which shows the example of the flow of sentence amplification processing. 生成文章評価処理のフローの例を示す図である。FIG. 10 is a diagram showing an example of the flow of generated sentence evaluation processing; 文章自然性評価モデルの入出力関係を示す図である。It is a figure which shows the input-output relationship of a sentence naturalness evaluation model. 入出力画面の例を示す図である。FIG. 10 is a diagram showing an example of an input/output screen;

以下、本発明に係る一つの実施の形態を図面に基づいて説明する。なお、実施の形態を説明するための全図において、同一の部材には原則として同一の符号を付し、その繰り返しの説明は省略する。また、以下の実施の形態において、その構成要素(要素ステップ等も含む)は、特に明示した場合および原理的に明らかに必須であると考えられる場合等を除き、必ずしも必須のものではないことは言うまでもない。また、「Aからなる」、「Aよりなる」、「Aを有する」、「Aを含む」と言うときは、特にその要素のみである旨明示した場合等を除き、それ以外の要素を排除するものでないことは言うまでもない。同様に、以下の実施の形態において、構成要素等の形状、位置関係等に言及するときは、特に明示した場合および原理的に明らかにそうでないと考えられる場合等を除き、実質的にその形状等に近似または類似するもの等を含むものとする。 One embodiment according to the present invention will be described below with reference to the drawings. In principle, the same members are denoted by the same reference numerals in all drawings for describing the embodiments, and repeated description thereof will be omitted. In addition, in the following embodiments, the constituent elements (including element steps, etc.) are not necessarily essential, unless otherwise specified or clearly considered essential in principle. Needless to say. In addition, when saying "consisting of A", "consisting of A", "having A", or "including A", other elements are excluded unless it is explicitly stated that only those elements are included. It goes without saying that it is not something to do. Similarly, in the following embodiments, when referring to the shape, positional relationship, etc. of components, etc., unless otherwise specified or in principle clearly considered otherwise, the shape is substantially the same. It shall include things that are similar or similar to, etc.

以下の説明では、「入出力部140」、「表示部150」は、一つ以上のインターフェースデバイスでよい。当該一つ以上のインターフェースデバイスは、下記のうちの少なくとも一つでよい。
・一つ以上のI/O(Input/Output)インターフェースデバイス。I/Oインターフェースデバイスは、I/Oデバイスと遠隔の運用管理装置10とのうちの少なくとも一つに対するインターフェースデバイスである。運用管理装置10に対するI/Oインターフェースデバイスは、通信インターフェースデバイスでよい。少なくとも一つのI/Oデバイスは、ユーザインターフェースデバイス、例えば、キーボード及びポインティングデバイスのような入力デバイスと、表示デバイスのような出力デバイスとのうちのいずれでもよい。
・一つ以上の通信インターフェースデバイス。一つ以上の通信インターフェースデバイスは、一つ以上の同種の通信インターフェースデバイス(例えば一つ以上のNIC(Network Interface Card))であってもよいし二つ以上の異種の通信インターフェースデバイス(例えばNICとHBA(Host Bus Adapter))であってもよい。
In the following description, "input/output unit 140" and "display unit 150" may be one or more interface devices. The one or more interface devices may be at least one of the following:
- One or more I/O (Input/Output) interface devices. The I/O interface device is an interface device for at least one of the I/O device and the remote operation management device 10 . The I/O interface device for the operation management device 10 may be a communication interface device. The at least one I/O device may be any of a user interface device, eg, an input device such as a keyboard and pointing device, and an output device such as a display device.
- One or more communication interface devices. The one or more communication interface devices may be one or more of the same type of communication interface device (e.g., one or more NICs (Network Interface Cards)) or two or more different types of communication interface devices (e.g., NIC and It may be an HBA (Host Bus Adapter).

また、以下の説明では、「メモリ」は、一つ以上の記憶デバイスの一例である一つ以上のメモリデバイスであり、典型的には主記憶デバイスでよい。メモリにおける少なくとも一つのメモリデバイスは、揮発性メモリデバイスであってもよいし不揮発性メモリデバイスであってもよい。 Also, in the following description, "memory" refers to one or more memory devices, which are examples of one or more storage devices, and may typically be a main memory device. At least one memory device in the memory may be a volatile memory device or a non-volatile memory device.

また、以下の説明では、「記憶部」または「ストレージ」は、メモリと永続記憶装置のうちメモリかまたは両方であればよい。具体的には、永続記憶装置は例えば、HDD(Hard Disk Drive)、SSD(Solid State Drive)、NVME(Non-Volatile Memory Express)ドライブ、又は、SCM(Storage Class Memory)でよい。 Also, in the following description, "storage unit" or "storage" may be memory or both of memory and permanent storage. In particular, the permanent storage device may be, for example, a HDD (Hard Disk Drive), an SSD (Solid State Drive), an NVME (Non-Volatile Memory Express) drive, or an SCM (Storage Class Memory).

また、以下の説明では、「処理部」または「プロセッサ」は、一つ以上のプロセッサデバイスでよい。少なくとも一つのプロセッサデバイスは、典型的には、CPU(Central Processing Unit)のようなマイクロプロセッサデバイスでよいが、GPU(Graphics Processing Unit)のような他種のプロセッサデバイスでもよい。少なくとも一つのプロセッサデバイスは、シングルコアでもよいしマルチコアでもよい。少なくとも一つのプロセッサデバイスは、プロセッサコアでもよい。少なくとも一つのプロセッサデバイスは、処理の一部又は全部を行うハードウェア記述言語によりゲートアレイの集合体である回路(例えばFPGA(Field-Programmable Gate Array)、CPLD(Complex Programmable Logic Device)又はASIC(Application Specific Integrated Circuit))といった広義のプロセッサデバイスでもよい。 Also, in the following description, a "processing unit" or "processor" may be one or more processor devices. The at least one processor device may typically be a microprocessor device such as a CPU (Central Processing Unit), but may be another type of processor device such as a GPU (Graphics Processing Unit). At least one processor device may be single-core or multi-core. At least one processor device may be a processor core. At least one processor device is a circuit (for example, FPGA (Field-Programmable Gate Array), CPLD (Complex Programmable Logic Device) or ASIC (Application A processor device in a broad sense such as Specific Integrated Circuit) may also be used.

また、以下の説明では、「yyy部」の表現にて機能を説明することがあるが、機能は、一つ以上のコンピュータプログラムがプロセッサによって実行されることで実現されてもよいし、一つ以上のハードウェア回路(例えばFPGA又はASIC)によって実現されてもよいし、それらの組合せによって実現されてもよい。プログラムがプロセッサによって実行されることで機能が実現される場合、定められた処理が、適宜に記憶装置及び/又はインターフェース装置等を用いながら行われるため、機能はプロセッサの少なくとも一部とされてもよい。機能を主語として説明された処理は、プロセッサあるいはそのプロセッサを有する装置が行う処理としてもよい。プログラムは、プログラムソースからインストールされてもよい。プログラムソースは、例えば、プログラム配布計算機又は計算機が読み取り可能な記録媒体(例えば非一時的な記録媒体)であってもよい。各機能の説明は一例であり、複数の機能が一つの機能にまとめられたり、一つの機能が複数の機能に分割されたりしてもよい。 In addition, in the following description, the function may be described using the expression “yyy part”, but the function may be realized by executing one or more computer programs by a processor, or may be realized by executing one or more computer programs. It may be realized by the above hardware circuits (for example, FPGA or ASIC), or may be realized by a combination thereof. When a function is realized by executing a program by a processor, the defined processing is performed using a storage device and/or an interface device as appropriate, so the function may be at least part of the processor. good. A process described with a function as the subject may be a process performed by a processor or a device having the processor. Programs may be installed from program sources. The program source may be, for example, a program distribution computer or a computer-readable recording medium (for example, a non-temporary recording medium). The description of each function is an example, and multiple functions may be combined into one function, or one function may be divided into multiple functions.

また、以下の説明では、「プログラム」や「処理部」を主語として処理を説明する場合があるが、プログラムを主語として説明された処理は、プロセッサあるいはそのプロセッサを有する装置が行う処理としてもよい。また、二つ以上のプログラムが一つのプログラムとして実現されてもよいし、一つのプログラムが二つ以上のプログラムとして実現されてもよい。 Further, in the following explanation, the processing may be explained with the subject of "program" or "processing unit", but the processing explained with the program as the subject may be the processing performed by the processor or the device having the processor. . Also, two or more programs may be implemented as one program, and one program may be implemented as two or more programs.

また、以下の説明では、「xxxテーブル」といった表現にて、入力に対して出力が得られる情報を説明することがあるが、当該情報は、どのような構造のテーブルでもよいし、入力に対する出力を発生するニューラルネットワーク、遺伝的アルゴリズムやランダムフォレストに代表されるような学習モデルでもよい。従って、「xxxテーブル」を「xxx情報」と言うことができる。また、以下の説明において、各テーブルの構成は一例であり、一つのテーブルは、二つ以上のテーブルに分割されてもよいし、二つ以上のテーブルの全部又は一部が一つのテーブルであってもよい。 In the following description, the expression "xxx table" may be used to describe information that provides an output for an input. It may be a learning model represented by a neural network, a genetic algorithm, or a random forest that generates . Therefore, the "xxx table" can be called "xxx information". Also, in the following description, the configuration of each table is an example, and one table may be divided into two or more tables, or all or part of two or more tables may be one table. may

また、以下の説明では、「文章生成システム」は、一つ以上の物理的な計算機で構成されたシステムでもよいし、物理的な計算リソース群(例えば、クラウド基盤)上に実現されたシステム(例えば、クラウドコンピューティングシステム)でもよい。文章生成システムが表示用情報を「表示する」ことは、計算機が有する表示デバイスに表示用情報を表示することであってもよいし、計算機が表示用計算機に表示用情報を送信することであってもよい(後者の場合は表示用計算機によって表示用情報が表示される)。 Also, in the following description, the "text generation system" may be a system composed of one or more physical computers, or a system ( For example, it may be a cloud computing system). "Displaying" the display information by the text generation system may be displaying the display information on a display device of the computer, or the computer may transmit the display information to the display computer. (in the latter case the display information is displayed by a display computer).

近年、ニューラルネットワークにより、データの特徴を深く学習した学習済みモデルが様々な分野の認識や分析などに用いられている。一方で、適用する対象分野、例えばNLP(Natural Language Processing)においては学習用教師データ(異常及び正常)を十分に用意できない場合、認識精度を実用レベルに到達させることが困難である。しかし、言語は直接的に連続値データにできないこともあって画像認識のように文章データを自動的に生成する手法がなく、教師データ作成に膨大な時間と人件費が必要となる。 In recent years, trained models that have learned the characteristics of data deeply using neural networks are used for recognition and analysis in various fields. On the other hand, in the target field of application, for example, NLP (Natural Language Processing), if sufficient teacher data (abnormal and normal) for learning cannot be prepared, it is difficult to achieve a practical level of recognition accuracy. However, since language cannot be converted directly to continuous value data, there is no method for automatically generating sentence data like image recognition, and a huge amount of time and labor costs are required to create training data.

例えば、単語間の出現確率分布を使って雑談チャットボットなどが実現されている。しかし、チャットボットにより生成された文章は、種類が少なく文法的に問題がある場合も少なくない。本発明では、入力した自然言語の文章に対し、言語理解とアノテーション推定を実施することで、意味とアノテーション(本明細書において本発明に係る「アノテーション」とは、「話題」をいう)に従い、教師用のより自然な文章を自動的に生成することが可能になる。 For example, chatbots for chatting are realized by using the appearance probability distribution between words. However, sentences generated by chatbots are often of few types and have grammatical problems. In the present invention, by performing language understanding and annotation estimation on the input natural language sentence, according to the meaning and annotation ("annotation" according to the present invention in this specification means "topic"), It becomes possible to automatically generate more natural sentences for teachers.

また、これに限られず、生成された文章から教師データとして適切でないものを自動的に排除し、質の良い教師データ出力を行う。具体的には、意味の類似度、アノテーションの類似度、自然性を評価して質を測り、入力した自然言語の文章と意味が類似しない文章、話題が類似しない文章、意味及び話題が類似していても不自然な文章を教師データから排除する。 In addition, the present invention is not limited to this, and automatically eliminates inappropriate teaching data from generated sentences to output high-quality teaching data. Specifically, the quality is measured by evaluating semantic similarity, annotation similarity, and naturalness. Eliminate unnatural sentences from training data.

従来の教師データ作成においては、言語処理の学習に必要な教師データを作成するために、文章を解析し、ルールベースやパターンマッチングで単語を入れ替えることで文章を生成する手法が提案されているが、そのルール作成やパターン作成に膨大な時間と労力を消費してしまうことも付言する。 In conventional teaching data creation, methods have been proposed to generate sentences by analyzing sentences and replacing words with a rule base or pattern matching in order to create the teacher data necessary for learning language processing. It should be added that a huge amount of time and labor is consumed in creating rules and patterns.

本発明に係る文章生成装置によれば、意味、アノテーションを解析した入力文章と同意味・同アノテーションの教師データを自動的に大量作成することができるだけでなく、生成した文章に対し、自然性(文法的正しさ)と、意味・アノテーションの類似を自動的に解析して評価を実施することで、高品質な教師データ作成ができ、人工知能(学習済みモデル)の学習精度の向上に関与できる。 According to the text generating apparatus of the present invention, it is possible not only to automatically create a large amount of training data of the same meaning and annotation as the input text whose meaning and annotation have been analyzed, but also to automatically generate naturalness ( By automatically analyzing and evaluating grammatical correctness) and similarities in meaning and annotation, it is possible to create high-quality training data and contribute to improving the learning accuracy of artificial intelligence (trained models). .

図1は、本発明の実施形態に係る文章生成システムの構成例を示す図である。文章生成システム1は、運用管理装置10からネットワーク50を介して教師データ生成指示を受けて動作するサーバー装置である文章生成装置100と、文章生成装置100からネットワーク50を介して教師データの提供を受ける学習処理装置200と、を備える。学習処理装置200は、対話処理を行う学習済みモデルに対し教師データを用いて学習処理を実施する。 FIG. 1 is a diagram showing a configuration example of a sentence generation system according to an embodiment of the present invention. The text generation system 1 includes a text generation device 100, which is a server device that operates in response to instructions for generating training data from the operation management device 10 via the network 50, and provides training data from the text generation device 100 via the network 50. and a learning processing device 200 for receiving. The learning processing device 200 uses teacher data to perform learning processing on a trained model that performs interactive processing.

なお、学習処理装置200が学習させる対象の対話処理は、チャットボットのみならず、対話型の制御を行う空調機等の家庭用電気機器等のIoT機器、自動運転制御を行う自動車等の移動体等を含む各種装置において行われる対話処理、大量文章の要約を作成する要約ツールの処理等であってもよい。 In addition, the interactive processing to be learned by the learning processing device 200 is not limited to chatbots. It may also be interactive processing performed in various devices including, etc., processing of a summary tool that creates a summary of a large amount of sentences, and the like.

ネットワーク50は、例えば、LTE(Long Term Evolution)あるいは5Gと呼ばれる3.5GHz(ギガヘルツ)帯、4.5GHz帯、28GHz帯等の周波数帯を利用する無線通信ネットワークであり、運用管理装置10と、文章生成装置100と、学習処理装置200とを互いに通信可能に接続する。 The network 50 is, for example, a wireless communication network that uses frequency bands such as 3.5 GHz (gigahertz) band, 4.5 GHz band, and 28 GHz band called LTE (Long Term Evolution) or 5G. The sentence generation device 100 and the learning processing device 200 are connected so as to be communicable with each other.

なお、学習処理装置200と、文章生成装置100と、運用管理装置10の間は、通信品質やセキュリティ、維持コスト等を総合的に考慮して有線ネットワーク(LAN(Local Area Netowork)等)を介して通信可能に接続されるものであってもよい。 In addition, the learning processing device 200, the sentence generation device 100, and the operation management device 10 are connected via a wired network (LAN (Local Area Network), etc.) in consideration of overall communication quality, security, maintenance cost, etc. may be communicably connected to each other.

運用管理装置10は、文章生成装置100に対する文章生成指示を利用者から受け付けるのに用いる情報処理装置である。運用管理装置10には、処理部11と、通信部13とが含まれ、処理部11には、ブラウザ部12が含まれる。 The operation management device 10 is an information processing device used to receive a text generation instruction to the text generation device 100 from a user. The operation management device 10 includes a processing unit 11 and a communication unit 13 , and the processing unit 11 includes a browser unit 12 .

ブラウザ部12は、文章生成装置100に対して、教師データ生成を指示する。例えば、ブラウザ部12は、Webブラウザとしての機能および入力補助としての画面インターフェースを備え、文章生成装置100のWebページに通信部13を介してアクセスして、文章生成装置100に文章生成指示や入力文章の情報を送信する。 The browser unit 12 instructs the sentence generation device 100 to generate teacher data. For example, the browser unit 12 has a function as a web browser and a screen interface as input assistance, accesses the web page of the sentence generation device 100 via the communication unit 13, and instructs the sentence generation device 100 to generate sentences and input information. Send text information.

通信部13は、ネットワーク50を介して他の装置と通信を行う。 The communication unit 13 communicates with other devices via the network 50 .

文章生成装置100は、運用管理装置10から入力文章の情報および教師データ生成指示を受けて文章を生成して教師データを作成する情報処理装置である。また、文章生成装置100は、作成した教師データを学習処理装置200へ送信する。また、文章生成装置100は、運用管理装置10に対して、教師データ生成指示に関する入出力画面をWebページとして提供する。 The text generation device 100 is an information processing device that receives input text information and training data generation instructions from the operation management device 10 and generates texts to create training data. Also, the sentence generation device 100 transmits the created teacher data to the learning processing device 200 . In addition, the sentence generation device 100 provides the operation management device 10 with an input/output screen relating to instruction data generation instruction as a web page.

例えば、文章生成装置100は、運用管理装置10から入力文章を受け付けるためのテキスト入力エリアを備える画面情報を生成してブラウザ部12に表示させたり、作成した教師データをグラフ化して示す出力エリアを備える画面情報を生成してブラウザ部12に表示させる。 For example, the text generation device 100 generates screen information having a text input area for receiving an input text from the operation management device 10 and displays it on the browser unit 12, or creates an output area showing the created teacher data in graph form. The screen information to be provided is generated and displayed on the browser unit 12 .

文章生成装置100には、記憶部110と、処理部120と、通信部130と、入出力部140と、表示部150とが含まれる。記憶部110には、入力文記憶部111と、生成文記憶部112とが含まれる。 The sentence generation device 100 includes a storage unit 110 , a processing unit 120 , a communication unit 130 , an input/output unit 140 and a display unit 150 . The storage unit 110 includes an input sentence storage unit 111 and a generated sentence storage unit 112 .

図2は、入力文記憶部に格納されるデータ構造例を示す図である。入力文記憶部111には、入力文章識別子111aと、入力文章111bと、文章意味ベクトル111cと、アノテーションベクトル111dと、が含まれている。入力文章識別子111aは、入力文章を識別する情報である。入力文章111bは、学習対象となる教師データを作成するために用いる自然言語の文章である。文章意味ベクトル111cは、Word2Vec、Doc2Vec等を用いて数値化した文章/単語の特性を示す情報である。 FIG. 2 is a diagram showing an example data structure stored in an input sentence storage unit. The input sentence storage unit 111 contains an input sentence identifier 111a, an input sentence 111b, a sentence semantic vector 111c, and an annotation vector 111d. The input sentence identifier 111a is information for identifying an input sentence. The input sentence 111b is a natural language sentence used to create teacher data to be learned. The sentence semantic vector 111c is information indicating the characteristics of a sentence/word digitized using Word2Vec, Doc2Vec, or the like.

アノテーションベクトル111dは、文章に含まれるトークンごとに、TF-IDF(Term Frequency(出現頻度)- Inverse Document Frequency(逆文書頻度))等の所定の方法で算出され付与される重要度(重み)の集合である。 The annotation vector 111d is the degree of importance (weight) calculated and assigned by a predetermined method such as TF-IDF (Term Frequency - Inverse Document Frequency) for each token included in the text. is a set.

図3は、生成文記憶部に格納されるデータ構造例を示す図である。生成文記憶部112には、生成文識別子112aと、生成元文章識別子112bと、生成文章112cと、生成文章意味ベクトル112dと、意味類似度112eと、生成文章アノテーションベクトル112fと、アノテーション類似度112gとが含まれている。 FIG. 3 is a diagram showing an example data structure stored in the generated sentence storage unit. The generated sentence storage unit 112 stores a generated sentence identifier 112a, a generated original sentence identifier 112b, a generated sentence 112c, a generated sentence semantic vector 112d, a semantic similarity 112e, a generated sentence annotation vector 112f, and an annotation similarity 112g. and are included.

生成文識別子112aは、生成文章を識別する情報である。生成元文章識別子112bは、生成文章の生成のために用いられた自然言語の文章を識別する情報である。生成文章112cは、学習対象となる教師データとして生成された自然言語の文章である。生成文章意味ベクトル112dは、Word2Vec、Doc2Vec等を用いて数値化した文章/単語の特性を示す情報である。意味類似度112eは、生成文章112cと、生成元文章識別子112bにて識別される生成元文章との間の意味の類似度合いを示す情報である。 The generated sentence identifier 112a is information for identifying a generated sentence. The generation source sentence identifier 112b is information for identifying the natural language sentence used for generating the generated sentence. The generated sentence 112c is a natural language sentence generated as teacher data to be learned. The generated sentence semantic vector 112d is information indicating the sentence/word characteristics digitized using Word2Vec, Doc2Vec, or the like. The semantic similarity 112e is information indicating the degree of similarity in meaning between the generated sentence 112c and the source sentence identified by the source sentence identifier 112b.

生成文章アノテーションベクトル112fは、生成された文章に含まれるトークンごとに、TF-IDF等の所定の方法で算出され付与される重要度(重み)の集合である。アノテーション類似度112gは、生成文章112cと、生成元文章識別子112bにて識別される生成元文章との間のアノテーションの類似度合いを示す情報である。 The generated sentence annotation vector 112f is a set of degrees of importance (weights) calculated and assigned by a predetermined method such as TF-IDF for each token included in the generated sentence. The annotation similarity 112g is information indicating the degree of annotation similarity between the generated sentence 112c and the source sentence identified by the source sentence identifier 112b.

図1の説明に戻る。処理部120には、言語理解部121と、アノテーション推定部122と、文章生成部123と、文章評価部124と、が含まれる。 Returning to the description of FIG. The processing unit 120 includes a language understanding unit 121 , an annotation estimation unit 122 , a text generation unit 123 and a text evaluation unit 124 .

言語理解部121は、自然言語の文章を解析して意味情報をモデル化する。具体的には、言語理解部121は、自然言語の文章および生成した文章の各々をトークンに区切って各々の文章の文章意味ベクトルを取得する。文章意味ベクトルは、上述のように、Word2Vec、Doc2Vec等を用いて数値化した文章/単語の特性を示す情報である。本実施形態においては、言語理解部121は、形態素解析等の所定のアルゴリズムにより文章をトークンに区切る。そして、言語理解部121は、トークンごとにベクトル化を行う。なお、言語理解部121は、文章全体のベクトル化も行うようにしてもよい。 The language understanding unit 121 analyzes natural language sentences to model semantic information. Specifically, the language understanding unit 121 divides each of the natural language sentences and the generated sentences into tokens and acquires the sentence semantic vector of each sentence. The sentence semantic vector is, as described above, information indicating the characteristics of a sentence/word digitized using Word2Vec, Doc2Vec, or the like. In this embodiment, the language understanding unit 121 divides sentences into tokens by a predetermined algorithm such as morphological analysis. The language understanding unit 121 then vectorizes each token. Note that the language understanding unit 121 may also vectorize the entire sentence.

アノテーション推定部122は、自然言語の話題情報をモデル化する。具体的には、アノテーション推定部122は、自然言語の文章および生成した文章の各々をトークンに区切って各々の文章のアノテーションベクトルを取得する。生成文章アノテーションベクトルは、上述のように、トークンごとに、TF-IDF等の所定の方法で算出され付与される重要度(重み)の集合である。本実施形態においては、アノテーション推定部122は、形態素解析等の所定のアルゴリズムにより文章をトークンに区切る。そして、アノテーション推定部122は、トークンごとにベクトル化を行う。なお、アノテーション推定部122は、文章全体のベクトル化も行うようにしてもよい。 The annotation estimation unit 122 models natural language topic information. Specifically, the annotation estimating unit 122 divides each of the natural language sentences and the generated sentences into tokens and acquires the annotation vector of each sentence. The generated text annotation vector is, as described above, a set of degrees of importance (weights) calculated and given to each token by a predetermined method such as TF-IDF. In this embodiment, the annotation estimation unit 122 divides the text into tokens by a predetermined algorithm such as morphological analysis. The annotation estimation unit 122 then vectorizes each token. Note that the annotation estimation unit 122 may also vectorize the entire sentence.

文章生成部123は、自然言語の文章に係る意味情報(文章意味ベクトル)と話題情報(アノテーションベクトル)とを用いて文章を生成する。具体的には、文章生成部123は、自然言語の文章内で取得した話題情報の中で重要度(重み)が高いトークン(例:重み上位15パーセンタイルのトークン)を固定し、該文章内の固定していないトークンをマスキング(取替可能化)する。文章生成部123は、マスキングしたトークンの一部または全部を所定の学習済みモデルを用いて類似の表現に様々に予測変換することで複数パターンの文章を生成する。 The sentence generation unit 123 generates sentences using semantic information (sentence semantic vector) and topic information (annotation vector) related to sentences in natural language. Specifically, the sentence generation unit 123 fixes a token having a high degree of importance (weight) in the topic information acquired in the natural language sentence (for example, a token with a top 15th percentile weight), and Masking (replacement) tokens that are not fixed. The sentence generation unit 123 generates multiple patterns of sentences by variously predictively transforming some or all of the masked tokens into similar expressions using a predetermined learned model.

文章評価部124は、生成した文章を評価して、自然言語の文章と類似し、かつ、不自然でない文章を教師データとして抽出して出力する。例えば、文章評価部124は、各々の文章の文章意味ベクトル間の比較を行って類似度を算出し類似を判定する。また例えば、文章評価部124は、各々の文章のアノテーションベクトル間の比較を行って類似度を算出し類似を判定する。また例えば、文章評価部124は、入力文章を受け付けると文章の自然性スコアを算出するよう学習済みの文章自然性評価モデルを用いて、生成した文章の自然性スコアを算出して不自然でないか否かを判定する。 The sentence evaluation unit 124 evaluates the generated sentences, extracts and outputs sentences that are similar to natural language sentences and that are not unnatural as teacher data. For example, the sentence evaluation unit 124 compares the sentence semantic vectors of each sentence to calculate the degree of similarity and determine the similarity. Further, for example, the text evaluation unit 124 compares the annotation vectors of each text to calculate the degree of similarity and determine the similarity. Further, for example, when receiving an input sentence, the sentence evaluation unit 124 uses a sentence naturalness evaluation model that has been trained to calculate the naturalness score of the sentence, and calculates the naturalness score of the generated sentence to check whether it is unnatural. determine whether or not

自然性スコアを用いて不自然でないか否かの判定を行う際には、文章評価部124は、例えば、生成した文章間で自然性スコアの高い文章(例:自然性スコア上位10パーセンタイルまたは閾値0.9以上の文章)を不自然でないと判定するようにしてもよい。あるいは、教師データの利用先のシステムの特性(チャット用等)によっては、自然性スコアの閾値は0.75や0.8等様々に変更されるようにしてもよい。多少の不自然さはあっても回答を優先する場合もあるためである。また、文章評価部124は、教師データを出力する際に、生成した文章ごとに自然言語の文章との類似度または自然性スコアをグラフとして出力することもできる。 When determining whether or not it is unnatural using the naturalness score, the sentence evaluation unit 124, for example, selects sentences with high naturalness scores among the generated sentences (eg, the top 10 percentile of naturalness scores or a threshold 0.9 or more) may be determined as not unnatural. Alternatively, the naturalness score threshold may be changed to various values such as 0.75 and 0.8 depending on the characteristics of the system where the teacher data is used (such as for chat). This is because there are cases where the answer is given priority even if it is somewhat unnatural. Further, when outputting the training data, the sentence evaluation unit 124 can also output the degree of similarity or the naturalness score of each generated sentence to the natural language sentence as a graph.

また、処理部120は、ブラウザ部12等のWebブラウザに対して、所定のWebページを提供するWebサーバーとしての機能を備える。処理部120は、運用管理装置10からWebページを介して教師データの作成指示および教師データから除外するべき文章の削除指示を受け付ける。そして、受け付けた指示に応じて、処理部120は、言語理解部121、アノテーション推定部122、文章生成部123、文章評価部124に制御を受け渡す。また、処理部120は、通信部130を介して、生成文(教師データ)を学習処理装置200に送信する。 The processing unit 120 also has a function as a web server that provides a predetermined web page to web browsers such as the browser unit 12 . The processing unit 120 receives an instruction to create training data and an instruction to delete sentences to be excluded from training data from the operation management apparatus 10 via a Web page. Then, the processing unit 120 transfers control to the language understanding unit 121, the annotation estimation unit 122, the text generation unit 123, and the text evaluation unit 124 according to the received instructions. The processing unit 120 also transmits the generated sentence (teaching data) to the learning processing device 200 via the communication unit 130 .

通信部130は、ネットワーク50を介して運用管理装置10および学習処理装置200と通信を行う。 The communication unit 130 communicates with the operation management device 10 and the learning processing device 200 via the network 50 .

学習処理装置200は、特定の分野の教師データを大量に読み込んで深層学習を行い、自然言語による対話処理を実現する情報処理装置である。本発明では、対話処理の目的を特に問わないものとする。 The learning processing device 200 is an information processing device that reads a large amount of teacher data in a specific field, performs deep learning, and realizes dialogue processing using natural language. In the present invention, the purpose of interactive processing is not particularly limited.

学習処理装置200は、記憶部210と、処理部220と、通信部230と、を備える。記憶部210には、教師データを記憶する教師データ記憶部211が格納される。処理部220には、学習実施部221と、対話処理部222と、が含まれる。学習実施部221は、対話処理部222が用いる対話モデルに教師データ記憶部211の教師データを学習させる。対話処理部222は、教師データ記憶部211に格納された教師データを用いて深層学習された学習済み対話モデルを用いて、テキストまたは音声による自然言語の入力文章を受け付けて、応答するためのテキストまたは音声による自然言語の文章を出力することで対話を行う。通信部230は、ネットワーク50を介して文章生成装置100と通信を行う。 The learning processing device 200 includes a storage unit 210 , a processing unit 220 and a communication unit 230 . The storage unit 210 stores a teacher data storage unit 211 that stores teacher data. The processing unit 220 includes a learning execution unit 221 and a dialogue processing unit 222 . The learning execution unit 221 causes the dialog model used by the dialog processing unit 222 to learn the teacher data in the teacher data storage unit 211 . The dialogue processing unit 222 uses a trained dialogue model that has been deep-learned using the training data stored in the training data storage unit 211 to receive natural language input sentences in the form of texts or voices, and generate texts for responses. Alternatively, dialogue is performed by outputting sentences in natural language by voice. The communication unit 230 communicates with the sentence generation device 100 via the network 50 .

図4は、文章生成装置のハードウェア構成例を示す図である。文章生成装置100は、いわゆるパーソナルコンピューターやサーバー装置等の情報処理装置であって、ネットワーク50を介して他の装置との間で情報の送受信を行う。なお、文章生成装置100は、パーソナルコンピューターに限られず、例えばスマートフォンやタブレット装置等の他の装置であってもよい。 FIG. 4 is a diagram showing a hardware configuration example of the text generation device. The sentence generation device 100 is an information processing device such as a so-called personal computer or a server device, and transmits and receives information to and from other devices via the network 50 . Note that the sentence generation device 100 is not limited to a personal computer, and may be other devices such as a smart phone or a tablet device.

文章生成装置100は、CPU(Central Processing Unit)等のプロセッサ101と、RAM(Random Access Memory)等のメモリ102と、ハードディスクやSSD(Solid State Drive)等のストレージ103と、LTE通信用のSIMカード等、あるいはNIC(Network Interface Card)等の通信装置107と、これらをつなぐバスと、を含んで構成される。 The sentence generation device 100 includes a processor 101 such as a CPU (Central Processing Unit), a memory 102 such as a RAM (Random Access Memory), a storage 103 such as a hard disk or an SSD (Solid State Drive), and a SIM card for LTE communication. etc., or a communication device 107 such as a NIC (Network Interface Card), and a bus connecting them.

通信装置107は、アンテナを介して無線通信を行う無線通信装置である。通信装置107は、ネットワーク50に接続される他の装置との無線通信を行う。本実施形態においては、あるいは、通信装置107は、ネットワークケーブルを介して他の装置との有線通信を行う有線の通信装置であってもよい。 The communication device 107 is a wireless communication device that performs wireless communication via an antenna. The communication device 107 performs wireless communication with other devices connected to the network 50 . Alternatively, in this embodiment, the communication device 107 may be a wired communication device that performs wired communication with another device via a network cable.

上記した言語理解部121と、アノテーション推定部122と、文章生成部123と、文章評価部124とは、プロセッサ101に処理を行わせるプログラムによって実現される。このプログラムは、メモリ102内に記憶され、実行にあたってプロセッサ101により実行される。 The language understanding unit 121, the annotation estimating unit 122, the text generating unit 123, and the text evaluating unit 124 described above are implemented by a program that causes the processor 101 to perform processing. This program is stored in memory 102 and executed by processor 101 upon execution.

また、記憶部110に格納される入力文記憶部111と、生成文記憶部112とは、メモリ102及びストレージ103により実現される。 Also, the input sentence storage unit 111 and the generated sentence storage unit 112 stored in the storage unit 110 are realized by the memory 102 and the storage 103 .

また、通信部130は、通信装置107により実現される。入出力部140、表示部150は、上述の通りI/Oインターフェースデバイスあるいは通信インターフェースデバイスのいずれかでよい。 Also, the communication unit 130 is implemented by the communication device 107 . The input/output unit 140 and display unit 150 may be either an I/O interface device or a communication interface device as described above.

以上が、本実施形態における文章生成装置100のハードウェア構成例である。しかし、これに限らず、その他のハードウェアを用いて構成されるものであってもよい。なお、文章生成装置100は、図示しないが、OS、ミドルウェア、アプリケーションなどの公知の要素を有する。 The above is an example of the hardware configuration of the sentence generation device 100 according to the present embodiment. However, the configuration is not limited to this, and may be configured using other hardware. Note that the sentence generation device 100 has well-known elements such as an OS, middleware, and applications (not shown).

[動作の説明]次に、本実施形態における文章生成装置100の動作を説明する。 [Description of Operation] Next, the operation of the text generating apparatus 100 according to this embodiment will be described.

図5は、文章増幅処理のフロー例を示す図である。文章増幅処理は、運用管理装置10から教師データ生成指示を受け付けると、開始される。 FIG. 5 is a diagram showing an example flow of text amplification processing. The sentence amplification process is started when a teaching data generation instruction is received from the operation management device 10 .

まず、言語理解部121は、一または複数の入力文章を読み込む(ステップS001)。読み込まれる入力文章は、入力文記憶部111に格納されているものである。しかし、これに限られず、入出力部140のI/Oインターフェースあるいは通信インターフェースを介して受け付けた文章でもよい。 First, the language understanding unit 121 reads one or more input sentences (step S001). The input sentence to be read is stored in the input sentence storage unit 111 . However, the text is not limited to this, and may be text received via the I/O interface or communication interface of the input/output unit 140 .

そして、言語理解部121は、入力文章ごとに、ステップS003~ステップS007の処理を実施する(ステップS002、ステップS008)。 Then, the language understanding unit 121 performs the processing of steps S003 to S007 for each input sentence (steps S002 and S008).

言語理解部121は、入力文章をトークンに区切る(ステップS003)。具体的には、言語理解部121は、入力文章を入力文章の対象言語によってスペース区切りで単語に分割してトークンとするか、あるいは形態素解析等を行って所定のトークンに区切る。この区切り処理は、その他の既存の技術を用いるものであってよい。例えば、入力文章が「2日の東京株式市場で日経平均株価は大幅下落。前場は上昇して推移していたが、後場に米トランプ大統領が新型コロナウイルスに感染したことが判明するとマイナス圏に転じ、一時2万3000円を割り込む場面があった。」である場合には、「2日/の/東京株式市場/で/日経平均株価/は/大幅下落/。/前場は/上昇/して/推移/して/いた/が/、/後場/に/米トランプ大統領が/新型コロナウイルス/に/感染した/ことが判明する/と/マイナス圏に/転じ/、/一時/2万3000円/を/割り込む場面があった/。」300と区切られる。 The language understanding unit 121 divides the input sentence into tokens (step S003). Specifically, the language understanding unit 121 divides the input text into words separated by spaces into tokens according to the target language of the input text, or divides the words into predetermined tokens by performing morphological analysis or the like. This segmentation process may use other existing techniques. For example, if the input text is "The Nikkei Stock Average fell sharply on the Tokyo stock market on the 2nd. It was trending upward in the first half, but after it turned out that President Trump was infected with the new coronavirus in the second half, it fell into negative territory. On the other hand, there was a scene where it fell below 23,000 yen at one point.” In the case of “2 days / no / Tokyo stock market / at / Nikkei Stock Average / is / sharply declined /. / , / after / in / U.S. President Trump / was / infected / with / new coronavirus / / turned into negative territory /, / temporary / 20,000 3000 yen//There was a scene where I interrupted/.”

そして、言語理解部121は、入力文章の文章意味ベクトルを算出する(ステップS004)。具体的には、上述のように、言語理解部121は、Word2Vec、Doc2Vec等を用いて文章/単語の特性に応じて数値化した情報を特定し、トークンごとおよび文章全体でベクトル化を行う。 The language understanding unit 121 then calculates a sentence semantic vector of the input sentence (step S004). Specifically, as described above, the language understanding unit 121 uses Word2Vec, Doc2Vec, etc. to specify numerical information according to the characteristics of sentences/words, and vectorizes each token and the entire sentence.

そして、アノテーション推定部122は、入力文章のアノテーションベクトルを推定する(ステップS005)。具体的には、上述のように、アノテーション推定部122は、IT-IDF等を用いてトークンの重要度に応じて数値化した情報を特定し、トークンごとおよび文章全体でベクトル化を行う。例えば、アノテーション推定部122は、各トークンの重要度の集合を多次元配列301として推定する。 The annotation estimation unit 122 then estimates the annotation vector of the input sentence (step S005). Specifically, as described above, the annotation estimating unit 122 uses IT-IDF or the like to identify information digitized according to the importance of tokens, and vectorizes each token and the entire sentence. For example, the annotation estimation unit 122 estimates a set of importance of each token as a multidimensional array 301 .

そして、文章生成部123は、アノテーションベクトルを用いて重要トークン以外をマスクする(ステップS006)。具体的には、文章生成部123は、自然言語の文章内で取得した話題情報の中で重要度(重み)が高いトークン(例えば、重み上位15パーセンタイルのトークン)を固定し、該文章内の固定していないトークンをマスキング(取替可能化)する。例えば、マスクされた文章302では、重要なトークンはそのまま維持され、重要でないトークンは[MSK]と示されているが、[MSK]と示されたトークンがマスクされたトークンであることを示す。 Then, the text generation unit 123 uses the annotation vector to mask tokens other than important tokens (step S006). Specifically, the sentence generation unit 123 fixes a token having a high degree of importance (weight) in the topic information acquired in the natural language sentence (for example, a token with a top 15th percentile weight), and Masking (replacement) tokens that are not fixed. For example, in masked sentence 302, significant tokens are kept intact, and non-critical tokens are labeled [MSK], indicating that tokens labeled [MSK] are masked tokens.

そして、文章生成部123は、重要トークン以外を類似の単語で置換して一または複数の文章に増幅する(ステップS007)。具体的には、文章生成部123は、マスクされたトークンの一部または全部を所定の学習済みモデル(図示せず)を用いて類似の表現に様々に予測変換することで複数パターンの文章303を生成する。例えば、「午前9:30東京株式は日経平均が大幅下落した結果、2万3千・・・」のように入力文章と若干異なるが似た意味の文章を生成し、増幅させる。増幅された生成文は、生成文記憶部112に格納される。 Then, the sentence generator 123 replaces the tokens other than the important tokens with similar words and amplifies them into one or more sentences (step S007). Specifically, the sentence generation unit 123 predictively converts part or all of the masked tokens into similar expressions using a predetermined trained model (not shown), thereby creating multiple patterns of sentences 303 . to generate For example, a sentence with a slightly different but similar meaning to the input sentence, such as "9:30 am Tokyo stocks fell sharply in the Nikkei Stock Average, resulting in 23,000...", is generated and amplified. The amplified generated sentence is stored in the generated sentence storage unit 112 .

以上が、文章増幅処理のフロー例である。文章増幅処理によれば、分析していない文章であっても入力データとして受け付け、所定の質を保ちつつ大量の教師データを生成するための文章を増幅させることが可能となる。 The above is an example of the flow of the text amplification process. According to the sentence amplification process, it is possible to receive even unanalyzed sentences as input data and amplify sentences for generating a large amount of training data while maintaining a predetermined quality.

図6は、生成文章評価処理のフローの例を示す図である。生成文章評価処理は、文章増幅処理に続けて開始される。または、生成文章評価処理は、生成文章を一または複数指定されて運用管理装置10から指示を受けると開始されるようにしてもよい。 FIG. 6 is a diagram showing an example of the flow of generated sentence evaluation processing. The generated sentence evaluation process is started following the sentence amplification process. Alternatively, the generated sentence evaluation process may be started when one or more generated sentences are specified and an instruction is received from the operation management device 10 .

まず、言語理解部121は、一または複数の生成文章を読み込む(ステップS101)。読み込まれる生成文章は、生成文記憶部112に格納されているものである。しかし、これに限られず、入出力部140のI/Oインターフェースあるいは通信インターフェースを介して受け付けた文章でもよい。 First, the language understanding unit 121 reads one or more generated sentences (step S101). The generated sentence to be read is stored in the generated sentence storage unit 112 . However, the text is not limited to this, and may be text received via the I/O interface or communication interface of the input/output unit 140 .

そして、言語理解部121は、生成文章ごとに、ステップS103~ステップS107の処理を実施する(ステップS102、ステップS108)。 Then, the language understanding unit 121 performs the processing of steps S103 to S107 for each generated sentence (steps S102 and S108).

言語理解部121は、生成文章をトークンに区切る(ステップS103)。具体的には、言語理解部121は、生成文章を生成文章の対象言語によってスペース区切りで単語に分割してトークンとするか、あるいは形態素解析等を行って所定のトークンに区切る。この区切り処理は、その他の既存の技術を用いるものであってよい。 The language understanding unit 121 divides the generated sentence into tokens (step S103). Specifically, the language understanding unit 121 divides the generated text into words separated by spaces depending on the target language of the generated text to obtain tokens, or performs morphological analysis or the like to divide the words into predetermined tokens. This segmentation process may use other existing techniques.

そして、言語理解部121は、生成文章の文章意味ベクトルを算出する(ステップS104)。具体的には、上述のように、言語理解部121は、Word2Vec、Doc2Vec等を用いて文章/単語の特性に応じて数値化した情報を特定し、トークンごとおよび文章全体でベクトル化を行う。 The language understanding unit 121 then calculates a sentence semantic vector of the generated sentence (step S104). Specifically, as described above, the language understanding unit 121 uses Word2Vec, Doc2Vec, etc. to specify numerical information according to the characteristics of sentences/words, and vectorizes each token and the entire sentence.

そして、アノテーション推定部122は、生成文章のアノテーションベクトルを推定する(ステップS105)。具体的には、上述のように、アノテーション推定部122は、IT-IDF等を用いてトークンの重要度に応じて数値化した情報を特定し、トークンごとおよび文章全体でベクトル化を行う。 The annotation estimation unit 122 then estimates the annotation vector of the generated sentence (step S105). Specifically, as described above, the annotation estimating unit 122 uses IT-IDF or the like to identify information digitized according to the importance of tokens, and vectorizes each token and the entire sentence.

そして、文章評価部124は、生成文章と生成元文章の意味ベクトルを用いて意味類似度を算出する(ステップS106)。この意味類似度は、意味ベクトルのベクトル間距離等を算出する既存技術を用いることで算出できる。 Then, the text evaluation unit 124 calculates the degree of semantic similarity using the semantic vectors of the generated text and the generation source text (step S106). This semantic similarity can be calculated by using an existing technique for calculating the distance between semantic vectors.

そして、文章評価部124は、生成文章と生成元文章のアノテーションベクトルを用いてアノテーション類似度を算出する(ステップS107)。このアノテーション類似度は、アノテーションベクトルのベクトル間距離等を算出する既存技術を用いることで算出できる。 Then, the text evaluation unit 124 calculates annotation similarity using the annotation vectors of the generated text and the generation source text (step S107). This annotation similarity can be calculated using an existing technique for calculating the distance between annotation vectors and the like.

そして、文章評価部124は、意味類似度またはアノテーション類似度が所定未満の生成文章を削除する(ステップS109)。なお、文章評価部124は、意味類似度またはアノテーション類似度のいずれかが所定未満である生成文書を削除することを想定しているが、これに限られず、他の生成元文章あるいは他の生成文章と同一あるいは変動値違いの文章についても、削除するようにしてもよい。重複する文章は無駄となる可能性が高いためである。 Then, the sentence evaluation unit 124 deletes the generated sentences whose semantic similarity or annotation similarity is less than a predetermined level (step S109). It is assumed that the text evaluation unit 124 deletes a generated document in which either the degree of semantic similarity or the degree of annotation similarity is less than a predetermined value. A sentence that is the same as the sentence or has a different variation value may also be deleted. This is because duplicate sentences are likely to be wasted.

そして、文章評価部124は、残存する生成文章の自然性評価を行い、所定未満の自然性スコアの生成文章を削除する(ステップS110)。具体的には、文章評価部124は、ステップS109において削除されず残った生成文章に対して、文章の自然性スコアを算出するよう学習済みの文章自然性評価モデルを用いて、生成文章の自然性スコアを算出して、所定未満(例えば、自然性スコア下位90パーセンタイル未満、あるいは閾値0.9未満)の自然性スコアの生成文章を削除する。 Then, the sentence evaluation unit 124 evaluates the naturalness of the remaining generated sentences, and deletes the generated sentences with a naturalness score less than a predetermined score (step S110). Specifically, the text evaluation unit 124 uses a text naturalness evaluation model that has been trained to calculate the naturalness score of the text for the generated text that has not been deleted in step S109, and evaluates the naturalness of the generated text. The naturalness score is calculated, and generated sentences with naturalness scores below a predetermined value (eg, below the bottom 90th percentile of naturalness scores, or below a threshold of 0.9) are deleted.

そして、処理部120は、通信部130を介して、残存する生成文章を教師データとして学習処理装置200に送信する(ステップS111)。 Then, the processing unit 120 transmits the remaining generated sentence as teacher data to the learning processing device 200 via the communication unit 130 (step S111).

以上が、生成文章評価処理のフローの例である。生成文章評価処理によれば、生成元の文章と類似し、不自然でない文章を大量に効率的に学習できる教師データを生成することが可能となる。 The above is an example of the generated sentence evaluation process flow. According to the generated sentence evaluation process, it is possible to generate teacher data that can efficiently learn a large amount of sentences that are similar to the original sentence and are not unnatural.

図7は、文章自然性評価モデルの入出力関係を示す図である。生成文章評価処理のステップS110において実施する生成文章の自然性評価処理では、学習済みのニューラルネットワーク等である文章自然性評価モデル402を用いて、入力文章401を受け付けて、入力文章の自然性スコア403と単語ごとの自然性スコア404とを出力する。このような文章自然性評価モデル402は、自然的な文章(新聞記事等の自然言語による文章)に対して不自然な表現に加工するプロセスを経て生成した不自然的な文章と、加工せず自然的なままの文章と、を用いて学習済みである。 FIG. 7 is a diagram showing the input/output relationship of the sentence naturalness evaluation model. In the generated sentence naturalness evaluation process performed in step S110 of the generated sentence evaluation process, the sentence naturalness evaluation model 402, which is a trained neural network or the like, is used to receive the input sentence 401 and calculate the naturalness score of the input sentence. 403 and the naturalness score 404 for each word are output. Such sentence naturalness evaluation model 402 can be used to generate unnatural sentences generated through a process of processing natural sentences (sentences in natural language such as newspaper articles) into unnatural expressions, and unprocessed sentences. It has been learned using sentences that remain natural.

図8は、入出力画面の例を示す図である。入出力画面500には、入力文章受付領域501と、入力文章入力指示受付領域502と、トークン区切り結果表示領域503と、文章生成指示受付領域504と、生成文表示領域505と、教師データへ含める指示の受付領域506と、生成文章の位置508をプロットするグラフ描画領域507と、教師データとして決定する入力を受け付ける出力指示受付領域510と、が含まれる。 FIG. 8 is a diagram showing an example of an input/output screen. The input/output screen 500 includes an input text reception area 501, an input text input instruction reception area 502, a token segmentation result display area 503, a text generation instruction reception area 504, a generated sentence display area 505, and an input text reception area 501. It includes an instruction receiving area 506, a graph drawing area 507 for plotting the generated sentence position 508, and an output instruction receiving area 510 for receiving input to be determined as teacher data.

グラフ描画領域507には、生成文章ごとに生成元文章との意味類似度、アノテーション類似度および自然性スコアを互いに直交する軸とする3次元空間に生成文章の位置508がプロットされ、スコア509が表示される。また、出力指示受付領域510は、教師データへ含める指示の受付領域506にチェックされた生成文章を教師データとする指示入力を受け付ける。 In the graph drawing area 507, the position 508 of the generated sentence is plotted in a three-dimensional space in which the semantic similarity, the annotation similarity, and the naturalness score for each generated sentence with respect to the source sentence are orthogonal to each other, and the score 509 is plotted. Is displayed. In addition, the output instruction receiving area 510 receives an instruction input to set the generated sentence checked in the instruction receiving area 506 for inclusion in the teacher data as the teacher data.

なお、これに限られるものではなく、グラフ描画領域507は、類似度または自然性スコアを軸の一つに含む2次元以上のグラフが描画されるものであってもよい。 Note that the graph drawing area 507 is not limited to this, and may draw a two or more-dimensional graph including similarity or naturalness score as one of its axes.

以上、実施形態に係る文章生成システム1について具体的に説明したが、本発明はこの実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。例えば、運用管理装置10は、独立した装置ではなく、文章生成装置100あるいは学習処理装置200に設けられるものであってもよい。 Although the text generation system 1 according to the embodiment has been specifically described above, the present invention is not limited to this embodiment, and it goes without saying that various modifications can be made without departing from the gist of the invention. do not have. For example, the operation management device 10 may be provided in the sentence generation device 100 or the learning processing device 200 instead of being an independent device.

また、学習処理装置200は、独立した装置ではなく、文章生成装置100の一部として組み込まれて設けられるものであってもよい。 Also, the learning processing device 200 may be incorporated as a part of the sentence generation device 100 instead of being an independent device.

またあるいは、ネットワーク50についても、携帯電話通信網や、これをローカルに適用したローカル5Gネットワーク等の各種無線通信網により実現するようにしてもよい。 Alternatively, the network 50 may also be realized by various wireless communication networks such as a mobile phone communication network or a local 5G network locally applied to the network.

なお、上記した実施形態では本発明を分かりやすく説明するために構成を詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。 In addition, in the above-described embodiment, the configuration is described in detail in order to explain the present invention in an easy-to-understand manner.

また、上記の各構成、機能、処理部等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、制御線や情報線は説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。実際には殆ど全ての構成が相互に接続されていると考えてもよい。 Further, each of the configurations, functions, processing units, etc. described above may be realized by hardware, for example, by designing a part or all of them using an integrated circuit. Further, the control lines and information lines indicate those considered necessary for explanation, and not all control lines and information lines are necessarily indicated on the product. In practice, it may be considered that almost all configurations are interconnected.

また、上記した各構成、機能、処理部等は、それらの一部又は全部を、例えば別の装置で実行してネットワークを介して統合処理する等により分散システムで実現してもよい。 Further, each configuration, function, processing unit, and the like described above may be implemented in a distributed system by executing a part or all of them on another device, for example, and performing integrated processing via a network.

また、上記した実施形態の技術的要素は、単独で適用されてもよいし、プログラム部品とハードウェア部品のような複数の部分に分けられて適用されるようにしてもよい。 Also, the technical elements of the above-described embodiments may be applied singly, or may be applied after being divided into a plurality of parts such as program parts and hardware parts.

以上、本発明について、実施形態を中心に説明した。 The present invention has been described above with a focus on the embodiments.

1:文章生成システム、10:運用管理装置、11:処理部、12:ブラウザ部、13:通信部、50:ネットワーク、100:文章生成装置、110:記憶部、111:入力文記憶部、112:生成文記憶部、120:処理部、121:言語理解部、122:アノテーション推定部、123:文章生成部、124:文章評価部、130:通信部、140:入出力部、150:表示部、200:学習処理装置、210:記憶部、211:教師データ記憶部、220:処理部、221:学習実施部、222:対話処理部、230:通信部。 1: sentence generation system, 10: operation management device, 11: processing unit, 12: browser unit, 13: communication unit, 50: network, 100: sentence generation device, 110: storage unit, 111: input sentence storage unit, 112 : generated sentence storage unit, 120: processing unit, 121: language understanding unit, 122: annotation estimation unit, 123: sentence generation unit, 124: sentence evaluation unit, 130: communication unit, 140: input/output unit, 150: display unit 200: learning processing device; 210: storage unit; 211: teacher data storage unit; 220: processing unit;

Claims (9)

自然言語の文章を解析して意味情報をモデル化する言語理解部と、
該文章の話題情報をモデル化するアノテーション推定部と、
前記自然言語の文章に係る前記意味情報と前記話題情報とを用いて文章を生成する文章生成部と、
生成した前記文章を評価して、前記自然言語の文章と類似し、かつ、不自然でない前記文章を教師データとして抽出して出力する文章評価部と、
を備えることを特徴とする文章生成装置。
a language understanding unit that analyzes natural language sentences and models semantic information;
an annotation estimation unit that models topic information of the sentence;
a text generation unit that generates a text using the semantic information and the topic information related to the text in the natural language;
a sentence evaluation unit that evaluates the generated sentences and extracts and outputs the sentences that are similar to the natural language sentences and that are not unnatural as training data;
A text generation device comprising:
請求項1に記載の文章生成装置であって、
前記言語理解部は、前記自然言語の文章および前記生成した文章の各々をトークンに区切って各々の文章の文章意味ベクトルを取得し、
前記文章評価部は、前記各々の文章の前記文章意味ベクトル間の比較を行って類似度を算出し類似を判定する、
ことを特徴とする文章生成装置。
The text generation device according to claim 1,
The language understanding unit obtains a sentence semantic vector of each sentence by dividing each of the natural language sentence and the generated sentence into tokens,
The sentence evaluation unit compares the sentence semantic vectors of the sentences to calculate similarity and determine similarity.
A text generation device characterized by:
請求項1または2に記載の文章生成装置であって、
前記アノテーション推定部は、前記自然言語の文章および前記生成した文章の各々をトークンに区切って各々の文章のアノテーションベクトルを取得し、
前記文章評価部は、前記各々の文章の前記アノテーションベクトル間の比較を行って類似度を算出し類似を判定する、
ことを特徴とする文章生成装置。
The text generation device according to claim 1 or 2,
The annotation estimating unit divides each of the natural language sentences and the generated sentences into tokens to acquire annotation vectors of each sentence,
The text evaluation unit performs comparison between the annotation vectors of each of the texts to calculate similarity and determine similarity.
A text generation device characterized by:
請求項1~3のいずれか一項に記載の文章生成装置であって、
前記文章評価部は、入力文章を受け付けると文章の自然性スコアを算出するよう学習済みの文章自然性評価モデルを用いて、生成した前記文章の自然性スコアを算出して不自然でないか否かを判定する、
ことを特徴とする文章生成装置。
The text generation device according to any one of claims 1 to 3,
When an input sentence is received, the sentence evaluation unit calculates the naturalness score of the generated sentence using a sentence naturalness evaluation model that has been trained to calculate the naturalness score of the sentence, and determines whether or not it is unnatural. determine the
A text generation device characterized by:
請求項1~4のいずれか一項に記載の文章生成装置であって、
前記文章評価部は、前記教師データを出力する際に、生成した前記文章ごとに前記自然言語の文章との類似度または自然性スコアをグラフとして出力する、
ことを特徴とする文章生成装置。
The text generation device according to any one of claims 1 to 4,
When outputting the training data, the sentence evaluation unit outputs a similarity score or a naturalness score of each generated sentence to the natural language sentence as a graph.
A text generation device characterized by:
請求項5に記載の文章生成装置であって、
前記グラフは、前記類似度または前記自然性スコアを軸の一つに含む2次元以上のグラフである、
ことを特徴とする文章生成装置。
The text generation device according to claim 5,
The graph is a two-dimensional or more graph including the similarity or the naturalness score as one of the axes,
A text generation device characterized by:
請求項1~6のいずれか一項に記載の文章生成装置であって、
前記教師データを、所定の自然言語の対話処理を行う学習済みモデルの学習に用いる、
ことを特徴とする文章生成装置。
The text generation device according to any one of claims 1 to 6,
using the teacher data for learning a trained model that performs predetermined natural language dialogue processing;
A text generation device characterized by:
コンピュータを、文章生成装置として機能させるプログラムであって、
前記コンピュータのプロセッサに、
自然言語の文章を解析して意味情報をモデル化する言語理解ステップと、
該文章の話題情報をモデル化するアノテーション推定ステップと、
前記自然言語の文章に係る前記意味情報と前記話題情報とを用いて文章を生成する文章生成ステップと、
生成した前記文章を評価して、前記自然言語の文章と類似し、かつ、不自然でない前記文章を教師データとして抽出して出力する文章評価ステップと、
を実施させることを特徴とする文章生成プログラム。
A program that causes a computer to function as a sentence generation device,
to the processor of said computer;
a language understanding step that analyzes natural language sentences to model semantic information;
an annotation estimation step of modeling topic information of the sentence;
a text generation step of generating a text using the semantic information and the topic information relating to the text in the natural language;
a sentence evaluation step of evaluating the generated sentences and extracting and outputting the sentences similar to the natural language sentences and not unnatural as training data;
A sentence generation program characterized by executing
コンピュータを文章生成装置として用いる文章生成方法であって、
前記コンピュータに、
自然言語の文章を解析して意味情報をモデル化する言語理解ステップと、
該文章の話題情報をモデル化するアノテーション推定ステップと、
前記自然言語の文章に係る前記意味情報と前記話題情報とを用いて文章を生成する文章生成ステップと、
生成した前記文章を評価して、前記自然言語の文章と類似し、かつ、不自然でない前記文章を教師データとして抽出して出力する文章評価ステップと、
を実施させることを特徴とする文章生成方法。
A text generation method using a computer as a text generation device,
on said computer;
a language understanding step that analyzes natural language sentences to model semantic information;
an annotation estimation step of modeling topic information of the sentence;
a text generation step of generating a text using the semantic information and the topic information relating to the text in the natural language;
a sentence evaluation step of evaluating the generated sentences and extracting and outputting the sentences similar to the natural language sentences and not unnatural as training data;
A sentence generation method characterized by performing
JP2021013425A 2021-01-29 2021-01-29 Text generation device, program and text generation method Pending JP2022116979A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021013425A JP2022116979A (en) 2021-01-29 2021-01-29 Text generation device, program and text generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021013425A JP2022116979A (en) 2021-01-29 2021-01-29 Text generation device, program and text generation method

Publications (1)

Publication Number Publication Date
JP2022116979A true JP2022116979A (en) 2022-08-10

Family

ID=82749681

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021013425A Pending JP2022116979A (en) 2021-01-29 2021-01-29 Text generation device, program and text generation method

Country Status (1)

Country Link
JP (1) JP2022116979A (en)

Similar Documents

Publication Publication Date Title
JP7358698B2 (en) Training method, apparatus, device and storage medium for word meaning representation model
US12204851B2 (en) Method for generating pre-trained language model, electronic device and storage medium
JP7430820B2 (en) Sorting model training method and device, electronic equipment, computer readable storage medium, computer program
KR20220005416A (en) Method for training multivariate relationship generation model, electronic device and medium
US12175198B2 (en) Document processing
CN110795572B (en) Entity alignment method, device, equipment and medium
CN110222330B (en) Semantic recognition method and device, storage medium and computer equipment
CN112257446B (en) Named entity recognition method, named entity recognition device, named entity recognition computer equipment and named entity recognition readable storage medium
CN112883193A (en) Training method, device and equipment of text classification model and readable medium
CN112487173A (en) Man-machine conversation method, device and storage medium
US12164879B2 (en) Data processing method, device, and storage medium
CN110502976A (en) Text recognition model training method and related products
CN112818091A (en) Object query method, device, medium and equipment based on keyword extraction
CN112527127B (en) Training method and device for input method long sentence prediction model, electronic equipment and medium
CN116127066A (en) Text clustering method, text clustering device, electronic equipment and storage medium
CN114186680A (en) Network structure processing method and device, electronic equipment and storage medium
US20250054494A1 (en) Method and device for training speech translation model, and storage medium
CN117113990B (en) Word vector generation method oriented to large language model, electronic equipment and storage medium
CN109800410A (en) A kind of list generation method and system based on online chatting record
JP2022116979A (en) Text generation device, program and text generation method
JP7024262B2 (en) Learning methods, how to use learning results, learning programs and learning devices
CN116579919A (en) Image translation method and device, equipment and storage medium
JP2020071737A (en) Learning method, learning program and learning device
CN114943474A (en) Research and development workload detection method, device, equipment and storage medium
CN111309875B (en) Method, device, equipment and storage medium for answering questions