JP7058438B2 - Dialogue response system, model learning device and dialogue device - Google Patents
Dialogue response system, model learning device and dialogue device Download PDFInfo
- Publication number
- JP7058438B2 JP7058438B2 JP2017192845A JP2017192845A JP7058438B2 JP 7058438 B2 JP7058438 B2 JP 7058438B2 JP 2017192845 A JP2017192845 A JP 2017192845A JP 2017192845 A JP2017192845 A JP 2017192845A JP 7058438 B2 JP7058438 B2 JP 7058438B2
- Authority
- JP
- Japan
- Prior art keywords
- sentence
- learning
- response
- dialogue
- utterance
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Machine Translation (AREA)
Description
本発明は、対話応答システム、モデル学習装置および対話装置に関する。 The present invention relates to a dialogue response system, a model learning device and a dialogue device.
近年、人と対話可能なコンピュータ(対話応答システム)が数多く出現してきたが、そのほとんどは、人手で書かれた応答文またはテンプレートを用いて人手で作成された応答文を、ユーザ発話に応じて出力しているに過ぎない。Webから取得できる文(以下、Web取得文)を対話に用いることできれば、対話応答システム開発において大幅なコストダウンとなるが、現状では、Web取得文は、対話応答システム開発に有効に利用されていない。その理由は、Web取得文は、対話において応答文としては不完全または不自然で違和感を生じさせることが多いからである。たとえば、Web取得文には、ニュースのタイトルに多い「自動車、タイでエンジンの生産を開始」のような名詞で終わる文、「こうしたブランドのメガネフレームは深い輝きを持つ」のような前後の文脈がないと成り立たない文、または発話に対しては不適切な部分または冗長な部分を含んでいる文などがある。Web取得文は、文自体としては、おかしくないけれども、発話に対する応答としては違和感を生じさせることが多い。したがって、Web取得文を対話応答システムで用いるためには、応答文として適切な形に変換することが必要となる。 In recent years, many computers (dialogue response systems) that can interact with humans have appeared, but most of them respond to user utterances by manually creating response sentences using manually written response sentences or templates. It's just outputting. If a sentence that can be acquired from the Web (hereinafter referred to as a Web acquisition sentence) can be used for dialogue, the cost will be significantly reduced in the development of the dialogue response system, but at present, the Web acquisition sentence is effectively used in the development of the dialogue response system. not. The reason is that the Web acquisition sentence is often incomplete or unnatural as a response sentence in a dialogue and causes a sense of incongruity. For example, in the web acquisition sentence, there are many news titles that end with a noun such as "automobiles start production of engines in Thailand", and contexts such as "glass frames of these brands have a deep shine". There are sentences that do not hold without them, or sentences that contain inappropriate or redundant parts for utterances. Although the Web-acquired sentence itself is not strange, it often causes a sense of discomfort as a response to the utterance. Therefore, in order to use the Web acquisition statement in the dialogue response system, it is necessary to convert it into an appropriate form as the response statement.
従来から、語尾を変換することにより対話応答システムのキャラクタを表現したり、文意を変えたりする技術が知られている。たとえば、語尾変換によるキャラクタ表現技術として、語尾の「です・ます」を「だ・である」に変換する技術、および語尾を関西弁風に変換する技術が知られている。文意を変える技術として、たとえば「今夜はハンバーグを食べる」という文を「今夜はハンバーグを食べましょう」と提案風の語尾に変換する技術、および「今夜はハンバーグを食べるの?」と疑問系に変換する技術が知られている。しかしながら、これらの技術では、ユーザ発話に対する応答として適切な形に変換することができない。たとえば、発話文「冬越しの貯食をすることで知られている野鳥にヤマガラがいます。」に対する応答文が「良い天気で雲も少なく、湖の周辺ではヤマガラ、ツグミなど野鳥見ることもできた。」である場合、応答文の語尾を変換したとしても、応答文は、発話に対して適切とはいえない。なぜなら、応答文に含まれる「良い天気で雲も少なく、」が意味を成していないため、少なくともこの「良い天気で雲も少なく、」は削除する必要があるからである。 Conventionally, there have been known techniques for expressing characters in a dialogue response system or changing the meaning of a sentence by converting the ending of a word. For example, as a character expression technique by flexion conversion, a technique of converting the flexion "da-masu" to "da-desu" and a technique of converting the flexion to Kansai dialect are known. As a technique to change the meaning of the sentence, for example, a technique to convert the sentence "Eat a hamburger tonight" into a suggestion-like ending "Let's eat a hamburger tonight", and a questionable technique "Do you eat a hamburger tonight?" The technique of converting to is known. However, these techniques cannot be converted into an appropriate form as a response to a user's utterance. For example, the response to the utterance "Varied tit is a wild bird known for hoarding over the winter" is "Good weather, few clouds, and you can see wild birds such as varied tit and thrush around the lake." In the case of ".", Even if the ending of the response sentence is converted, the response sentence is not appropriate for the utterance. This is because "good weather and few clouds" in the response text does not make sense, so at least this "good weather and few clouds" needs to be deleted.
特許文献1には、敬体表現を常態表現に精度良く変換する方法が記載されている。この方法によって、例えば、語尾の「です」または「ます」を「だ」に変換することができる。
特許文献2には、対話者の知識量に応じた表現に言い換える方法が記載されている。この方法によって、例えばワインに詳しくない相手に応答する場合は、「ボジョレーが好きです」を「赤ワインが好きです」に言い換えることができる。
特許文献1では、敬体表現を常態表現に変換することができるが、変換できるのは語尾に限られる。また、いつどの語尾に変換することが適切なのかを見極めることもできない。特許文献2では、対話者の知識量に応じた表現に言い換えるが、知識レベルが一致しても応答文として適切でない場合は多々ある。たとえば、特許文献2では、前述のような応答文における「良い天気で雲も少なく、」のような不要な箇所を削除することができない。
In
それゆえに、本発明の目的は、発話に対して、対話らしく応答することを可能にする対話応答システム、モデル学習装置および対話装置を提供することである。 Therefore, it is an object of the present invention to provide a dialogue response system, a model learning device, and a dialogue device capable of responding to an utterance in a dialogue-like manner.
本発明の対話応答システムは、モデル学習装置と、対話装置とを備える。モデル学習装置は、学習用の発話文と、テキストデータベースの文を検索することによって取得された学習用の発話文に関連する学習用の関連文と、学習用の関連文が対話の応答として適切な形式に修正された学習用の応答文とを含む学習用コーパスを記憶するコーパス記憶部と、学習用コーパスを用いて、関連文を入力に含み、応答文を出力とする応答文生成モデルを学習するモデル学習部とを備える。対話装置は、対話実行用の発話文が入力される発話文入力部と、テキストデータベースの文を検索することによって、対話実行用の発話文に関連する対話実行用の関連文を取得する関連文取得部と、発話文に関連する関連文を入力として含み、入力に応答して応答文を出力とするように学習された応答文生成モデルに対話実行用の関連文を入力することによって、対話実行用の応答文を生成する応答文生成部とを備える。 The dialogue response system of the present invention includes a model learning device and a dialogue device. In the model learning device, the learning utterance sentence, the learning related sentence related to the learning utterance sentence obtained by searching the sentence in the text database, and the learning related sentence are appropriate as the response of the dialogue. A corpus storage unit that stores a learning corpus including a learning response sentence modified in various formats, and a response sentence generation model that includes related sentences in the input and outputs the response sentence using the learning corpus. It is equipped with a model learning unit for learning. The dialogue device acquires a dialogue execution related sentence related to the dialogue execution speech sentence by searching the speech sentence input unit in which the dialogue execution speech sentence is input and the sentence in the text database. Dialogue by inputting the relational sentence for dialogue execution into the response sentence generation model trained to include the acquisition part and the related sentence related to the spoken sentence as input and output the response sentence in response to the input. It is provided with a response statement generation unit that generates a response statement for execution.
本発明の対話応答システムは、モデル学習装置と対話装置とからなる対話応答システムである。モデル学習装置は、学習用の発話文と、テキストデータベースの文を検索することによって取得された学習用の発話文に関連する関連文と、関連文の適合度とを含む学習用コーパスを記憶するコーパス記憶部と、学習用コーパスを用いて、発話文および関連文を入力に含み、適合度を出力とする適合性判定モデルを学習する第1の学習処理部とを備える。対話装置は、対話実行用の発話文が入力される発話文入力部と、テキストデータベースの文を検索することによって、対話実行用の発話文に関連する関連文を取得する関連文取得部と、発話文と関連文を入力に含み、入力に応答して関連文の適合度を出力するように学習された適合性判定モデルに、対話実行用の発話文および取得した関連文を入力することによって、適合度を生成する関連文適合性判定部とを備える。 The dialogue response system of the present invention is a dialogue response system including a model learning device and a dialogue device. The model learning device stores a learning corpus containing the utterances for learning, the related sentences related to the utterances for learning obtained by searching the sentences in the text database, and the suitability of the related sentences. It includes a corpus storage unit and a first learning processing unit that uses a learning corpus to learn a suitability determination model that includes utterance sentences and related sentences as inputs and outputs the degree of conformity. The dialogue device includes an utterance sentence input unit in which an utterance sentence for executing a dialogue is input, a related sentence acquisition unit that acquires a related sentence related to the utterance sentence for executing a dialogue by searching a sentence in a text database, and a related sentence acquisition unit. By inputting the spoken sentence for dialogue execution and the acquired related sentence into the conformity judgment model trained to include the spoken sentence and the related sentence in the input and output the conformity of the related sentence in response to the input. , A related sentence conformity determination unit that generates a degree of conformity is provided.
本発明の対話応答システムは、モデル学習装置と対話装置とからなる対話応答システムである。モデル学習装置は、学習用の発話文と、学習用の発話文に関連する関連文を取得するためにテキストデータベースの文を検索するときに用いられる検索トピックと、検索トピックの適合度とを含む学習用コーパスを記憶するコーパス記憶部と、学習用コーパスを用いて、発話文および検索トピックを入力に含み、適合度を出力とする適合性判定モデルを学習する第1の学習処理部とを備える。対話装置は、対話実行用の発話文が入力される発話文入力部と、対話実行用の発話文に基づいて、対話実行用の発話文に関連する関連文を取得するためにテキストデータベースの文を検索するときに用いられる検索トピックを生成する第1のトピック生成部と、発話文と検索トピックを入力に含み、入力に応答して検索トピックの適合度を出力するように学習された適合性判定モデルに、対話実行用の発話文および生成した検索トピックを入力することによって、適合度を生成するトピック適合性判定部と、トピック適合性判定部で生成された適合度に基づいて、複数の検索トピックの中から1つの検索トピックを選択する選択部と、選択された検索トピックを用いて、テキストデータベースの文を検索することによって、対話実行用の発話文に関連する関連文を取得する第1の関連文取得部とを備える。 The dialogue response system of the present invention is a dialogue response system including a model learning device and a dialogue device. The model learning device includes a utterance sentence for learning, a search topic used when searching a sentence in a text database to obtain a related sentence related to the utterance sentence for learning, and a suitability of the search topic. It includes a corpus storage unit that stores a learning corpus, and a first learning processing unit that uses a learning corpus to learn a conformity determination model that includes spoken sentences and search topics in input and outputs conformity. .. The dialogue device has a utterance text input unit in which the utterance text for dialogue execution is input, and a sentence in the text database to acquire related sentences related to the utterance text for dialogue execution based on the utterance text for dialogue execution. A first topic generator that generates the search topic used when searching for, and a suitability learned to include utterances and search topics in the input and output the suitability of the search topic in response to the input. A topic suitability judgment unit that generates a degree of conformity by inputting an utterance sentence for dialogue execution and a generated search topic into the judgment model, and a plurality of suitability based on the suitability generated by the topic suitability judgment unit. By searching the text database sentences using the selection section that selects one search topic from the search topics and the selected search topic, the related sentences related to the utterance sentences for executing the dialogue are acquired. It is provided with a related sentence acquisition unit of 1.
本発明によれば、テキストデータベースから取得したデータを質の良い応答文として利用することが可能となる。その結果、対話応答システムの利用範囲が大幅に広がる。 According to the present invention, it is possible to use the data acquired from the text database as a high-quality response sentence. As a result, the range of use of the dialogue response system is greatly expanded.
以下、実施の形態について、図面を用いて説明する。
[第1の実施形態]
図1は、第1の実施形態の対話応答システム1の構成を表わす図である。対話応答システム1は、モデル学習装置2と、対話装置3とを備える。
Hereinafter, embodiments will be described with reference to the drawings.
[First Embodiment]
FIG. 1 is a diagram showing the configuration of the
モデル学習装置2は、コーパス生成部4と、コーパス記憶部5と、応答生成学習処理部6と、パラメータ記憶部14とを備える。コーパス生成部4は、発話文入力部11と、関連文取得部12と、学習用応答文入力部13と、コーパス出力部64とを備える。
The
発話文入力部11は、開発側の人員によって作成された学習用発話文の入力を受ける。
関連文取得部12は、テキストデータベースを検索することによって、学習用発話文に関連する文を取得して、学習用関連文とする。たとえば、関連文取得部12は、テキストデータベースの1種であるWeb1000上に掲載された文を検索することによって、学習用発話文に関連する文を取得して、学習用関連文とする。関連文取得部12は、たとえば、Web1000上に掲載された文を検索することによって、学習用発話文に含まれる名詞を最も多く含む1つの文を学習用関連文として取得する。関連文取得部12は、検索エンジンなどを利用することによって、人手または自動でWeb1000上のデータを検索することによって、学習用関連文を取得する。
The utterance
The related
Web1000上に掲載された文とは、関連文取得の時点でWeb1000上に掲載されている文(第1のケース)、または関連文取得の時点よりも前にWeb1000上に掲載された後、データベースに取り込まれた文(第2のケース)である。第1のケースでは、関連文取得部12は、Web1000を直接検索する。第2のケースでは、関連文取得部12は、データベースを検索する。
A sentence posted on Web1000 is a sentence posted on Web1000 at the time of acquisition of a related sentence (first case), or a sentence posted on Web1000 before the time of acquisition of a related sentence, and then a database. It is a sentence (second case) taken in. In the first case, the related
学習用応答文入力部13は、学習用応答文の入力を受ける。学習用応答文は、開発側の人員によって、発話に対して対話の応答として適切になるように予め定められた規則に従って、学習用関連文を修正することによって生成される。発話に対して対話の応答として適切とは、たとえば、対話の応答として重要な部分を維持する、対話の応答らしい語尾を含む、対話の応答として冗長な部分を含まない、前後の文脈がないと成立しない部分を含まない、または対話の応答らしい助詞を含む、対話の応答らしい語順である、などである。開発側の人員によって学習用応答文が作成されるので、質の良い学習用応答文が得られる。
The learning response
コーパス出力部64は、学習用関連文と学習用応答文のセットを複数含む学習用コーパスを生成して、コーパス記憶部5に書込む。コーパス記憶部5は、学習用コーパスを記憶する。
The
応答生成学習処理部6は、学習用コーパスを用いて、関連文を入力とし、応答文を出力とする応答文生成モデルAを学習する。応答文生成モデルAは、深層学習のニューラルネットワークと、そのパラメータとからなる。
The response generation
パラメータ記憶部14は、応答生成学習処理部6による応答文生成モデルAの学習後のパラメータを記憶する。パラメータ記憶部14は、ニューラルネットワークの学習後のパラメータ(重み行列など)を記憶する。パラメータ記憶部14に記憶されている応答文生成モデルAの学習後のパラメータは、入出力ポートなどを介して外部へ取り出されることができる。
The
図2は、第1の実施形態の学習用発話文、学習用関連文、および学習用応答文の例を表わす図である。図2に示すように、学習用発話文「ぽつぽつしてきたから、洗濯物取り込まなきゃね。」に含まれる名詞「洗濯物」を含む文がWeb1000から検索されて、学習用関連文「浴槽温暖機で洗濯物を乾かす早さベストアンサー」が取得される。そして、学習用関連文に含まれる対話の応答として冗長な部分「早さベストアンサー」が削除されるとともに、対話らしくない語尾「乾かす」が対話らしい語尾「乾かそう」に置き換えられることによって、学習用応答文「浴槽温暖機で洗濯物を乾かそう。」が作成される。このような学習用関連文と学習用応答文とを用いた学習によって、関連文から、対話として適切な応答文を生成する応答文生成モデルAが生成される。 FIG. 2 is a diagram showing an example of a learning utterance sentence, a learning related sentence, and a learning response sentence of the first embodiment. As shown in Fig. 2, a sentence containing the noun "laundry" contained in the learning utterance sentence "I have to take in the laundry because I've been popping up" is searched from Web1000, and the learning-related sentence "In the bathtub warmer". "Best answer to dry laundry" is obtained. Then, the redundant part "quickness best answer" is deleted as the response of the dialogue included in the related sentence for learning, and the non-dialogue flexion "dry" is replaced with the dialogue-like flexion "dry". The response sentence "Let's dry the laundry with a bathtub warmer." Is created. By learning using such a learning-related sentence and a learning response sentence, a response sentence generation model A that generates an appropriate response sentence as a dialogue is generated from the related sentence.
対話装置3は、発話文入力部7と、関連文取得部8と、パラメータ記憶部15と、応答文生成部9とを備える。
The
発話文入力部7は、ユーザからの対話実行用発話文の入力を受ける。
関連文取得部8は、テキストデータベースを検索することによって、対話実行用発話文に関連する文を取得して、対話実行用関連文とする。たとえば、関連文取得部8は、テキストデータベースの1種であるWeb1000上に掲載された文を検索することによって、対話実行用発話文に関連する文を取得して、対話実行用関連文とする。関連文取得部8は、たとえば、Web1000上に掲載された文を検索することによって、対話実行用発話文に含まれる名詞を含む1つの文を対話実行用関連文として取得する。関連文取得部8は、検索エンジンなどを利用することによって、ユーザの操作または自動でWeb1000上のデータを検索することによって、対話実行用関連文を取得する。
The utterance
The related
パラメータ記憶部15は、モデル学習装置2による応答文生成モデルAの学習後のパラメータを記憶する。たとえば、パラメータ記憶部15は、ニューラルネットワークの学習後のパラメータ(重み行列など)を記憶する。モデル学習装置2から外部に取り出された応答文生成モデルAの学習後のパラメータが対話装置3に入力され、パラメータ記憶部15に記憶される。これらのパラメータは、対話装置3の機能を実現するプログラムとともに、ユーザに頒布されるものとしてもよい。
The
応答文生成部9は、対話実行用関連文を学習後の応答文生成モデルAに入力することによって、対話実行用応答文を生成する。たとえば、応答文生成部9は、学習後のニューラルネットワークに対話実行用関連文を入力して、ニューラルネットワークの出力を対話実行用応答文とすることができる。
The response
図3は、第1の実施形態の対話実行用発話文、対話実行用関連文、および対話実行用応答文の例を表わす図である。図3に示すように、対話実行用発話文「やっぱり、ブランドの眼鏡フレームは、いいですね。」に含まれる「眼鏡フレーム」を含む文がWeb1000から検索されて、対話実行用関連文「こうしたブランドの眼鏡フレームは深い輝きを持つ。」が取得される。そして、対話実行用関連文に含まれる前後の文脈がないと成立しない部分「こうした」が削除されるとともに、対話らしくない語尾「持つ」が対話らしい語尾「持ちますね」に置き換えられた対話実行用応答文「ブランドの眼鏡フレームは深い輝きを持ちますね。」が生成される。 FIG. 3 is a diagram showing an example of a dialogue execution utterance sentence, a dialogue execution related sentence, and a dialogue execution response sentence according to the first embodiment. As shown in FIG. 3, a sentence including "glasses frame" included in the dialogue execution utterance sentence "After all, the brand's spectacle frame is good." Is searched from Web1000, and the dialogue execution related sentence "such". The brand's eyeglass frames have a deep shine. " Then, the part "such" that cannot be established without the context before and after it is included in the related sentence for dialogue execution is deleted, and the ending "have" that is not like dialogue is replaced with the ending "have" that seems to be dialogue. The response statement "Branded eyeglass frames have a deep shine." Is generated.
図4は、第1の実施形態の応答生成学習処理部6の構成を表わす図である。応答生成学習処理部6は、エンコーダ151と、デコーダ152とを備える。応答生成学習処理部6は、応答文生成モデルAの一例であるSequence to Sequence モデルを学習する。
FIG. 4 is a diagram showing the configuration of the response generation
エンコーダ151は、時間軸(t=1~m)に沿って展開されたリカレントニューラルネットワークを備える。時刻tの入力ベクトルをx1(t)、隠れ層のベクトルをh1(t)とする。
The
時刻tの隠れ層は、時刻tの入力層に入力された学習用関連文の単語を表わす入力ベクトルx1(t)を受け取るとともに、時刻(t-1)の隠れ層のベクトルh1(t-1)を受け、ベクトルh1(t)を時刻(t+1)の隠れ層に出力する。ただし、時刻1の隠れ層は、入力ベクトルx1(1)のみを受け取る。たとえば、時刻1の入力ベクトルx1(1)は、「京都」を表わすベクトルであり、時刻2の入力ベクトルx1(2)は、「で」を表わすベクトルである。なお、本実施の形態では、単語を表すベクトルとしていわゆる単語埋め込みベクトル(例えばword2vectorにより得られるもの)等を用いてもよい。
The hidden layer at time t receives an input vector x1 (t) representing a word of a learning-related sentence input to the input layer at time t, and a vector h1 (t-1) of the hidden layer at time (t-1). ), And the vector h1 (t) is output to the hidden layer at the time (t + 1). However, the hidden layer at
時刻tの重み行列をU1(t)、W1(t)とし、バイアスをb、活性化関数をfとしたときに、以下の式が成り立つ。 When the weight matrix at time t is U1 (t) and W1 (t), the bias is b, and the activation function is f, the following equation holds.
h1(t)=f(U1(1)x1(1)+b)…(1)
h1(t)=f(U1(t)x1(t)+W1(t)h1(t-1)+b)(t=1以外) …(2)
デコーダ152は、時間軸(t=1~n)に沿って展開されたリカレントニューラルネットワークを備える。時刻tの入力ベクトルをx3(t)、隠れ層のベクトルをh3(t)、出力ベクトルをy3(t)とする。
h1 (t) = f (U1 (1) x1 (1) + b)… (1)
h1 (t) = f (U1 (t) x1 (t) + W1 (t) h1 (t-1) + b) (other than t = 1)… (2)
The
時刻tの隠れ層は、時刻tの入力層に入力された学習用応答文の単語を表わす入力ベクトルx3(t)を受け取るとともに、時刻(t-1)の隠れ層のベクトルh3(t-1)を受け、ベクトルh3(t)を出力層および時刻(t+1)の隠れ層に出力する。ただし、時刻1の隠れ層は、入力ベクトルx3(1)と、エンコーダ151の最後の時刻mの隠れ層のベクトルh1(m)を受ける。たとえば、時刻1の入力ベクトルx3(1)は、ダミーワード(<s>)を表わすベクトルであり、時刻2の入力ベクトルx3(2)は、単語「京都」を表わすベクトルである。時刻tの出力層は、時刻tの隠れ層からベクトルh3(t)を受け、出力ベクトルy3(t)を出力する。出力ベクトルy3(t)は、時刻(t+1)の入力ベクトルx3(t+1)を予測したものである。
The hidden layer at time t receives the input vector x3 (t) representing the word of the learning response sentence input to the input layer at time t, and the vector h3 (t-1) of the hidden layer at time (t-1). ), And the vector h3 (t) is output to the output layer and the hidden layer at the time (t + 1). However, the hidden layer at
時刻tの重み行列をU3(t)、W3(t)、V3(t)とし、バイアスをb、c、活性化関数をf、gとしたときに、以下の式が成り立つ。 When the weight matrix at time t is U3 (t), W3 (t), V3 (t), the bias is b, c, and the activation function is f, g, the following equation holds.
h3(1)=f(U3(1)x3(1)+W3(1)h1(m)+b)…(3)
h3(t)=f(U3(t)x3(t)+W3(t)h3(t-1)+b)(t=1以外)…(4)
y3(t)=g(V3(t)h3(t)+c)…(5)
デコーダ152では、出力ベクトルy3(1)~y3(n)で構成される出力文とx3(1)~x3(n)で構成される学習用応答文(教師データ)との誤差が求められる。時刻tの出力ベクトルy3(t)と、入力ベクトルx3(t+1)との誤差E(t)が求められる。ただし、時刻t=nでは、出力ベクトルy3(n)と、時刻1の入力ベクトルx3(1)(ダミーワード(<s>))との誤差E(n)が求められる。これらの誤差は、デコーダ152内の時刻tよりも前の隠れ層、およびエンコーダ151内の隠れ層(時刻t=1~m)に逆伝搬される。デコーダ152内の時刻tの隠れ層に逆伝搬されてきた誤差の和を最小化するように重み行列W3(t)、U3(t)、V3(t)が更新される。エンコーダ151内の時刻tの隠れ層に逆伝搬されてきた誤差の和を最小化するようにW1(t)、U1(t)が更新される。学習後の応答文生成モデルAのパラメータである重み行列W3(t)、U3(t)、V3(t)、W1(t)、U1(t)は、パラメータ記憶部14に記憶される。
h3 (1) = f (U3 (1) x3 (1) + W3 (1) h1 (m) + b)… (3)
h3 (t) = f (U3 (t) x3 (t) + W3 (t) h3 (t-1) + b) (other than t = 1) ... (4)
y3 (t) = g (V3 (t) h3 (t) + c)… (5)
In the
図5は、第1の実施形態の応答文生成部9の構成を表わす図である。応答文生成部9は、エンコーダ153と、デコーダ154とを備える。応答文生成部9は、学習後の応答文生成モデルAの一例である学習後のSequence to Sequence モデルを用いて、対話実行用応答文を生成する。
FIG. 5 is a diagram showing the configuration of the response
図5において、応答文生成モデルAの学習後のパラメータである重み行列W3(t)、U3(t)、V3(t)、W1(t)、U1(t)がパラメータ記憶部15から読み出されて設定される。これらは、図4の応答生成学習処理部6による学習(更新)によって得られたものが用いられる。
In FIG. 5, the weight matrices W3 (t), U3 (t), V3 (t), W1 (t), and U1 (t), which are the parameters after learning the response sentence generation model A, are read from the
エンコーダ153は、エンコーダ151と同様の時間軸(t=1~m)に沿って展開されたリカレントニューラルネットワークを備える。ただし、時刻tの入力層に入力される入力ベクトルx1(t)は、学習用関連文の単語ではなく、対話実行用関連文の単語である。
The
デコーダ154は、時間軸(t=1~n)に沿って展開されたリカレントニューラルネットワークを備える。時刻tの入力ベクトルをx3(t)、隠れ層のベクトルをh3(t)、出力ベクトルをy3(t)とする。
The
時刻tの隠れ層は、時刻(t-1)の出力ベクトルy3(t-1)を受け取るとともに、時刻(t-1)の隠れ層のベクトルh3(t-1)を受け、ベクトルh3(t)を出力層および時刻(t+1)の隠れ層に出力する。ただし、時刻1の隠れ層は、ダミーワードを表わすベクトルDと、エンコーダ151の最後の時刻mの隠れ層のベクトルh1(m)を受ける。時刻tの出力層は、時刻tの隠れ層からベクトルh3(t)を受け、出力ベクトルy3(t)を出力する。
The hidden layer at time t receives the output vector y3 (t-1) at time (t-1) and the vector h3 (t-1) of the hidden layer at time (t-1), and receives the vector h3 (t-1). ) Is output to the output layer and the hidden layer at the time (t + 1). However, the hidden layer at
時刻tの重み行列をU3(t)、W3(t)、V3(t)とし、バイアスをb、c、活性化関数をf、gとしたときに、以下の式が成り立つ。 When the weight matrix at time t is U3 (t), W3 (t), V3 (t), the bias is b, c, and the activation function is f, g, the following equation holds.
h3(1)=f(D+W3(1)h1(m)+b)…(6)
h3(t)=f(U3(t)y3(t-1)+W3(t)h3(t-1)+b)(t=1以外)…(7)
y3(t)=g(V3(t)h3(t)+c)…(8)
図6は、第1の実施形態のモデル学習装置2の動作手順を表わすフローチャートである。
h3 (1) = f (D + W3 (1) h1 (m) + b)… (6)
h3 (t) = f (U3 (t) y3 (t-1) + W3 (t) h3 (t-1) + b) (other than t = 1) ... (7)
y3 (t) = g (V3 (t) h3 (t) + c)… (8)
FIG. 6 is a flowchart showing the operation procedure of the
ステップS101において、発話文入力部11は、学習用発話文の入力を受ける。
ステップS102において、関連文取得部12は、学習用発話文に関連する学習用関連文をテキストデータベースの1種であるWeb1000から取得する。
In step S101, the utterance
In step S102, the related
ステップS103において、学習用応答文入力部13は、学習用関連文を対話の応答として適切になるように、開発側の人員の操作によって学習用関連文を修正することによって生成された学習用応答文の入力を受ける。
In step S103, the learning response
ステップS104において、ステップS101~S103がすべての入力が完了するまで繰り返されることによって、複数セットの学習用関連文と学習用応答文とが得られる。コーパス出力部64は、学習用関連文と学習用応答文のセットを複数を含む学習用コーパスを生成して、コーパス記憶部5に書込む。コーパス記憶部5は、学習用コーパスを記憶する。
In step S104, steps S101 to S103 are repeated until all the inputs are completed, so that a plurality of sets of learning-related sentences and learning response sentences are obtained. The
ステップS105において、応答生成学習処理部6は、学習用コーパスを用いて、関連文を入力とし、応答文を出力とする応答文生成モデルAを学習する。
In step S105, the response generation
ステップS106において、パラメータ記憶部14は、応答生成学習処理部6による応答文生成モデルAの学習後のパラメータを記憶する。
In step S106, the
図7は、第1の実施形態の対話装置3の動作手順を表わすフローチャートである。
ステップS201において、応答文生成部9は、パラメータ記憶部15に記憶されているモデル学習装置2による応答文生成モデルAの学習後のパラメータを読み出す。
FIG. 7 is a flowchart showing the operation procedure of the
In step S201, the response
ステップS202において、発話文入力部7は、ユーザから対話実行用発話文の入力を受ける。
In step S202, the utterance
ステップS203において、関連文取得部8は、対話実行用発話文に関連する対話実行用関連文をテキストデータベースの1種であるWeb1000から取得する。
In step S203, the related
ステップS204において、応答文生成部9は、読み出したパラメータを用いることによって得られる学習後の応答文生成モデルAに対話実行用関連文を入力することによって、対話実行用応答文を生成する。
In step S204, the response
以上のように、本実施の形態によれば、発話に基づいて得られる応答候補である関連文を適切な応答文に変換することができる。これにより、Webで取得することができる膨大な数の文を対話応答システムの応答として利用することができる。 As described above, according to the present embodiment, the related sentence which is a response candidate obtained based on the utterance can be converted into an appropriate response sentence. As a result, a huge number of sentences that can be acquired on the Web can be used as the response of the dialogue response system.
[第2の実施形態]
図8は、第2の実施形態の対話応答システム21の構成を表わす図である。対話応答システム21は、モデル学習装置22と、対話装置23とを備える。本実施の形態のモデル学習装置22が、第1の実施形態のモデル学習装置2と相違する点は、コーパス生成部24に含まれる学習用応答文入力部38およびコーパス出力部74と、コーパス記憶部25と、応答生成学習処理部26とである。
[Second Embodiment]
FIG. 8 is a diagram showing the configuration of the
学習用応答文入力部38は、学習用応答文の入力を受ける。学習用応答文は、開発側の人員の操作によって、今回の発話に対する対話の応答として適切になるように予め定められた規則に従って、学習用関連文を修正することによって作成される。今回の発話に対する対話の応答として適切とは、第1の実施形態で説明したような一般的な対話の応答として適切(対話らしい語尾を含む、対話として冗長な部分を含まない、前後の文脈がないと成立しない部分を含まない、または対話らしい助詞を含むなど)であるだけではなく、今回入力された発話文に対する応答として適切である(たとえば不自然な部分を含まないなど)ことである。
The learning response
コーパス出力部74は、学習用発話文と学習用関連文と学習用応答文のセットを複数含む学習用コーパスを生成して、コーパス記憶部25に書込む。コーパス記憶部25は、学習用コーパスを記憶する。
The
応答生成学習処理部26は、学習用コーパスを用いて、発話文および関連文を入力とし、応答文を出力とする応答文生成モデルBを学習する。応答文生成モデルBは、発話文も入力とする点において、応答文生成モデルAと異なる。応答文生成モデルBは、深層学習のニューラルネットワークと、そのパラメータとからなる。
The response generation
図9は、第2の実施形態の学習用発話文、学習用関連文、および学習用応答文の例を表わす図である。図9に示すように、学習用発話文「冬越しの貯食をすることで知られている野鳥にヤマガラがいます。」に含まれる「ヤマガラ」を含む文がWeb1000から検索されて、学習用関連文「良い天気で雲も少なく、湖の周辺ではヤマガラ、ツグミなど野鳥見ることもできた。」が取得される。そして、学習用関連文から、今回の学習用発話文に対する応答として不自然な部分「良い天気で雲も少なく、」が削除されるとともに、対話らしくない語尾「できた」が応答として相応しい語尾「できますよ」に置き換えられることによって、学習用応答文「湖の周辺ではヤマガラ、ツグミなど野鳥を見ることもできますよ。」が作成される。このような学習用発話文と学習用関連文と学習用応答文とを用いた学習によって、発話文と関連文から、発話に対する応答として適切な応答文を生成する応答文生成モデルBが生成される。 FIG. 9 is a diagram showing an example of a learning utterance sentence, a learning related sentence, and a learning response sentence of the second embodiment. As shown in Fig. 9, a sentence containing "varied tit" included in the utterance sentence for learning "Varied tit is a wild bird known for hoarding over the winter" is searched from Web1000 and used for learning. The related sentence "Good weather, few clouds, and wild birds such as varied tit and tsugumi could be seen around the lake." Then, from the learning-related sentences, the unnatural part "good weather and few clouds," is deleted as a response to this learning utterance sentence, and the flexion "done" that does not seem to be a dialogue is a suitable flexion as a response. By replacing it with "I can do it", a learning response sentence "You can also see wild birds such as yamagara and tsugumi around the lake." Is created. By learning using such an utterance sentence for learning, a related sentence for learning, and a response sentence for learning, a response sentence generation model B that generates an appropriate response sentence as a response to the utterance is generated from the utterance sentence and the related sentence. To.
本実施の形態の対話装置23が、第1の実施形態の対話装置3と相違する点は、応答文生成部29である。応答文生成部29は、対話実行用発話文および対話実行用関連文を学習後の応答文生成モデルBに入力することによって、対話実行用応答文を生成する。
The difference between the
図10は、第2の実施形態の対話実行用発話文、対話実行用関連文、および対話実行用応答文の例を表わす図である。図10に示すように、対話実行用発話文「花粉が飛び始めたようだ。」に含まれる「花粉」を含む文がWeb1000から検索されて、対話実行用関連文「花粉で肌がヒリヒリそろそろ、紫外線も強くなってきたので恐々使用することに。」が取得される。そして、対話実行用関連文から、対話実行用発話文に対する応答として不自然な部分「ので恐々使用することに」が削除されるとともに、対話の応答らしくない語尾「なってきた」が対話の応答らしい語尾「なってきましたね」に置き換えられた対話実行用応答文「花粉で肌がヒリヒリそろそろ、紫外線も強くなってきましたね。」が生成される。 FIG. 10 is a diagram showing an example of a dialogue execution utterance sentence, a dialogue execution related sentence, and a dialogue execution response sentence of the second embodiment. As shown in FIG. 10, a sentence containing "pollen" contained in the dialogue execution utterance sentence "It seems that pollen has begun to fly" is searched from Web1000, and the dialogue execution related sentence "pollen makes the skin tingling." , UV rays are getting stronger, so I'm afraid to use it. " Then, from the dialogue execution related sentences, the unnatural part "because it is scary to use" is deleted as a response to the dialogue execution utterance sentence, and the ending "become" that does not seem to be the response of the dialogue is the response of the dialogue. The dialogue execution response sentence "The pollen is about to irritate the skin, and the ultraviolet rays are getting stronger." Is generated.
図11は、第2の実施形態の応答生成学習処理部26の構成を表わす図である。応答生成学習処理部26は、第1の実施形態と同様に、エンコーダ151と、デコーダ152とを備え、さらに、エンコーダ157と、合成部155とを備える。応答生成学習処理部26は、応答文生成モデルBの一例であるSequence to Sequence モデルを学習する。
FIG. 11 is a diagram showing the configuration of the response generation
エンコーダ157は、時間軸(t=1~s)に沿って展開されたリカレントニューラルネットワークを備える。エンコーダ157には、学習用発話文が入力される。時刻tの入力ベクトルをx2(t)、隠れ層のベクトルをh2(t)とする。
The
時刻tの隠れ層は、時刻tの入力層に入力された学習用発話文の単語を表わす入力ベクトルx2(t)を受け取るとともに、時刻(t-1)の隠れ層のベクトルh2(t-1)を受け、ベクトルh2(t)を時刻(t+1)の隠れ層に出力する。ただし、時刻1の隠れ層は、入力ベクトルx2(1)のみを受け取る。たとえば、時刻1の入力ベクトルx2(1)は、「京都」を表わすベクトルであり、時刻2の入力ベクトルx2(2)は、「に」を表わすベクトルである。
The hidden layer at time t receives an input vector x2 (t) representing a word of a learning utterance sentence input to the input layer at time t, and a vector h2 (t-1) of the hidden layer at time (t-1). ), And the vector h2 (t) is output to the hidden layer at the time (t + 1). However, the hidden layer at
時刻tの重み行列をU2(t)、W2(t)とし、バイアスをb、活性化関数をfとしたときに、以下の式が成り立つ。 When the weight matrix at time t is U2 (t) and W2 (t), the bias is b, and the activation function is f, the following equation holds.
h2(1)=f(U2(1)x2(1)+b)…(9)
h2(t)=f(U2(t)x2(t)+W2(t)h2(t-1)+b) (t=1以外)…(10)
合成部155は、エンコーダ151の最後の時刻mの隠れ層のベクトルh1(m)と、エンコーダ157の最後の時刻sの隠れ層のベクトルh2(s)とから1つのベクトルhhを生成する。ベクトルhhは、たとえば、h1(m)とh2(s)を加算したベクトル、重みづけ加算したベクトル、h1(m)の要素とh2(s)の要素をすべて含むベクトルとすることができる。
h2 (1) = f (U2 (1) x2 (1) + b)… (9)
h2 (t) = f (U2 (t) x2 (t) + W2 (t) h2 (t-1) + b) (other than t = 1) ... (10)
The synthesizing
デコーダ152は、時刻1の隠れ層が、エンコーダ151の最後の時刻mの隠れ層のベクトルh1(m)に代えて、ベクトルhhを受けること以外は、第1の実施形態と同様である。
The
第1の実施形態と同様に、デコーダ152では、出力ベクトルy3(1)~y3(n)で構成される出力文とx3(1)~x3(n)で構成される学習用応答文(教師データ)との誤差が求められる。これらの誤差は、デコーダ152内の時刻tよりも前の隠れ層、エンコーダ151内の隠れ層(時刻t=1~m)、およびエンコーダ157内の隠れ層(時刻t=1~s)に逆伝搬される。デコーダ152内の時刻tの隠れ層に逆伝搬されてきた誤差の和を最小化するように重み行列W3(t)、U3(t)、V3(t)が更新される。エンコーダ151内の時刻tの隠れ層に逆伝搬されてきた誤差の和を最小化するようにW1(t)、U1(t)が更新される。エンコーダ157内の時刻tの隠れ層に逆伝搬されてきた誤差の和を最小化するようにW2(t)、U2(t)が更新される。学習後の応答文生成モデルBのパラメータである重み行列W3(t)、U3(t)、V3(t)、W1(t)、U1(t)、W2(t)、U2(t)は、パラメータ記憶部14に記憶される。
Similar to the first embodiment, in the
図12は、第2の実施形態の応答文生成部29の構成を表わす図である。応答文生成部29は、第1の実施形態と同様にエンコーダ153と、デコーダ154とを備えるとともに、エンコーダ158と、合成部156とを備える。応答文生成部29は、学習後の応答文生成モデルBの一例である学習後のSequence to Sequence モデルを用いて、対話実行用応答文を生成する。
FIG. 12 is a diagram showing the configuration of the response
図12において、応答文生成モデルBの学習後のパラメータである重み行列W3(t)、U3(t)、V3(t)、W1(t)、U1(t)、W2(t)、U2(t)がパラメータ記憶部15から読み出されて設定される。これらは、図11の応答生成学習処理部26による学習(更新)によって得られたものが用いられる。
In FIG. 12, the weight matrices W3 (t), U3 (t), V3 (t), W1 (t), U1 (t), W2 (t), U2 ( t) is read from the
エンコーダ158は、エンコーダ157と同様の時間軸(t=1~s)に沿って展開されたリカレントニューラルネットワークを備える。ただし、時刻tの入力層に入力される入力ベクトルx2(t)は、学習用関連文の単語ではなく、対話実行用発話文の単語である。
The
合成部156は、エンコーダ153の最後の時刻mの隠れ層のベクトルh1(m)と、エンコーダ158の最後の時刻sの隠れ層のベクトルh2(s)とから1つのベクトルhhを生成する。ベクトルhhは、たとえば、h1(m)とh2(s)を加算したベクトル、重みづけ加算したベクトル、h1(m)の要素とh2(s)の要素をすべて含むベクトルとすることができる。
The synthesizing
デコーダ154は、時刻1の隠れ層が、エンコーダ151の最後の時刻mの隠れ層のベクトルh1(m)に代えて、ベクトルhhを受けること以外は、第1の実施形態と同様である。
The
図13は、第2の実施形態のモデル学習装置22の動作手順を表わすフローチャートである。
FIG. 13 is a flowchart showing the operation procedure of the
ステップS301において、発話文入力部11は、学習用発話文の入力を受ける。
ステップS302において、関連文取得部12は、学習用発話文に関連する学習用関連文をテキストデータベースの1種であるWeb1000から取得する。
In step S301, the utterance
In step S302, the related
ステップS303において、学習用応答文入力部13は、学習用関連文を対話の応答として適切になるように、開発側の人員の操作によって学習用関連文を修正することによって生成された学習用応答文の入力を受ける。
In step S303, the learning response
ステップS304において、ステップS301~S303がすべての入力が完了するまで繰り返されることによって、複数セットの学習用発話文と学習用関連文と学習用応答文とが得られる。コーパス出力部74は、学習用発話文と学習用関連文と学習用応答文のセットを複数含む学習用コーパスを生成して、コーパス記憶部25に書込む。コーパス記憶部25は、学習用コーパスを記憶する。
In step S304, by repeating steps S301 to S303 until all the inputs are completed, a plurality of sets of learning utterance sentences, learning related sentences, and learning response sentences are obtained. The
ステップS305において、応答生成学習処理部26は、学習用コーパスを用いて、発話文および関連文を入力とし、応答文を出力とする応答文生成モデルBを学習する。
In step S305, the response generation
ステップS306において、パラメータ記憶部14は、応答生成学習処理部26による応答文生成モデルBの学習後のパラメータを記憶する。
In step S306, the
図14は、第2の実施形態の対話装置23の動作手順を表わすフローチャートである。
ステップS401において、応答文生成部29は、パラメータ記憶部15に記憶されているモデル学習装置22による応答文生成モデルBの学習後のパラメータを読み出す。
FIG. 14 is a flowchart showing the operation procedure of the
In step S401, the response
ステップS402において、発話文入力部7は、ユーザから対話実行用発話文の入力を受ける。
In step S402, the utterance
ステップS403において、関連文取得部8は、対話実行用発話文に関連する対話実行用関連文をテキストデータベースの1種であるWeb1000から取得する。
In step S403, the related
ステップS404において、応答文生成部29は、読み出したパラメータを用いることによって得られる学習後の応答文生成モデルBに対話実行用発話文および対話実行用関連文を入力することによって、対話実行用応答文を生成する。
In step S404, the response
以上のように、本実施の形態によれば、モデル学習装置は、関連文だけでなく発話文も入力に含むモデルを学習するので、対話装置は、そのときの発話文に対して、より適切な応答文を生成することができる。 As described above, according to the present embodiment, the model learning device learns the model including not only the related sentence but also the utterance sentence in the input, so that the dialogue device is more appropriate for the utterance sentence at that time. Response statement can be generated.
[第3の実施形態]
図15は、第3の実施形態の対話応答システム31の構成を表わす図である。対話応答システム31は、モデル学習装置32と、対話装置23とを備える。
[Third Embodiment]
FIG. 15 is a diagram showing the configuration of the
本実施の形態の対話装置23は、第2の実施形態の対話装置23と同一である。本実施の形態のモデル学習装置32が、第2の実施形態のモデル学習装置22と相違する点は、コーパス生成部34である。
The
コーパス生成部34は、対話データ取得部39と、関連文取得部45と、学習用応答文生成部63と、コーパス出力部84とを備える。
The
対話データ取得部39は、twitterなどの対話データをテキストデータベースの1種であるWeb1000から取得する。対話データは、ユーザ発話文と、ユーザ応答文とからなる。
The dialogue
関連文取得部45は、対話データに含まれるユーザ発話文に関連する文をテキストデータベースの1種であるWeb1000から取得して、学習用関連文とする。具体的には、関連文取得部45は、たとえば、Web1000上のデータからユーザ応答文に含まれる少なくとも1つの名詞及びもしくは少なくとも1つの述語が含まれる文を関連文として取得する。すなわち、少なくとも1つの名詞が含まれる文、少なくとも1つの述語が含まれる文、または少なくとも1つの名詞と少なくとも1つの述語が含まれる文が関連文として取得される。つまり、本実施の形態では、学習用関連文は、ユーザ発話文から直接ではなく、ユーザ発話文に対する応答であるユーザ応答文を経由して検索される。
The related
学習用応答文生成部63は、学習用関連文を対話らしい文に変換した学習用応答文を生成する。具体的には、学習用応答文生成部63は、対話データを構成するユーザ応答文と学習用関連文とで内容が共通する箇所を抽出することによって、学習用応答文を生成する。学習用応答文生成部63は、ユーザ応答文から学習用関連文に含まれる名詞及びもしくは述語に関連する箇所を抽出して、学習用応答文とすることができる。すなわち、ユーザ応答文から、学習用関連文に含まれる名詞に関連する箇所、学習用関連文に含まれる述語に関連する箇所、または学習用関連文に含まれる名詞と述語に関連する箇所が抽出される。ここで生成された学習用応答文は、Web1000から取得した学習用関連文を対話らしい文に変換したものとみることができる。
The learning response
コーパス出力部84は、対話データに含まれるユーザ発話文を学習用発話文とする。コーパス出力部84は、学習用発話文(図16参照)と学習用関連文と学習用応答文のセットを複数含む学習用コーパスを生成して、コーパス記憶部25に書込む。
The
図16は、第3の実施形態の対話データ、学習用発話文、学習用関連文、および学習用応答文の例を表わす図である。図16に示すように、ユーザ発話文「今朝のコスモス!」とユーザ応答文「ありがとうございます。コスモスはなんとなく秋の気配を感じさせてくれますね。」とからなる対話データが取得される。ユーザ応答文に含まれる名詞「コスモス」、名詞「秋の気配」、述語「感じさせ」を含む文がWeb1000から検索されて、学習用関連文「コスモスが秋の気配を感じさせる。」が取得される。そして、ユーザ応答文の中から学習用関連文に含まれる名詞「コスモス」、名詞「秋の気配」、述語「感じさせる」に関連する箇所が抽出されることによって、学習用応答文「コスモスは秋の気配を感じさせてくれますね。」が生成される。このように、対話データのユーザ応答文の一部を学習用応答文とすることによって、学習用関連文を学習用発話文に対する応答として適切な形に変形した学習用応答文が得られる。このような学習用発話文と学習用関連文と学習用応答文とを用いた学習によって、発話文と関連文から、発話に対する応答として適切な応答文を生成する応答文生成モデルBが生成される。 FIG. 16 is a diagram showing examples of dialogue data, learning utterance sentences, learning related sentences, and learning response sentences according to the third embodiment. As shown in FIG. 16, dialogue data consisting of the user utterance "Cosmos this morning!" And the user response "Thank you. Cosmos somehow makes me feel the sign of autumn." Is acquired. A sentence containing the noun "Cosmos", the noun "Autumn sign", and the predicate "Feeling" included in the user response sentence is searched from Web1000, and the learning related sentence "Cosmos makes you feel the autumn sign" is acquired. Will be done. Then, by extracting the parts related to the noun "Cosmos", the noun "Autumn sign", and the predicate "Make me feel" included in the learning-related sentence from the user response sentence, the learning response sentence "Cosmos is". It makes me feel the sign of autumn. "Is generated. By using a part of the user response sentence of the dialogue data as the learning response sentence in this way, a learning response sentence obtained by transforming the learning-related sentence into an appropriate form as a response to the learning utterance sentence can be obtained. By learning using such an utterance sentence for learning, a related sentence for learning, and a response sentence for learning, a response sentence generation model B that generates an appropriate response sentence as a response to the utterance is generated from the utterance sentence and the related sentence. To.
図17は、第3の実施形態のモデル学習装置32の動作手順を表わすフローチャートである。
FIG. 17 is a flowchart showing the operation procedure of the
ステップS501において、対話データ取得部39は、twitterなどのユーザ発話文とユーザ応答文から構成される対話データをテキストデータベースの1種であるWeb100から取得する。ユーザ発話文が学習用発話文となる。
In step S501, the dialogue
ステップS502において、関連文取得部45は、対話データに含まれるユーザ発話文に関連する文をテキストデータベースの1種であるWeb1000から取得して、学習用関連文とする。
In step S502, the related
ステップS503において、学習用応答文生成部63は、学習用関連文を対話らしい文に変換した学習用応答文を生成する。
In step S503, the learning response
ステップS504において、ステップS501~S503が繰り返されることによって、複数セットの学習用発話文と学習用関連文と学習用応答文とが得られる。コーパス出力部84は、学習用発話文と学習用関連文と学習用応答文のセットを複数含む学習用コーパスを生成して、コーパス記憶部25に書込む。コーパス記憶部25は、学習用コーパスを記憶する。
By repeating steps S501 to S503 in step S504, a plurality of sets of learning utterance sentences, learning related sentences, and learning response sentences are obtained. The
ステップS505において、応答生成学習処理部26は、学習用コーパスを用いて、発話文および関連文を入力とし、応答文を出力とする応答文生成モデルBを学習する。
In step S505, the response generation
ステップS506において、パラメータ記憶部14は、応答生成学習処理部6による応答文生成モデルBの学習後のパラメータを記憶する。
In step S506, the
以上のように、本実施の形態によれば、自動で学習用コーパスを生成できるので、大量の学習データを用いて、高精度な応答文生成モデルBの学習が可能となる。 As described above, according to the present embodiment, the learning corpus can be automatically generated, so that the highly accurate response sentence generation model B can be learned by using a large amount of learning data.
[第4の実施形態]
図18は、第4の実施形態の対話応答システム41の構成を表わす図である。
[Fourth Embodiment]
FIG. 18 is a diagram showing the configuration of the
対話応答システム41は、モデル学習装置42と、対話装置43とを備える。本実施の形態のモデル学習装置42が、第3の実施形態のモデル学習装置32と相違する点は、コーパス生成部44である。
The
コーパス生成部44は、対話データ取得部39と、関連文取得部28と、学習用応答文生成部63と、コーパス出力部84とを備える。
The
対話データ取得部39、学習用応答文生成部63、およびコーパス出力部84は、第3の実施形態と同一なので、説明を繰り返さない。
Since the dialogue
関連文取得部28は、バイナリトリプル生成部51と、元文取得部52と、元文ランキング部53とを備える。関連文取得部28は、質問・応答システム1051のデータベース1054に記憶されている文の中から学習用関連文を選択する。
The related
質問・応答システム1051のデータベース1054には、Web1000から取得された後、パターン別に整理された元文が記憶されている。
The
図19は、データベース1054に記憶されている元文の例を表わす図である。図20は、モデル学習装置42の関連文取得部28によって用いられる文の例を表わす図である。
FIG. 19 is a diagram showing an example of an original sentence stored in the
図19に示すように、元文を整理するパターンとして、バイナリトリプルが用いられる。バイナリトリプルは、「AでBに行く」のように、2つの変数(A、B)および述部とからなるバイナリパターンと、(A、B)=(お正月、初詣)のように変数A及びBに相当する単語のペアとを含む。 As shown in FIG. 19, a binary triple is used as a pattern for organizing the original sentence. A binary triple consists of a binary pattern consisting of two variables (A, B) and a predicate, such as "A goes to B", and variables A and, such as (A, B) = (New Year, Hatsumode). Includes a pair of words corresponding to B.
バイナリトリプル生成部51は、対話データに基づいて、バイナリトリプルを生成する。具体的には、バイナリトリプル生成部51は、対話データのユーザ発話文に含まれるすべての名詞と、対話データのユーザ応答文に含まれるすべての名詞および動詞とに基づいて、バイナリトリプルを生成する。たとえば、図20に示すように、ユーザ発話文の「お正月でしたね」から名詞「お正月」が抽出され、ユーザ応答文「昨年は初めて京都に初詣に行ったよ!」から名詞「昨年」、名詞「京都」、名詞「初詣」および動詞「行く」が抽出される。バイナリトリプル生成部51は、バイナリトリプル「AはBに行く、(A、B)=(お正月、初詣)」、および「AはBに行く、(A、B)=(お正月、京都)」を生成する。
The binary
元文取得部52は、質問・応答システム1051のデータベース1054にアクセスして、生成されたバイナリトリプルのパターンに一致する複数個の元文を取得する。たとえば、図20に示すように、バイナリトリプル「AはBに行く、(A、B)=(お正月、初詣)」または「AはBに行く、(A、B)=(お正月、京都)」のパターンに一致する3つの元文(元文1、元文2、元文3)が取得される。
The original
元文ランキング部53は、予め定められた基準に従って、取得した複数個の元文にランクを付け、ランキングが1位の元文を学習用関連文として出力する。具体的には、元文ランキング部53は、対話データのユーザ応答文に含まれるトピックワードと述語を多く含む元文ほど、ランクを高く設定する。たとえば、トピックワードは、予め定められたワード以外のワードとすることができる。予め定められたワードは、対話において使用される頻度が高い一般的なワード、言い換えると対話において特徴的な部分でないワードとすることができる。たとえば、図20に示すように、対話データのユーザ応答文に含まれるトピックワード「京都」および「初詣」と、述語「行ったよ」を最も多く含む元文「お正月は、初詣に京都に行きました」がランキング1位に決定され、学習用関連文として出力される。
The original
本実施の形態の対話装置43が、第3の実施形態の対話装置33と相違する点は、関連文取得部48である。関連文取得部48は、質問文生成部55と、回答及び元文取得部56と、元文ランキング部57とを備える。
The difference between the
図21は、対話装置43の関連文取得部48によって用いられる文の例を表わす図である。ここでは、説明の便宜のため、対話装置43において、モデル学習装置42で用いられる例文と同じ例文が用いられる場合について説明する。
FIG. 21 is a diagram showing an example of a sentence used by the related
質問文生成部55は、予め定められた規則に従って、対話実行用発話文を質問形式に変換することによって質問文を生成する。たとえば、図21に示すように、対話実行用発話文「お正月でしたね」から質問文「お正月は何に行く」が生成される。
The question
回答及び元文取得部56は、質問・応答システム1051に質問文を送信する。質問・応答システム1051は、質問文をバイナリトリプルの形式に変換し、このバイナリトリプルの形式に一致する複数の元文をデータベース1054から取り出す。たとえば、質問文「お正月は何に行く」がバイナリトリプル「AはBに行く、(A、B)=(お正月、*)」(*は任意の名詞)に変換される。図21に示すように、データベース1054からバイナリトリプル「AはBに行く、(A、B)=(お正月、*)」のパターンに一致する3つの元文(元文1、元文2、元文3)が取得される。さらに、質問・応答システム1051は、複数の元文に基づいて、質問文に対する回答を生成する。たとえば、複数の元文に含まれるBのうち、最も多く含まれるものを回答とすることができる。図21では、3つの元文は、すべてBとして「初詣」を含むので、「初詣」が回答として生成される。
The answer and original
質問・応答システム1051は、回答と複数の元文を対話装置43に送信する。回答及び元文取得部56は、質問・応答システム1051から送られる回答および複数の元文を取得する。たとえば、図21に示すように、回答「初詣」と、3つの元文が取得される。
The question /
元文ランキング部57は、予め定められた基準に従って、取得した複数個の元文にランクを付け、ランキングが1位の元文を対話実行用関連文として出力する。具体的には、元文ランキング部57は、トピックワードを多く含む元文ほど、ランクを高く設定する。たとえば、図21に示すように、トピックワード「お正月」、「初詣」、「京都」を最も多く含む元文「お正月は、初詣に京都に行きました」がランキングが1位の元文に選ばれる。
The original
図22は、第4の実施形態のモデル学習装置42の動作手順を表わすフローチャートである。
FIG. 22 is a flowchart showing the operation procedure of the
ステップS601において、対話データ取得部39は、twitterなどのユーザ発話文とユーザ応答文から構成される対話データをテキストデータベースの1種であるWeb1000から取得する。対話データに含まれるユーザ発話文が学習用発話文となる。
In step S601, the dialogue
ステップS602において、バイナリトリプル生成部51は、対話データに基づいて、バイナリトリプルを生成する。
In step S602, the binary
ステップS603において、元文取得部52は、質問・応答システム1051のデータベース1054にアクセスして、生成されたバイナリトリプルのパターンに一致する複数個の元文を取得する。
In step S603, the original
ステップS604において、元文ランキング部53は、予め定められた基準に従って、取得した複数個の元文にランクを付け、ランキングが1位の元文を学習用関連文として出力する。
In step S604, the original
ステップS605において、学習用応答文生成部63は、学習用関連文を対話らしい文に変換した学習用応答文を生成する。
In step S605, the learning response
ステップS606において、ステップS601~S605が繰り返されることによって複数セットの学習用発話文と学習用関連文と学習用応答文とが得られる。コーパス出力部84は、学習用発話文と学習用関連文と学習用応答文のセットを複数含む学習用コーパスを生成して、コーパス記憶部25に書込む。コーパス記憶部25は、学習用コーパスを記憶する。
In step S606, by repeating steps S601 to S605, a plurality of sets of learning utterance sentences, learning related sentences, and learning response sentences are obtained. The
ステップS607において、応答生成学習処理部26は、学習用コーパスを用いて、発話文および関連文を入力とし、応答文を出力とする応答文生成モデルBを学習する。
In step S607, the response generation
ステップS608において、パラメータ記憶部14は、応答生成学習処理部26による応答文生成モデルBの学習後のパラメータを記憶する。
In step S608, the
図23は、第4の実施形態の対話装置43の動作手順を表わすフローチャートである。
ステップS701において、応答文生成部29は、パラメータ記憶部15に記憶されているモデル学習装置42による応答文生成モデルBの学習後のパラメータを読み出す。
FIG. 23 is a flowchart showing the operation procedure of the
In step S701, the response
ステップS702において、発話文入力部7は、ユーザから対話実行用発話文の入力を受ける。
In step S702, the utterance
ステップS703において、質問文生成部55は、予め定められた規則に従って、対話実行用発話文を質問形式に変換することによって質問文を生成する。
In step S703, the question
ステップS704において、回答及び元文取得部56は、質問・応答システム1051から送られる回答および複数の元文を取得する。
In step S704, the answer and original
ステップS705において、元文ランキング部57は、予め定められた基準に従って、取得した複数個の元文にランクを付け、ランキングが1位の元文を対話実行用関連文として出力する。
In step S705, the original
ステップS706において、応答文生成部29は、読み出したパラメータを用いることによって得られる学習後の応答文生成モデルBに対話実行用発話文および対話実行用関連文を入力することによって、対話実行用応答文を生成する。
In step S706, the response
以上のように、本実施の形態によれば、既存の質問・応答システムを利用することによって、発話に対する応答文の質を上げることができる。 As described above, according to the present embodiment, the quality of the response sentence to the utterance can be improved by using the existing question / response system.
[第5の実施形態]
図24は、第5の実施形態の対話応答システム81の構成を表わす図である。対話応答システム81は、モデル学習装置78と、対話装置77とを備える。
[Fifth Embodiment]
FIG. 24 is a diagram showing the configuration of the
本実施の形態のモデル学習装置78が、第4の実施形態のモデル学習装置42と相違する点は、元文ランキング49と、学習用応答文生成部83と、コーパス出力部85と、コーパス記憶部87と、応答生成学習処理部86である。
The
元文ランキング49は、予め定められた基準に従って、取得した複数個の元文にランクを付け、ランキングが1位から所定順位までの複数個の元文を複数個の学習用関連文として出力する。 The original sentence ranking 49 ranks a plurality of acquired original sentences according to a predetermined standard, and outputs a plurality of original sentences having a ranking from the first place to a predetermined order as a plurality of learning-related sentences. ..
学習用応答文生成部83は、複数個の学習用関連文から1つの学習用応答文を生成する。たとえば、学習用応答文生成部83は、対話データに含まれるユーザ応答文からランキングが1位の学習用関連文に含まれる名詞と動詞に係る箇所のみを抽出して、学習用応答文としてもよい。あるいは、学習用応答文生成部83は、複数個の学習用関連文を重複部分が繰り返されない形で連結することによって、1つの学習用応答文を生成してもよい。
The learning response
コーパス出力部85は、学習用発話文と複数個の学習用関連文と学習用応答文のセットを複数含む学習用コーパスを生成して、コーパス記憶部87に書込む。コーパス記憶部87は、学習用コーパスを記憶する。
The
応答生成学習処理部86は、学習用コーパスを用いて、発話文および複数個の関連文を入力とし、応答文を出力とするモデルCを学習する。モデルCは、発話文および複数個の関連文を入力とする点で、応答文生成モデルAおよびBと異なる。
The response generation
本実施の形態の対話装置77が、第4の実施形態の対話装置43と相違する点は、応答文生成部89である。応答文生成部89は、対話実行用発話文および複数の対話実行用関連文をモデルCに入力することによって、対話実行用応答文を生成する。
The difference between the
図25は、第5の実施形態の応答生成学習処理部86の構成を表わす図である。応答文生成部89の構成も同様である。
FIG. 25 is a diagram showing the configuration of the response generation
図25に示すように、応答生成学習処理部86は、第2の実施形態と同様に、エンコーダ151,157と、デコーダ152とを備え、さらに、エンコーダ351,352と、合成部353とを備える。
As shown in FIG. 25, the response generation
エンコーダ151には、複数の関連文のうちの第1関連文が入力される。エンコーダ351には、複数の関連文のうちの第2関連文が入力される。エンコーダ352には、複数の関連文のうちの第3関連文が入力される。合成部353は、エンコーダ151,351,352,157のそれぞれの最後の時刻の隠れ層のベクトルから、1つのベクトルhhを生成して、デコーダ152の時刻1の隠れ層に供給する。エンコーダ151,351,352,117と、デコーダ152の構成および動作は、第1および第2の実施形態で説明したものと同様なので、説明を繰り返さない。
The first related sentence among the plurality of related sentences is input to the
以上のように、本実施の形態によれば、本実施の形態によれば、モデル学習装置は、複数の関連文を入力に含むモデルを学習するので、対話装置は、発話文に対して、より適切な応答文を生成することができる。 As described above, according to the present embodiment, according to the present embodiment, the model learning device learns the model including a plurality of related sentences in the input, so that the dialogue device receives the spoken sentence. A more appropriate response statement can be generated.
[第6の実施形態]
図26は、第6の実施形態の対話応答システム91の構成を表わす図である。
[Sixth Embodiment]
FIG. 26 is a diagram showing the configuration of the
対話応答システム91は、モデル学習装置75と、対話装置76とを備える。
本実施の形態のモデル学習装置75が、第4の実施形態のモデル学習装置42と相違する点は、質問文生成部94と、学習用応答文生成部93と、コーパス出力部95と、コーパス記憶部97と、応答生成学習処理部96である。
The
The
質問文生成部94は、ユーザ発話文から学習用質問文を生成する。学習用応答文生成部93は、学習用関連文を対話らしい文に変換した学習用応答文を生成する。具体的には、学習用応答文生成部93は、学習用発話文(ユーザ発話文)と、元文ランキング部53から出力される学習用関連文と、質問文生成部94から出力される学習用質問文と、元文ランキング部53から出力されるトピックワードに基づいて、学習用応答文を生成する。たとえば、学習用応答文生成部93は、対話データに含まれるユーザ応答文から、学習用質問文に含まれる名詞、学習用関連文に含まれる名詞と動詞、およびトピックワードに関係する部分を抽出して、学習用応答文としてもよい。
The question
コーパス出力部95は、学習用発話文と、学習用関連文と、学習用質問文と、学習用トピックワードと学習用応答文のセットを複数含む学習用コーパスを生成して、コーパス記憶部97に書込む。コーパス記憶部97は、学習用コーパスを記憶する。
The
応答生成学習処理部96は、学習用コーパスを用いて、発話文、関連文、質問文、およびトピックワードを入力とし、応答文を出力とするモデルDを学習する。モデルDは、発話文、関連文、質問文、およびトピックワードを入力とする点において、その他のモデルと異なる。
The response generation
本実施の形態の対話装置76が、第4の実施形態の対話装置43と相違する点は、応答文生成部99である。応答文生成部99は、対話実行用発話文、対話実行用関連文、質問文生成部55から出力される対話実行用質問文、および元文ランキング部57から出力される対話実行用トピックワードをモデルDに入力することによって、対話実行用応答文を生成する。
The difference between the
図27は、第6の実施形態の応答生成学習処理部96の構成を表わす図である。応答文生成部99の構成も同様である。
FIG. 27 is a diagram showing the configuration of the response generation
図27に示すように、応答生成学習処理部96は、第2の実施形態と同様に、エンコーダ151、157と、デコーダ152とを備え、さらに、エンコーダ451、452と、合成部453を備える。
As shown in FIG. 27, the response generation
エンコーダ451には、質問文が入力される。エンコーダ451には、トピックワードが入力される。合成部453は、エンコーダ151、157、451、452のそれぞれの最後の時刻の隠れ層のベクトルから、1つのベクトルhhを生成して、デコーダ152の時刻1の隠れ層に供給する。エンコーダ151、157、451、452、デコーダ152の構成および動作は、第1および第2の実施形態で説明したものと同様なので、説明を繰り返さない。
A question sentence is input to the
以上のように、本実施の形態によれば、モデル学習装置は、質問文およびトピックワードを入力に含むモデルを学習するので、対話装置は、発話文に対して、より適切な応答文を生成することができる。 As described above, according to the present embodiment, the model learning device learns the model including the question sentence and the topic word in the input, so that the dialogue device generates a more appropriate response sentence to the utterance sentence. can do.
[第7の実施形態]
図28は、第7の実施形態の対話応答システム551の構成を表わす図である。コーパス記憶部5には今までの実施例における処理により得られた学習のためのコーパスが記憶されている。また、関連文取得部8については、例えば図1におけるそれ以前の構成が省略されている。この対話応答システム551は、1つの装置がモデルの学習と実際の対話の両方を実行する。対話応答システムは、コーパス記憶部5と、学習制御部552と、応答文生成モデルAと、関連文取得部8とを備える。
[7th Embodiment]
FIG. 28 is a diagram showing the configuration of the
コーパス記憶部5は、第1の実施形態で説明したコーパス記憶部5と同様である。
学習制御部552は、応答文生成モデルAに学習データを与えることによって、応答文生成モデルAを学習させる。学習データは、コーパス記憶部5に記憶されている学習用関連文(入力)と、学習用応答文(出力)である。学習が完了すると、応答文生成モデルAのネットワークと、パラメータが保存される。
The
The
関連文取得部8は、第1の実施形態で説明した関連文取得部8と同様である。
対話処理時に、関連文取得部8で取得された対話実行用関連文が学習後の応答文生成モデルAに入力されることによって、学習結果に基づく対話実行用応答文が生成される。
The related
At the time of dialogue processing, the dialogue execution related sentence acquired by the related
図28の構成によれば、対話を実行するときのデータを利用して、学習を動的に継続実行することができる。すなわち、応答文生成モデルAから出力される対話実行用応答文を学習用データとしても用いることができる。 According to the configuration of FIG. 28, the learning can be dynamically continuously executed by using the data when the dialogue is executed. That is, the dialogue execution response sentence output from the response sentence generation model A can also be used as learning data.
第2~第6の実施形態も、同様に、1つのモデル学習および対話装置が、モデルの学習と実際の対話の両方を実行するものとしてもよい。 Similarly, in the second to sixth embodiments, one model learning and dialogue device may perform both model learning and actual dialogue.
[第8の実施形態]
図29は、第8の実施形態の対話応答システム1100の構成を表わす図である。
[Eighth Embodiment]
FIG. 29 is a diagram showing the configuration of the
対話応答システム1100は、モデル学習装置1120と、対話装置1130とを備える。
The
本実施の形態のモデル学習装置1130が、第1の実施形態のモデル学習装置2と相違する点は、関連文適合性入力部1103と、コーパス出力部1104と、適合判定学習処理部1105と、パラメータ記憶部1106である。
The
関連文適合性入力部1103は、取得された関連文の適合性を表わす適合度の入力を受ける。たとえば、開発側の人員は、取得された関連文が学習用発話文と話題が同一または類似している場合には、取得された関連文が適合していることを表わす適合度(たとえば、数値「1」)を入力する。開発側の人員は、取得された関連文が学習用発話文と話題が異なる場合には、取得された関連文が適合していないことを表わす適合度(たとえば、数値「0」)を入力する。
The related sentence
関連文適合性入力部1103によって、適合していないことを表わす適合度が入力された関連文(以下、不適合関連文)は、コーパス出力部1104に送られる。
A related sentence (hereinafter referred to as a non-conforming related sentence) in which a goodness of fit indicating non-conformity is input by the related sentence
図30は、不適合関連文の例を説明するための図である。
学習用発話文「修学旅行で奈良に行くんだ」の「修学旅行」および「奈良」を含む文「奈良市内の中学では多くが沖縄への修学旅行を実施。」が関連文として取得される。この文では、「修学旅行」の行先が「沖縄」であると記載しており、学習用発話文と話題がずれている。このような場合に、取得された関連文が不適合関連文と判断される。
FIG. 30 is a diagram for explaining an example of a nonconformity-related sentence.
Sentences for learning "I'm going to Nara on a school trip""Schooltrip" and sentences including "Nara""Many junior high schools in Nara city carry out school trips to Okinawa." To. In this sentence, it is stated that the destination of the "study trip" is "Okinawa", and the topic is different from the utterance sentence for learning. In such a case, the acquired related sentence is determined to be a nonconforming related sentence.
関連文適合性入力部1103によって、適合していることを表わす適合度が入力された関連文(以下、適合関連文)は学習用関連文として、学習用応答文入力部13に送られる。第1の実施形態と同様に、学習用応答文入力部13が、学習用関連文が対話の応答として適切な形式に修正された学習用応答文の入力を受けて、学習用応答文がコーパス出力部1104に送られる。
The related sentence (hereinafter referred to as the conformity-related sentence) in which the goodness of fit indicating conformity is input by the related sentence
コーパス出力部1104は、学習用発話文と、関連文と、関連文の適合度の複数のセットを含み、さらに、関連文のうちの適合関連文である学習用関連文と学習用応答文の複数のセットを含む学習用コーパスを生成して、コーパス記憶部1108に書込む。
The
コーパス記憶部1108は、学習用コーパスを記憶する。
図31は、コーパス記憶部1108に記憶されている学習用コーパスの例を表わす図である。
The
FIG. 31 is a diagram showing an example of a learning corpus stored in the
適合判定学習処理部1105は、コーパス記憶部1108に記憶されている学習用発話文と、関連文と、適合度を用いて、発話文および関連文を入力に含み、適合度を出力とする適合性判定モデルX1を学習する。適合性判定モデルX1は、深層学習のニューラルネットワークと、そのパラメータとからなる。
The conformity determination
パラメータ記憶部1106は、適合判定学習処理部1105による適合性判定モデルX1の学習後のパラメータを記憶する。パラメータ記憶部1106は、ニューラルネットワークの学習後のパラメータ(重み行列など)を記憶する。パラメータ記憶部1106に記憶されている適合性判定モデルX1の学習後のパラメータは、図示しない入出力ポートなどを介して外部へ取り出されることができる。
The
本実施の形態の対話装置1130が、第1の実施形態の対話装置3と相違する点は、パラメータ記憶部1107と、関連文適合性判定部1101と、関連文選択部1102である。
The
パラメータ記憶部1107は、モデル学習装置1120による適合性判定モデルX1の学習後のパラメータを記憶する。たとえば、パラメータ記憶部1107は、ニューラルネットワークの学習後のパラメータ(重み行列など)を記憶する。モデル学習装置1120から外部に取り出された適合性判定モデルX1の学習後のパラメータが対話装置1130に入力され、パラメータ記憶部1107に記憶される。これらのパラメータは、対話装置1130の機能を実現するプログラムとともに、ユーザに頒布されるものとしてもよい。
The
関連文適合性判定部1101は、学習された適合性判定モデルX1に、対話実行用発話文および取得した関連文を入力することによって、適合度を生成する。たとえば、関連文としての適合度が高い場合に、生成される適合度が「1」に近い値となり、関連文として適合度が低い場合に、生成される適合度が「0」に近い値となる。
The goodness-of-
関連文選択部1102は、適合度に従って、関連文取得部8で取得された複数の関連文の中から対話実行用関連文を選択して、応答文生成部9へ出力する。たとえば、適合度が最も「1」に近い関連文が対話実行用関連文として選択される。
The related
応答文生成部9は、第1の実施形態と同様に、選択された対話実行用関連文を学習後の応答文生成モデルAに入力することによって、対話実行用応答文を生成する。
Similar to the first embodiment, the response
図32は、第8の実施形態の適合判定学習処理部1105および関連文適合性判定部1101で用いられる適合性判定モデルX1を実現するニューラルネットワークを表わす図である。
FIG. 32 is a diagram showing a neural network that realizes the conformity determination model X1 used in the conformity determination
畳み込みニューラルネットワークCNN1は、第1の入力データである学習用発話文を受ける。畳み込みニューラルネットワークCNN1は、畳み込み層C11と、プーリング層C12とを備える。 The convolutional neural network CNN1 receives the learning utterance sentence which is the first input data. The convolutional neural network CNN1 includes a convolutional layer C11 and a pooling layer C12.
第1の入力データである学習用発話文「京都に行きます」がN×4の大きさのデータで表される。 The first input data, the utterance sentence for learning "I'm going to Kyoto", is represented by data having a size of N × 4.
学習用発話文と複数のフィルタとの演算結果によって、畳み込み層C11において、M個の1×3の大きさの第1の畳み込み演算結果と、M個の1×2の大きさの第2の畳み込み演算結果と、M個の1×1の大きさの第3の畳み込み演算結果が得られる。
Based on the calculation results of the learning utterance sentence and the plurality of filters, in the convolution layer C11, the first convolution calculation result of
第1の演算結果、第2の演算結果、第3の演算結果のMAXプーリングによって、プーリング層C12において、M個の第1のプーリング結果、M個の第2のプーリング結果、M個の第3のプーリング結果が得られる。MAXプーリングでは、最大値のみが出力される。 By MAX pooling of the first calculation result, the second calculation result, and the third calculation result, M first pooling results, M second pooling results, and M third pooling results in the pooling layer C12. The pooling result of is obtained. In MAX pooling, only the maximum value is output.
畳み込みニューラルネットワークCNN2は、第2の入力データである関連文を受ける。畳み込みニューラルネットワークCNN2は、畳み込み層C21と、プーリング層C22とを備える。 The convolutional neural network CNN2 receives the related sentence which is the second input data. The convolutional neural network CNN2 includes a convolutional layer C21 and a pooling layer C22.
第2の入力データである関連文「京都で花火を楽しむ」がN×5の大きさのデータで表される。 The second input data, the related sentence "Enjoying fireworks in Kyoto", is represented by data having a size of N × 5.
関連文と複数のフィルタとの演算結果によって、畳み込み層C21において、M個の1×4の大きさの第4の畳み込み演算結果と、M個の1×3の大きさの第5の畳み込み演算結果と、M個の1×2の大きさの第6の畳み込み演算結果が得られる。
Based on the operation results of the related sentence and the plurality of filters, in the convolution layer C21, the fourth convolution operation result of
第4の演算結果、第5の演算結果、第6の演算結果のMAXプーリングによって、プーリング層C22において、M個の第4のプーリング結果、M個の第5のプーリング結果、M個の第6のプーリング結果が得られる。 By MAX pooling of the fourth calculation result, the fifth calculation result, and the sixth calculation result, M fourth pooling results, M fifth pooling results, and M sixth pooling results in the pooling layer C22. The pooling result of is obtained.
結合部COE1は、第1~第6のプーリング結果を結合して、6M次元の結合ベクトルを生成する。 The coupling portion COE1 combines the first to sixth pooling results to generate a 6M-dimensional coupling vector.
多層パーセプトロン500は、入力層501と、中間層502と、出力層503とを備える。
The multilayer perceptron 500 includes an
6M次元の結合ベクトルのデータは、入力層501に送られる。入力層501、中間層502及び出力層503の演算によって、関連文の適合度が出力される。
The 6M-dimensional coupling vector data is sent to the
図33は、畳み込みニューラルネットワークCNN1における畳み込み演算の詳細を表わす図である。 FIG. 33 is a diagram showing details of the convolution operation in the convolutional neural network CNN1.
畳み込みニューラルネットワークCNN1では、M個のN×2の大きさのフィルタと、M個のN×3の大きさのフィルタと、M個のN×4の大きさのフィルタとが用いられる。 In the convolutional neural network CNN1, M N × 2 size filters, M N × 3 size filters, and M N × 4 size filters are used.
N×4の大きさの学習用発話文と、M個のN×2の大きさのフィルタとの畳み込み演算によって、M個の1×3の大きさの第1の畳み込み演算結果が得られる。
By the convolution operation of the N × 4 size learning utterance sentence and the M N × 2 size filters, the first convolution operation result of
N×4の大きさの学習用発話文と、M個のN×3の大きさのフィルタとの畳み込み演算によって、M個の1×2の大きさの第2の畳み込み演算結果が得られる。
By the convolution operation of the N × 4 size learning utterance sentence and the M N × 3 size filters, the second convolution operation result of
N×4の大きさの学習用発話文と、M個のN×4の大きさのフィルタとの畳み込み演算によって、M個の1×1の大きさの第3の畳み込み演算結果が得られる。
By the convolution operation of the N × 4 size learning utterance sentence and the M N × 4 size filters, a third convolution operation result of
図34は、畳み込みニューラルネットワークCNN2における畳み込み演算の詳細を表わす図である。 FIG. 34 is a diagram showing details of the convolution operation in the convolutional neural network CNN2.
畳み込みニューラルネットワークCNN2では、M個のN×2の大きさのフィルタと、M個のN×3の大きさのフィルタと、M個のN×4の大きさのフィルタとが用いられる。 In the convolutional neural network CNN2, M N × 2 size filters, M N × 3 size filters, and M N × 4 size filters are used.
N×5の大きさの関連文と、M個のN×2の大きさのフィルタとの畳み込み演算によって、M個の1×4の大きさの第4の畳み込み演算結果が得られる。
By the convolution operation of the related sentence of the size of N × 5 and the filter of the size of M N × 2, the fourth convolution operation result of the size of
N×5の大きさの関連文と、M個のN×3の大きさのフィルタとの畳み込み演算によって、M個の1×3の大きさの第5の畳み込み演算結果が得られる。
By the convolution operation of the related sentence of the size of N × 5 and the filter of the size of M N × 3, the fifth convolution operation result of the size of
N×5の大きさの関連文と、M個のN×4の大きさのフィルタとの畳み込み演算によって、M個の1×3の大きさの第6の畳み込み演算結果が得られる。
By the convolution operation of the related sentence of the size of N × 5 and the filter of the size of M N × 4, the sixth convolution operation result of the size of
学習時には、教師データとして、関連文適合性入力部1103に入力された適合度が用いられる。誤差逆伝搬法によって、教師データとの誤差が最小となるように、多層パーセプトロン500の重み、およびフィルタの係数が更新される。学習後の多層パーセプトロン500の重み、およびフィルタの係数がパラメータ記憶部1106に記憶される。パラメータ記憶部1106に記憶された学習後の多層パーセプトロン500の重み、およびフィルタの係数がパラメータ記憶部1107に転送される。
At the time of learning, the goodness of fit input to the related sentence
対話応答時には、パラメータ記憶部1107に記憶されている学習後の多層パーセプトロン500の重み、およびフィルタの係数が読み出されて、利用される。多層パーセプトロン500の出力層503から出力される適合度が、関連文選択部1102に送られて、関連文の選択に利用される。
At the time of dialogue response, the weight of the multi-layer perceptron 500 after learning and the coefficient of the filter stored in the
図35は、第8の実施形態のモデル学習装置1120の動作手順を表わすフローチャートである。
FIG. 35 is a flowchart showing the operation procedure of the
ステップS1101において、発話文入力部11は、学習用発話文の入力を受ける。
ステップS1102において、関連文取得部12は、学習用発話文に関連する学習用関連文をテキストデータベースの1種であるWeb1000から取得する。
In step S1101, the utterance
In step S1102, the related
ステップS1103において、関連文適合性入力部1103は、取得された関連文の適合性を表わす適合度の入力を受ける。
In step S1103, the related sentence
ステップS1104において、入力された適合度が適合していることを表わす値であった場合には(S1104:YES)、処理がステップS1105に進み、入力された適合度が適合していることを表わす値でなかった場合には(S1104;NO)、処理がステップS1106に進む。 In step S1104, if the value indicates that the input goodness of fit is conforming (S1104: YES), the process proceeds to step S1105, indicating that the input goodness of fit is conforming. If it is not a value (S1104; NO), the process proceeds to step S1106.
ステップS1105において、学習用応答文入力部13は、適合関連文(学習用関連文)を対話の応答として適切になるように、開発側の人員の操作によって学習用関連文を修正することによって生成された学習用応答文の入力を受ける。
In step S1105, the learning response
ステップS1106において、ステップS1101~S1105がすべての入力が完了するまで繰り返される。コーパス出力部1104は、学習用発話文と、関連文と、関連文の適合度の複数のセットを含み、さらに、関連文のうちの適合関連文である学習用関連文と学習用応答文の複数のセットを含む学習用コーパスを生成して、コーパス記憶部1108に書込む。
In step S1106, steps S1101 to S1105 are repeated until all inputs are completed. The
ステップS1107において、適合判定学習処理部1105は、学習用コーパスに含まれる学習用発話文と関連文と適合度とを用いて、発話文および関連文を入力とし、適合度を出力とする適合性判定モデルX1を学習する。
In step S1107, the conformity determination
ステップS1108において、パラメータ記憶部1106は、適合判定学習処理部1105よる適合性判定モデルX1の学習後のパラメータを記憶する。
In step S1108, the
ステップS1109において、応答生成学習処理部6は、学習用コーパスに含まれる学習用関連文と学習用応答文を用いて、関連文を入力とし、応答文を出力とする応答文生成モデルAを学習する。
In step S1109, the response generation
ステップS1110において、パラメータ記憶部14は、応答生成学習処理部6による応答文生成モデルAの学習後のパラメータを記憶する。
In step S1110, the
図36は、第8の実施形態の対話装置1130の動作手順を表わすフローチャートである。
FIG. 36 is a flowchart showing the operation procedure of the
ステップS1201において、応答文生成部9は、パラメータ記憶部15に記憶されているモデル学習装置1130による応答文生成モデルAの学習後のパラメータを読み出す。
In step S1201, the response
ステップS1202において、関連文適合性判定部1101は、パラメータ記憶部1107に記憶されているモデル学習装置1130による適合性判定モデルX1の学習後のパラメータを読み出す。
In step S1202, the related sentence
ステップS1203において、発話文入力部7は、ユーザから対話実行用発話文の入力を受ける。
In step S1203, the utterance
ステップS1204において、関連文取得部8は、対話実行用発話文に関連する複数の関連文をテキストデータベースの1種であるWeb1000から取得する。
In step S1204, the related
ステップS1205において、関連文適合性判定部1101は、読み出したパラメータを用いることによって得られる学習後の適合性判定モデルX1に、対話実行用発話文および取得した関連文を入力することによって、適合度を生成する。
In step S1205, the related sentence
ステップS1206において、関連文選択部1102は、適合度に従って、関連文取得部8で取得された複数の関連文の中から対話実行用関連文を選択して、応答文生成部9へ出力する。
In step S1206, the related
ステップS1207において、応答文生成部9は、読み出したパラメータを用いることによって得られる学習後の応答文生成モデルAに対話実行用関連文を入力することによって、対話実行用応答文を生成する。
In step S1207, the response
以上のように、本実施の形態によれば、関連文取得部で取得した関連文の話題が発話文の話題がずれている場合に、そのような関連文を応答文の生成に利用しないようにすることができる。 As described above, according to the present embodiment, when the topic of the related sentence acquired by the related sentence acquisition unit is different from the topic of the utterance sentence, such a related sentence is not used for generating the response sentence. Can be.
なお、本実施の形態では、第1の実施の形態の対話応答システムに、話題が相違する関連文から応答文が生成されるのを防止する機能を追加するものとしたが、これに限定するものではない。第2~第7の実施形態の対話応答システムにも同様に追加することができる。 In addition, in this embodiment, the function of preventing the response sentence from being generated from the related sentences having different topics is added to the dialogue response system of the first embodiment, but the present invention is limited to this. It's not a thing. It can be similarly added to the dialogue response system of the second to seventh embodiments.
また、本実施の形態では、適合関連文から応答文を生成することとしたが、これに限定するものではない。発話文に対する応答文として適合関連文を直接用いるものとしてもよい。 Further, in the present embodiment, the response sentence is generated from the conformity-related sentence, but the present invention is not limited to this. The conformity-related sentence may be directly used as the response sentence to the utterance sentence.
[第9の実施形態]
図37は、第9の実施形態の対話応答システム1200の構成を表わす図である。
[9th embodiment]
FIG. 37 is a diagram showing the configuration of the
対話応答システム1200は、モデル学習装置1220と、対話装置1230とを備える。
The
本実施の形態のモデル学習装置1220が、第3の実施形態のモデル学習装置32と相違する点は、関連文取得部1201と、適合度付与部1203と、コーパス出力部1104と、コーパス記憶部1108と、適合判定学習処理部1105と、パラメータ記憶部1106である。
The
関連文取得部1201は、対話データに含まれるユーザ発話文に関連する文をテキストデータベースの1種であるWeb1000から取得する。具体的には、関連文取得部1201は、たとえば、Web1000上のデータからユーザ応答文に含まれる少なくとも1つの名詞及びもしくは少なくとも1つの述語が含まれる文を適合関連文(学習用関連文)として取得する。関連文取得部1201は、たとえば、Web1000上のデータからユーザ応答文に含まれる1つの名詞を含み、ユーザ応答文に含まれない少なくとも1つの名詞を含む文を不適合関連文として取得する。
The related
図38は、第9の実施形態の対話データ、学習用発話文、学習用関連文、および学習用応答文の例を表わす図である。図38に示すように、ユーザ発話文「今朝のコスモス!」とユーザ応答文「ありがとうございます。コスモスはなんとなく秋の気配を感じさせてくれますね。」とからなる対話データが取得される。 FIG. 38 is a diagram showing examples of dialogue data, learning utterance sentences, learning related sentences, and learning response sentences according to the ninth embodiment. As shown in FIG. 38, dialogue data consisting of the user utterance "Cosmos this morning!" And the user response "Thank you. Cosmos somehow makes me feel the sign of autumn." Is acquired.
ユーザ応答文に含まれる名詞「コスモス」、名詞「秋の気配」、述語「感じさせ」を含む文がWeb1000から検索されて、適合関連文(学習用関連文)「コスモスが秋の気配を感じさせる。」が取得される。 A sentence containing the noun "Cosmos", the noun "Autumn sign", and the predicate "Feeling" included in the user response sentence is searched from Web1000, and the conformance related sentence (learning related sentence) "Cosmos feels the autumn sign". Let me. "Is acquired.
また、ユーザ応答文に含まれる名詞「コスモス」を含み、ユーザ応答文に含まれない名詞「育て方」を含む文がWeb1000から検索されて、不適合関連文「コスモスの育て方は難しい。」が取得される。 In addition, a sentence containing the noun "Cosmos" included in the user response sentence and containing the noun "How to grow" not included in the user response sentence is searched from Web1000, and the nonconformity-related sentence "How to grow cosmos is difficult." To be acquired.
適合度付与部1203は、取得された関連文の適合性を表わす適合度を付与する。適合度付与部1203は、取得された適合関連文に対して、適合していることを表わす適合度(たとえば、数値「1」)を付与する。適合度付与部1203は、取得された不適合関連文に対して、適合していないことを表わす適合度(たとえば、数値「0」)を付与する。
The goodness-of-
適合していないことを表わす適合度が付与された不適合関連文は、コーパス出力部1104に送られる。
A nonconformity-related sentence to which a goodness of fit indicating non-conformity is given is sent to the
適合していることを表わす適合度が付与された適合関連文は学習用関連文として、学習用応答文生成部63に送られる。第3の実施形態と同様に、学習用応答文生成部63が、学習用関連文が対話の応答として適切な形式に修正された学習用応答文を生成して、学習用応答文がコーパス出力部1104に送られる。
The conformity-related sentence to which the goodness of fit indicating conformity is given is sent to the learning response
コーパス出力部1104と、コーパス記憶部1108と、適合判定学習処理部1105と、パラメータ記憶部1106は、第8の実施形態で説明したものと同様なので説明を繰り返さない。
Since the
本実施の形態の対話装置1230が、第3の実施形態の対話装置23と相違する点は、対話装置1230が、関連文適合性判定部1101と、関連文選択部1102とを備える点である。
The
関連文適合性判定部1101と、関連文選択部1102は、第8の実施形態で説明したものと同様なので説明を繰り返さない。
Since the related sentence
図39は、第9の実施形態のモデル学習装置1220の動作手順を表わすフローチャートである。
FIG. 39 is a flowchart showing the operation procedure of the
ステップS1301において、対話データ取得部39は、twitterなどのユーザ発話文とユーザ応答文から構成される対話データをテキストデータベースの1種であるWeb1000から取得する。ユーザ発話文が学習用発話文となる。
In step S1301, the dialogue
ステップS1302において、関連文取得部1302は、Web1000上のデータから適合関連文(学習用関連文)と不適合関連文とを取得する。
In step S1302, the related sentence acquisition unit 1302 acquires a conforming related sentence (learning related sentence) and a nonconforming related sentence from the data on the
ステップS1303において、適合度付与部1203は、取得された関連文(適合関連文と不適合関連文)の適合性を表わす適合度を付与する。
In step S1303, the goodness-of-
ステップS1304において、付与された適合度が適合していることを表わす値であった場合には(S1304:YES)、処理がステップS1305に進み、付与された適合度が適合していることを表わす値でなかった場合には(S1304;NO)、処理がステップS1306に進む。 In step S1304, if the value indicates that the given goodness of fit is conforming (S1304: YES), the process proceeds to step S1305, indicating that the given goodness of fit is conforming. If it is not a value (S1304; NO), the process proceeds to step S1306.
ステップS1305において、学習用応答文生成部63は、学習用関連文を対話らしい文に変換した学習用応答文を生成する。
In step S1305, the learning response
ステップS1306において、ステップS1301~S1305がすべての入力が完了するまで繰り返される。コーパス出力部1104は、学習用発話文と、関連文と、関連文の適合度のセットを複数含み、さらに、関連文のうちの適合関連文である学習用関連文と学習用応答文のセットを複数含む学習用コーパスを生成して、コーパス記憶部1108に書込む。
In step S1306, steps S1301 to S1305 are repeated until all inputs are completed. The
ステップS1307において、適合判定学習処理部1105は、学習用コーパスに含まれる学習用発話文と関連文と適合度とを用いて、発話文および関連文を入力とし、適合度を出力とする適合性判定モデルX1を学習する。
In step S1307, the conformity determination
ステップS1308において、パラメータ記憶部1106は、適合判定学習処理部1105よる適合性判定モデルX1の学習後のパラメータを記憶する。
In step S1308, the
ステップS1309において、応答生成学習処理部26は、学習用コーパスに含まれる学習用発話文と学習用関連文と学習用応答文を用いて、発話文と関連文を入力とし、応答文を出力とする応答文生成モデルBを学習する。
In step S1309, the response generation
ステップS1310において、パラメータ記憶部14は、応答生成学習処理部26による応答文生成モデルBの学習後のパラメータを記憶する。
In step S1310, the
以上のように、本実施の形態では、人手によらずに自動で、応答文を生成し、関連文の適合度を設定することができる。 As described above, in the present embodiment, it is possible to automatically generate a response sentence and set the goodness of fit of the related sentence without manpower.
[第10の実施形態]
図40は、第10の実施形態の対話応答システム1300の構成を表わす図である。
[10th Embodiment]
FIG. 40 is a diagram showing the configuration of the
対話応答システム1300は、モデル学習装置1320と、対話装置1330とを備える。
The
本実施の形態のモデル学習装置1320が、第1の実施形態のモデル学習装置2と相違する点は、トピック生成部1338と、関連文取得部1309と、トピック適合性入力部1303と、コーパス出力部1304と、コーパス記憶部1308と、適合判定学習処理部1305と、パラメータ記憶部1306である。本実施の形態の対話装置1330が、第1の実施形態の対話装置3との相違する点は後ほど説明する。
The
図41は、学習用発話文、検索トピック、関連文、適合度の例を表わす図である。以下、図41を参照して、トピック生成部1338、関連文取得部1309、トピック適合性入力部1303の動作を説明する。
FIG. 41 is a diagram showing an example of a learning utterance sentence, a search topic, a related sentence, and a goodness of fit. Hereinafter, the operations of the
トピック生成部1338は、学習用発話文に含まれ、かつ予め定められた除外名詞以外の名詞を抽出して、複数の検索トピックを生成する。
The
図41に示すように、トピック生成部1338は、学習用発話文「修学旅行で奈良に行くんだ」から名詞「修学旅行」と「奈良」を抽出する。トピック生成部1338は、第1検索トピックとして、トピック「修学旅行」を生成する。トピック生成部1338は、第2検索トピックとして、トピック「奈良」を生成する。トピック生成部1338は、第3検索トピックとして、主トピック「修学旅行」、および副トピック「奈良」を生成する。トピック生成部1338は、第4検索トピックとして、主トピック「奈良」、および副トピック「修学旅行」を生成する。
As shown in FIG. 41, the
関連文取得部1309は、トピック生成部1338で生成された各検索トピックを用いて、テキストデータベースの1種であるWeb1000から関連文を取得する。
The related
図41に示すように、関連文取得部1309は、第1検索トピックを用いて、「修学旅行」を含む複数の関連文を取得する。たとえば、関連文1-1~関連文1-4の4個の関連文が取得される。
As shown in FIG. 41, the related
関連文取得部1309は、第2検索トピックを用いて、「奈良」を含む複数の関連文を取得する。たとえば、たとえば、関連文2-1~関連文2-4の4個の関連文が取得される。
The related
関連文取得部1309は、第3検索トピックを用いて、述部に直接係る主トピック「修学旅行」を含み、かつ述部に直接係らない副トピック「奈良」を含む複数の関連文を取得する。たとえば、関連文3-1~関連文3-4の4個の関連文が取得される。述部に直接係るとは、述部と格助詞によって結ばれていることを意味する。
The related
関連文取得部1309は、第4検索トピックを用いて、述部に直接係る主トピック「奈良」を含み、かつ述部に直接係らない副トピック「修学旅行」を含む複数の関連文を取得する。たとえば、関連文4-1~関連文4-4の4個の関連文が取得される。
The related
トピック適合性入力部1303は、関連文の取得に用いた検索トピックの適合性を表わす適合度の入力を受ける。開発側の人員は、各検索トピックを用いて取得された関連文が学習用発話文と話題が同一または類似している場合には、その検索トピックが適合していることを表わす適合度(たとえば、数値「1」)を入力し、話題が異なる場合には、その検索トピックが適合していないことを表わす適合度(たとえば、数値「0」)を入力する。
The topic
図41に示すように、第1検索トピックを用いて検索された関連文1-1が学習用発話文と話題が同一または類似し、かつ第1検索トピックを用いて検索された関連文1-2、1-3、1-4が学習用発話文と話題が異なるときには、第1検索トピックの適合度として「1」、「0」、「0」、「0」が入力される。 As shown in FIG. 41, the related sentence 1-1 searched using the first search topic has the same or similar topic as the learning utterance sentence, and the related sentence 1- searched using the first search topic. When 2, 1-3, 1-4 have different topics from the utterance sentence for learning, "1", "0", "0", and "0" are input as the goodness of fit of the first search topic.
トピック適合性入力部1303によって生成された学習用発話文と、検索トピックと、適合度との関係は、コーパス出力部1304に送られる。
The relationship between the learning utterance sentence generated by the topic
トピック適合性入力部1303によって、適合していないことを表わす適合度が入力された関連文(以下、不適合関連文)は、学習用応答文入力部13に送られない。
A related sentence (hereinafter referred to as a non-conforming related sentence) in which a goodness of fit indicating non-conformity is input by the topic
トピック適合性入力部1303によって、適合していることを表わす適合度が入力された関連文(以下、適合関連文)は学習用関連文として、学習用応答文入力部13に送られる。第1の実施形態と同様に、学習用応答文入力部13が、学習用関連文が対話の応答として適切な形式に修正された学習用応答文の入力を受けて、学習用応答文がコーパス出力部1304に送られる。図41の例では、関連文1-1、関連文2-2、関連文3-1、関連文3-2、関連文3-3、関連文4-2、関連文4-3が学習用応答文入力部13に送られる。
A related sentence (hereinafter referred to as a conformity-related sentence) in which the goodness of fit indicating conformity is input by the topic
コーパス出力部1304は、学習用発話文と検索トピックと適合度の複数のセット、および学習用関連文と学習用応答文の複数のセットを含む学習用コーパスを生成して、コーパス記憶部1308に書込む。
The
コーパス記憶部1308は、学習用コーパスを記憶する。
図42(a)は、コーパス記憶部1308に記憶されている学習用コーパスのうちの学習用関連文と学習用応答文の複数のセットの例を表わす図である。図42(b)は、コーパス記憶部1308に記憶されている学習用コーパスのうちの学習用発話文と検索トピックと適合度の複数のセットの例を表わす図である。
The
FIG. 42A is a diagram showing an example of a plurality of sets of learning-related sentences and learning response sentences in the learning corpus stored in the
適合判定学習処理部1305は、学習用発話文と、検索トピックと、適合度を用いて、発話文および、検索トピックを入力に含み、適合度を出力とする適合性判定モデルX2を学習する。適合性判定モデルX2は、深層学習のニューラルネットワークと、そのパラメータとからなる。
The conformity determination
図41の例では、たとえば、「修学旅行で奈良に行くんだ」および「修学旅行」を入力とし、「1」を出力とする学習1、「修学旅行で奈良に行くんだ」および「修学旅行」を入力とし、「0」を出力とする学習2、「修学旅行で奈良に行くんだ」および「修学旅行」を入力とし、「0」を出力とする学習3、「修学旅行で奈良に行くんだ」および「修学旅行」を入力とし、「0」を出力とする学習4が行われる。他の検索トピックについても同様である。
In the example of FIG. 41, for example, "going to Nara on a school trip" and "study trip" are input and "1" is output as learning 1, "going to Nara on a school trip" and "study".
パラメータ記憶部1306は、は、適合判定学習処理部1305による適合性判定モデルX2の学習後のパラメータを記憶する。パラメータ記憶部1306は、ニューラルネットワークの学習後のパラメータ(重み行列など)を記憶する。パラメータ記憶部1306に記憶されている適合性判定モデルX2の学習後のパラメータは、図示しない入出力ポートなどを介して外部へ取り出されることができる。
The
本実施の形態の対話装置1330が、第1の実施形態の対話装置3と相違する点は、パラメータ記憶部1307と、トピック生成部1368と、トピック適合性判定部1312と、検索トピック選択部1349と、関連文取得部1341である。
The
パラメータ記憶部1307は、モデル学習装置1320による適合性判定モデルX2の学習後のパラメータを記憶する。たとえば、パラメータ記憶部1307は、ニューラルネットワークの学習後のパラメータ(重み行列など)を記憶する。モデル学習装置1320から外部に取り出された適合性判定モデルX2の学習後のパラメータが対話装置1330に入力され、パラメータ記憶部1307に記憶される。これらのパラメータは、対話装置1330の機能を実現するプログラムとともに、ユーザに頒布されるものとしてもよい。
The
トピック生成部1368は、トピック生成部1338と同様に、対話実行用発話文に含まれ、かつ予め定められた除外名詞以外の名詞を抽出して、複数の検索トピックを生成する。仮に、対話実行用発話文が、図39の学習用発話文「修学旅行で奈良に行くんだ」と同じ場合には、トピック生成部1368は、名詞「修学旅行」と「奈良」を抽出する。トピック生成部1368は、第1検索トピックとして、トピック「修学旅行」を生成する。トピック生成部1368は、第2検索トピックとして、トピック「奈良」を生成する。トピック生成部1368は、第3検索トピックとして、主トピック「修学旅行」、および副トピック「奈良」を生成する。トピック生成部1368は、第4検索トピックとして、主トピック「奈良」、および副トピック「修学旅行」を生成する。
Similar to the
トピック適合性判定部1312は、生成された複数の検索トピックの適合性を判定する。すなわち、トピック適合性判定部1312は、学習された適合性判定モデルX2に、対話実行用発話文および各検索トピックを入力することによって、適合度を生成する。たとえば、出力される適合度は、検索トピックの適合度が高い場合に、「1」に近い値となり、検索トピックの適合度が低い場合に「0」に近い値となる。 The topic suitability determination unit 1312 determines the suitability of a plurality of generated search topics. That is, the topic suitability determination unit 1312 generates the goodness of fit by inputting the utterance sentence for dialogue execution and each search topic into the learned suitability determination model X2. For example, the output goodness of fit is a value close to "1" when the goodness of fit of the search topic is high, and a value close to "0" when the goodness of fit of the search topic is low.
検索トピック選択部1349は、複数の検索トピックの中から適合度が最も高い検索トピックを選択して、関連文取得部1341へ出力する。
The search
関連文取得部1341は、選択された検索トピックを用いて、テキストデータベースの1種であるWeb1000から1つの関連文を取得する。関連文取得部1341は、適合度が最も高い検索トピックが主トピックと副トピックから構成される場合には、述部に直接係る主トピックを含み、かつ述部に直接係らない副トピックを含む1つの関連文を取得する。
The related
図43は、第10の実施形態の適合判定学習処理部1305およびトピック適合性判定部1312で用いられる適合性判定モデルX2を実現するニューラルネットワークを表わす図である。
FIG. 43 is a diagram showing a neural network that realizes the conformity determination model X2 used in the conformity determination
畳み込みニューラルネットワークCNN3は、第1の入力データである学習用発話文を受ける。畳み込みニューラルネットワークCNN3は、畳み込み層C31と、プーリング層C32とを備える。 The convolutional neural network CNN3 receives the learning utterance sentence which is the first input data. The convolutional neural network CNN3 includes a convolutional layer C31 and a pooling layer C32.
第1の入力データである学習用発話文「修学旅行で奈良に行くんだ」がN×6の大きさのデータで表される。 The first input data, the utterance sentence for learning, "I'm going to Nara on a school trip," is represented by data with a size of N × 6.
学習用発話文と複数のフィルタとの演算結果によって、畳み込み層C31において、M個の1×5の大きさの第1の畳み込み演算結果と、M個の1×4の大きさの第2の畳み込み演算結果と、M個の1×3の大きさの第3の畳み込み演算結果が得られる。
Based on the calculation results of the learning utterance sentence and the plurality of filters, in the convolution layer C31, the first convolution calculation result of
第1の演算結果、第2の演算結果、第3の演算結果のMAXプーリングによって、プーリング層C32において、M個の第1のプーリング結果、M個の第2のプーリング結果、M個の第3のプーリング結果が得られる。 By MAX pooling of the first calculation result, the second calculation result, and the third calculation result, M first pooling results, M second pooling results, and M third pooling results in the pooling layer C32. The pooling result of is obtained.
畳み込みニューラルネットワークCNN4は、第2の入力データである検索トピックを受ける。畳み込みニューラルネットワークCNN4は、畳み込み層C41と、プーリング層C42とを備える。 The convolutional neural network CNN4 receives a search topic which is the second input data. The convolutional neural network CNN4 includes a convolutional layer C41 and a pooling layer C42.
第2の入力データである検索トピック「修学旅行 奈良」がN×2の大きさのデータで表される。 The search topic "Study Trip Nara", which is the second input data, is represented by data having a size of N × 2.
検索トピックと複数のフィルタとの演算結果によって、畳み込み層C41において、M個の1×2の大きさの第4の畳み込み演算結果と、M個の1×1の大きさの第5の畳み込み演算結果が得られる。
Depending on the calculation result of the search topic and the plurality of filters, in the convolution layer C41, the fourth convolution operation result of
第4の演算結果、第5の演算結果のMAXプーリングによって、プーリング層C42において、M個の第4のプーリング結果、M個の第5のプーリング結果が得られる。 By MAX pooling of the fourth calculation result and the fifth calculation result, M fourth pooling results and M fifth pooling results are obtained in the pooling layer C42.
結合部COE2は、第1~第5のプーリング結果を結合して、5M次元の結合ベクトルを生成する。 The coupling portion COE2 combines the first to fifth pooling results to generate a 5M-dimensional coupling vector.
多層パーセプトロン600は、入力層601と、中間層602と、出力層603とを備える。
The multilayer perceptron 600 includes an
5M次元の結合ベクトルのデータは、入力層601に送られる。入力層601、中間層602及び出力層603の演算によって、検索トピックの適合度が出力される。
The data of the 5M-dimensional coupling vector is sent to the
図44は、畳み込みニューラルネットワークCNN3における畳み込み演算の詳細を表わす図である。 FIG. 44 is a diagram showing details of the convolution operation in the convolutional neural network CNN3.
畳み込みニューラルネットワークCNN3では、M個のN×2の大きさのフィルタと、M個のN×3の大きさのフィルタと、M個のN×4の大きさのフィルタとが用いられる。 In the convolutional neural network CNN3, M N × 2 size filters, M N × 3 size filters, and M N × 4 size filters are used.
N×6の大きさの学習用発話文と、M個のN×2の大きさのフィルタとの畳み込み演算によって、M個の1×5の大きさの第1の畳み込み演算結果が得られる。
By the convolution operation of the N × 6 size learning utterance sentence and the M N × 2 size filters, the first convolution operation result of
N×6の大きさの学習用発話文と、M個のN×3の大きさのフィルタとの畳み込み演算によって、M個の1×4の大きさの第2の畳み込み演算結果が得られる。
By the convolution operation of the N × 6 size learning utterance sentence and the M N × 3 size filters, the second convolution operation result of the
N×6の大きさの学習用発話文と、M個のN×4の大きさのフィルタとの畳み込み演算によって、M個の1×3の大きさの第3の畳み込み演算結果が得られる。
By the convolution operation of the N × 6 size learning utterance sentence and the M N × 4 size filters, a third convolution operation result of
図45は、畳み込みニューラルネットワークCNN4における畳み込み演算の詳細を表わす図である。 FIG. 45 is a diagram showing the details of the convolution operation in the convolutional neural network CNN4.
畳み込みニューラルネットワークCNN4では、M個のN×1の大きさのフィルタと、M個のN×2の大きさのフィルタとが用いられる。 In the convolutional neural network CNN4, M N × 1 size filters and M N × 2 size filters are used.
N×2の大きさの検索用トピックと、M個のN×1の大きさのフィルタとの畳み込み演算によって、M個の1×2の大きさの第4の畳み込み演算結果が得られる。
By the convolution operation of the N × 2 size search topic and the M N × 1 size filters, a fourth convolution operation result of
N×2の大きさの検索用トピックと、M個のN×2の大きさのフィルタとの畳み込み演算によって、M個の1×1の大きさの第5の畳み込み演算結果が得られる。
By the convolution operation of the N × 2 size search topic and the M N × 2 size filters, the fifth convolution operation result of
学習時には、教師データとして、トピック適合性入力部1303に入力された適合度が用いられる。誤差逆伝搬法によって、教師データとの誤差が最小となるように、多層パーセプトロン600の重み、およびフィルタの係数が更新される。学習後の多層パーセプトロン600の重み、およびフィルタの係数がパラメータ記憶部1306に記憶される。パラメータ記憶部1306に記憶された学習後の多層パーセプトロン600の重み、およびフィルタの係数がパラメータ記憶部1307に転送される。
At the time of learning, the goodness of fit input to the topic
対話応答時には、パラメータ記憶部1307に記憶されている学習後の多層パーセプトロン600の重み、およびフィルタの係数が読み出されて、利用される。多層パーセプトロン600の出力層603から出力される適合度が、検索トピック選択部1349に送られて、検索トピックの選択に利用される。
At the time of dialogue response, the weight of the multi-layer perceptron 600 after learning and the coefficient of the filter stored in the
図46は、第10の実施形態のモデル学習装置1320の動作手順を表わすフローチャートである。
FIG. 46 is a flowchart showing the operation procedure of the
ステップS1401において、発話文入力部11は、学習用発話文の入力を受ける。
ステップS1402において、トピック生成部1338は、学習用発話文に含まれ、かつ予め定められた除外名詞以外の名詞を抽出して、複数の検索トピックを生成する。
In step S1401, the utterance
In step S1402, the
ステップS1403において、関連文取得部1309は、トピック生成部1338で生成された各検索トピックを用いて、テキストデータベースの1種であるWeb1000から関連文を取得する。
In step S1403, the related
ステップS1404において、トピック適合性入力部1303は、関連文の取得に用いた検索トピックの適合性を表わす適合度の入力を受ける。
In step S1404, the topic
ステップS1405において、入力された適合度が適合していることを表わす値であった場合には(S1405:YES)、処理がステップS1406に進み、入力された適合度が適合していることを表わす値でなかった場合には(S1405;NO)、処理がステップS1407に進む。 In step S1405, if the value indicates that the input goodness of fit is conforming (S1405: YES), the process proceeds to step S1406, indicating that the input goodness of fit is conforming. If it is not a value (S1405; NO), the process proceeds to step S1407.
ステップS1406において、学習用応答文入力部13は、適合関連文(学習用関連文)を対話の応答として適切になるように、開発側の人員の操作によって学習用関連文を修正することによって生成された学習用応答文の入力を受ける。
In step S1406, the learning response
ステップS1407において、ステップS1401~S1406がすべての入力が完了するまで繰り返される。コーパス出力部1304は、学習用発話文と検索トピックと適合度の複数のセット、および学習用関連文と学習用応答文の複数のセットを含む学習用コーパスを生成して、コーパス記憶部1308に書込む。
In step S1407, steps S1401 to S1406 are repeated until all inputs are completed. The
ステップS1408において、適合判定学習処理部1305は、学習用コーパスに記憶されている学習用発話文と、検索トピックと、適合度を用いて、発話文および検索トピックを入力に含み、適合度を出力とする適合性判定モデルX2を学習する。
In step S1408, the conformity determination
ステップS1409において、パラメータ記憶部1306は、適合判定学習処理部1305よる適合性判定モデルX2の学習後のパラメータを記憶する。
In step S1409, the
ステップS1410において、応答生成学習処理部6は、学習用コーパスに記憶されている学習用関連文と学習用応答文とを用いて、関連文を入力とし、応答文を出力とする応答文生成モデルAを学習する。
In step S1410, the response generation
ステップS1411において、パラメータ記憶部14は、応答生成学習処理部6による応答文生成モデルAの学習後のパラメータを記憶する。
In step S1411, the
図47は、第10の実施形態の対話装置1330の動作手順を表わすフローチャートである。
FIG. 47 is a flowchart showing the operation procedure of the
ステップS1501において、応答文生成部9は、パラメータ記憶部15に記憶されているモデル学習装置1330による応答文生成モデルAの学習後のパラメータを読み出す。
In step S1501, the response
ステップS1502において、トピック適合性判定部1312は、パラメータ記憶部1307に記憶されているモデル学習装置1330による適合性判定モデルX2の学習後のパラメータを読み出す。
In step S1502, the topic suitability determination unit 1312 reads out the parameters after learning of the suitability determination model X2 by the
ステップS1503において、発話文入力部7は、ユーザから対話実行用発話文の入力を受ける。
In step S1503, the utterance
ステップS1504において、トピック生成部1368は、対話実行用発話文に含まれ、かつ予め定められた除外名詞以外の名詞を抽出して、複数種の検索トピックを生成する。
In step S1504, the
ステップS1505において、トピック適合性判定部1312は、読み出したパラメータを用いることによって得られる学習後の適合性判定モデルX2に、対話実行用発話文および各検索トピックを入力することによって、適合度を生成する。 In step S1505, the topic suitability determination unit 1312 generates a goodness of fit by inputting an utterance sentence for dialogue execution and each search topic into the post-learning suitability determination model X2 obtained by using the read parameters. do.
ステップS1506において、検索トピック選択部1349は、適合度に従って、複数の検索トピックの中から1つの検索トピックを選択して、関連文取得部1341へ出力する。
In step S1506, the search
ステップS1507において、関連文取得部1341は、選択した検索トピックを用いて検索することによって、対話実行用発話文に関連する1つの関連文をテキストデータベースの1種であるWeb1000から取得する。
In step S1507, the related
ステップS1508において、応答文生成部9は、読み出したパラメータを用いることによって得られる学習後の応答文生成モデルAに対話実行用関連文を入力することによって、対話実行用応答文を生成する。
In step S1508, the response
以上のように、本実施の形態によれば、関連文取得部で取得する際に用いる検索トピックが不適切な場合に、そのような検索トピックを用いて関連文が取得されないようにすることができる。 As described above, according to the present embodiment, when the search topic used for acquisition by the related sentence acquisition unit is inappropriate, it is possible to prevent the related sentence from being acquired using such a search topic. can.
なお、本実施の形態では、第1の実施の形態の対話応答システムに、不適切な検索トピックから関連文が取得されるのを防止する機能を追加するものとしたが、これに限定するものではない。第2~第8の実施形態の対話応答システムにも同様に追加することができる。 In the present embodiment, a function for preventing related sentences from being acquired from an inappropriate search topic is added to the dialogue response system of the first embodiment, but the present invention is limited to this. is not. It can be similarly added to the dialogue response system of the second to eighth embodiments.
また、本実施の形態では、適合度が高い検索トピックを用いて取得した関連文から応答文を生成することとしたが、これに限定するものではない。発話文に対する応答文としてて、適合度が高い検索トピックを用いて取得した関連文を直接用いるものとしてもよい。 Further, in the present embodiment, the response sentence is generated from the related sentence acquired by using the search topic having a high degree of conformity, but the present invention is not limited to this. As the response sentence to the utterance sentence, the related sentence acquired by using the search topic with high goodness of fit may be directly used.
[第11の実施形態]
上述の実施形態に係るモデル学習装置および対話装置の構成要素は、コンピュータハードウェアと、そのコンピュータハードウェア上で実行されるコンピュータプログラムとにより実現できる。
[Eleventh Embodiment]
The components of the model learning device and the interactive device according to the above-described embodiment can be realized by computer hardware and a computer program executed on the computer hardware.
図48は、モデル学習装置または対話装置の内部構成を表わす図である。
図48を参照して、モデル学習装置または対話装置は、バス3300と、CPU(Central Processing Unit)3301と、ROM(Read Only Memory)3302と、RAM(Random Access Memory)3303と、HDD(Hard Disk Drive)3304と、DVD(Digital Versatile Disk)3307が接続されたDVDドライブ3306と、ネットワークI/F3309と、キーボード3310と、マウス3311と、リムーバブルメモリ3313が接続されるメモリポート3312と、ディスプレイ3308とを備える。
FIG. 48 is a diagram showing an internal configuration of a model learning device or a dialogue device.
With reference to FIG. 48, the model learning device or dialogue device includes a
キーボード3310およびマウス3311は、開発側の人員またはユーザからの入力を受け付ける。上述の実施形態で説明した機能をコンピュータで実現するためのモデル学習プログラムまたは対話プログラムは、DVD3307、リムーバブルメモリ3313、ネットワークI/F3309からHDD3304に転送される。ROM3302は、たとえば起動プログラム等を記憶する。RAM3303は、実行中のプログラムやその作業データなどを記憶する。ネットワークI/F3309は、インターネット3400に接続され、Web1000上のデータを取得することができる。
The
[変形例]
本発明は、上記の実施形態に限定されるものではない。本発明は、以下のような変形例も含まれる。
[Modification example]
The present invention is not limited to the above embodiment. The present invention also includes the following modifications.
(1)上記の実施形態では、関連文検索部は、Webに掲載された文を検索することとしたが、これに限定されるものではない。モデル学習装置の関連文検索部は、モデル学習装置で利用する目的以外の目的で作成され、かつ公衆が利用可能なデータに含まれる文を検索することとしてもよい。対話装置の関連文検索部は、対話で利用する目的以外の目的で作成され、かつ公衆が利用可能なデータに含まれる文を検索することとしてもよい。これによって、Webではなく、DVDまたCDに記録されて頒布される新聞データなどに含まれる文も関連文として利用することができる。 (1) In the above embodiment, the related sentence search unit searches for sentences posted on the Web, but the present invention is not limited to this. The related sentence search unit of the model learning device may search for sentences that are created for a purpose other than the purpose used by the model learning device and are included in the data that can be used by the public. The related sentence search unit of the dialogue device may search for sentences that are created for a purpose other than the purpose used in the dialogue and are included in the data that can be used by the public. As a result, sentences included in newspaper data recorded and distributed on DVDs or CDs can be used as related sentences instead of the Web.
(2)パラメータ記憶部14,15には、重み行列だけでなく、バイアスb、c、活性化関数f、gのようなパラメータも記憶されるものとしてもよい。
(2) Not only the weight matrix but also parameters such as bias b, c, activation functions f, and g may be stored in the
(3)応答文を出力するモデルの一例として、リカレントニューラルネットワークで構成されるモデルを用いたが、これに限定されるものではなく、リカレントニューラルネットワーク以外のニューラルネットワークを用いたモデルを用いてもよい。関連文および検検索トピックを判定するモデルの一例として、畳み込みニューラルネットワークと多層パーセプトロンで構成されるモデルを用いたが、これに限定されるものではない。 (3) As an example of a model that outputs a response statement, a model composed of a recurrent neural network is used, but the model is not limited to this, and a model using a neural network other than the recurrent neural network may be used. good. As an example of a model for determining related sentences and search topics, a model composed of a convolutional neural network and a multi-layer perceptron was used, but the model is not limited thereto.
(4)元文に対して、例えばエモーションに関するタグを付すなどの前処理を施して、タグ情報とともに学習を実行することもできる。これにより、感情に基づいた出力を行う対話応答システムを構築することもできる。 (4) It is also possible to perform preprocessing such as attaching a tag related to emotion to the original sentence and execute learning together with the tag information. As a result, it is possible to construct a dialogue response system that outputs based on emotions.
(5)質問文を入力とし、その質問文に対するアドバイスおよび回答を表す応答文を出力とするモデルを学習し、質問文に対してアドバイスおよび回答を出力する対話応答システムを構築することもできる。 (5) It is also possible to learn a model in which a question sentence is input and an answer sentence expressing an advice and an answer to the question sentence is output, and a dialogue response system for outputting an advice and an answer to the question sentence can be constructed.
(6)第1~第6の実施形態では、モデル学習装置がモデル(ニューラルネットワーク)の学習後のパラメータを対話装置に供給するものとしたが、これに限定するものではない。モデル学習装置が、モデル自体を表わすデータ、すなわちエンコーダおよびデコーダを構成するニューラルネットワークの構成、およびそのニューラルネットワークの学習後のパラメータを対話装置に供給するものとしてもよい。対話装置は、供給されたモデル自体を表わすデータに基づいて、モデルを構築することによって、対話実行用応答文を生成する。第8~10の実施形態でも同様である。 (6) In the first to sixth embodiments, the model learning device supplies the parameters after learning the model (neural network) to the dialogue device, but the present invention is not limited to this. The model learning device may supply data representing the model itself, that is, a configuration of a neural network constituting an encoder and a decoder, and parameters after training of the neural network to the dialogue device. The dialogue device generates a dialogue execution response statement by constructing a model based on the data representing the supplied model itself. The same applies to the eighth to tenth embodiments.
今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 It should be considered that the embodiments disclosed this time are exemplary in all respects and not restrictive. The scope of the present invention is shown by the scope of claims rather than the above description, and is intended to include all modifications within the meaning and scope equivalent to the scope of claims.
1,21,31,41,81,91,551,1100,1200,1300 対話応答システム、2,22,32,42,75,78,1120,1220,1320 モデル学習装置、3,23,43,76,77,1130,1230,1330 対話装置、4,24,34,44,82,92,1140,1240,1340 コーパス生成部、5,25,87,97,1108,1308 コーパス記憶部、6,26,86 応答生成学習処理部、7,11 発話文入力部、8,12,28,45,48,1201,1341 関連文取得部、9,29,89 応答文生成部、13,38 学習用応答文入力部、14,15,1106,1107,1306,1307 パラメータ記憶部、39 対話データ取得部、33,63,83,93 学習用応答文生成部、 49,53,57 元文ランキング部、51 バイナリトリプル生成部、52 元文取得部、55 質問文生成部、56 回答及び元文取得部、64,74,84,85,95,1104,1304 コーパス出力部、151,153,157,158,351,352,451,452 エンコーダ、152,154 デコーダ、552 学習制御部、1000 Web、1051 質問・応答システム、1054 データベース、1101 関連文適合性判定部、1102 関連文選択部、1103 関連文適合性入力部、1105,1305 適合判定学習処理部、1202 適合度付与部、1303 トピック適合性入力部、1338,1368 トピック生成部、1312 トピック適合性判定部、1349 検索トピック選択部、3300 バス、3301 CPU、3302 ROM、3303 RAM、3304 HDD、3306 DVDドライブ、3307 DVD、3308 ディスプレイ、3309 ネットワークI/F、3310 キーボード、3311 マウス、3312 メモリポート、3313 リムーバブルメモリ、3400 インターネット、500,600 多層パーセプトロン、501,601 入力層、502,602 中間層、503,603 出力層、CNN1,CNN2,CNN3,CNN4 畳み込みニューラルネットワーク、C11,C21 畳み込み層、C12,C22 プーリング層、COE1,COE2 結合部。 1,21,31,41,81,91,551,1100,1200,1300 Dialogue response system, 2,22,32,42,75,78,1120,1220,1320 Model learning device, 3,23,43, 76,77,1130,1230,1330 Dialogue device, 4,24,34,44,82,92,1140,1240,1340 Corpus generator, 5,25,87,97,1108,1308 Corpus storage, 6, 26,86 Response generation learning processing unit, 7,11 utterance sentence input unit, 8,12,28,45,48,1201,1341 Related sentence acquisition unit, 9,29,89 Response sentence generation unit, 13,38 For learning Response sentence input unit, 14, 15, 1106, 1107, 1306, 1307 parameter storage unit, 39 dialogue data acquisition unit, 33, 63, 83, 93 learning response sentence generation unit, 49, 53, 57 original sentence ranking unit, 51 Binary triple generator, 52 Original sentence acquisition unit, 55 Question sentence generation unit, 56 Answer and original sentence acquisition unit, 64,74,84,85,95,1104,1304 Corpus output unit, 151,153,157,158 , 351,352,451,452 Encoder, 152,154 Decoder, 552 Learning Control Unit, 1000 Web, 1051 Question / Answer System, 1054 Database, 1101 Related Sentence Conformity Judgment Unit, 1102 Related Sentence Selection Unit, 1103 Related Sentence Conformity Gender input unit, 1105, 1305 Conformity judgment learning processing unit, 1202 Conformity granting unit, 1303 topic conformity input unit, 1338, 1368 topic generation unit, 1312 topic conformity judgment unit, 1349 search topic selection unit, 3300 bus, 3301 CPU, 3302 ROM, 3303 RAM, 3304 HDD, 3306 DVD drive, 3307 DVD, 3308 display, 3309 network I / F, 3310 keyboard, 3311 mouse, 3312 memory port, 3313 removable memory, 3400 Internet, 500,600 multi-layer perceptron, 501,601 input layer, 502,602 intermediate layer, 503,603 output layer, CNN1, CNN2, CNN3, CNN4 convolutional neural network, C11, C21 convolutional layer, C12, C22 pooling layer, COE1, COE2 joint.
Claims (10)
前記学習用コーパスを用いて、関連文を入力に含み、応答文を出力とする応答文生成モデルを学習する学習処理部とを備えたモデル学習装置と、
対話実行用の発話文が入力される発話文入力部と、
テキストデータベースの文を検索することによって、前記対話実行用の発話文に関連する対話実行用の関連文を取得する関連文取得部と、
発話文に関連する関連文を入力として含み、前記入力に応答して前記応答文を出力とするように学習された応答文生成モデルに前記対話実行用の関連文を入力することによって、対話実行用の応答文を生成する応答文生成部とを備えた対話装置とよりなる対話応答システム。 The learning utterance sentence, the learning related sentence related to the learning utterance sentence obtained by searching the sentence in the text database, and the learning related sentence are in an appropriate format as a response of the dialogue. A corpus storage unit that stores a learning corpus including a modified learning response sentence,
Using the learning corpus, a model learning device including a learning processing unit that includes a related sentence as an input and learns a response sentence generation model that outputs a response sentence, and a model learning device.
The utterance text input section where the utterance text for dialogue execution is input, and
A related sentence acquisition unit that acquires a related sentence for dialogue execution related to the spoken sentence for executing the dialogue by searching a sentence in the text database, and a related sentence acquisition unit.
Dialogue by inputting the related sentence for executing the dialogue into the response sentence generation model trained to include the related sentence related to the utterance sentence as an input and output the response sentence in response to the input. A dialogue response system consisting of a dialogue device equipped with a response statement generator that generates a response statement for execution.
学習用の発話文と、テキストデータベースの文を検索することによって取得された前記学習用の発話文に関連する学習用の関連文と、前記学習用の関連文が対話の応答として適切な形式に修正された学習用の応答文とを含む学習用コーパスを記憶するコーパス記憶部と、
前記学習用コーパスを用いて、関連文を入力に含み、前記応答文を出力とする応答文生成モデルを学習する学習処理部とを備えた、モデル学習装置。 It is a model learning device that learns the response sentence generation model used in the dialogue device that automatically generates the response sentence for the utterance sentence.
The learning utterance sentence, the learning related sentence related to the learning utterance sentence obtained by searching the sentence in the text database, and the learning related sentence are in an appropriate format as a response of the dialogue. A corpus storage unit that stores a learning corpus including a modified learning response sentence,
A model learning device including a learning processing unit that uses the learning corpus to learn a response sentence generation model that includes a related sentence as an input and outputs the response sentence as an output.
前記学習処理部は、前記学習用コーパスを用いて、前記発話文および前記関連文を入力に含み、前記応答文を出力とする応答文生成モデルを学習する、請求項2記載のモデル学習装置。 The corpus storage unit stores a learning corpus including the utterance sentence for learning, one or more related sentences for learning, and the response sentence for learning.
The model learning device according to claim 2, wherein the learning processing unit learns a response sentence generation model that includes the utterance sentence and the related sentence as an input and outputs the response sentence by using the learning corpus.
対話実行用の発話文が入力される発話文入力部と、
テキストデータベースの文を検索することによって、前記対話実行用の発話文に関連する対話実行用の関連文を取得する関連文取得部と、
前記発話文に関連する関連文を入力として含み、前記入力に応答して前記応答文を出力とするように学習された応答文生成モデルに前記対話実行用の関連文を入力することによって、対話実行用の応答文を生成する応答文生成部とを備えた対話装置。 It is a dialogue device that automatically generates a response sentence to an utterance sentence.
The utterance text input section where the utterance text for dialogue execution is input, and
A related sentence acquisition unit that acquires a related sentence for dialogue execution related to the spoken sentence for executing the dialogue by searching a sentence in the text database, and a related sentence acquisition unit.
Dialogue by inputting the related sentence for executing the dialogue into the response sentence generation model trained to include the related sentence related to the utterance sentence as an input and output the response sentence in response to the input. A dialogue device equipped with a response statement generator that generates a response statement for execution.
前記応答文生成部は、前記対話実行用の発話文および一又は複数の前記対話実行用の関連文を前記応答文生成モデルに入力することによって、前記対話実行用の応答文を生成する、請求項4記載の対話装置。 The response sentence generation model includes the utterance sentence and the related sentence as the input.
The response sentence generation unit generates a response sentence for executing the dialogue by inputting the utterance sentence for executing the dialogue and one or a plurality of related sentences for executing the dialogue into the response sentence generation model. Item 4. The dialogue device according to item 4.
前記モデル学習装置は、
学習用の発話文と、テキストデータベースの文を検索することによって取得された前記学習用の発話文に関連する関連文と、前記関連文の適合度とを含む学習用コーパスを記憶するコーパス記憶部と、
前記学習用コーパスを用いて、発話文および関連文を入力に含み、適合度を出力とする適合性判定モデルを学習する第1の学習処理部とを備え、
前記対話装置は、
対話実行用の発話文が入力される発話文入力部と、
テキストデータベースの文を検索することによって、前記対話実行用の発話文に関連する対話実行用の関連文を取得する関連文取得部と、
前記発話文と前記関連文を入力に含み、前記入力に応答して前記関連文の適合度を出力するように学習された適合性判定モデルに、前記対話実行用の発話文および前記取得した前記対話実行用の関連文を入力することによって、適合度を生成する関連文適合性判定部とを備え、
前記コーパス記憶部は、さらに、前記関連文の適合度が高い学習用の関連文が対話の応答として適切な形式に修正された学習用の応答文とを含む学習用コーパスを記憶し、
前記モデル学習装置は、さらに、
前記学習用の関連文と前記学習用の応答文を用いて、関連文を入力に含み、応答文を出力とする応答文生成モデルを学習する第2の学習処理部を備え、
前記対話装置は、さらに、
前記発話文に関連する関連文を入力として含み、前記入力に応答して前記応答文を出力とするように学習された応答文生成モデルに前記対話実行用の関連文を入力することによって、対話実行用の応答文を生成する応答文生成部を備える、対話応答システム。 A dialogue response system consisting of a model learning device and a dialogue device.
The model learning device is
A corpus storage unit that stores a learning corpus including a learning utterance sentence, a related sentence related to the learning utterance sentence acquired by searching a sentence in a text database, and a degree of conformity of the related sentence. When,
Using the learning corpus, it is provided with a first learning processing unit that learns a conformity determination model that includes utterance sentences and related sentences in the input and outputs the goodness of fit.
The dialogue device is
The utterance text input section where the utterance text for dialogue execution is input, and
A related sentence acquisition unit that acquires a related sentence for dialogue execution related to the spoken sentence for executing the dialogue by searching a sentence in the text database, and a related sentence acquisition unit.
The utterance sentence for executing the dialogue and the acquired said sentence were added to the conformity determination model trained to include the utterance sentence and the related sentence in the input and output the degree of conformity of the related sentence in response to the input. It is equipped with a related sentence conformity determination unit that generates a degree of conformity by inputting a related sentence for executing a dialogue .
The corpus storage unit further stores a learning corpus including a learning response sentence in which the learning related sentence having a high goodness of fit of the related sentence is modified into an appropriate format as a response of the dialogue .
The model learning device further
A second learning processing unit for learning a response sentence generation model that includes the related sentence in the input and outputs the response sentence by using the related sentence for learning and the response sentence for learning is provided.
The dialogue device further
Dialogue by inputting the related sentence for executing the dialogue into the response sentence generation model trained to include the related sentence related to the utterance sentence as an input and output the response sentence in response to the input. An interactive response system that includes a response statement generator that generates response statements for execution .
前記ユーザ応答文に含まれる1つの名詞と、前記ユーザ応答文に含まれない少なくとも1つの名詞とを含む文を適合度の低い前記関連文として取得するコーパス生成部を備える、請求項7記載の対話応答システム。 A sentence containing at least one noun and / or at least one predicate included in the user response sentence of the dialogue data consisting of the user utterance sentence and the user response sentence is acquired as the related sentence having a high degree of conformity.
The seventh aspect of claim 7, further comprising a corpus generation unit that acquires a sentence including one noun included in the user response sentence and at least one noun not included in the user response sentence as the related sentence having low goodness of fit. Dialogue response system.
前記モデル学習装置は、
学習用の発話文と、前記学習用の発話文に関連する関連文を取得するためにテキストデータベースの文を検索するときに用いられる検索トピックと、前記検索トピックの適合度とを含む学習用コーパスを記憶するコーパス記憶部と、
前記学習用コーパスを用いて、発話文および検索トピックを入力に含み、適合度を出力とする適合性判定モデルを学習する第1の学習処理部とを備え、
前記対話装置は、
対話実行用の発話文が入力される発話文入力部と、
前記対話実行用の発話文に基づいて、前記対話実行用の発話文に関連する関連文を取得するためにテキストデータベースの文を検索するときに用いられる検索トピックを生成する第1のトピック生成部と、
前記発話文と前記検索トピックを入力に含み、前記入力に応答して前記検索トピックの適合度を出力するように学習された適合性判定モデルに、前記対話実行用の発話文および前記生成した検索トピックを入力することによって、適合度を生成するトピック適合性判定部と、
前記トピック適合性判定部で生成された適合度に基づいて、複数の検索トピックの中から1つの検索トピックを選択する選択部と、
前記選択された検索トピックを用いて、テキストデータベースの文を検索することによって、前記対話実行用の発話文に関連する対話実行用の関連文を取得する第1の関連文取得部とを備え、
前記コーパス記憶部は、テキストデータベースの文を検索することによって取得された前記学習用の発話文に関連する学習用の関連文と、前記学習用の関連文が対話の応答として適切な形式に修正された学習用の応答文とを含む学習用コーパスを記憶し、
前記モデル学習装置は、さらに、
前記学習用の関連文と前記学習用の応答文とを用いて、関連文を入力に含み、応答文を出力とする応答文生成モデルを学習する第2の学習処理部を備え、
前記対話装置は、さらに、
前記発話文に関連する関連文を入力として含み、前記入力に応答して前記応答文を出力とするように学習された応答文生成モデルに前記対話実行用の関連文を入力することによって、対話実行用の応答文を生成する応答文生成部を備える、対話応答システム。 A dialogue response system consisting of a model learning device and a dialogue device.
The model learning device is
A learning corpus that includes a learning utterance sentence, a search topic used when searching a sentence in a text database to obtain a related sentence related to the learning utterance sentence, and a degree of conformity of the search topic. A corpus memory that memorizes
Using the learning corpus, a first learning processing unit for learning a conformity determination model that includes utterance sentences and search topics as inputs and outputs the goodness of fit is provided.
The dialogue device is
The utterance text input section where the utterance text for dialogue execution is input, and
A first topic generation unit that generates a search topic used when searching a sentence in a text database to acquire a related sentence related to the utterance sentence for executing the dialogue based on the utterance sentence for executing the dialogue. When,
The utterance sentence for executing the dialogue and the generated search are added to the conformity determination model trained to include the utterance sentence and the search topic in the input and output the goodness of fit of the search topic in response to the input. A topic suitability judgment unit that generates a goodness of fit by inputting a topic,
A selection unit that selects one search topic from a plurality of search topics based on the goodness of fit generated by the topic suitability determination unit, and a selection unit.
It comprises a first related sentence acquisition unit that acquires a dialogue execution related sentence related to the dialogue execution utterance sentence by searching a sentence in the text database using the selected search topic .
The corpus storage unit modifies the learning-related sentences related to the learning utterance sentences obtained by searching the sentences in the text database and the learning-related sentences into an appropriate format as a response to the dialogue. Memorize the learning corpus, including the learning response sentences that have been made,
The model learning device further
A second learning processing unit for learning a response sentence generation model that includes the related sentence in the input and outputs the response sentence by using the related sentence for learning and the response sentence for learning is provided.
The dialogue device further
Dialogue by inputting the related sentence for executing the dialogue into the response sentence generation model trained to include the related sentence related to the utterance sentence as an input and output the response sentence in response to the input. An interactive response system that includes a response statement generator that generates response statements for execution .
前記学習用の発話文に基づいて、前記検索トピックを生成する第2のトピック生成部と、
前記生成された検索トピックを用いて、テキストデータベースの文を検索することによって、前記学習用の発話文に関連する関連文を取得する第2の関連文取得部とを備え、
前記第1のトピック生成部および前記第2のトピック生成部は、主トピックと副トピックとからなる検索トピックを生成し、
前記第1の関連文取得部および前記第2の関連文取得部は、前記検索トピックが前記主トピックと前記副トピックからなる場合には、述部に直接係る主トピックを含み、かつ述部に直接係らない副トピックを含む関連文を取得する、請求項9記載の対話応答システム。 The model learning device is
A second topic generation unit that generates the search topic based on the utterance sentence for learning,
It is provided with a second related sentence acquisition unit that acquires a related sentence related to the utterance sentence for learning by searching a sentence in a text database using the generated search topic.
The first topic generation unit and the second topic generation unit generate a search topic consisting of a main topic and a subtopic, and generate a search topic.
When the search topic consists of the main topic and the subtopic, the first related sentence acquisition unit and the second related sentence acquisition unit include the main topic directly related to the predicate, and the predicate includes the predicate. The dialogue response system according to claim 9 , wherein a related sentence including a subtopic that is not directly related is acquired.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/JP2018/030408 WO2019039375A1 (en) | 2017-08-23 | 2018-08-16 | Dialog response system, model training device, and dialog device |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017160329 | 2017-08-23 | ||
| JP2017160329 | 2017-08-23 |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2019040574A JP2019040574A (en) | 2019-03-14 |
| JP7058438B2 true JP7058438B2 (en) | 2022-04-22 |
Family
ID=65727365
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2017192845A Active JP7058438B2 (en) | 2017-08-23 | 2017-10-02 | Dialogue response system, model learning device and dialogue device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7058438B2 (en) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US12481830B2 (en) | 2019-10-02 | 2025-11-25 | Ntt, Inc. | Text generation apparatus, text generation learning apparatus, text generation method, text generation learning method and program |
| JP2021096711A (en) | 2019-12-18 | 2021-06-24 | 富士通株式会社 | Information processing program, information processing method, and information processing device |
| CN114638212A (en) * | 2020-12-16 | 2022-06-17 | 科沃斯商用机器人有限公司 | Model training method and device, electronic equipment and storage medium |
| JP7696736B2 (en) * | 2021-03-23 | 2025-06-23 | キオクシア株式会社 | Information processing device, information processing method, and learning model generation method |
| JP7511794B1 (en) * | 2023-11-02 | 2024-07-05 | 三菱電機株式会社 | Question answering device and question answering method |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000339314A (en) | 1999-05-25 | 2000-12-08 | Nippon Telegr & Teleph Corp <Ntt> | Automatic response method, dialogue analysis method, response sentence generation method, device thereof, and medium recording the program |
| JP2006252381A (en) | 2005-03-14 | 2006-09-21 | Fuji Xerox Co Ltd | Question answering system, data retrieval method, and computer program |
| JP2013190985A (en) | 2012-03-13 | 2013-09-26 | Sakae Takeuchi | Knowledge response system, method and computer program |
| US20160026629A1 (en) | 2014-07-23 | 2016-01-28 | International Business Machines Corporation | Question answer system using physical distance data |
| US20160283491A1 (en) | 2015-03-25 | 2016-09-29 | Google Inc. | Information Extraction from Question And Answer Websites |
| JP2017037588A (en) | 2015-08-14 | 2017-02-16 | 富士ゼロックス株式会社 | Information processor and information processing program |
-
2017
- 2017-10-02 JP JP2017192845A patent/JP7058438B2/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000339314A (en) | 1999-05-25 | 2000-12-08 | Nippon Telegr & Teleph Corp <Ntt> | Automatic response method, dialogue analysis method, response sentence generation method, device thereof, and medium recording the program |
| JP2006252381A (en) | 2005-03-14 | 2006-09-21 | Fuji Xerox Co Ltd | Question answering system, data retrieval method, and computer program |
| JP2013190985A (en) | 2012-03-13 | 2013-09-26 | Sakae Takeuchi | Knowledge response system, method and computer program |
| US20160026629A1 (en) | 2014-07-23 | 2016-01-28 | International Business Machines Corporation | Question answer system using physical distance data |
| US20160283491A1 (en) | 2015-03-25 | 2016-09-29 | Google Inc. | Information Extraction from Question And Answer Websites |
| JP2017037588A (en) | 2015-08-14 | 2017-02-16 | 富士ゼロックス株式会社 | Information processor and information processing program |
Non-Patent Citations (2)
| Title |
|---|
| 守時 理裕,音声対話システムにおけるユーザ適応技術の統合手法の提案,言語処理学会第13回年次大会発表論文集,言語処理学会,2007年03月19日,pp.1018~1021 |
| 樋口 真介,Webを利用した連想単語及びモダリティ表現による雑談システム,言語処理学会第14回年次大会発表論文集,言語処理学会,2008年03月17日,pp.175~178 |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2019040574A (en) | 2019-03-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12153642B2 (en) | Automatic navigation of interactive web documents | |
| Bamman et al. | An annotated dataset of coreference in English literature | |
| CN110717017B (en) | Method for processing corpus | |
| JP7058438B2 (en) | Dialogue response system, model learning device and dialogue device | |
| Hausser et al. | Foundations of computational linguistics | |
| Pesina et al. | Words Functioning in Lexicon | |
| US20200183928A1 (en) | System and Method for Rule-Based Conversational User Interface | |
| Esmaeilzadeh et al. | Neural abstractive text summarization and fake news detection | |
| CN113569932A (en) | An Image Description Generation Method Based on Text Hierarchy | |
| US12361296B2 (en) | Environment augmentation based on individualized knowledge graphs | |
| Rastgoo et al. | All you need in sign language production | |
| Yuan et al. | Abstractive dialog summarization with semantic scaffolds | |
| KR101929509B1 (en) | Device and method for composing morpheme | |
| Cakir et al. | Modified query expansion through generative adversarial networks for information extraction in e-commerce | |
| Stringer et al. | Non-native speech recognition sentences: A new materials set for non-native speech perception research | |
| Su et al. | Efficient visual metaphor image generation based on metaphor understanding | |
| Morrissey et al. | Building a Sign Language corpus for use in Machine Translation | |
| CN116244414A (en) | A question-and-answer interaction method and device combined with user behavior data | |
| KR20240074062A (en) | Apparatus and method for generating academic guidance language model, and apparatus for recommending academic guidance information | |
| Naqvi et al. | Deep neural combinational model (DNCM): Digital image descriptor for child’s independent learning | |
| WO2019039375A1 (en) | Dialog response system, model training device, and dialog device | |
| Wang et al. | A review of knowledge-grounded dialogue systems | |
| Wu et al. | Lexical Ontological Semantics | |
| Sharma et al. | Cyclegen: Cyclic consistency based product review generator from attributes | |
| Choi et al. | Intelligent Human Computer Interaction: 15th International Conference, IHCI 2023, Daegu, South Korea, November 8–10, 2023, Revised Selected Papers, Part I |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200925 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20211124 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220118 |
|
| 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: 20220315 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220405 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7058438 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |