JP7155758B2 - Information processing device, information processing method and program - Google Patents

Information processing device, information processing method and program Download PDF

Info

Publication number
JP7155758B2
JP7155758B2 JP2018158653A JP2018158653A JP7155758B2 JP 7155758 B2 JP7155758 B2 JP 7155758B2 JP 2018158653 A JP2018158653 A JP 2018158653A JP 2018158653 A JP2018158653 A JP 2018158653A JP 7155758 B2 JP7155758 B2 JP 7155758B2
Authority
JP
Japan
Prior art keywords
sentence
language model
specified
elements
input
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.)
Active
Application number
JP2018158653A
Other languages
Japanese (ja)
Other versions
JP2020035019A (en
Inventor
直之 伊藤
聡 田端
錬 松山
遥 前田
和久 大野
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing Co 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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP2018158653A priority Critical patent/JP7155758B2/en
Publication of JP2020035019A publication Critical patent/JP2020035019A/en
Application granted granted Critical
Publication of JP7155758B2 publication Critical patent/JP7155758B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、情報処理装置、情報処理方法及びプログラムに関する。 The present invention relates to an information processing device, an information processing method, and a program.

コンピュータが文章を自動生成する文章生成技術がある。例えば特許文献1では、再帰型ニューラルネットワーク(RNN;Recurrent Neural Network、以下では「RNN」と記す)を用いて、コンピュータに入力された文書を要約した説明文を生成する説明文生成方法等が開示されている。 There is a sentence generation technology in which a computer automatically generates sentences. For example, Patent Document 1 discloses a descriptive text generation method for generating descriptive text summarizing a document input to a computer using a recurrent neural network (RNN; hereinafter referred to as "RNN"). It is

特開2018-28866号公報JP 2018-28866 A

しかしながら、特許文献1に係る発明は文書の要約を行っているに過ぎず、ユーザが指定したテキストから、当該テキストを含む文章を自動生成するに至っていない。 However, the invention according to Patent Literature 1 merely summarizes a document, and does not automatically generate sentences containing the text from the text specified by the user.

一つの側面では、ユーザが指定したテキストを含む文章を適切に生成することができる情報処理装置等を提供することを目的とする。 An object of one aspect of the present invention is to provide an information processing apparatus and the like capable of appropriately generating sentences including text specified by a user.

一つの側面では、情報処理装置は、所定単位の文字又は文字列である各要素から構成される文章において、前記各要素の次に出現する前記要素を前記文章の順に学習した言語モデルを記憶する記憶部と、生成する文章に含める前記要素の指定入力を受け付ける受付部と、前記言語モデルに、指定された前記要素のいずれかを入力して前記要素の次に出現する要素を取得し、指定された前記要素及び取得した要素を前記言語モデルに入力して更に次に出現する要素を取得する処理を繰り返し、指定された前記要素及び取得した各要素を含む文章を生成する生成部と、生成した前記文章を出力する出力部とを備え、前記生成部は、前記言語モデルの学習に用いた学習元文章の先頭に存在する要素を前記言語モデルに入力して前記要素の次に出現する要素を取得し、前記先頭の要素及び取得した前記次に出現する要素を含む先頭フレーズを生成し、または、前記学習元文章の先頭に存在する要素を前記言語モデルに入力して前記要素の次に出現する要素を取得し、前記先頭の要素及び取得した要素を前記言語モデルに入力して更に次に出現する要素を取得する処理を繰り返し、前記先頭の要素及び取得した各要素を含む先頭フレーズを生成し、生成した先頭フレーズ及び前記指定された要素を含む文章を生成するIn one aspect, an information processing device stores a language model obtained by learning, in the order of the sentence, the elements that appear next to each element in a sentence composed of elements that are characters or character strings of a predetermined unit. a storage unit, a reception unit that receives input for specifying the elements to be included in a sentence to be generated , and an element that appears next to the element by inputting one of the specified elements to the language model, and specifying the element a generation unit that repeats the process of inputting the specified element and the obtained element into the language model and obtaining the element that appears next, and generates a sentence containing the specified element and the obtained elements ; and an output unit that outputs the sentence that has been written, and the generation unit inputs an element that exists at the beginning of the learning source sentence used for learning the language model to the language model, and an element that appears next to the element and generate a head phrase that includes the head element and the element that appears next to the obtained element, or input the element that exists at the head of the learning source sentence into the language model and next to the element Obtaining an appearing element, inputting the first element and the obtained element to the language model, and repeating the process of obtaining the next appearing element, and obtaining the first phrase including the first element and each obtained element Generate a sentence containing the generated head phrase and the specified element .

一つの側面では、ユーザが指定したテキストを含む文章を適切に生成することができる。 In one aspect, it is possible to appropriately generate sentences that include user-specified text.

文章生成システムの構成例を示す模式図である。It is a schematic diagram which shows the structural example of a sentence production|generation system. サーバの構成例を示すブロック図である。It is a block diagram which shows the structural example of a server. キーワードDB及び置換辞書のレコードレイアウトの一例を示す説明図である。FIG. 4 is an explanatory diagram showing an example of a record layout of a keyword DB and a replacement dictionary; 文章学習処理に関する説明図である。FIG. 10 is an explanatory diagram relating to sentence learning processing; 言語モデルに関する説明図である。FIG. 4 is an explanatory diagram of a language model; 文章生成処理に関する説明図である。It is explanatory drawing regarding sentence production|generation processing. 端末が表示する画面イメージ図である。FIG. 3 is a screen image diagram displayed by a terminal; 文章学習処理の処理手順の一例を示すフローチャートである。It is a flowchart which shows an example of the processing procedure of sentence learning processing. 文章生成処理の処理手順の一例を示すフローチャートである。It is a flow chart which shows an example of a processing procedure of sentence generation processing. 実施の形態2の概要を示す説明図である。FIG. 10 is an explanatory diagram showing an overview of Embodiment 2; 実施の形態2に係る文章生成処理の処理手順の一例を示すフローチャートである。10 is a flow chart showing an example of a processing procedure of sentence generation processing according to Embodiment 2; 実施の形態3の概要を示す説明図である。FIG. 11 is an explanatory diagram showing an overview of Embodiment 3; 実施の形態3に係る文章生成処理の処理手順の一例を示すフローチャートである。14 is a flow chart showing an example of a processing procedure of sentence generation processing according to Embodiment 3; 実施の形態4の概要を示す説明図である。FIG. 12 is an explanatory diagram showing an outline of a fourth embodiment; FIG. 実施の形態4に係る文章生成処理の処理手順の一例を示すフローチャートである。FIG. 12 is a flow chart showing an example of a processing procedure of sentence generation processing according to Embodiment 4; FIG. 実施の形態5に係る文章学習処理に関する説明図である。FIG. 21 is an explanatory diagram of sentence learning processing according to Embodiment 5; 実施の形態5に係る文章生成処理に関する説明図である。FIG. 21 is an explanatory diagram of sentence generation processing according to Embodiment 5; 実施の形態5に係る文章学習処理の処理手順の一例を示すフローチャートである。FIG. 14 is a flow chart showing an example of a processing procedure of sentence learning processing according to Embodiment 5. FIG. 実施の形態5に係る文章生成処理の処理手順の一例を示すフローチャートである。FIG. 13 is a flow chart showing an example of a processing procedure of sentence generation processing according to Embodiment 5. FIG. 上述した形態のサーバの動作を示す機能ブロック図である。It is a functional block diagram which shows operation|movement of the server of the form mentioned above.

以下、本発明をその実施の形態を示す図面に基づいて詳述する。
(実施の形態1)
図1は、文章生成システムの構成例を示す模式図である。本実施の形態では、ユーザが指定した語句に基づき、契約書の文章を自動生成する文章生成システムについて説明する。文章生成システムは、情報処理装置1、端末2、2、2…を含む。各装置は、インターネット等のネットワークNを介して通信接続されている。
Hereinafter, the present invention will be described in detail based on the drawings showing its embodiments.
(Embodiment 1)
FIG. 1 is a schematic diagram showing a configuration example of a sentence generation system. In this embodiment, a text generation system that automatically generates a text of a contract based on words specified by a user will be described. The text generation system includes an information processing device 1, terminals 2, 2, 2, . . . Each device is connected for communication via a network N such as the Internet.

情報処理装置1は、種々の情報処理、情報の送受信が可能な情報処理装置であり、例えばサーバ装置、パーソナルコンピュータ等である。本実施の形態では情報処理装置1がサーバ装置であるものとし、以下の説明では簡潔にサーバ1と読み替える。サーバ1は、学習用の契約書群を用いて、契約書に出現する語句を学習する機械学習を行い、契約書内の任意の箇所に出現する語句を、直前までに出現する語句から推定可能な言語モデルを生成する。言語モデルは、自然言語の文章が生成される確率をモデル化したものであり、例えばN-gramモデル、隠れマルコフモデルなどがある。後述するように、本実施の形態においてサーバ1は、学習用に与えられる契約書群からRNNを言語モデルとして構築し、当該RNNを用いて契約書用の文章を生成する。 The information processing device 1 is an information processing device capable of various types of information processing and transmission/reception of information, and is, for example, a server device, a personal computer, or the like. In the present embodiment, the information processing device 1 is assumed to be a server device, and is simply replaced with the server 1 in the following description. The server 1 uses a group of contracts for learning to perform machine learning to learn words and phrases that appear in the contract, and can estimate words and phrases that appear at any point in the contract from the words and phrases that appear immediately before. generate a language model. A language model is a model of the probability of generating natural language sentences, and includes, for example, an N-gram model and a hidden Markov model. As will be described later, in the present embodiment, the server 1 constructs RNN as a language model from a group of contracts given for learning, and uses the RNN to generate sentences for contracts.

端末2は、契約書を作成する各ユーザが使用する端末装置であり、例えばパーソナルコンピュータ、多機能端末等である。端末2は、作成する契約書の文章に含める語句を指定する指定入力を受け付け、指定された語句(以下では適宜に「指定語句」と呼ぶ)を含む文章の生成をサーバ1に要求する。端末2は、生成された文章をサーバ1から受信し、ユーザに提示する。 The terminal 2 is a terminal device used by each user who creates a contract, and is, for example, a personal computer, a multifunctional terminal, or the like. The terminal 2 receives a specification input for specifying a phrase to be included in the text of the contract to be created, and requests the server 1 to generate a sentence including the specified phrase (hereinafter referred to as "specified phrase" as appropriate). The terminal 2 receives the generated sentence from the server 1 and presents it to the user.

図2は、サーバ1の構成例を示すブロック図である。サーバ1は、制御部11、主記憶部12、通信部13、補助記憶部14を備える。
制御部11は、一又は複数のCPU(Central Processing Unit)、MPU(Micro-Processing Unit)、GPU(Graphics Processing Unit)等の演算処理装置を有し、補助記憶部14に記憶されたプログラムPを読み出して実行することにより、サーバ1に係る種々の情報処理、制御処理等を行う。主記憶部12は、SRAM(Static Random Access Memory)、DRAM(Dynamic Random Access Memory)、フラッシュメモリ等の一時記憶領域であり、制御部11が演算処理を実行するために必要なデータを一時的に記憶する。通信部13は、通信に関する処理を行うための処理回路等を含み、外部と情報の送受信を行う。
FIG. 2 is a block diagram showing a configuration example of the server 1. As shown in FIG. The server 1 includes a control section 11 , a main storage section 12 , a communication section 13 and an auxiliary storage section 14 .
The control unit 11 has an arithmetic processing unit such as one or more CPU (Central Processing Unit), MPU (Micro-Processing Unit), GPU (Graphics Processing Unit), etc., and executes the program P stored in the auxiliary storage unit 14. By reading and executing, various information processing, control processing, etc. related to the server 1 are performed. The main storage unit 12 is a temporary storage area such as SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), flash memory, etc., and temporarily stores data necessary for the control unit 11 to perform arithmetic processing. Remember. The communication unit 13 includes a processing circuit and the like for performing processing related to communication, and transmits and receives information to and from the outside.

補助記憶部14は大容量メモリ、ハードディスク等であり、制御部11が処理を実行するために必要なプログラムP、その他のデータを記憶している。また、補助記憶部14は、言語モデル141、キーワードDB142、及び置換辞書143を記憶している。言語モデル141は、上述の如く、学習用の契約書群から生成される言語モデルのデータであり、各種契約書に含まれる各条項のモデルデータである。後述するように、本実施の形態でサーバ1は、契約書に含まれる文章のカテゴリ(契約書の種別、及び契約書内の条項)毎に言語モデル141を生成して補助記憶部14に記憶してある。 The auxiliary storage unit 14 is a large-capacity memory, a hard disk, or the like, and stores programs P and other data necessary for the control unit 11 to execute processing. The auxiliary storage unit 14 also stores a language model 141 , a keyword DB 142 and a replacement dictionary 143 . The language model 141 is, as described above, language model data generated from a learning contract group, and is model data of each clause included in various contracts. As will be described later, in this embodiment, the server 1 generates a language model 141 for each category of sentences included in a contract (type of contract and clauses in the contract) and stores the language model 141 in the auxiliary storage unit 14. I have

キーワードDB142は、各種契約書の各条項に頻出するキーワードを格納したデータベースである。例えばサーバ1は、機械学習を行って学習用の契約書群から言語モデル141を生成する際に、出現頻度に応じて契約書内の各条項のキーワードを抽出し、キーワードDB142に格納しておく。 The keyword DB 142 is a database that stores keywords that frequently appear in each clause of various contracts. For example, when the server 1 performs machine learning to generate the language model 141 from a group of contracts for learning, it extracts the keywords of each clause in the contract according to the appearance frequency and stores them in the keyword DB 142. .

置換辞書143は、同義語、類義語等のような関連ある複数の語句を対応付けて格納したテーブルである。後述するようにユーザから語句の指定を受けて文章を生成する際に、サーバ1は置換辞書143を参照して、ユーザが指定した語句を置換して文章を生成する。 The replacement dictionary 143 is a table that associates and stores a plurality of related terms such as synonyms and synonyms. As will be described later, when a sentence is generated by receiving designation of a word from the user, the server 1 refers to the replacement dictionary 143 and replaces the word specified by the user to generate the sentence.

なお、補助記憶部14はサーバ1に接続された外部記憶装置であってもよい。また、サーバ1は複数のコンピュータからなるマルチコンピュータであってもよく、ソフトウェアによって仮想的に構築された仮想マシンであってもよい。 Incidentally, the auxiliary storage unit 14 may be an external storage device connected to the server 1 . Moreover, the server 1 may be a multicomputer consisting of a plurality of computers, or may be a virtual machine virtually constructed by software.

また、本実施の形態においてサーバ1は上記の構成に限られず、例えば可搬型記憶媒体に記憶された情報を読み取る読取部、操作入力を受け付ける入力部、画像を表示する表示部等を含んでもよい。 Further, in the present embodiment, the server 1 is not limited to the above configuration, and may include, for example, a reading unit for reading information stored in a portable storage medium, an input unit for receiving operation input, a display unit for displaying images, and the like. .

図3は、キーワードDB142及び置換辞書143のレコードレイアウトの一例を示す説明図である。キーワードDB142は、種別列、条項列、キーワード列を含む。種別列は、キーワードの抽出元である契約書の種別を記憶している。条項列は、契約書の種別と対応付けて、キーワードの抽出元である契約書内の各条項を記憶している。キーワード列は、契約書の種別及び条項と対応付けて、各種別の契約書の各条項から抽出した一又は複数のキーワードを記憶している。 FIG. 3 is an explanatory diagram showing an example of the record layout of the keyword DB 142 and replacement dictionary 143. As shown in FIG. The keyword DB 142 includes a type column, a clause column, and a keyword column. The type column stores the types of contracts from which keywords are extracted. The clause column stores each clause in the contract from which keywords are extracted, in association with the contract type. The keyword column stores one or more keywords extracted from each clause of each type of contract in association with the type and clause of the contract.

置換辞書143は、対象語列、置換語列を含む。対象語列は、ユーザが指定した語句について、置換辞書143を用いた置換対象とする対象語を記憶している。置換語列は、対象語と対応付けて、対象語を置換した語句を記憶している。 The replacement dictionary 143 includes a target word string and a replacement word string. The target word string stores target words to be replaced using the replacement dictionary 143 for the words specified by the user. The replacement word string stores words and phrases that replace the target word in association with the target word.

図4は、文章学習処理に関する説明図である。図4では、サーバ1が学習用の契約書の文章を学習する機械学習を行い、複数の言語モデル141、141、141…を生成する様子を概念的に図示してある。以下では、サーバ1が実行する処理の概要について説明する。 FIG. 4 is an explanatory diagram relating to sentence learning processing. FIG. 4 conceptually shows how the server 1 performs machine learning for learning the sentences of a learning contract and generates a plurality of language models 141, 141, 141, . The outline of the processing executed by the server 1 will be described below.

サーバ1は、学習用の契約書群を外部から取得し、各契約書の文章(学習元文章)に出現する語句を学習する機械学習を行う。例えばサーバ1は、人手で作成された既存の契約書を学習用の契約書として用いて学習を行う。サーバ1はまず、各々の契約書から、その契約書の種別、及び契約書に含まれる各条項を判別し、カテゴリ(種別及び条項)毎に契約書内の文章を分類する文書の構造化を行う。そしてサーバ1は、構造化した契約書の各文章を、カテゴリ毎に学習して別々の言語モデル141を生成する。 The server 1 acquires a group of contracts for learning from the outside, and performs machine learning to learn words and phrases appearing in sentences (learning source sentences) of each contract. For example, the server 1 performs learning using an existing manually created contract as a learning contract. First, the server 1 determines the type of the contract and each clause included in the contract from each contract, and structuring the document by classifying the sentences in the contract for each category (type and clause). conduct. The server 1 then learns each sentence of the structured contract for each category to generate separate language models 141 .

契約書の種別は、契約内容を大別する分類であり、例えば秘密保持契約、業務委託契約、共同研究契約などである。なお、上記はいずれも一例であって、契約書の種別は特に限定されない。図4左側に一例として、秘密保持契約に係る契約書を概念的に図示してある。図4で太線枠に示すように、一般的な契約書は、複数の条項に区分して契約内容が記述される。サーバ1は、契約書の条項毎に、各条項の文章を学習する。なお、本明細書で「文章」と言う場合、文章は一文(センテンス)に限定されず、複数の文から成る文章、又は一文よりも短い文章も含まれ得る。後述するように、サーバ1は、各種別の契約書の各条項に出現する語句を、契約書における各語句の並び順に従って学習する。これによりサーバ1は、各条項に応じた言語モデル141を生成する。 The type of contract is a classification that broadly categorizes the content of the contract, such as a nondisclosure agreement, outsourcing agreement, joint research agreement, and the like. All of the above are examples, and the type of contract is not particularly limited. As an example on the left side of FIG. 4, a contract relating to a confidentiality agreement is conceptually illustrated. As shown in the thick line frame in FIG. 4, a general contract is divided into a plurality of clauses and the contents of the contract are described. The server 1 learns the text of each clause for each clause of the contract. In addition, when the term "sentence" is used in this specification, the sentence is not limited to one sentence, but may include a sentence consisting of a plurality of sentences or a sentence shorter than one sentence. As will be described later, the server 1 learns words and phrases that appear in each clause of each type of contract according to the order of the words and phrases in the contract. As a result, the server 1 generates a language model 141 corresponding to each clause.

まずサーバ1は、複数の学習用契約書を、契約書の種別に応じて分類する。例えばサーバ1は、契約書の書類名等から契約書の種別を判別する。図4に示す契約書では、サーバ1はタイトルの「秘密保持契約書」から、当該契約書が秘密保持契約に係る契約書であることを判別する。 First, the server 1 classifies a plurality of learning contracts according to the type of the contract. For example, the server 1 determines the type of contract based on the document name of the contract. In the contract shown in FIG. 4, the server 1 determines from the title "confidentiality agreement" that the contract is related to the nondisclosure agreement.

さらにサーバ1は、契約書内の各条項に相当する文章部分を特定し、契約書内の文章を条項毎に分類する。例えばサーバ1は、各条項のタイトルに相当する小見出し(サブタイトル)に基づいて条項を特定する。図4の例では、サーバ1は「第1条」の小見出し「目的」から、当該文章部分を契約の目的に関する条項として判別する。 Further, the server 1 identifies text portions corresponding to each clause in the contract, and classifies the text in the contract for each clause. For example, the server 1 identifies a clause based on a subheading (subtitle) corresponding to the title of each clause. In the example of FIG. 4, the server 1 determines from the subheading "Purpose" of "Article 1" that the text portion is a clause relating to the purpose of the contract.

なお、上記ではサーバ1が契約書のタイトル名、小見出し等からルールベースで契約書のカテゴリ(種別及び条項)を判別するものとしたが、本実施の形態はこれに限定されるものではない。例えばサーバ1は、tf-idf法等を用いて各契約書の文章の類似度を、文章に含まれる単語の出現頻度に応じて算出し、文章同士の類似度を算出して契約書の構造化を行ってもよい。 In the above description, the server 1 determines the category (type and clause) of the contract based on the rule based on the title name, subheading, etc. of the contract, but the present embodiment is not limited to this. For example, the server 1 uses the tf-idf method or the like to calculate the degree of similarity between sentences in each contract according to the appearance frequency of words contained in the sentences, and calculates the degree of similarity between sentences to determine the structure of the contract. may be modified.

サーバ1は各契約書について上述の処理を繰り返し、複数の学習用契約書それぞれの種別を判別し、各契約書に記述されている各条項を判別する。すなわちサーバ1は、契約書の構造化を行う。サーバ1は、構造化した各契約書においてカテゴリ(種別及び条項)が共通する文章を元に、各言語モデル141を生成する。例えば図4右側に示すように、サーバ1は、種別が「秘密保持契約」であり、かつ、条項が「損害賠償」で共通する各契約書の文章を元に、一の言語モデル141を生成する。その他の言語モデル141についても同様に、サーバ1は文章のカテゴリに応じて言語モデル141を生成する。 The server 1 repeats the above-described processing for each contract, discriminates the type of each of the plurality of learning contracts, and discriminates each clause described in each contract. That is, the server 1 structures the contract. The server 1 generates each language model 141 based on sentences having a common category (type and clause) in each structured contract. For example, as shown on the right side of FIG. 4, the server 1 generates one language model 141 based on the text of each contract whose type is "confidentiality agreement" and whose clause is "compensation for damages" in common. do. Similarly for the other language models 141, the server 1 generates the language models 141 according to the categories of sentences.

図5は、言語モデル141に関する説明図である。本実施の形態でサーバ1は、言語モデル141としてRNNを構築する。例えばサーバ1は、RNNの一種であるLSTM(Long Short-Term Memory)を構築する。 FIG. 5 is an explanatory diagram of the language model 141. As shown in FIG. In this embodiment, the server 1 constructs RNN as the language model 141 . For example, the server 1 constructs an LSTM (Long Short-Term Memory), which is a type of RNN.

サーバ1は、上記のようにカテゴリ毎に分類した文章をRNNに入力し、各カテゴリの文章に出現する語句を学習する。ここでサーバ1はまず、RNNに入力する文章に対して形態素解析等の自然言語処理を行い、所定単位の文字又は文字列である語句(要素)毎に分割する。この分割単位は、例えば単語、文節等の単位であるが、特に限定されない。例えばサーバ1は、複数の語句を格納した辞書(不図示)を予め記憶しておき、当該辞書に格納された語句に従って文章を分割する。 The server 1 inputs the sentences classified for each category as described above to the RNN, and learns the words appearing in the sentences of each category. Here, the server 1 first performs natural language processing such as morphological analysis on the text input to the RNN, and divides the text into words and phrases (elements) that are characters or character strings of predetermined units. This division unit is, for example, a unit such as a word or a clause, but is not particularly limited. For example, the server 1 stores in advance a dictionary (not shown) storing a plurality of words and phrases, and divides sentences according to the words and phrases stored in the dictionary.

なお、サーバ1は単語、文節等の単位ではなく、その他の単位で文章を分割してもよい。その他の分割単位としては、サブワード(部分語)と呼ばれる単位が想定され得る。サブワードは通常の分かち書きとは異なり、文章中に出現する頻度に応じて文章を区分した語句の単位である。一般的に文章の最小構成単位として用いられる「単語」は、文章中の文字又は文字列を意味、文法等の観点から最小化した単位であるが、サブワードは意味、文法等による単位ではなく、文章中で用いられる頻度に応じて最小化した単位である。サブワード単位で分割した場合、サーバ1は契約書特有の専門用語も分割可能であるため、より好適に文書の分割を行うことができる。このように、サーバ1は所定単位の文字又は文字列である要素毎に契約書の文章を分割可能であればよく、分割単位とする要素は単語等の単位に限定されない。 It should be noted that the server 1 may divide the text in units other than words, phrases, and the like. As another division unit, a unit called a subword (partial word) can be assumed. A subword is a unit of words and phrases into which a sentence is divided according to the frequency of appearance in the sentence, unlike the usual spaced words. "Word", which is generally used as the minimum structural unit of sentences, is a unit that minimizes characters or character strings in sentences from the viewpoint of meaning, grammar, etc., but subwords are not units based on meaning, grammar, etc. It is a unit minimized according to the frequency used in a sentence. When the document is divided into subwords, the server 1 can also divide technical terms specific to the contract, so that the document can be divided more appropriately. In this manner, the server 1 may divide the text of the contract into elements, which are characters or character strings in predetermined units, and the elements to be divided are not limited to units such as words.

サーバ1は、分割した各語句をRNNに係る入力層に入力し、機械学習を行う。図5に、RNNの構成を概念的に図示する。図5に示すように、RNNは、入力層、中間層(隠れ層)、及び出力層を有する。入力層は、文章の先頭から末尾に亘って順に出現する各語句の入力をそれぞれ受け付ける複数のニューロンを有する。出力層は、入力層の各ニューロンに対応して、各ニューロンに入力される語句の次に出現する語句をそれぞれ推定して出力する複数のニューロンを有する。そして中間層は、入力層の各ニューロンへの入力値(語句)に対して出力層の各ニューロンにおける出力値(語句)を演算するための複数のニューロンを有する。中間層の各ニューロンは、過去の入力値に関する中間層での演算結果を用いて次の入力値に関する演算を行うことで、直前までに出現する一又は複数の語句から次の語句を推定する。 The server 1 inputs each divided word/phrase to the input layer related to the RNN, and performs machine learning. FIG. 5 conceptually illustrates the configuration of the RNN. As shown in FIG. 5, the RNN has an input layer, an intermediate layer (hidden layer), and an output layer. The input layer has a plurality of neurons that receive inputs of words that appear in order from the beginning to the end of a sentence. The output layer has a plurality of neurons for estimating and outputting words appearing next to words input to each neuron corresponding to each neuron in the input layer. The intermediate layer has a plurality of neurons for computing output values (words) in each neuron in the output layer with respect to input values (words) in each neuron in the input layer. Each neuron in the intermediate layer estimates the next word/phrase from one or a plurality of words/phrases appearing immediately before by performing an operation regarding the next input value using the operation result in the intermediate layer regarding the past input value.

なお、図5に示すRNNの構成は一例であって、本実施の形態はこれに限定されるものではない。例えば中間層は一層に限定されず、二層以上であってもよい。また、入力層及び出力層のニューロンの数は同数に限定されず、例えば入力に対して出力の数は少なくともよい。 Note that the configuration of the RNN shown in FIG. 5 is an example, and the present embodiment is not limited to this. For example, the intermediate layer is not limited to one layer, and may be two or more layers. Also, the number of neurons in the input layer and the number of output layers are not limited to the same number, and for example, the number of outputs may be at least as many as the inputs.

また、本実施の形態でサーバ1はRNNのアルゴリズムに従って学習を行うが、例えばその他の深層学習、N-gramモデル、SVM(Support Vector Machine)、ベイジアンネットワーク、決定木など、他のアルゴリズムに従って学習を行い、言語モデル141を生成してもよい。 In addition, although the server 1 performs learning according to the RNN algorithm in the present embodiment, learning can be performed according to other algorithms such as other deep learning, N-gram model, SVM (Support Vector Machine), Bayesian network, decision tree, etc. may be performed to generate the language model 141 .

サーバ1は、学習用文章の各語句を、当該文章内での並び順に従って入力層の各ニューロンに入力し、出力層の各ニューロンから出力値を得る。図5の例では、サーバ1は学習用文章の各語句「甲」、「及び」、「乙」、「が」…を、文章内での順番に従い、対応する入力層の各ニューロンに入力する。サーバ1は、中間層を経て出力層の各ニューロンでの演算を行い、文章内の任意の位置(順番)に出現する語句の生起確率を、直前までに出現する語句に基づいて算出し、次に出現する語句を推定する。図5の例では、サーバ1は1番目の語句「甲」に基づき、2番目に出現する語句の生起確率を算出して推定を行う。また、サーバ1は1番目、2番目の語句「甲」、「及び」に基づき、3番目の語句の生起確率を算出して推定を行う。以下同様にして、サーバ1は各語句を推定する。 The server 1 inputs each word of the learning sentence to each neuron of the input layer according to the order of arrangement in the sentence, and obtains an output value from each neuron of the output layer. In the example of FIG. 5, the server 1 inputs the words "A", "And", "Otsu", "GA", etc. of the learning sentence to each neuron of the corresponding input layer according to the order in the sentence. . The server 1 performs calculations in each neuron of the output layer via the intermediate layer, calculates the occurrence probability of a word appearing at an arbitrary position (order) in the sentence based on the words appearing immediately before, infer words that appear in In the example of FIG. 5, the server 1 performs estimation by calculating the occurrence probability of the second appearing word based on the first word "ko". The server 1 also calculates and estimates the occurrence probability of the third word based on the first and second words "ko" and "and". Similarly, the server 1 estimates each word.

サーバ1は、推定した語句を実際の語句(正解値)と比較し、出力層の各ニューロンからの出力値が正解値に近似するよう各ニューロンのパラメータを調整し、RNNを構築する。例えばサーバ1は、「甲」に続く語句として推定した語句が、実際の語句「及び」となるように、各ニューロンでの重み等を調整する。これによりサーバ1は、学習用文章の正順序における語句の並び順を学習した言語モデル141を生成する。 The server 1 compares the estimated word/phrase with the actual word/phrase (correct value), adjusts the parameters of each neuron so that the output value from each neuron in the output layer approximates the correct value, and constructs an RNN. For example, the server 1 adjusts the weight and the like in each neuron so that the word/phrase estimated as the word/phrase following "ko" becomes the actual word/phrase "and". As a result, the server 1 generates a language model 141 that has learned the order of words in the correct order of the learning sentences.

サーバ1は上述の処理を各カテゴリの文章について行い、RNNに係る言語モデル141を、契約書のカテゴリ毎に生成する。 The server 1 performs the above-described processing for sentences in each category, and generates a language model 141 related to RNN for each category of contract.

また、サーバ1は上記の学習時に、併せて各カテゴリの文章に高頻度で出現するキーワードを抽出してキーワードDB142に格納しておく。例えばサーバ1は、文章内での各語句の出現頻度を計算し、出現頻度が閾値以上の語句をキーワードとして抽出する。サーバ1は、キーワードとして抽出した語句を、抽出元である文章のカテゴリ(種別及び条項)と対応付けてキーワードDB142に格納する。後述するように、サーバ1は、生成する契約書の文章に含める語句をユーザが指定する場合に、キーワードとして抽出した語句をユーザに提示して指定入力を受け付ける。 In addition, the server 1 extracts keywords that frequently appear in sentences of each category and stores them in the keyword DB 142 at the time of learning. For example, the server 1 calculates the frequency of appearance of each word/phrase in a sentence, and extracts words/phrases whose frequency of appearance is greater than or equal to a threshold value as keywords. The server 1 stores the words extracted as keywords in the keyword DB 142 in association with the category (type and clause) of the text that is the extraction source. As will be described later, when the user designates words and phrases to be included in the text of the contract to be generated, the server 1 presents the words and phrases extracted as keywords to the user and accepts designation input.

図6は、文章生成処理に関する説明図である。図7は、端末2が表示する画面イメージ図である。図6では、ユーザが指定した複数の語句から契約書の文章を生成する様子を概念的に図示している。図7では、文章生成時における端末2の表示画面を模式的に図示している。図6及び図7に基づき、言語モデル141を用いた文章生成処理について説明する。 FIG. 6 is an explanatory diagram regarding the text generation process. FIG. 7 is a screen image diagram displayed by the terminal 2. As shown in FIG. FIG. 6 conceptually illustrates how a contract sentence is generated from a plurality of words specified by the user. FIG. 7 schematically shows the display screen of the terminal 2 during sentence generation. A text generation process using the language model 141 will be described with reference to FIGS. 6 and 7. FIG.

まずサーバ1は、端末2から、ユーザが文章の作成を希望する契約書のカテゴリと、当該文章に含めたい複数の語句とを指定する指定入力を受け付ける。例えば図7に図示する入力画面を介して、サーバ1は端末2から各種情報の指定入力を受け付ける。 First, the server 1 receives, from the terminal 2, a designation input designating a contract category for which the user wishes to create a text and a plurality of words to be included in the text. For example, the server 1 receives various information designation inputs from the terminal 2 via the input screen illustrated in FIG.

入力画面は、例えば条項選択欄71、キーワード選択欄72、テキスト入力欄73を含む。条項選択欄71は、入力画面上部に既に表示されている種別の契約書の条項をプルダウンメニューとして表示し、作成を希望する文章の条項をユーザが選択するための選択欄である。図7に示すように、条項選択欄71において端末2は、入力画面上部に表示されている契約書の種別「秘密保持契約」に含まれる各種条項をプルダウンで表示し、いずれかの条項の選択入力を受け付ける。これにより端末2は、ユーザが作成を希望する契約書の種別及び条項、すなわちカテゴリの指定入力を受け付ける。 The input screen includes, for example, a clause selection field 71, a keyword selection field 72, and a text input field 73. The clause selection column 71 is a selection column for displaying the clauses of the type of contract already displayed in the upper part of the input screen as a pull-down menu, and allowing the user to select the clause of the text that the user desires to create. As shown in FIG. 7, in the clause selection field 71, the terminal 2 displays various clauses included in the contract type "confidentiality agreement" displayed at the top of the input screen in a pull-down, and selects one of the clauses. Accept input. As a result, the terminal 2 accepts the specification input of the type and clause of the contract that the user desires to create, that is, the category.

キーワード選択欄72は、条項選択欄71で選択された条項のキーワードをプルダウンメニューとして表示し、作成する文章に含めたいキーワードをユーザが選択するための選択欄である。サーバ1は条項選択欄71で選択された条項のキーワードをキーワードDB142から読み出して端末2に出力し、端末2は当該キーワードをキーワード選択欄72にプルダウンで表示し、いずれかのキーワードの選択入力を受け付ける。 The keyword selection column 72 is a selection column for displaying the keyword of the clause selected in the clause selection column 71 as a pull-down menu and allowing the user to select the keyword to be included in the sentence to be created. The server 1 reads the keyword of the clause selected in the clause selection column 71 from the keyword DB 142 and outputs it to the terminal 2, and the terminal 2 displays the keyword in the keyword selection column 72 by pull-down, and selects and inputs one of the keywords. accept.

テキスト入力欄73は、作成する文章に含めたい任意のキーワード(語句)をユーザがテキスト入力するための入力欄である。端末2はキーワード選択欄72で提示したキーワードから選択入力を受け付けるだけでなく、テキスト入力欄73において任意のキーワードの入力を受け付ける。 The text input field 73 is an input field for the user to input any keyword (word/phrase) desired to be included in the sentence to be created. The terminal 2 not only accepts a selection input from the keywords presented in the keyword selection field 72 , but also accepts input of any keyword in the text input field 73 .

なお、テキスト入力欄73によりユーザが任意のテキストをキーワードとして入力した場合、ユーザが自由に入力を行うため、入力されるテキストの内容によっては言語モデル141を用いても当該テキストから契約書の文章を生成することが困難となる虞がある。そこでサーバ1は、置換辞書143を用いてユーザが入力したテキストを変換し、変換後のテキストをキーワードとして用いてもよい。図7の例の場合、サーバ1は、ユーザが入力したテキスト「文書による許諾」に含まれる語句「文書」及び「許諾」を「書面」及び「承諾」に変換し、変換後のテキストをキーワードとして用いる。これにより、言語モデル141による文章生成が困難になる事態を防止する。 When the user inputs arbitrary text as a keyword in the text input field 73, the user can freely input text. may be difficult to generate. Therefore, the server 1 may convert the text input by the user using the replacement dictionary 143 and use the converted text as a keyword. In the example of FIG. 7, the server 1 converts the words "document" and "permission" included in the text "permission by document" input by the user into "document" and "approval", and converts the converted text to keywords used as This prevents a situation in which sentence generation by the language model 141 becomes difficult.

上述の如く、端末2は、ユーザが作成を希望する契約書のカテゴリ、及び当該条項の文章に含める複数の語句(キーワード)の指定入力を受け付ける。生成ボタン74への操作入力を受け付けた場合、端末2は入力内容をサーバ1に出力し、指定された語句を含む文章の生成を要求する。 As described above, the terminal 2 accepts designation input of the category of the contract that the user desires to create and a plurality of words and phrases (keywords) to be included in the text of the clause. When an operation input to the generation button 74 is accepted, the terminal 2 outputs the input content to the server 1 and requests generation of a sentence including the specified phrase.

図6に戻って、サーバ1は、ユーザが指定したカテゴリの言語モデル141を用い、指定された複数の語句を含む文章を生成して端末2に出力する。図6では、ユーザがカテゴリとして種別「秘密保持契約」の条項「知的財産権」を指定し、かつ、文章に含める語句として「発明」及び「共有」が指定された場合を図示している。この場合、サーバ1は契約書の種別が「秘密保持契約」であり、かつ、条項が「知的財産権」である言語モデル141を用い、文章を生成する。 Returning to FIG. 6 , the server 1 uses the language model 141 of the category specified by the user to generate a sentence containing a plurality of specified words and phrases, and outputs the sentence to the terminal 2 . FIG. 6 illustrates a case where the user specifies the clause "intellectual property rights" of the type "confidentiality agreement" as a category, and specifies "invention" and "sharing" as words to be included in the text. . In this case, the server 1 generates a sentence using the language model 141 in which the contract type is "confidentiality agreement" and the clause is "intellectual property rights".

サーバ1はまず、指定された複数の語句のうち、いずれかの語句から、最終的に出力する文章の候補(以下では「候補文」と呼ぶ)を複数生成する。図6では、語句「発明」から複数の候補文が生成される様子を図示している。サーバ1は、当該語句をRNNに係る入力層に入力し、当該語句に基づき次の語句の生起確率を算出して、2番目の語句として生起確率が高い一又は複数の語句を出力として得る。次にサーバ1は、2番目の語句を入力層に入力して、1番目の語句「発明」と、2番目の語句とに基づき次の語句の生起確率を算出して、3番目の語句として生起確率が高い一又は複数の語句を出力として得る。 First, the server 1 generates a plurality of sentence candidates (hereinafter referred to as “candidate sentences”) to be finally output from any of the specified words and phrases. FIG. 6 illustrates how a plurality of candidate sentences are generated from the word "invention". The server 1 inputs the word/phrase into the input layer related to the RNN, calculates the occurrence probability of the next word/phrase based on the word/phrase, and obtains one or more words/phrases with the highest occurrence probability as the second word/phrase as an output. Next, the server 1 inputs the second word/phrase to the input layer, calculates the probability of occurrence of the next word/phrase based on the first word/phrase "invention" and the second word/phrase, and obtains the third word/phrase as One or more words with a high probability of occurrence are obtained as an output.

このように、サーバ1は直前までの語句から次の語句の生起確率を算出し、次の語句を推定していく。サーバ1は上述の処理を繰り返し、一の語句から複数の文章を生成する。この場合にサーバ1は、生成した各文章の妥当性を評価するためのスコアを、文章生成の際に算出された各語句の生起確率に基づいて算出し、スコアが高い文章を候補文とする。例えばサーバ1は、文章全体のスコアとして、文章に含まれる各語句の生起確率の平均値を用いる。サーバ1は、生起確率の平均値が閾値以上の文章を候補文とする。 In this way, the server 1 calculates the occurrence probability of the next word/phrase from the previous word/phrase, and estimates the next word/phrase. The server 1 repeats the above process to generate a plurality of sentences from one phrase. In this case, the server 1 calculates a score for evaluating the validity of each generated sentence based on the occurrence probability of each word calculated when generating the sentence, and selects a sentence with a high score as a candidate sentence. . For example, the server 1 uses the average probability of occurrence of each word included in the sentence as the score of the entire sentence. The server 1 regards sentences with an average value of occurrence probability equal to or greater than a threshold as candidate sentences.

なお、サーバ1は生起確率の平均値をスコアとして用いることで候補文を決定したが、他の基準で候補文を決定してもよい。例えばサーバ1は、生起確率が閾値以下の語句を含む文章、つまり不適切な語句を含む文章を除外することで、候補文を決定してもよい。 Although the server 1 determines the candidate sentences by using the average value of the occurrence probabilities as the score, the candidate sentences may be determined based on other criteria. For example, the server 1 may determine candidate sentences by excluding sentences containing words and phrases whose occurrence probability is equal to or less than a threshold value, that is, sentences containing inappropriate words and phrases.

また、上記ではユーザが指定した複数の語句のうち、単一の語句から候補文を生成したが、本実施の形態はこれに限定されるものではない。例えばサーバ1は、ユーザが指定した3以上の語句のうち、2以上の語句から複数の候補文を生成し、残る指定語句を含む候補文を選択するようにしてもよい。つまりサーバ1は、ユーザが指定した複数の語句のうち、一部の語句を用いて候補文を生成可能であればよく、当該一部の語句は単一の語句に限定されない。 Also, in the above description, candidate sentences are generated from a single word out of a plurality of words specified by the user, but the present embodiment is not limited to this. For example, the server 1 may generate a plurality of candidate sentences from two or more of the three or more words specified by the user, and select candidate sentences containing the remaining specified words. That is, the server 1 only needs to be able to generate candidate sentences using some of the multiple words specified by the user, and the part of the words is not limited to a single word.

サーバ1は、生成した複数の候補文から、ユーザが指定した複数の語句のうち、文章生成に用いていない他の指定語句を含む候補文を、端末2に出力する文章として選択する。図6の例では、サーバ1は「発明」以外の語句「共有」を含む、点線矩形枠で囲んだ候補文を出力文章として選択する。 The server 1 selects candidate sentences including other specified words and phrases not used for sentence generation from among the plurality of words and phrases specified by the user, as sentences to be output to the terminal 2 from the generated candidate sentences. In the example of FIG. 6, the server 1 selects candidate sentences surrounded by dotted-line rectangular frames that include the word "share" other than "invention" as output sentences.

上述の如く、サーバ1は、生成した複数の候補文から、指定された複数の語句を全て含み、かつ、文章全体のスコアが高い候補文を選択する。なお、選択する候補文は単一であってもよく、複数であってもよい。サーバ1は、選択した候補文を端末2に出力する。端末2は、図7に示すようにサーバ1から出力された候補文を表示し、ユーザに提示する。 As described above, the server 1 selects candidate sentences that include all of the specified words and phrases and that have a high overall score from the generated candidate sentences. A single candidate sentence may be selected, or a plurality of candidate sentences may be selected. The server 1 outputs the selected candidate sentences to the terminal 2 . The terminal 2 displays the candidate sentences output from the server 1 as shown in FIG. 7 and presents them to the user.

図8は、文章学習処理の処理手順の一例を示すフローチャートである。図8に基づき、文章学習処理の処理内容について説明する。
サーバ1の制御部11は、学習用の契約書群を取得する(ステップS11)。制御部11は、取得した各契約書の文章を、契約書の種別、契約書内の条項等のカテゴリに応じて構造化する処理を行い、各契約書内の文章をカテゴリ毎に分類する(ステップS12)。
FIG. 8 is a flow chart showing an example of the procedure of sentence learning processing. Based on FIG. 8, the contents of the sentence learning process will be described.
The control unit 11 of the server 1 acquires a contract group for learning (step S11). The control unit 11 performs a process of structuring the obtained text of each contract according to categories such as the type of contract and clauses in the contract, and classifies the text in each contract by category ( step S12).

制御部11は、カテゴリ毎に分類した各文章を、所定単位の文字又は文字列である複数の語句(要素)に分割する(ステップS13)。例えば制御部11は、単語、文節等の意味単位で文章を分割してもよく、サブワード等の出現頻度に応じた単位で文章を分割してもよい。 The control unit 11 divides each sentence classified into each category into a plurality of words (elements), which are characters or character strings of a predetermined unit (step S13). For example, the control unit 11 may divide the sentence into semantic units such as words and clauses, or may divide the sentence into units according to the appearance frequency of subwords and the like.

制御部11は、分割した文章の各語句を、文章における並び順に従って学習する機械学習処理を行い、カテゴリ毎に言語モデル141を生成する(ステップS14)。例えば制御部11は、RNN(LSTM)のアルゴリズムに基づく機械学習を行い、文章の先頭から順に出現する一又は複数の語句から、当該一又は複数の語句に続いて出現する語句を推定する言語モデル141を生成する。制御部11は、カテゴリ毎に別々の言語モデル141を生成する。制御部11は、生成した各カテゴリの言語モデル141を補助記憶部14に格納する。 The control unit 11 performs machine learning processing for learning each word of the divided sentence according to the order of arrangement in the sentence, and generates the language model 141 for each category (step S14). For example, the control unit 11 performs machine learning based on the RNN (LSTM) algorithm, and from one or more words that appear in order from the beginning of the sentence, a language model that estimates words that appear following the one or more words. 141 is generated. The control unit 11 generates separate language models 141 for each category. The control unit 11 stores the generated language model 141 for each category in the auxiliary storage unit 14 .

また、制御部11は、各カテゴリの文章内での出現頻度に基づき、各カテゴリの文章のキーワードを抽出してキーワードDB142に記憶する(ステップS15)。制御部11は、一連の処理を終了する。 Further, the control unit 11 extracts the keywords of the sentences of each category based on the appearance frequency in the sentences of each category and stores them in the keyword DB 142 (step S15). The control unit 11 ends the series of processes.

図9は、文章生成処理の処理手順の一例を示すフローチャートである。図9に基づき、文章生成処理の処理内容について説明する。
サーバ1の制御部11は、図7で例示した入力画面を介して、生成する文章のカテゴリを指定する指定入力を端末2から受け付ける(ステップS31)。上述の如く、文章のカテゴリは契約書の種別、条項等である。制御部11は、同じく図7で例示した入力画面を介して、生成する文章に含める複数の語句を指定する指定入力を端末2から受け付ける(ステップS32)。例えば制御部11は、キーワードDB142を参照して、ステップS31で指定されたカテゴリの文章のキーワードを複数提示し、ユーザによる選択入力を受け付ける。また、制御部11はユーザから任意の語句のテキスト入力を受け付けてもよい。また、任意の語句のテキスト入力を受け付けた場合、制御部11は置換辞書143を用いて、入力された語句を置換してもよい。
FIG. 9 is a flow chart showing an example of a processing procedure of sentence generation processing. Based on FIG. 9, the processing contents of the text generation processing will be described.
The control unit 11 of the server 1 receives, from the terminal 2, a designation input that designates the category of the text to be generated via the input screen illustrated in FIG. 7 (step S31). As described above, the text category is the contract type, clause, and the like. The control unit 11 also receives, from the terminal 2, a designation input for designating a plurality of words to be included in the sentence to be generated via the input screen illustrated in FIG. 7 (step S32). For example, the control unit 11 refers to the keyword DB 142, presents a plurality of keywords of sentences of the category specified in step S31, and receives selection input by the user. Further, the control unit 11 may accept text input of arbitrary phrases from the user. Further, when receiving a text input of an arbitrary word/phrase, the control unit 11 may use the replacement dictionary 143 to replace the input word/phrase.

制御部11は、ステップS31で指定されたカテゴリの言語モデル141を用いて、ステップS32で指定された複数の語句のうち、いずれかの語句から候補文を複数生成する(ステップS33)。例えば制御部11は、指定語句のいずれかをRNNである言語モデル141に入力し、指定語句に続く語句を出力として得る。さらに制御部11は、指定語句と、出力された語句とに基づいて次に続く語句を出力として得る。制御部11は当該処理を繰り返し、複数の文章を生成する。制御部11は、文章を生成する際に算出した各語句の生起確率に基づいて各パターンの文章全体のスコア(例えば生起確率の平均値)を算出する。制御部11は、算出したスコアに応じて候補文を決定する。例えば制御部11は、スコアが閾値以上の文章を候補文に決定する。 Using the language model 141 of the category specified in step S31, the control unit 11 generates a plurality of candidate sentences from any of the words specified in step S32 (step S33). For example, the control unit 11 inputs one of the specified words into the language model 141, which is the RNN, and obtains the words following the specified words as output. Furthermore, the control unit 11 obtains the following phrase as an output based on the specified phrase and the outputted phrase. The control unit 11 repeats the processing to generate a plurality of sentences. The control unit 11 calculates a score (for example, an average value of occurrence probabilities) of the entire sentence of each pattern based on the occurrence probability of each word/phrase calculated when generating the sentence. The control unit 11 determines candidate sentences according to the calculated scores. For example, the control unit 11 determines sentences with scores equal to or higher than a threshold as candidate sentences.

制御部11は、生成した複数の候補文のうち、ステップS33で候補文を生成する際に用いた語句以外の他の指定語句を含む候補文を、最終的に出力する文章として選択する(ステップS34)。制御部11は、選択した文章を端末2に出力し(ステップS35)、一連の処理を終了する。 The control unit 11 selects, from among the plurality of generated candidate sentences, candidate sentences containing designated words other than the words used when generating the candidate sentences in step S33 as sentences to be finally output (step S34). The control unit 11 outputs the selected text to the terminal 2 (step S35), and ends the series of processes.

なお、上記ではユーザが指定した複数の語句を用いて文章を生成したが、単一の指定語句のみから文章を生成してもよい。 In the above description, a sentence is generated using a plurality of words specified by the user, but a sentence may be generated only from a single specified word.

また、上記では生成する文章の一例として契約書を挙げたが、生成する文章は契約書に限定されず、他の文書に係るものであってもよい。 In addition, although the contract is given as an example of the text to be generated above, the text to be generated is not limited to the contract, and may relate to other documents.

また、上記では、サーバ1は学習用契約書の文章に出現する各語句を先頭から末尾に亘り文章通りの正順序で学習して言語モデル141を生成したが、本実施の形態はこれに限定されるものではない。例えばサーバ1は、後述する実施の形態5のように文章の先頭及び末尾を入れ替え、文章の末尾から先頭に亘る逆順序で各語句を学習した言語モデル141を生成し、逆順序の言語モデル141から文章を生成するようにしてもよい。また、例えばサーバ1は、正順序及び逆順序の双方向で学習を行ったbidirectional RNNを言語モデル141として構築し、当該言語モデル141を用いて文章を生成してもよい。このように、サーバ1は文章内の語順を学習した言語モデル141から文章を生成可能であればよく、その語順は正順序であるか、又は逆順序であるかを問わず、また、正順序及び逆順序の双方向を学習して言語モデル141を構築してもよい。 In the above description, the server 1 generates the language model 141 by learning each word appearing in the text of the learning contract from the beginning to the end in the correct order of the text, but the present embodiment is limited to this. not to be For example, the server 1 replaces the beginning and end of a sentence as in Embodiment 5, which will be described later, and generates a language model 141 that has learned each word in reverse order from the end to the beginning of the sentence. You may make it generate|occur|produce a sentence from. Further, for example, the server 1 may construct a bidirectional RNN that has been learned in both the forward order and the reverse order as the language model 141, and use the language model 141 to generate sentences. In this way, the server 1 only needs to be able to generate a sentence from the language model 141 that has learned the word order in the sentence, regardless of whether the word order is forward or reverse. The language model 141 may be constructed by learning bi-directionally and in reverse order.

以上より、本実施の形態1によれば、学習用契約書の文章内に出現する各語句を、その文章の順に学習した言語モデル141を用いることで、ユーザが指定した語句を含む文章を適切に生成することができる。 As described above, according to the first embodiment, by using the language model 141 that learns each phrase appearing in the sentence of the learning contract in the order of the sentence, the sentence including the phrase specified by the user can be appropriately reproduced. can be generated to

また、本実施の形態1によれば、ユーザが指定した複数の語句から文章を生成することで、より適切な文章を生成することができる。 Moreover, according to the first embodiment, by generating a sentence from a plurality of words specified by the user, it is possible to generate a more appropriate sentence.

また、本実施の形態1によれば、言語モデル141から生成した文章のスコアを各語句の生起確率から算出することで、当該文章の妥当性を評価し、適切な文章をユーザに提示することができる。 Further, according to the first embodiment, by calculating the score of a sentence generated from the language model 141 from the probability of occurrence of each word, the validity of the sentence is evaluated, and an appropriate sentence is presented to the user. can be done.

また、本実施の形態1によれば、文章のカテゴリ毎に言語モデル141を用意し、ユーザが指定したカテゴリに対応する言語モデル141から文章を生成することで、より適切な文章をユーザに提示することができる。 Further, according to the first embodiment, a language model 141 is prepared for each category of sentences, and a sentence is generated from the language model 141 corresponding to the category specified by the user, thereby presenting a more appropriate sentence to the user. can do.

また、本実施の形態1によれば、ユーザが任意に入力した語句から文章を生成する際に、置換辞書を用いて入力された語句を置換することで、言語モデル141を用いても文章を生成困難となるような事態を防止することができる。 Further, according to the first embodiment, when a sentence is generated from a word arbitrarily input by the user, the sentence is generated using the language model 141 by replacing the input word using the replacement dictionary. It is possible to prevent situations in which generation is difficult.

(実施の形態2)
本実施の形態では、言語モデル141に基づいて文章の先頭に頻出するフレーズを生成し、当該フレーズから、ユーザが指定した語句を含む文章を生成する形態について述べる。なお、実施の形態1と重複する内容については同一の符号を付して説明を省略する。
図10は、実施の形態2の概要を示す説明図である。図10に基づき、本実施の形態でサーバ1が実行する文章生成処理について説明する。
(Embodiment 2)
In this embodiment, a form is described in which phrases that frequently appear at the beginning of sentences are generated based on the language model 141, and sentences including words specified by the user are generated from the phrases. In addition, the same code|symbol is attached|subjected about the content which overlaps with Embodiment 1, and description is abbreviate|omitted.
FIG. 10 is an explanatory diagram showing an overview of the second embodiment. Based on FIG. 10, the sentence generation process which the server 1 performs in this Embodiment is demonstrated.

本実施の形態に係るサーバ1はまず、言語モデル141を用いて、契約書の文章先頭に出現するであろうと推定される複数の語句、すなわち頻出の先頭フレーズを生成する。例えばサーバ1は、言語モデル141の生成時に用いた学習用契約書の文章、すなわち学習元文章において、文章先頭に存在する語句から言語モデル141を用いて先頭フレーズを生成する。図10の例では、「甲」が学習元文章の先頭に存在する語句に該当する。サーバ1は言語モデル141を参照しながら、学習元文章の先頭語句に続く語句として、一定値以上の生起確率を有する語句を選択する。さらにサーバ1は、選択した語句に続く語句として、一定値以上の生起確率を有する語句を選択する。サーバ1は当該処理を繰り返し、一定値以上の生起確率を有する語句を、先頭語句に続く語句として順々に選択し、文章を生成していく。 The server 1 according to the present embodiment first uses the language model 141 to generate a plurality of words and phrases that are presumed to appear at the beginning of the text of the contract, ie, frequently appearing first phrases. For example, the server 1 uses the language model 141 to generate the first phrase from the words and phrases present at the beginning of the text of the learning contract used when generating the language model 141, that is, the learning source text. In the example of FIG. 10, "ko" corresponds to the word at the beginning of the learning source sentence. While referring to the language model 141, the server 1 selects words and phrases having occurrence probabilities equal to or greater than a certain value as words and phrases following the first word and phrase of the learning source sentence. Furthermore, the server 1 selects words and phrases having occurrence probabilities equal to or greater than a certain value as words and phrases following the selected words and phrases. The server 1 repeats this process, sequentially selects words and phrases having occurrence probabilities equal to or greater than a certain value as words and phrases following the head word, and generates sentences.

サーバ1は、上記のように文章先頭から順に生起確率が一定値以上の語句を選択していき、複数の語句を先頭フレーズとして生成する。例えばサーバ1は、ユーザが指定した語句のいずれか(図10では「発明」又は「共有」)が出現するまで文章生成を行い、指定語句が出現した時点で、指定語句より前に位置する一又は複数の語句を先頭フレーズとして特定すればよい。あるいはサーバ1は、文章の先頭から所定語数の語句を生成し、当該所定語数の語句から、意味、文法等のまとまりを持ったフレーズ部分を特定してもよい。文章先頭からどこまでの語句を先頭フレーズとして特定するか、その手法は特に問わない。 As described above, the server 1 sequentially selects words and phrases having occurrence probabilities equal to or higher than a certain value from the beginning of the sentence, and generates a plurality of words and phrases as the first phrase. For example, the server 1 generates sentences until one of the phrases specified by the user (in FIG. 10, "invention" or "shared") appears, and when the specified phrase appears, the word preceding the specified phrase appears. Alternatively, a plurality of words may be specified as the first phrase. Alternatively, the server 1 may generate a predetermined number of words and phrases from the beginning of the sentence, and from the predetermined number of words and phrases, specify a phrase portion having a cohesive meaning, grammar, and the like. It does not matter how far the phrase from the beginning of the sentence is specified as the first phrase.

サーバ1は、生成した先頭フレーズから、ユーザが指定した語句を含む文章を生成する。具体的には、サーバ1は、ユーザが指定した複数の語句のうち、いずれかの語句を先頭フレーズの次の語句として配置する。そしてサーバ1は、先頭フレーズ及び指定語句をRNN(言語モデル141)に入力し、指定語句に続く語句を推定して複数の候補文を生成する。 The server 1 generates a sentence including the phrase specified by the user from the generated first phrase. Specifically, the server 1 arranges one of the plural words specified by the user as the word following the first phrase. Then, the server 1 inputs the initial phrase and the designated word/phrase to the RNN (language model 141), estimates the word/phrase following the designated word/phrase, and generates a plurality of candidate sentences.

後の処理は実施の形態1と同様であり、サーバ1は文章生成に用いていない他の指定語句を含む候補文を最終的に出力する文章として選択し、端末2に出力する。 The subsequent processing is the same as in the first embodiment, and the server 1 selects candidate sentences containing other specified words and phrases not used for sentence generation as sentences to be finally output, and outputs them to the terminal 2 .

図11は、実施の形態2に係る文章生成処理の処理手順の一例を示すフローチャートである。
生成する文章のカテゴリの指定入力を受け付け(ステップS31)、当該文章に含める複数の語句の指定入力を受け付けた後(ステップS32)、サーバ1の制御部11は、以下の処理を実行する。制御部11は、ステップS31で指定されたカテゴリの言語モデル141に基づき、当該カテゴリの文章の先頭に出現するフレーズ(複数の語句)を生成する(ステップS201)。制御部11は、生成したフレーズと、ステップS31で指定された複数の語句のうちいずれかの語句とに基づいて、複数の候補文を生成する(ステップS202)。具体的には、制御部11は先頭フレーズの次に指定語句のいずれかを配置してRNNに入力し、後続の語句を推定して文章を生成する。制御部11は、処理をステップS34に移行する。
FIG. 11 is a flowchart illustrating an example of a processing procedure of sentence generation processing according to the second embodiment.
After accepting input specifying the category of the sentence to be generated (step S31) and accepting input specifying multiple words to be included in the sentence (step S32), the control unit 11 of the server 1 executes the following processes. Based on the language model 141 of the category specified in step S31, the control unit 11 generates a phrase (a plurality of words) appearing at the beginning of sentences in the category (step S201). Control unit 11 generates a plurality of candidate sentences based on the generated phrase and one of the plurality of words specified in step S31 (step S202). Specifically, the control unit 11 arranges one of the designated phrases next to the first phrase, inputs it to the RNN, estimates the subsequent phrases, and generates a sentence. The control unit 11 shifts the process to step S34.

以上より、本実施の形態2によれば、言語モデル141に基づいて先頭フレーズを生成し、当該フレーズの次に指定語句を配置して後続の語句を生成していくことで、より好適に文章を生成することができる。 As described above, according to the second embodiment, the first phrase is generated based on the language model 141, and the subsequent phrases are generated by arranging the specified phrase next to the phrase, thereby making the sentence more suitable. can be generated.

(実施の形態3)
本実施の形態では、ユーザが指定した順序で指定語句が出現する文章を生成する形態について説明する。
図12は、実施の形態3の概要を示す説明図である。図12に基づき、本実施の形態に係るサーバ1が実行する文章生成処理について説明する。
(Embodiment 3)
In this embodiment, a form in which a sentence is generated in which specified words appear in the order specified by the user will be described.
FIG. 12 is an explanatory diagram showing an overview of the third embodiment. The text generation process executed by the server 1 according to the present embodiment will be described with reference to FIG. 12 .

本実施の形態でサーバ1は、図7で例示した画面と同様の入力画面において、複数の語句の指定入力を受け付けるだけでなく、当該複数の語句が文章内で出現する順序の指定入力を受け付ける。そしてサーバ1は、指定された順序で各語句が出現する文章を生成する。 In the present embodiment, the server 1 accepts not only input specifying a plurality of words on an input screen similar to the screen illustrated in FIG. . Then, the server 1 generates sentences in which each word appears in the designated order.

例えば図12に示すように、「発明」が1番目の語句、「帰属」が2番目の語句、「協議」が3番目の語句として指定された場合を考える。この場合、サーバ1は1番目の語句として指定された「発明」をRNN(言語モデル141)に入力し、後続の語句を推定して複数の候補文を生成する。 For example, as shown in FIG. 12, consider a case where "invention" is specified as the first word, "attribution" as the second word, and "consultation" as the third word. In this case, the server 1 inputs "invention" specified as the first word/phrase to the RNN (language model 141), estimates subsequent words/phrases, and generates a plurality of candidate sentences.

サーバ1は、生成した複数の候補文のうち、文章生成に用いていない他の指定語句がユーザにより指定された順序で出現する文章を選択する。図12の例では、「発明」以外の指定語句「帰属」及び「協議」を含み、かつ、2番目に指定された語句「帰属」が3番目に指定された語句「協議」よりも先に出現する文章を選択する。サーバ1は、選択した文章を端末2に出力する。 The server 1 selects, from among the plurality of generated candidate sentences, sentences in which other specified words and phrases not used for sentence generation appear in the order specified by the user. In the example of FIG. 12, the specified words other than "invention" and "attribution" and "consultation" are included, and the second specified word "attribution" precedes the third specified word "consultation". Select the text that appears. The server 1 outputs the selected text to the terminal 2.

図13は、実施の形態3に係る文章生成処理の処理手順の一例を示すフローチャートである。
生成する文章のカテゴリの指定入力を受け付けた後(ステップS31)、サーバ1の制御部11は以下の処理を実行する。制御部11は、生成する文章に含める複数の語句と、各語句が文章内で出現する順序とを指定する指定入力を受け付ける(ステップS301)。制御部11は、指定された複数の語句のうち、いずれかの語句から候補文を複数生成する(ステップS302)。そして制御部11は、複数の候補文から、ステップS301で指定された順序で各指定語句が出現する候補文を、最終的に出力する文章として選択する(ステップS303)。制御部11は処理をステップS35に移行する。
FIG. 13 is a flowchart illustrating an example of a processing procedure of sentence generation processing according to the third embodiment.
After receiving the designation input of the category of the text to be generated (step S31), the control section 11 of the server 1 executes the following processing. The control unit 11 receives a designation input that designates a plurality of words and phrases to be included in the sentence to be generated and the order in which the words and phrases appear in the sentence (step S301). The control unit 11 generates a plurality of candidate sentences from one of the specified words (step S302). Then, the control unit 11 selects a candidate sentence in which each specified word/phrase appears in the order specified in step S301 from a plurality of candidate sentences as a sentence to be finally output (step S303). The control unit 11 shifts the process to step S35.

以上より、本実施の形態3によれば、指定された順序で指定語句が出現する文章を生成することで、より正確な文章の生成を行うことができる。 As described above, according to the third embodiment, a more accurate sentence can be generated by generating a sentence in which specified words appear in a specified order.

(実施の形態4)
本実施の形態では、ユーザが指定した複数の語句を全て含む候補文が生成されない場合、候補文に含まれる語句を指定語句に置き換えて、指定語句を全て含む文章を生成する形態について説明する。
図14は、実施の形態4の概要を示す説明図である。図14に基づき、本実施の形態に係るサーバ1が実行する文章生成処理について説明する。
(Embodiment 4)
In this embodiment, when a candidate sentence containing all of a plurality of words specified by the user is not generated, the words included in the candidate sentence are replaced with the specified words to generate a sentence including all the specified words.
FIG. 14 is an explanatory diagram showing an overview of the fourth embodiment. The text generation process executed by the server 1 according to this embodiment will be described with reference to FIG. 14 .

本実施の形態に係るサーバ1は、実施の形態1と同様に、ユーザが指定した複数の語句のうち、いずれかの語句に基づいて複数の候補文を生成する。この場合に、ユーザが指定した語句によっては、候補文生成に用いていない他の指定語句を含む文章が候補文として生成されない可能性もある。例えば図14の上側に模式的に示すように、「発明」及び「共有」が指定された場合に、語句「発明」から複数の候補文が生成されたものの、候補文のいずれにも「共有」が含まれないような可能性もある。 Server 1 according to the present embodiment generates a plurality of candidate sentences based on one of the plurality of phrases specified by the user, as in the first embodiment. In this case, depending on the phrase specified by the user, sentences containing other specified phrases not used for candidate sentence generation may not be generated as candidate sentences. For example, as schematically shown in the upper part of FIG. ” may not be included.

この場合にサーバ1は、候補文に含まれる語句を指定語句に置換しながら、文章のスコアに応じて端末2に出力する文章を選択する。例えばサーバ1はまず、上記のようにして生成された複数の候補文のうち、スコアが最も高い候補文を選択する。そしてサーバ1は、選択した候補文に含まれる各語句を残りの指定語句に置換して、複数の候補文を新たに生成する。図14の例では、スコアが最も高い点線矩形枠で囲んだ文章について、「発明」に続く2番目の語句、3番目の語句、4番目の語句…をそれぞれ残りの指定語句「共有」に置換した候補文を生成する。 In this case, the server 1 selects sentences to be output to the terminal 2 according to the score of the sentences while replacing the words included in the candidate sentences with the specified words. For example, the server 1 first selects the candidate sentence with the highest score from among the plurality of candidate sentences generated as described above. Then, the server 1 replaces each word/phrase included in the selected candidate sentence with the remaining designated word/phrase to generate a plurality of new candidate sentences. In the example of FIG. 14, regarding the sentences surrounded by the dotted rectangular frame with the highest score, the second, third, fourth, and so on following "invention" are replaced with the remaining designated words "shared". generate candidate sentences.

なお、上記では指定語句「発明」以外の全ての語句を総当たりで指定語句「共有」に置換しているが、本実施の形態はこれに限定されるものではない。例えばサーバ1は、指定語句「発明」を除く各語句のうち、残りの指定語句「共有」と同一品詞の語句に絞って指定語句「共有」に置換し、候補文を生成してもよい。すなわちサーバ1は、候補文生成に用いていない他の指定語句(要素)と同一品詞の語句を、当該他の指定語句に変換して候補文を生成する。同一品詞の間で変換を行うことで、より適切な候補文を作成することができると共に、文章生成に伴う処理負荷を軽減することができる。 In the above description, all words other than the specified word "invention" are replaced with the specified word "shared" in round robin, but the present embodiment is not limited to this. For example, the server 1 may narrow down words having the same part of speech as the rest of the specified words "shared" out of the specified words "invention" and replace them with the specified words "shared" to generate candidate sentences. That is, the server 1 generates a candidate sentence by converting a word having the same part of speech as another specified word/phrase (element) not used for candidate sentence generation into the other specified word/phrase. By converting between the same parts of speech, more appropriate candidate sentences can be created and the processing load associated with sentence generation can be reduced.

サーバ1は、生成した各候補文の語句をRNN(言語モデル141)に入力して生起確率を算出し、各候補文のスコアを算出する。そしてサーバ1は、スコアが高い候補文を選択する。例えばサーバ1は、スコアが閾値以上の候補文を選択する。このようにしてサーバ1は、複数の指定語句を全て含み、かつ、スコアが閾値以上の候補文を生成する。サーバ1は、生成した候補文を端末2に出力し、ユーザに提示する。 The server 1 inputs the generated word/phrase of each candidate sentence to the RNN (language model 141), calculates the probability of occurrence, and calculates the score of each candidate sentence. Then, the server 1 selects a candidate sentence with a high score. For example, the server 1 selects candidate sentences whose scores are equal to or greater than a threshold. In this way, the server 1 generates candidate sentences that include all of the specified words and phrases and have scores equal to or higher than the threshold. The server 1 outputs the generated candidate sentences to the terminal 2 and presents them to the user.

図15は、実施の形態4に係る文章生成処理の処理手順の一例を示すフローチャートである。
ステップS32で指定された複数の語句のうち、いずれかの語句を用いて複数の候補文を生成した後(ステップS33)、サーバ1の制御部11は以下の処理を実行する。制御部11は、ステップS32で指定された複数の語句のうち、ステップS33で文章を生成する際に用いた語句以外の他の指定語句を含む候補文があるか否かを判定する(ステップS401)。指定語句を含む候補文があると判定した場合(S401:YES)、制御部11は処理をステップS34に移行する。
FIG. 15 is a flowchart illustrating an example of a processing procedure of sentence generation processing according to the fourth embodiment.
After generating a plurality of candidate sentences using any one of the plurality of phrases specified in step S32 (step S33), the control section 11 of the server 1 executes the following processing. The control unit 11 determines whether or not there is a candidate sentence including specified words other than the words used when generating the sentence in step S33 among the plurality of words specified in step S32 (step S401). ). If it is determined that there is a candidate sentence containing the specified word (S401: YES), the control section 11 shifts the process to step S34.

指定語句を含む候補文がないと判定した場合(S401:NO)、制御部11は、ステップS33で生成した候補文に含まれる各語句を指定語句に置換しながら、新たな候補文を生成する(ステップS402)。例えば制御部11は、ステップS33で生成した複数の候補文のうち最もスコアが高い候補文を選択し、当該候補文に含まれる各語句を、文章生成に用いていない指定語句に置換して複数の候補文を新たに生成する。この場合に制御部11は、例えば候補文に含まれる各語句のうち、文章生成に用いていない指定語句(他の要素)と同一品詞の語句を指定語句に置換することで新たな候補文を生成する。 When it is determined that there is no candidate sentence containing the designated word (S401: NO), the control unit 11 generates a new candidate sentence while replacing each word included in the candidate sentence generated in step S33 with the designated word. (Step S402). For example, the control unit 11 selects a candidate sentence with the highest score from among the plurality of candidate sentences generated in step S33, replaces each word included in the candidate sentence with a specified word not used for generating a sentence, and selects a plurality of candidate sentences. New candidate sentences for are generated. In this case, the control unit 11 generates a new candidate sentence by, for example, replacing words and phrases of the same part of speech as specified words and phrases (other elements) not used for sentence generation among the words and phrases included in the candidate sentences. Generate.

制御部11は、言語モデル141を用いて新たに生成した複数の候補文それぞれのスコアを算出し、スコアが高い候補文を、最終的に出力する文章として選択する(ステップS403)。例えば制御部11は、スコアが閾値以上の候補文を選択する。制御部11は処理をステップS35に移行する。 The control unit 11 uses the language model 141 to calculate the score of each of the newly generated candidate sentences, and selects the candidate sentence with the highest score as the sentence to be finally output (step S403). For example, the control unit 11 selects candidate sentences whose scores are equal to or greater than a threshold. The control unit 11 shifts the process to step S35.

以上より、本実施の形態4によれば、指定語句を全て含む文章が生成されない場合であっても、文章内の語句を置き換えることで、指定語句を含む文章を適切に生成することができる。 As described above, according to the fourth embodiment, even when a sentence including all specified words is not generated, a sentence including the specified words can be appropriately generated by replacing the words in the sentence.

また、本実施の形態4によれば、上記の置換を同一品詞の間で行うことで、指定語句を含む文章をより適切に生成することができる。 Further, according to the fourth embodiment, by performing the above replacement between the same part of speech, it is possible to more appropriately generate a sentence including the designated word/phrase.

(実施の形態5)
本実施の形態では、学習用契約書から正順序の言語モデル141(第1の言語モデル)だけでなく逆順序の言語モデル141(第2の言語モデル)を生成し、両方の言語モデル141を組み合わせて文章を生成する形態について説明する。
図16は、実施の形態5に係る文章学習処理に関する説明図である。図16では、学習用契約書に出現する語句の並び順を、文章の末尾から逆順序で学習する様子を概念的に図示している。
(Embodiment 5)
In this embodiment, not only the forward order language model 141 (first language model) but also the reverse order language model 141 (second language model) are generated from the learning contract, and both language models 141 are generated. A form of generating a sentence by combining will be described.
FIG. 16 is an explanatory diagram of sentence learning processing according to the fifth embodiment. FIG. 16 conceptually illustrates how words appearing in a learning contract are learned in reverse order from the end of the sentence.

サーバ1は実施の形態1と同様に、学習用契約書の文章を所定単位の語句毎に分割し、文章の先頭から末尾に亘って正順序で各語句を学習して言語モデル141を生成する。本実施の形態ではさらに、サーバ1は文章の各語句を逆順序に並び替え、文章の末尾から逆順序で各語句を学習して、逆順序の言語モデル141を生成する。 As in the first embodiment, the server 1 divides the text of the learning contract into predetermined units of words and phrases, learns the words and phrases from the beginning to the end of the text in positive order, and generates the language model 141. . Further, in this embodiment, the server 1 rearranges the words in the sentence in reverse order, learns the words in reverse order from the end of the sentence, and generates the language model 141 in reverse order.

例えばサーバ1は、正順序の学習処理を完了後、学習用文章の先頭から末尾までを入れ替え、末尾の語句を先頭にした逆順序に並び替える。すなわち、図16に示すように、サーバ1は「甲」、「及び」、「乙」、「が」、…「通知」、「する」と続く語句を、「する」、「通知」、「に」、「相手方」、…「及び」、「甲」という順序に並び替える。サーバ1は、図3で示したRNNと同様の構成を有する逆順序学習用のRNNの入力層に、並び替えた各語句を入力する。そしてサーバ1は、文章の末尾から逆順序で出現する一又は複数の語句に基づき、当該一又は複数の語句の直前に出現する語句を推定するRNNを構築する。つまりサーバ1は、文章内の任意の位置の語句を、当該語句に続く後続の語句から推定するRNNを構築する。 For example, after completing the learning process in the forward order, the server 1 rearranges the learning sentences from the beginning to the end, and rearranges them in reverse order with the last word at the beginning. That is, as shown in FIG. 16, the server 1 converts the phrases "K", "and", "B", "ga", ... "notice", "to do" to "do", "notify", " Arrange them in the order of "to", "counterparty", ... "and", and "Party A". The server 1 inputs each rearranged word/phrase to the input layer of the RNN for reverse order learning having the same configuration as the RNN shown in FIG. Then, the server 1 constructs an RNN for estimating a word that appears immediately before one or more words, based on one or more words that appear in reverse order from the end of the sentence. In other words, the server 1 constructs an RNN that estimates a word/phrase at an arbitrary position in a sentence from words/phrases that follow the word/phrase.

図17は、実施の形態5に係る文章生成処理に関する説明図である。ユーザが指定した語句から文章を生成する場合、サーバ1は、正順序及び逆順序の双方の言語モデル141から算出される各語句の生起確率を組み合わせて、文章を生成する。 FIG. 17 is an explanatory diagram of sentence generation processing according to the fifth embodiment. When generating sentences from words specified by the user, the server 1 combines the occurrence probabilities of each word/phrase calculated from both the forward-order and reverse-order language models 141 to generate sentences.

例えばサーバ1は、まず正順序の言語モデル141を用いて候補文を生成する。具体的には実施の形態1と同様に、サーバ1は複数の指定語句のいずれかから複数の候補文を生成する。そしてサーバ1は、残りの指定語句を含む候補文を選択する。ここで、図17に例示する候補文が選択された場合を考える。 For example, the server 1 first generates candidate sentences using the forward order language model 141 . Specifically, as in the first embodiment, the server 1 generates a plurality of candidate sentences from any of a plurality of specified words. The server 1 then selects candidate sentences containing the rest of the specified words. Here, consider a case where the candidate sentences illustrated in FIG. 17 are selected.

サーバ1は候補文の語句の並び順を逆順序に変換し、言語モデル141に入力して各語句の生起確率を算出する。そしてサーバ1は、逆順序の言語モデル141から算出した生起確率に基づき、候補文が適切な文章であるか否か判定する。例えばサーバ1は、各語句の生起確率を所定の閾値と比較し、閾値以下の語句があるか否かを判定する。これによりサーバ1は、逆順序の言語モデル141から、不適切な語句があるかをチェックする。 The server 1 reverses the arrangement order of the words in the candidate sentence, inputs it to the language model 141, and calculates the probability of occurrence of each word. Then, the server 1 determines whether or not the candidate sentence is an appropriate sentence based on the probability of occurrence calculated from the reverse order language model 141 . For example, the server 1 compares the probability of occurrence of each word/phrase with a predetermined threshold value, and determines whether or not there is a word/phrase that is equal to or less than the threshold value. As a result, the server 1 checks whether there is an inappropriate word or phrase from the reverse order language model 141 .

生起確率が閾値以下の語句があると判定した場合、例えばサーバ1は逆順序の言語モデル141を用いて、該当語句を別の語句に置換する。すなわちサーバ1は、該当語句を校正する。例えばサーバ1は、該当語句の直後から出現する一又は複数の語句(図17では「に」の直後から出現する「相手方」、「と」、「の」…の語句)より、該当語句の位置に出現する語句を推定し、語句を置換する。これによりサーバ1は、候補文をより適切な文章に校正する。サーバ1は、校正後の文章を端末2に出力する。 When determining that there is a word whose occurrence probability is equal to or lower than the threshold, the server 1 replaces the relevant word with another word using the reverse order language model 141, for example. That is, the server 1 proofreads the relevant words. For example, the server 1 determines the position of the relevant phrase from one or more phrases that appear immediately after the relevant phrase (in FIG. 17, the phrases “opponent”, “to”, “no”, etc. , and replace the words. As a result, the server 1 corrects the candidate sentences into more appropriate sentences. The server 1 outputs the proofread sentence to the terminal 2 .

図18は、実施の形態5に係る文章学習処理の処理手順の一例を示すフローチャートである。
契約書の文章を複数の語句に分割した後(ステップS13)、サーバ1の制御部11は以下の処理を実行する。制御部11は、分割した文章の各語句を、文章における並び順に従って学習する機械学習処理を行い、正順序の言語モデル141を生成する(ステップS501)。次に制御部11は、文章の先頭から末尾までを並び替え、各語句の並び順を逆順序に変換する(ステップS502)。そして制御部11は、各語句を逆順序で学習した言語モデル141を生成する(ステップS503)。制御部11は、ステップS501で生成した正順序の言語モデル141と、ステップS503で生成した逆順序の言語モデル141とを補助記憶部14に格納し、処理をステップS15に移行する。
18 is a flowchart illustrating an example of a processing procedure of sentence learning processing according to Embodiment 5. FIG.
After dividing the text of the contract into a plurality of words (step S13), the control section 11 of the server 1 executes the following processes. The control unit 11 performs machine learning processing for learning each word of the divided sentence according to the order in which the sentence is arranged, and generates the forward order language model 141 (step S501). Next, the control unit 11 rearranges the sentences from the beginning to the end, and reverses the arrangement order of each word (step S502). Then, the control unit 11 generates the language model 141 by learning each word in reverse order (step S503). The control unit 11 stores the forward-order language model 141 generated in step S501 and the reverse-order language model 141 generated in step S503 in the auxiliary storage unit 14, and shifts the process to step S15.

図19は、実施の形態5に係る文章生成処理の処理手順の一例を示すフローチャートである。
生成する文章に含める複数の語句の指定入力を受け付けた後(ステップS32)、サーバ1の制御部11は以下の処理を実行する。制御部11は、正順序の言語モデル141に基づき、ステップS32で指定された複数の語句のうち、いずれかの語句から候補文を複数生成する(ステップS521)。制御部11は、生成した複数の候補文から、ステップS521で用いていない指定語句を含む候補文を選択する(ステップS522)。
19 is a flowchart illustrating an example of a processing procedure of sentence generation processing according to Embodiment 5. FIG.
After receiving the designation input of a plurality of words to be included in the sentence to be generated (step S32), the control section 11 of the server 1 executes the following processing. Based on the normal order language model 141, the control unit 11 generates a plurality of candidate sentences from any of the plurality of words specified in step S32 (step S521). The control unit 11 selects a candidate sentence including the specified word/phrase not used in step S521 from the generated candidate sentences (step S522).

制御部11は、ステップS522で選択した候補文に含まれる各語句の並び順を逆順序に変換する(ステップS523)。そして制御部11は、逆順序の言語モデル141に基づき、候補文に含まれる各語句の生起確率を算出する(ステップS524)。制御部11は、逆順序の言語モデル141から算出した生起確率に応じて、最終的に出力する文章を決定する(ステップS525)。例えば制御部11は、逆順序の言語モデル141を用いて候補文に含まれる各語句の生起確率を所定の閾値と比較し、閾値以下の語句があるか否かを判定する。閾値以下の語句がないと判定した場合、制御部11は、候補文を出力文章に決定する。また、例えば制御部11は、閾値以下の語句があると判定した場合、逆順序の言語モデル141を用いて該当語句を別の語句に置換(校正)する処理を行い、置換後の候補文を最終的に出力する文章に決定してもよい。制御部11は処理をステップS35に移行する。 The control unit 11 reverses the arrangement order of the words included in the candidate sentence selected in step S522 (step S523). Then, the control unit 11 calculates the occurrence probability of each word included in the candidate sentence based on the reverse order language model 141 (step S524). The control unit 11 determines the final sentence to be output according to the occurrence probability calculated from the reverse order language model 141 (step S525). For example, the control unit 11 uses the reverse order language model 141 to compare the probability of occurrence of each word included in the candidate sentence with a predetermined threshold, and determines whether there is a word below the threshold. When determining that there is no word or phrase below the threshold, the control unit 11 determines the candidate sentence as the output sentence. Further, for example, when the control unit 11 determines that there is a word or phrase below the threshold, it performs a process of replacing (proofreading) the corresponding word or phrase with another word or phrase using the reverse order language model 141, and generates a candidate sentence after replacement. The text to be finally output may be determined. The control unit 11 shifts the process to step S35.

なお、逆順序の言語モデル141から候補文を生成して、正順序の言語モデル141によりチェックを行うようにしてもよい。 Alternatively, candidate sentences may be generated from the language model 141 in reverse order and checked by the language model 141 in normal order.

以上より、本実施の形態5によれば、正順序及び逆順序の言語モデル141を組み合わせて文章を生成することで、より適切な文章をユーザに提示することができる。 As described above, according to the fifth embodiment, a more appropriate sentence can be presented to the user by generating a sentence by combining the forward-order and reverse-order language models 141 .

また、本実施の形態5によれば、正順序又は逆順序のいずれかの言語モデル141から候補文を生成し、他方の言語モデル141を用いて候補文をチェックすることで、より適切に文章を生成することができる。 Further, according to the fifth embodiment, candidate sentences are generated from either the forward-order or reverse-order language model 141, and the other language model 141 is used to check the candidate sentences, thereby making the sentences more appropriate. can be generated.

(実施の形態6)
図20は、上述した形態のサーバ1の動作を示す機能ブロック図である。制御部11がプログラムPを実行することにより、サーバ1は以下のように動作する。
記憶部201は、所定単位の文字又は文字列である各要素から構成される文章において、前記各要素の次に出現する前記要素を前記文章の順に学習した言語モデルを記憶する。受付部202は、生成する文章に含める前記要素の指定入力を受け付ける。生成部203は、前記言語モデルを参照して、指定された前記要素に基づき文章を生成する。出力部204は、生成した前記文章を出力する。
(Embodiment 6)
FIG. 20 is a functional block diagram showing the operation of the server 1 of the form described above. When the control unit 11 executes the program P, the server 1 operates as follows.
The storage unit 201 stores a language model obtained by learning, in order of the sentence, the elements that appear next to each element in a sentence composed of each element that is a character or character string of a predetermined unit. The receiving unit 202 receives an input specifying the elements to be included in the text to be generated. The generating unit 203 refers to the language model and generates sentences based on the designated elements. The output unit 204 outputs the generated text.

本実施の形態6は以上の如きであり、その他は実施の形態1から5と同様であるので、対応する部分には同一の符号を付してその詳細な説明を省略する。 The sixth embodiment is as described above, and the other parts are the same as those of the first to fifth embodiments.

今回開示された実施の形態はすべての点で例示であって、制限的なものではないと考えられるべきである。本発明の範囲は、上記した意味ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味及び範囲内でのすべての変更が含まれることが意図される。 The embodiments disclosed this time are illustrative in all respects and should not be considered restrictive. The scope of the present invention is indicated by the scope of the claims rather than the above-described meaning, and is intended to include all modifications within the scope and meaning equivalent to the scope of the claims.

1 サーバ(情報処理装置)
11 制御部
12 主記憶部
13 通信部
14 補助記憶部
P プログラム
141 言語モデル
142 キーワードDB
143 置換辞書
2 端末
1 server (information processing device)
11 Control Unit 12 Main Storage Unit 13 Communication Unit 14 Auxiliary Storage Unit P Program 141 Language Model 142 Keyword DB
143 replacement dictionary 2 terminal

Claims (12)

所定単位の文字又は文字列である各要素から構成される文章において、前記各要素の次に出現する前記要素を前記文章の順に学習した言語モデルを記憶する記憶部と、
生成する文章に含める前記要素の指定入力を受け付ける受付部と、
前記言語モデルに、指定された前記要素のいずれかを入力して前記要素の次に出現する要素を取得し、指定された前記要素及び取得した要素を前記言語モデルに入力して更に次に出現する要素を取得する処理を繰り返し、指定された前記要素及び取得した各要素を含む文章を生成する生成部と、
生成した前記文章を出力する出力部と
を備え
前記生成部は、
前記言語モデルの学習に用いた学習元文章の先頭に存在する要素を前記言語モデルに入力して前記要素の次に出現する要素を取得し、前記先頭の要素及び取得した前記次に出現する要素を含む先頭フレーズを生成し、または、前記学習元文章の先頭に存在する要素を前記言語モデルに入力して前記要素の次に出現する要素を取得し、前記先頭の要素及び取得した要素を前記言語モデルに入力して更に次に出現する要素を取得する処理を繰り返し、前記先頭の要素及び取得した各要素を含む先頭フレーズを生成し、
生成した先頭フレーズ及び前記指定された要素を含む文章を生成する
情報処理装置。
a storage unit that stores a language model obtained by learning, in the order of the sentence, the elements appearing next to the elements in a sentence composed of elements that are characters or character strings of a predetermined unit;
a receiving unit that receives a specified input of the element to be included in the generated text;
Input any of the specified elements into the language model to obtain an element appearing next to the element, input the specified element and the obtained element into the language model, and then appear next. a generation unit that repeats the process of acquiring elements to generate sentences that include the specified elements and the acquired elements ;
and an output unit that outputs the generated text ,
The generating unit
An element existing at the beginning of a learning source sentence used for learning the language model is input to the language model, an element appearing next to the element is acquired, and the element appearing at the beginning and the element appearing next to the acquired element are obtained. or input an element existing at the beginning of the learning source sentence into the language model to obtain an element that appears next to the element, and convert the first element and the obtained element to the Repeat the process of inputting to the language model and acquiring the next appearing element to generate a leading phrase including the leading element and each acquired element,
Generate a sentence containing the generated first phrase and the specified element
Information processing equipment.
前記言語モデルは、入力された前記先頭の要に基づき次に出現する要素の生起確率を算出し、一定値以上の生起確率が算出された要素を出力し、
前記言語モデルが出力した要素を含む前記先頭フレーズを生成する
ことを特徴とする請求項に記載の情報処理装置。
The language model calculates the probability of occurrence of the element appearing next based on the input leading element , and outputs the element for which the occurrence probability of a certain value or more is calculated,
2. The information processing apparatus according to claim 1 , wherein the head phrase including the element output by the language model is generated.
所定単位の文字又は文字列である各要素から構成される文章において、前記各要素の次に出現する前記要素を前記文章の順に学習した言語モデルを記憶する記憶部と、
生成する文章に含める前記要素の指定入力を受け付ける受付部と、
前記言語モデルに、指定された前記要素のいずれかを入力して前記要素の次に出現する要素を取得し、指定された前記要素及び取得した要素を前記言語モデルに入力して更に次に出現する要素を取得する処理を繰り返し、指定された前記要素及び取得した各要素を含む文章を生成する生成部と、
生成した前記文章を出力する出力部と
を備え、
前記受付部は、複数の前記要素の指定入力を受け付け、
前記生成部は、指定された前記複数の要素のうちいずれかの要素を前記言語モデルに入力して次に出現する要素を複数取得し、複数の前記次に出現する要素のそれぞれについて、前記言語モデルに入力された前記指定された要素及び前記次に出現する要素を前記言語モデルに入力して更に次に出現する要素を取得する処理を繰り返し、前記指定された要素及び前記次に出現する要素を含む複数の前記文章を生成し、
前記複数の文章から、前記言語モデルに入力された要素以外に指定された他の前記要素を含むかを判断して、前記文章を選択する選択部を備え、
前記出力部は、選択した前記文章を出力する
ことを特徴とする情報処理装置。
a storage unit that stores a language model obtained by learning, in the order of the sentence, the elements appearing next to the elements in a sentence composed of elements that are characters or character strings of a predetermined unit;
a receiving unit that receives a specified input of the element to be included in the generated text;
Input any of the specified elements into the language model to obtain an element appearing next to the element, input the specified element and the obtained element into the language model, and then appear next. a generation unit that repeats the process of acquiring elements to generate sentences that include the specified elements and the acquired elements;
an output unit that outputs the generated text;
with
The reception unit receives designation input of a plurality of the elements,
The generation unit inputs any one of the specified plurality of elements to the language model to obtain a plurality of elements that appear next, and for each of the plurality of elements that appear next, Repeating the process of inputting the specified element input to the language model and the next appearing element into the language model and obtaining the next appearing element, and generating a plurality of said sentences containing an element to
A selection unit that selects the sentences by determining whether the sentences contain other elements specified in addition to the elements input to the language model from the plurality of sentences,
The information processing apparatus, wherein the output unit outputs the selected text.
前記受付部は、前記複数の要素が文章内で出現する順序の指定入力を受け付け、
前記選択部は、指定された順序で前記複数の要素が出現する前記文章を選択する
ことを特徴とする請求項に記載の情報処理装置。
The reception unit receives an input specifying the order in which the plurality of elements appear in the sentence,
The information processing apparatus according to claim 3 , wherein the selection unit selects the sentence in which the plurality of elements appear in a designated order.
前記生成部は、前記他の要素を含む前記文章が生成されなかった場合、生成した前記文章に含まれる各要素を順次前記他の要素に置換して複数の文章を生成し、
前記言語モデルを用いて、生成した複数の文章のそれぞれに含まれる各要素の生起確率を算出し、前記各要素の生起確率に基づき、前記複数の文章のそれぞれの妥当性を示すスコアを算出する算出部を備え、
前記選択部は、前記スコアが所定値以上の文章を選択する
ことを特徴とする請求項又はに記載の情報処理装置。
If the sentence including the other element is not generated, the generating unit sequentially replaces each element included in the generated sentence with the other element to generate a plurality of sentences ;
Using the language model, the probability of occurrence of each element contained in each of the plurality of generated sentences is calculated, and based on the probability of occurrence of each element, a score indicating the validity of each of the plurality of sentences is calculated. a calculator,
5. The information processing apparatus according to claim 3 , wherein the selection unit selects sentences whose score is equal to or greater than a predetermined value .
前記生成部は、生成した前記文章に含まれる各要素のうち、前記他の要素と同一品詞の要素を前記他の要素に置換する
ことを特徴とする請求項に記載の情報処理装置。
6. The information processing apparatus according to claim 5 , wherein among the elements included in the generated sentence, the generation unit replaces an element having the same part of speech as the other element with the other element.
前記生成部は、前記言語モデルに基づき、前記指定された要素に続く各要素の生起確率を算出して前記文章を生成し、
前記各要素の生起確率に基づき、生成した前記文章の妥当性を示すスコアを算出する算出部を備え、
前記出力部は、算出した前記スコアが所定値以上の前記文章を出力する
ことを特徴とする請求項1~のいずれか1項に記載の情報処理装置。
The generation unit generates the sentence by calculating the probability of occurrence of each element following the specified element based on the language model,
A calculation unit that calculates a score indicating the validity of the generated sentence based on the probability of occurrence of each element,
The information processing apparatus according to any one of claims 1 to 6 , wherein the output unit outputs the text whose calculated score is equal to or greater than a predetermined value .
前記記憶部は、前記文章の先頭から末尾に亘る正順序で前記要素を学習した第1の言語モデルと、該文章の先頭から末尾までを逆順序に並び替えて前記要素を学習した第2の言語モデルとを記憶し、
前記生成部は、
前記第1又は第2の言語モデルを用いて前記文章を生成し、
生成した前記文章に含まれる前記要素の並び順を逆順序に変換し、
前記第2又は第1の言語モデルを用いて、変換後の前記文章に含まれる各要素の生起確率を算出し、
前記出力部は、算出した前記各要素の生起確率が所定値以上である場合に前記文章を出力する
ことを特徴とする請求項1~のいずれか1項に記載の情報処理装置。
The storage unit stores a first language model that has learned the elements in forward order from the beginning to the end of the sentence, and a second language model that has learned the elements by rearranging the elements from the beginning to the end of the sentence in reverse order. store the language model and
The generating unit
generating the sentence using the first or second language model ;
Converting the arrangement order of the elements included in the generated sentence to reverse order,
Using the second or first language model, calculate the occurrence probability of each element contained in the converted sentence,
The information processing apparatus according to any one of claims 1 to 7 , wherein the output unit outputs the text when the calculated probability of occurrence of each element is equal to or greater than a predetermined value .
前記記憶部は、文章のカテゴリに応じて異なる複数の前記言語モデルを記憶し、
前記受付部は、生成する文章の前記カテゴリの指定入力を受け付け、
前記生成部は、指定された前記カテゴリに対応する前記言語モデルに基づき、前記文章を生成する
ことを特徴とする請求項1~のいずれか1項に記載の情報処理装置。
The storage unit stores a plurality of the language models that differ according to categories of sentences,
The receiving unit receives a specified input of the category of the sentence to be generated,
The information processing apparatus according to any one of claims 1 to 8 , wherein the generation unit generates the sentence based on the language model corresponding to the designated category.
前記記憶部は、前記要素を置換するための置換辞書を記憶し、
前記受付部は、テキスト入力により前記要素の指定入力を受け付け、
前記置換辞書を参照して、入力された前記要素を置換する置換部を備え、
前記生成部は、置換された前記要素に基づき前記文章を生成する
ことを特徴とする請求項1~のいずれか1項に記載の情報処理装置。
the storage unit stores a replacement dictionary for replacing the element;
The receiving unit receives a specified input of the element by text input,
a replacement unit that refers to the replacement dictionary and replaces the input element;
The information processing apparatus according to any one of claims 1 to 9 , wherein the generation unit generates the sentence based on the replaced element.
生成する文章に含める所定単位の文字又は文字列である要素の指定入力を受け付け、
文章内で各要素の次に出現する前記要素を前記文章の順に学習した言語モデルに、指定された前記要素のいずれかを入力して前記要素の次に出現する要素を取得し、指定された前記要素及び取得した要素を前記言語モデルに入力して更に次に出現する要素を取得する処理を繰り返し、指定された前記要素及び取得した各要素を含む文章を生成し、
生成した前記文章を出力する
処理であって、
前記言語モデルの学習に用いた学習元文章の先頭に存在する要素を前記言語モデルに入力して前記要素の次に出現する要素を取得し、前記先頭の要素及び取得した前記次に出現する要素を含む先頭フレーズを生成し、または、前記学習元文章の先頭に存在する要素を前記言語モデルに入力して前記要素の次に出現する要素を取得し、前記先頭の要素及び取得した要素を前記言語モデルに入力して更に次に出現する要素を取得する処理を繰り返し、前記先頭の要素及び取得した各要素を含む先頭フレーズを生成し、
生成した先頭フレーズ及び前記指定された要素を含む文章を生成する
処理をコンピュータ実行ることを特徴とする情報処理方法。
Receiving a specified input of an element that is a character or a character string of a predetermined unit to be included in the generated sentence,
Input any of the specified elements to a language model that has learned the elements that appear next to each element in the sentence in the order of the sentence, acquire the element that appears next to the element, and obtain the element that appears next to the specified element. Repeating the process of inputting the element and the obtained element into the language model and obtaining the element that appears next, generating a sentence containing the specified element and each obtained element ,
A process of outputting the generated text,
An element existing at the beginning of a learning source sentence used for learning the language model is input to the language model, an element appearing next to the element is acquired, and the element appearing at the beginning and the element appearing next to the acquired element are obtained. or input an element existing at the beginning of the learning source sentence into the language model to obtain an element that appears next to the element, and convert the first element and the obtained element to the Repeat the process of inputting to the language model and acquiring the next appearing element to generate a leading phrase including the leading element and each acquired element,
Generate a sentence containing the generated first phrase and the specified element
An information processing method characterized in that a computer executes processing.
生成する文章に含める所定単位の文字又は文字列である要素の指定入力を受け付け、
文章内で各要素の次に出現する前記要素を前記文章の順に学習した言語モデルに、指定された前記要素のいずれかを入力して前記要素の次に出現する要素を取得し、指定された前記要素及び取得した要素を前記言語モデルに入力して更に次に出現する要素を取得する処理を繰り返し、指定された前記要素及び取得した各要素を含む文章を生成し、
生成した前記文章を出力する
処理であって、
前記言語モデルの学習に用いた学習元文章の先頭に存在する要素を前記言語モデルに入力して前記要素の次に出現する要素を取得し、前記先頭の要素及び取得した前記次に出現する要素を含む先頭フレーズを生成し、または、前記学習元文章の先頭に存在する要素を前記言語モデルに入力して前記要素の次に出現する要素を取得し、前記先頭の要素及び取得した要素を前記言語モデルに入力して更に次に出現する要素を取得する処理を繰り返し、前記先頭の要素及び取得した各要素を含む先頭フレーズを生成し、
生成した先頭フレーズ及び前記指定された要素を含む文章を生成する
処理をコンピュータに実行させることを特徴とするプログラム。
Receiving a specified input of an element that is a character or a character string of a predetermined unit to be included in the generated sentence,
Input any of the specified elements to a language model that has learned the elements that appear next to each element in the sentence in the order of the sentence, acquire the element that appears next to the element, and obtain the element that appears next to the specified element. Repeating the process of inputting the element and the obtained element into the language model and obtaining the element that appears next, generating a sentence containing the specified element and each obtained element ,
A process of outputting the generated text,
An element existing at the beginning of a learning source sentence used for learning the language model is input to the language model, an element appearing next to the element is acquired, and the element appearing at the beginning and the element appearing next to the acquired element are obtained. or input an element existing at the beginning of the learning source sentence into the language model to obtain an element that appears next to the element, and convert the first element and the obtained element to the Repeat the process of inputting to the language model and acquiring the next appearing element to generate a leading phrase including the leading element and each acquired element,
Generate a sentence containing the generated first phrase and the specified element
A program characterized by causing a computer to execute processing .
JP2018158653A 2018-08-27 2018-08-27 Information processing device, information processing method and program Active JP7155758B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018158653A JP7155758B2 (en) 2018-08-27 2018-08-27 Information processing device, information processing method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018158653A JP7155758B2 (en) 2018-08-27 2018-08-27 Information processing device, information processing method and program

Publications (2)

Publication Number Publication Date
JP2020035019A JP2020035019A (en) 2020-03-05
JP7155758B2 true JP7155758B2 (en) 2022-10-19

Family

ID=69668142

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018158653A Active JP7155758B2 (en) 2018-08-27 2018-08-27 Information processing device, information processing method and program

Country Status (1)

Country Link
JP (1) JP7155758B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7373099B2 (en) * 2021-04-30 2023-11-02 インダストリアル・ドリーム株式会社 text generation system
JP7058851B1 (en) 2021-08-06 2022-04-25 株式会社セルシス How and programs to create and / or edit works
JP7345034B1 (en) 2022-10-11 2023-09-14 株式会社ビズリーチ Document creation support device, document creation support method, and document creation support program
JP7427303B1 (en) 2023-07-23 2024-02-05 株式会社Stayway Information processing system, program and information processing method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016105232A (en) 2014-12-01 2016-06-09 日本電信電話株式会社 Language model creation device, language model creation method, program, and recording medium
JP2018045656A (en) 2016-09-16 2018-03-22 ヤフー株式会社 Learning device, program parameter, and learning method
JP2018045594A (en) 2016-09-16 2018-03-22 トヨタ自動車株式会社 Sentence generator and sentence generation method
JP2018055670A (en) 2016-09-27 2018-04-05 パナソニックIpマネジメント株式会社 Similar sentence generation method, similar sentence generation program, similar sentence generation apparatus, and similar sentence generation system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016105232A (en) 2014-12-01 2016-06-09 日本電信電話株式会社 Language model creation device, language model creation method, program, and recording medium
JP2018045656A (en) 2016-09-16 2018-03-22 ヤフー株式会社 Learning device, program parameter, and learning method
JP2018045594A (en) 2016-09-16 2018-03-22 トヨタ自動車株式会社 Sentence generator and sentence generation method
JP2018055670A (en) 2016-09-27 2018-04-05 パナソニックIpマネジメント株式会社 Similar sentence generation method, similar sentence generation program, similar sentence generation apparatus, and similar sentence generation system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
尾形朋哉 他3名,キーワードに基づくニューラル文生成のためのリランキング,言語処理学会第23回年次大会 発表論文集[online],日本,言語処理学会,2017年03月06日,679-682頁
浅川伸一,ニューラルネットワーク物語生成モデル,第49回ことば工学研究会資料(SIG-LSE-B501),日本,社団法人人工知能学会 ことば工学事務局,2015年09月25日,15-21頁
高橋瑞希 他2名,Web検索と単語n-gramモデルを用いた文生成手法の性能評価,言語処理学会第16回年次大会発表論文集,日本,言語処理学会,2010年03月08日,391-394頁

Also Published As

Publication number Publication date
JP2020035019A (en) 2020-03-05

Similar Documents

Publication Publication Date Title
US11222167B2 (en) Generating structured text summaries of digital documents using interactive collaboration
US11188711B2 (en) Unknown word predictor and content-integrated translator
US10311146B2 (en) Machine translation method for performing translation between languages
JP7155758B2 (en) Information processing device, information processing method and program
US11150875B2 (en) Automated content editor
CN111444320B (en) Text retrieval method and device, computer equipment and storage medium
JP5257071B2 (en) Similarity calculation device and information retrieval device
US20170185581A1 (en) Systems and methods for suggesting emoji
US9514098B1 (en) Iteratively learning coreference embeddings of noun phrases using feature representations that include distributed word representations of the noun phrases
US10997223B1 (en) Subject-specific data set for named entity resolution
JP5809381B1 (en) Natural language processing system, natural language processing method, and natural language processing program
US11593557B2 (en) Domain-specific grammar correction system, server and method for academic text
US11082369B1 (en) Domain-specific chatbot utterance collection
US20220012437A1 (en) Translating method using visually represented elements, and device therefor
CN114341841A (en) Building answers to queries by using depth models
KR20230061001A (en) Apparatus and method for correcting text
US20190303437A1 (en) Status reporting with natural language processing risk assessment
JP7279099B2 (en) Dialogue management
US20230123328A1 (en) Generating cascaded text formatting for electronic documents and displays
KR102552811B1 (en) System for providing cloud based grammar checker service
JP5528376B2 (en) Document simplifying apparatus and program
US11501088B1 (en) Techniques for generating natural language text customized to linguistic preferences of a user
US20230169257A1 (en) Device for generating combined sentences of images and characters
JP6303508B2 (en) Document analysis apparatus, document analysis system, document analysis method, and program
JP6886196B2 (en) Language learning support device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210622

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220427

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220531

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220707

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20220906

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220919

R150 Certificate of patent or registration of utility model

Ref document number: 7155758

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150