JP7224278B2 - Apparatus, program and method for estimating response sentence to user's utterance sentence - Google Patents
Apparatus, program and method for estimating response sentence to user's utterance sentence Download PDFInfo
- Publication number
- JP7224278B2 JP7224278B2 JP2019221898A JP2019221898A JP7224278B2 JP 7224278 B2 JP7224278 B2 JP 7224278B2 JP 2019221898 A JP2019221898 A JP 2019221898A JP 2019221898 A JP2019221898 A JP 2019221898A JP 7224278 B2 JP7224278 B2 JP 7224278B2
- Authority
- JP
- Japan
- Prior art keywords
- sentence
- utterance
- response
- machine learning
- causal relationship
- 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
- Machine Translation (AREA)
Description
本発明は、ユーザと自然な対話を実現する対話装置の技術に関する。 TECHNICAL FIELD The present invention relates to technology of a dialogue device that realizes natural dialogue with a user.
近年、ユーザとの対話装置として、スマートフォン又はタブレットのみならず、「Google Home(登録商標)」「Amazon Echo(登録商標)」のようなスマートスピーカや、「SOTA(登録商標)」「ユニボー(登録商標)」のようなロボット(以下「端末」と称す)が用いられてきている。端末は、ユーザインタフェース機能し、ユーザの発話音声を、サーバとしての対話装置へ送信する。
対話装置は、その発話文に対して自然な対話となる応答文を推定し、その応答文を端末へ返信する。
そして、端末は、その応答文を音声又はテキストによって、ユーザへ返答する。
このような対話システムとしては、例えば「Siri(登録商標)」や「しゃべってコンシェル(登録商標)」がある。
In recent years, not only smartphones and tablets but also smart speakers such as "Google Home (registered trademark)" and "Amazon Echo (registered trademark)" have been used as interactive devices with users, as well as "SOTA (registered trademark)" and "Unibo (registered trademark)". (trademark)” (hereinafter referred to as “terminal”) have been used. The terminal functions as a user interface and transmits the user's uttered voice to the interactive device as a server.
The dialogue device estimates a response sentence that will be a natural dialogue for the utterance sentence, and returns the response sentence to the terminal.
Then, the terminal replies the response sentence to the user by voice or text.
Examples of such dialogue systems include "Siri (registered trademark)" and "Talking Concier (registered trademark)."
従来、発話文に対して因果関係を持つ応答文を生成し、自然な対話を実現する技術がある(例えば非特許文献1参照)。この技術によれば、因果関係を持つ単語ペア辞書を予め構築し、発話文と因果関係を持つ応答文を優先的に選択する(リランキング応答生成)ことができる。具体的には、ユーザの発話文の単語と応答文の単語とをペアとして、単語ペア辞書を照合する。照合一致(単語ペア辞書に当該単語ペアが存在)した際に、因果関係があると判定し、この応答文を優先的に選択する。
非特許文献1によれば、例えば以下の文章に対して、因果関係ペアを抽出して学習することができる。
「円安になったため、貿易の視点から見ると日本の景気が上昇することが期待できる」
:因果関係ペア{(円安になる)->(景気が上昇)}
Conventionally, there is a technique of generating a response sentence having a causal relationship with an uttered sentence and realizing a natural dialogue (for example, see Non-Patent Document 1). According to this technique, a word pair dictionary having a causal relationship can be constructed in advance, and a response sentence having a causal relationship with an utterance sentence can be preferentially selected (reranking response generation). Specifically, a word in the user's utterance sentence and a word in the response sentence are paired with a word pair dictionary. When matching is achieved (the word pair exists in the word pair dictionary), it is determined that there is a causal relationship, and this response sentence is preferentially selected.
According to
“Since the yen has weakened, we can expect the Japanese economy to rise from a trade perspective.”
: Causality pair {(yen depreciation) -> (economy rise)}
また、大規模な対話コーパスから因果関係を持つ対話データ(発話文及び応答文)のみを用いて、学習モデルを作成する技術もある(例えば非特許文献2参照)。 There is also a technique for creating a learning model using only dialogue data (utterance sentences and response sentences) having a causal relationship from a large-scale dialogue corpus (see, for example, Non-Patent Document 2).
非特許文献1に記載の技術によれば、学習時には、単語ペアのみを照合するために、その単語ペア以外の文脈の特徴量を全く考慮してない。前述の例によれば、因果関係ペア{(円安になる)->(景気が上昇)}には、「貿易の視点」や「日本」のような制限となる特徴量が、全く含まれないこととなる。
また、運用時には、実際のユーザの発話文に対して、予め学習された因果関係ペアが完全一致で照合しないと、リランキング(最適な応答結果の再選定)を実現できないという問題もある。
According to the technique described in
In addition, during operation, there is also the problem that reranking (reselection of the optimum response result) cannot be realized unless causality pairs that have been learned in advance are completely matched against actual user utterances.
非特許文献2に記載の技術によれば、因果関係を持つ対話データ(発話文及び応答文)のみを用いて学習モデルを作成するために、教師データとなる対話データに依存しすぎてしまう。これは、教師データの量のみならず、ユーザの発話文に対する応答文としての多様性や汎用性が乏しいという問題もある。
According to the technique described in Non-Patent
そこで、本発明は、教師データとしての対話コーパスに依存しすぎることなく、ユーザの発話文に対して、できる限り因果関係を考慮した応答文を推定する装置、プログラム及び方法を提供することを目的とする。 SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to provide an apparatus, a program, and a method for estimating a response sentence that considers causal relationships as much as possible with respect to a user's utterance sentence without relying too much on a dialogue corpus as training data. and
本発明によれば、ユーザの発話文に対する応答文を生成する対話装置に搭載されたコンピュータを機能させるプログラムにおいて、
学習時に、
文章中の前後を因果関係で接続する接続助詞を登録した接続助詞テーブルと、
第1の教師データとなる学習文章の群から、接続助詞テーブルに登録された接続助詞を含む学習文章を選別する学習文章選別手段と、
接続助詞を含む学習文章を因果関係有りとして学習する分類型の第1の機械学習エンジンと、
第2の教師データとなる対話コーパスの対となる発話文及び応答文を、第1の機械学習エンジンへ入力し、因果関係有りと推定された発話文及び応答文を選別する発話応答文章選別手段と、
因果関係有りと推定された発話文をエンコーダ側に入力し、応答文をデコーダ側に入力して学習する第2の機械学習エンジンと
して機能させ、
運用時に、
ユーザの発話文を第2の機械学習エンジンへ入力し、応答文を取得する対話手段と
してコンピュータを機能させることを特徴とする。
According to the present invention, in a program that causes a computer installed in a dialogue device to generate a response sentence to a user's utterance sentence,
when learning,
a conjunctive particle table in which conjunctive particles that connect the preceding and following sentences in a causal relationship are registered;
learning sentence selection means for selecting learning sentences containing the conjunction particles registered in the conjunction particle table from the group of learning sentences serving as the first training data;
a classification-type first machine learning engine that learns learning sentences containing conjunctive particles as having a causal relationship;
Utterance response sentence selection means for inputting an utterance sentence and a response sentence paired in a dialogue corpus as second training data to a first machine learning engine and selecting an utterance sentence and a response sentence presumed to have a causal relationship. and,
Functioning as a second machine learning engine that inputs an utterance sentence estimated to have a causal relationship to the encoder side and inputs a response sentence to the decoder side for learning,
During operation,
It is characterized by inputting a user's uttered sentence to the second machine learning engine and causing the computer to function as interactive means for obtaining a response sentence.
本発明のプログラムにおける他の実施形態によれば、
運用時に、
対話手段から入力されたユーザの発話文と、当該発話文を第2の機械学習エンジンへ入力して取得された応答文と、を接続した発話応答文章を生成する発話応答文章生成手段と、
生成された発話応答文章を、第1の機械学習エンジンへ入力することによって因果関係の有無を推定し、因果関係有りと推定された当該発話応答文章の応答文を対話手段へ出力する因果関係推定手段と
して更にコンピュータを機能させることも好ましい。
According to another embodiment of the program of the present invention,
During operation,
an utterance response sentence generation means for generating an utterance response sentence by connecting a user utterance sentence input from the dialogue means and a response sentence obtained by inputting the utterance sentence to a second machine learning engine;
Presence or absence of a causal relationship is estimated by inputting the generated utterance response text into a first machine learning engine, and a causal relationship in which a response sentence of the utterance response text presumed to have a causal relationship is output to the dialogue means. It is also preferable to have a computer further function as the estimation means.
本発明のプログラムにおける他の実施形態によれば、
第1の機械学習エンジンは、因果関係有りとなる文章全体の表現の特徴を抽出可能な分類型のニューラルネットワークであり、
第2の機械学習エンジンは、因果関係有りとなる発話文及び応答文の間の特徴を抽出可能なSeq2Seqである
ようにコンピュータを機能させることも好ましい。
According to another embodiment of the program of the present invention,
The first machine learning engine is a categorical neural network capable of extracting the characteristics of the entire sentence that has a causal relationship,
The second machine learning engine also preferably functions as a Seq2Seq capable of extracting features between the causal utterance sentence and the response sentence.
本発明のプログラムにおける他の実施形態によれば、
学習時に、
第2の教師データとなる対話コーパスの対となる発話文及び応答文について、発話文をエンコーダ側に入力し、応答文をデコーダ側に入力して学習する第3の機械学習エンジンと
して機能させ、
運用時に、
因果関係推定手段は、第1の機械学習エンジンによって因果関係無しと推定された際に、発話応答文章の発話文を第3の機械学習エンジンへ入力して取得した応答文を、対話手段へ出力する
ようにコンピュータを機能させることも好ましい。
According to another embodiment of the program of the present invention,
when learning,
Functioning as a third machine learning engine for learning by inputting the utterance sentence to the encoder side and inputting the response sentence to the decoder side for the utterance sentence and the response sentence that are paired in the dialogue corpus as the second training data,
During operation,
When the first machine learning engine estimates that there is no causal relationship, the causality estimating means inputs the utterance sentence of the utterance response sentence to the third machine learning engine and outputs the obtained response sentence to the dialogue means. It is also preferred to have the computer function to do so.
本発明のプログラムにおける他の実施形態によれば、
第3の機械学習エンジンは、汎用的な発話文及び応答文の間の特徴を抽出可能なSeq2Seqである
ようにコンピュータを機能させることも好ましい。
According to another embodiment of the program of the present invention,
The third machine learning engine also preferably functions as a Seq2Seq capable of extracting features between generic utterance sentences and response sentences.
本発明によれば、ユーザの発話文に対する応答文を生成する対話装置において、
学習時に、
文章中の前後を因果関係で接続する接続助詞を登録した接続助詞テーブルと、
第1の教師データとなる学習文章の群から、接続助詞テーブルに登録された接続助詞を含む学習文章を選別する学習文章選別手段と、
接続助詞を含む学習文章を因果関係有りとして学習する分類型の第1の機械学習エンジンと、
第2の教師データとなる対話コーパスの対となる発話文及び応答文を、第1の機械学習エンジンへ入力し、因果関係有りと推定された発話文及び応答文を選別する発話応答文章選別手段と、
因果関係有りと推定された発話文をエンコーダ側に入力し、応答文をデコーダ側に入力して学習する第2の機械学習エンジンと
して機能させ、
運用時に、
ユーザの発話文を第2の機械学習エンジンへ入力し、応答文を取得する対話手段と
を有することを特徴とする。
According to the present invention, in a dialogue device that generates a response sentence to a user's utterance sentence,
when learning,
a conjunctive particle table in which conjunctive particles that connect the preceding and following sentences in a causal relationship are registered;
learning sentence selection means for selecting learning sentences containing the conjunction particles registered in the conjunction particle table from the group of learning sentences serving as the first training data;
a classification-type first machine learning engine that learns learning sentences containing conjunctive particles as having a causal relationship;
Utterance response sentence selection means for inputting an utterance sentence and a response sentence paired in a dialogue corpus as second training data to a first machine learning engine and selecting an utterance sentence and a response sentence presumed to have a causal relationship. and,
Functioning as a second machine learning engine that inputs an utterance sentence estimated to have a causal relationship to the encoder side and inputs a response sentence to the decoder side for learning,
During operation,
and dialogue means for inputting a user's utterance sentence to a second machine learning engine and acquiring a response sentence.
本発明によれば、ユーザの発話文に対する応答文を生成する装置の対話方法において、
装置は、
学習時に、
文章中の前後を因果関係で接続する接続助詞を登録した接続助詞テーブルと、
第1の教師データとなる学習文章の群から、接続助詞テーブルに登録された接続助詞を含む学習文章を選別し、接続助詞を含む学習文章を因果関係有りとして学習する分類型の第1の機械学習エンジンと、
第2の教師データとなる対話コーパスの対となる発話文及び応答文を、第1の機械学習エンジンへ入力し、因果関係有りと推定された発話文及び応答文を選別し、因果関係有りと推定された発話文をエンコーダ側に入力し、応答文をデコーダ側に入力して学習する第2の機械学習エンジンと
を有し、
運用時に、
ユーザの発話文を第2の機械学習エンジンへ入力し、応答文を取得する
ように実行することを特徴とする。
According to the present invention, in the dialogue method for a device that generates a response sentence to a user's utterance sentence,
The device
when learning,
a conjunctive particle table in which conjunctive particles that connect the preceding and following sentences in a causal relationship are registered;
A classification-type first machine that selects learning sentences containing a conjunction particle registered in a conjunction particle table from a group of learning sentences serving as first teacher data, and learns the learning sentences containing the conjunction particles as having a causal relationship. a learning engine;
A pair of utterance sentences and response sentences in the dialogue corpus, which serves as second training data, is input to the first machine learning engine, and utterance sentences and response sentences that are presumed to have a causal relationship are selected, and judged to have a causal relationship. a second machine learning engine that inputs the estimated utterance sentence to the encoder side and inputs the response sentence to the decoder side for learning;
During operation,
It is characterized by inputting a user's uttered sentence to a second machine learning engine and executing so as to obtain a response sentence.
本発明の対話装置、プログラム及び方法によれば、教師データとしての対話コーパスに依存しすぎることなく、ユーザの発話文に対して、できる限り因果関係を考慮した応答文を推定することができる。 According to the dialogue apparatus, program, and method of the present invention, it is possible to estimate a response sentence that considers causal relationships as much as possible with respect to a user's utterance sentence without relying too much on a dialogue corpus as teacher data.
以下、本発明の実施の形態について、図面を用いて詳細に説明する。 BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
図1は、本発明における対話装置の機能構成図である。 FIG. 1 is a functional configuration diagram of a dialogue device according to the present invention.
対話装置1は、ユーザとの間で、自然な対話を実現するものであり、ユーザの発話文に対する応答文を生成する。
図1によれば、サーバ機能を有する対話装置1は、ユーザインタフェース機能を有する端末2と通信する。端末2は、ユーザに対する入出力デバイスとして、マイクによってユーザの音声を取得し、スピーカによってユーザへ発声するものであってもよいし、ユーザからテキストベースの発話文を入力し、応答文を表示するものであってもよい。
尚、音声認識機能は、対話装置1に搭載されたものであってもよいし、端末2に搭載されていてもよい。
The
According to FIG. 1, a
The speech recognition function may be installed in the
本発明によれば、対話装置1は、複数の機械学習エンジンを搭載しており、<学習時>及び<運用時>に分けられる。また、対話装置1は、機械学習エンジンに対して、学習時に、複数の<教師データ>によって学習モデルを構築させる。
According to the present invention, the
<教師データ>
図1によれば、対話装置1は、教師データとして、接続助詞テーブル100と、第1の教師データ101と、第2の教師データ102とを有する。これら教師データは、対話装置1自らが記憶しておく必要はないが、学習時に外部から入力する必要がある。
<Teacher data>
According to FIG. 1, the
[接続助詞テーブル100]
接続助詞テーブル100は、文章中の前後を因果関係で接続する接続助詞を登録したものである。「接続助詞」とは、前文と後文との間に因果関係を構築する助詞であり、因果関係の手がかりとなるものである。
例えば、以下のような助詞がある。
「~ため、~」「~から、~」「~により、~」「~によって、~」
「~を背景に、~」「~を受け、~」「~の結果、~」「~をきっかけに、~」
「~の影響、~」「~の原因、~」「~を行うと、~」「~すれば、~」
「~しないと、~」「~に伴い、~」「~を反映し、~」
[Conjunctive particle table 100]
The conjunctive particle table 100 registers conjunctive particles that connect sentences before and after in a causal relationship. A "conjunctive particle" is a particle that builds a causal relationship between a preamble and a postscript, and serves as a clue to the causal relationship.
For example, there are adjectives such as:
"Because of,""From,""Becauseof,""Becauseof,"
``In the background of ``, ``In response to ``, ``As a result of ``, ``In the wake of ``,
"Influence of""Causeof""If you do""If you do"
"If you don't,""In line with,""Reflecting,"
[第1の教師データ101]
第1の教師データ101は、インターネット上で、自然言語の文章を構造化して大規模に集積した大量のコーパスである。これは、例えばウィキペディア(Wikipedia)(登録商標)のような百科事典であって、自然言語として正当な文章群である。
例えば、以下のような文章があるとする。
「子供が熱を出したため、学校を休んだ」
[First teacher data 101]
The
For example, suppose we have the following sentences:
"I was absent from school because my child had a fever."
[第2の教師データ102]
第2の教師データ102は、発話文と応答文とからなる対話ログの群である。これは、人の対話認識として正当な文章群である。
例えば以下のような文章があるとする。
発話文「子供が熱を出した」
応答文「学校を休んでください」
[Second teacher data 102]
The
For example, suppose we have the following sentences:
Utterance sentence "My child has a fever."
Response sentence "Please take a break from school"
<学習時>
対話装置1は、学習時の機能部として、学習文章選別部11と、第1の機械学習エンジン12と、発話応答文章選別部13と、第2の機械学習エンジン14と、第3の機械学習エンジン15とを有する。これら機能構成部は、装置に搭載されたコンピュータを機能させるプログラムを実行することによって実現される。また、これら機能構成部の処理の流れは、対話装置の学習方法としても理解できる。
<When learning>
The
図2は、第1の機械学習エンジン及び第2の機械学習エンジンの学習を表す説明図である。 FIG. 2 is an explanatory diagram showing learning of the first machine learning engine and the second machine learning engine.
[学習文章選別部11]
学習文章選別部11は、第1の教師データ101となる学習文章の群から、接続助詞テーブル100に登録された「接続助詞」を含む学習文章を選別する。これによって、接続助詞を含む学習文章から、接続助詞を削除して連結した学習文章のみが、第1の機械学習エンジン12へ入力される。
図2によれば、以下の学習文章が、第1の機械学習エンジン12へ入力される。
第1の教師データ 「子供が熱を出した{ため}、学校を休んだ」
入力される学習文章「子供が熱を出した、学校を休んだ」
[Learning text selection unit 11]
The learning
According to FIG. 2, the following training text is input to the first machine learning engine 12:
1st teacher data: "I was absent from school because my child had a fever."
Learning sentence to be input "My child had a fever and was absent from school"
[第1の機械学習エンジン12]
第1の機械学習エンジン12は、学習文章選別部11から入力された学習文章に対して、形態素分析によって形態素に区分した上で、「因果関係有り」として学習する。
[First Machine Learning Engine 12]
The first
図3は、第1の機械学習エンジンの概略的な機能構成図である。
図3によれば、第1の機械学習エンジン12は、分類型のニューラルネットワークである。
第1の機械学習エンジン12は、学習時には、因果関係有りとなる文章全体の表現の特徴を網羅的に抽出した深層学習モデルを構築する。
そして、第1の機械学習エンジン12は、運用時には、因果関係が不明な発話応答文章を入力すると、形態素分析によって形態素に区分した上で、因果関係有り又は無しに分類した結果を出力する。
FIG. 3 is a schematic functional configuration diagram of the first machine learning engine.
According to FIG. 3, the first
At the time of learning, the first
During operation, the first
[発話応答文章選別部13]
発話応答文章選別部13は、第2の教師データ102となる対話コーパスの対となる発話文及び応答文を、第1の機械学習エンジン12へ入力する。対となる発話文及び応答文は、そのまま接続された発話応答文章として、第1の機械学習エンジン12へ入力される。
[Utterance Response Sentence Selection Unit 13]
The utterance response
図2によれば、発話応答文章選別部13は、以下の発話応答文章を、第1の機械学習エンジン12へ出力している。
発話応答文章「子供が熱を出した、仕事を休んでください」
これに対し、第1の機械学習エンジン12は、その発話応答文章に対して、因果関係有り又は無しの結果を、発話応答文章選別部13へ返答する。
そして、発話応答文章選別部13は、「因果関係有り」と推定された発話文及び応答文のみを、第2の機械学習エンジン14へ出力する。
発話文「子供が熱を出した」
応答文「学校を休んでください」
According to FIG. 2, the speech response
Spoken Response Sentence "My child has a fever, please take a day off from work."
In response to this, the first
Then, the utterance response
Utterance sentence "My child has a fever."
Response sentence "Please take a break from school"
[第2の機械学習エンジン14]
第2の機械学習エンジン14は、因果関係有りと推定された発話文を、形態素分析によって形態素に区分した上でエンコーダ側に入力し、応答文を、形態素分析によって形態素に区分した上でデコーダ側に入力して学習する。
[Second machine learning engine 14]
The second
図4は、第2の機械学習エンジン及び第3の機械学習エンジンの概略的な機能構成図である。
図4によれば、第2の機械学習エンジン14は、具体的には、因果関係有りとなる発話文及び応答文の間の特徴を抽出可能なSeq2Seqであってもよいし、seq2seq+attentionやtransformのような改良モデルであってもよい。
seq2seqは、形態素文字列を入力して、別の形態素文字列を出力する置き換えルールを学習するニューラルネットワークである。これによって、発話文に対して1セットの応答文を学習していく。勿論、文字列の依存関係を学習可能なRNN(Recurrent Neural Network)の一種である例えばLSTM(Long Short-Term Memory)であってもよい。
これによって、第2の機械学習エンジン14は、エンコーダ側に発話文が入力されると、デコーダ側から応答文が出力されるようになる。
FIG. 4 is a schematic functional configuration diagram of the second machine learning engine and the third machine learning engine.
According to FIG. 4, the second
seq2seq is a neural network that learns replacement rules for inputting a morpheme string and outputting another morpheme string. In this way, one set of response sentences is learned for each utterance sentence. Of course, for example, LSTM (Long Short-Term Memory), which is a type of RNN (Recurrent Neural Network) capable of learning the dependency relationship of character strings, may be used.
As a result, the second
[第3の機械学習エンジン15]
第3の機械学習エンジン15は、第2の教師データ102となる対話コーパスの対となる発話文及び応答文について、発話文を、形態素分析によって形態素に区分した上でエンコーダ側に入力し、応答文を、形態素分析によって形態素に区分した上でデコーダ側に入力して学習する。
即ち、第3の機械学習エンジン15は、第2の機械学習エンジン14と異なって、因果関係に限らず、全ての第2の教師データ102について、汎用的に発話文及び応答文の関係の特徴を学習する。
一方で、第3の機械学習エンジン15は、第2の機械学習エンジン14と同様に、発話文及び応答文の間の特徴を抽出可能なSeq2Seqであってもよいし、seq2seq+attentionやtransformのような改良モデルであってもよい。
これによって、第3の機械学習エンジン15は、エンコーダ側に発話文が入力されると、デコーダ側から応答文が出力されるようになる。
[Third Machine Learning Engine 15]
The third
In other words, unlike the second
On the other hand, the third
As a result, when the speech sentence is input to the encoder side, the third
<運用時>
[対話部16]
対話装置1は、運用時の機能部として、対話部16を有する。
<During operation>
[Dialogue part 16]
The
対話部16は、ユーザの発話文を端末2から受信し、その発話文を第2の機械学習エンジン14へ出力する。そして、第2の機械学習エンジン14から応答文を取得し、その応答文を端末2へ送信する。端末2のユーザインタフェース機能が、キー入力可能であってディスプレイ表示可能であれば、対話部16は、発話文及び応答文はテキストベースで、端末2との間で送受信することができる。
The
対話部16は、端末2のユーザインタフェース機能に応じて、ユーザの発話音声の音声認識機能、及び、ユーザへの応答文の音声変換機能を有するものであってもよい。音声認識機能は、端末2のマイクによって取得されたユーザの発話音声を、テキストベースの発話文に変換する。音声変換機能は、第2の機械学習エンジン14から取得した応答文を、音声信号に変換する。
この場合、対話部16は、ユーザの発話音声データを端末2から受信し、その発話音声データをテキストの発話文に変換し、その発話文を第2の機械学習エンジン14へ入力する。また、第2の機械学習エンジン14から応答文を入力し、その応答文を音声データに変換し、その音声データを端末2へ送信する。
The
In this case, the
図5は、第2の実施形態における運用時の対話装置の第2の機能構成図である。 FIG. 5 is a second functional configuration diagram of the interactive device during operation according to the second embodiment.
前述した図2によれば、対話部16は、第2の機械学習エンジン14のみを用いて、発話文に対する応答文を取得する。
これに対し、図5によれば、対話装置1は、第1の機械学習エンジン12及び第2の機械学習エンジン14を用いて、運用時の機能部として、対話部16に加えて、発話応答文章生成部17と、因果関係推定部18とを有する。これら機能構成部も、装置に搭載されたコンピュータを機能させるプログラムを実行することによって実現される。また、これら機能構成部の処理の流れは、対話装置の運用方法としても理解できる。
According to FIG. 2 described above, the
On the other hand, according to FIG. 5, the
図6は、第2の実施形態における運用時の対話を表す説明図である。 FIG. 6 is an explanatory diagram showing dialogue during operation in the second embodiment.
[発話応答文章生成部17]
発話応答文章生成部17は、対話部16から入力されたユーザの発話文と、当該発話文を第2の機械学習エンジン14へ入力して取得された応答文と、を接続した発話応答文章を生成する。
[Utterance Response Sentence Generation Unit 17]
The utterance response
図6によれば、対話部16は、端末2から以下の発話文を受信したとする。
発話文「子供が熱を出した」
対話部16は、この発話文を、発話応答文章生成部17へ入力する。
発話応答文章生成部17は、入力された以下の発話文を、第2の機械学習エンジン14へ入力する。
発話文「子供が熱を出した」
これに対し、第2の機械学習エンジン14は、発話文に対する応答文を推定し、以下の応答文を返答する。
応答文「仕事を休んでください」
これに対し、発話応答文章生成部17は、発話文と応答文とを接続して、以下の発話応答文章を生成する。
発話応答文章「子供が熱を出した、仕事を休んでください」
この発話応答文章は、因果関係推定部18へ入力される。
According to FIG. 6, it is assumed that the
Utterance sentence "My child has a fever."
The
The utterance response
Utterance sentence "My child has a fever."
In response to this, the second
Response sentence "Please take a break from work"
On the other hand, the utterance response
Spoken Response Sentence "My child has a fever, please take a day off from work."
This speech response text is input to the
[因果関係推定部18]
因果関係推定部18は、生成された発話応答文章を、第1の機械学習エンジン12へ入力することによって因果関係の有無を推定し、因果関係有りと推定された当該発話応答文章の応答文を、対話部16へ出力する。
[Causal relationship estimation unit 18]
The causal
図6によれば、因果関係推定部18は、発話応答文章生成部17から入力された発話応答文章を、第1の機械学習エンジン12へ入力する。
発話応答文章「子供が熱を出した、仕事を休んでください」
これに対し、第1の機械学習エンジン12は、因果関係の有無を推定し、ここでは、因果関係有りが、因果関係推定部18へ出力される。
このとき、因果関係推定部18は、因果関係有りであるので、発話応答文章の応答文を、対話部16へ出力する。
応答文「仕事を休んでください」
これによって、対話部16は、その応答文を端末2へ送信する。
According to FIG. 6 , the causal
Spoken Response Sentence "My child has a fever, please take a day off from work."
On the other hand, the first
At this time, since there is a causal relationship, the causal
Response sentence "Please take a break from work"
By this, the
図7は、第3の実施形態における運用時の対話装置の第2の機能構成図である。 FIG. 7 is a second functional block diagram of the interactive device during operation according to the third embodiment.
図7は、図5と比較して、第3の機械学習エンジン15を更に用いる。
因果関係推定部18は、第1の機械学習エンジン12によって「因果関係無し」と推定された発話応答文章における発話文を、第3の機械学習エンジン15へ入力する。
これに対し、第3の機械学習エンジン15は、その発話文に対して応答文を推定し、その応答文を、因果関係推定部18へ出力する。
そして、因果関係推定部18は、第3の機械学習エンジン15から出力された応答文を、対話部16へ出力する。
このように、因果関係推定部18は、発話文に対する応答文として、因果関係無しの場合であっても、汎用モデルとしての第3の機械学習エンジン15を用いて、多様性を持つ応答文を出力することができる。
FIG. 7 further uses a third
The
On the other hand, the third
The
In this way, the causal
図8は、第3の実施形態における運用時の対話を表す説明図である。 FIG. 8 is an explanatory diagram showing dialogue during operation in the third embodiment.
図8によれば、対話部16から発話応答文章生成部17へ、以下の発話文が入力されたとする。
発話文「子供が熱を出した」
これに対して、発話応答文章生成部17は、第2の機械学習エンジン14へ、その発話文を入力し、以下の応答文を得る。
応答文「仕事場で昼食をとった」
そして、発話応答文章生成部17は、発話文と応答文とを接続した、以下の発話応答文章を、因果関係推部18へ出力する。
発話応答文章「子供が熱を出した、仕事場で昼食をとった」
これに対して、因果関係推定部18は、第1の機械学習エンジン12へ、その発話応答文章を入力し、「因果関係無し」と推定されている。
これに対して、因果関係推定部18は、因果関係無しと推定された発話応答文章における以下の発話文を、第3の機械学習エンジン15へ入力する。
発話文「子供が熱を出した」
これに対し、因果関係推定部18は、第3の機械学習エンジン15から、以下の応答文を得る。
応答文「残業はしますか」
そして、因果関係推定部18は、その応答文を、対話部16へ出力する。
According to FIG. 8, it is assumed that the following utterance sentence is input from the
Utterance sentence "My child has a fever."
In response to this, the utterance response
Response sentence "I had lunch at work"
Then, the utterance response
Spoken Response Sentence "My child has a fever, I had lunch at work."
On the other hand, the
On the other hand, the causal
Utterance sentence "My child has a fever."
In response to this, the
Response sentence "Do you work overtime?"
The
以上、詳細に説明したように、本発明の対話装置、プログラム及び方法によれば、ユーザの発話文に対して、できる限り因果関係を考慮した応答文を推定することができる。
特に、本発明によれば、因果関係を持つ単語ペアのみならず、その周辺の単語群も含む文脈の全体表現の特徴を網羅的に学習しているために、発話文に対する応答文が、ユーザにとってできる限り自然に感じられるようになる。また、本発明によれば、因果関係の辞書に無い発話文であっても、因果関係が無い文についても網羅的に学習しているので、汎用的に応答文を返答することができる。
即ち、本発明によれば、文の全体表現の特徴を網羅的に学習することによって、発話文に対して因果関係有りであっても無しであっても、多様的且つ汎用的な応答文を返答することができる。
As described in detail above, according to the interactive device, program, and method of the present invention, it is possible to estimate a response sentence that considers causal relationships as much as possible with respect to a user's uttered sentence.
In particular, according to the present invention, since the characteristics of the overall expression of the context including not only word pairs with causal relationships but also word groups around them are comprehensively learned, the response sentence to the utterance sentence is the user's sentence. feels as natural as possible for In addition, according to the present invention, even sentences that do not have a causal relationship, even if they are not in the causal dictionary, are comprehensively learned, so that a response sentence can be returned in a general purpose manner.
That is, according to the present invention, by comprehensively learning the characteristics of the overall expression of a sentence, various and versatile response sentences can be generated regardless of whether or not there is a causal relationship with the utterance sentence. can reply.
最後に、従来技術の非特許文献1及び非特許文献2と、本発明との相違を表す、発話文及び応答文のサンプル例を説明する。
<発話文に対して因果関係が有る応答文>
(非特許文献1の場合)
発話文「円安になったね」
{(円安になる)->(景気が上昇)}という因果関係ペアの辞書を参照
応答文「景気が上昇するよ」
(本発明の場合)
{因果関係文脈全体の特徴を網羅的に学習済み}
発話文「円安になったね」
応答文「貿易の視点から見ると日本の景気が上昇することが期待できるよ」
Finally, sample examples of utterance sentences and response sentences showing the difference between the
<Response sentence with causal relationship to utterance sentence>
(In the case of Non-Patent Document 1)
Spoken text: "The yen has depreciated."
Refer to a dictionary of causality pairs {(the yen will depreciate) -> (the economy will rise)} Response sentence "The economy will rise."
(in the case of the present invention)
{Comprehensive learning of the features of the entire causal context}
Spoken text: "The yen has depreciated."
Response: "From the perspective of trade, we can expect the Japanese economy to rise."
<発話文に対して因果関係が無い応答文>
(非特許文献2の場合)
発話文「レストランへ行きたい」
{因果関係の辞書が無いために、相槌のみ}
応答文「そうですか」
(本発明の場合)
{因果関係文脈全体の特徴を網羅的に学習済み}
発話文「円安になったね」
応答文「いつも外食ですか?」
<Response sentence with no causal relationship to the utterance sentence>
(In the case of Non-Patent Document 2)
Utterance sentence "I want to go to a restaurant"
{only backtracking due to lack of causality dictionary}
Response sentence "Is that so?"
(in the case of the present invention)
{Comprehensive learning of the features of the entire causal context}
Spoken text: "The yen has depreciated."
Response sentence "Do you always eat out?"
前述した本発明の種々の実施形態について、本発明の技術思想及び見地の範囲の種々の変更、修正及び省略は、当業者によれば容易に行うことができる。前述の説明はあくまで例であって、何ら制約しようとするものではない。本発明は、特許請求の範囲及びその均等物として限定するものにのみ制約される。 For the various embodiments of the present invention described above, various changes, modifications and omissions within the spirit and scope of the present invention can be easily made by those skilled in the art. The foregoing description is exemplary only and is not intended to be limiting. The invention is to be limited only as limited by the claims and the equivalents thereof.
1 対話装置
100 接続助詞テーブル
101 第1の教師データ
102 第2の教師データ
11 学習文章選別部
12 第1の機械学習エンジン
13 発話応答文章選別部
14 第2の機械学習エンジン
15 第3の機械学習エンジン
16 対話部
17 発話応答文章生成部
18 因果関係推定部
2 端末
1
Claims (7)
学習時に、
文章中の前後を因果関係で接続する接続助詞を登録した接続助詞テーブルと、
第1の教師データとなる学習文章の群から、接続助詞テーブルに登録された接続助詞を含む学習文章を選別する学習文章選別手段と、
接続助詞を含む学習文章を因果関係有りとして学習する分類型の第1の機械学習エンジンと、
第2の教師データとなる対話コーパスの対となる発話文及び応答文を、第1の機械学習エンジンへ入力し、因果関係有りと推定された発話文及び応答文を選別する発話応答文章選別手段と、
因果関係有りと推定された発話文をエンコーダ側に入力し、応答文をデコーダ側に入力して学習する第2の機械学習エンジンと
して機能させ、
運用時に、
ユーザの発話文を第2の機械学習エンジンへ入力し、応答文を取得する対話手段と
してコンピュータを機能させることを特徴とするプログラム。 In a program that operates a computer installed in a dialogue device that generates a response sentence to a user's utterance sentence,
when learning,
a conjunctive particle table in which conjunctive particles that connect the preceding and following sentences in a causal relationship are registered;
learning sentence selection means for selecting learning sentences containing the conjunction particles registered in the conjunction particle table from the group of learning sentences serving as the first training data;
a classification-type first machine learning engine that learns learning sentences containing conjunctive particles as having a causal relationship;
Utterance response sentence selection means for inputting an utterance sentence and a response sentence paired in a dialogue corpus as second training data to a first machine learning engine and selecting an utterance sentence and a response sentence presumed to have a causal relationship. and,
Functioning as a second machine learning engine that inputs an utterance sentence estimated to have a causal relationship to the encoder side and inputs a response sentence to the decoder side for learning,
During operation,
A program characterized by inputting a user's utterance sentence to a second machine learning engine and causing a computer to function as dialogue means for obtaining a response sentence.
対話手段から入力されたユーザの発話文と、当該発話文を第2の機械学習エンジンへ入力して取得された応答文と、を接続した発話応答文章を生成する発話応答文章生成手段と、
生成された発話応答文章を、第1の機械学習エンジンへ入力することによって因果関係の有無を推定し、因果関係有りと推定された当該発話応答文章の応答文を対話手段へ出力する因果関係推定手段と
して更にコンピュータを機能させることを特徴とする請求項1に記載のプログラム。 During operation,
an utterance response sentence generation means for generating an utterance response sentence by connecting a user utterance sentence input from the dialogue means and a response sentence obtained by inputting the utterance sentence to a second machine learning engine;
Presence or absence of a causal relationship is estimated by inputting the generated utterance response text into a first machine learning engine, and a causal relationship in which a response sentence of the utterance response text presumed to have a causal relationship is output to the dialogue means. 2. The program according to claim 1, further causing a computer to function as estimation means.
第2の機械学習エンジンは、因果関係有りとなる発話文及び応答文の間の特徴を抽出可能なSeq2Seqである
ようにコンピュータを機能させることを特徴とする請求項1又は2に記載のプログラム。 The first machine learning engine is a categorical neural network capable of extracting the characteristics of the entire sentence that has a causal relationship,
3. The program according to claim 1, wherein the second machine learning engine causes the computer to function as a Seq2Seq capable of extracting features between an utterance sentence and a response sentence that have a causal relationship.
第2の教師データとなる対話コーパスの対となる発話文及び応答文について、発話文をエンコーダ側に入力し、応答文をデコーダ側に入力して学習する第3の機械学習エンジンと
して機能させ、
運用時に、
因果関係推定手段は、第1の機械学習エンジンによって因果関係無しと推定された際に、発話応答文章の発話文を第3の機械学習エンジンへ入力して取得した応答文を、対話手段へ出力する
ようにコンピュータを機能させることを特徴とする請求項2に記載のプログラム。 when learning,
Functioning as a third machine learning engine for learning by inputting the utterance sentence to the encoder side and inputting the response sentence to the decoder side for the utterance sentence and the response sentence that are paired in the dialogue corpus as the second training data,
During operation,
When the first machine learning engine estimates that there is no causal relationship, the causality estimating means inputs the utterance sentence of the utterance response sentence to the third machine learning engine and outputs the obtained response sentence to the dialogue means. 3. A program according to claim 2 , which causes a computer to function to do.
第2の機械学習エンジンは、因果関係有りとなる発話文及び応答文の間の特徴を抽出可能なSeq2Seqであり、
第3の機械学習エンジンは、汎用的な発話文及び応答文の間の特徴を抽出可能なSeq2Seqである
ようにコンピュータを機能させることを特徴とする請求項4に記載のプログラム。 The first machine learning engine is a categorical neural network capable of extracting the characteristics of the entire sentence that has a causal relationship,
The second machine learning engine is Seq2Seq that can extract features between utterance sentences and response sentences that have a causal relationship,
5. The program according to claim 4, wherein the third machine learning engine causes the computer to function as a Seq2Seq capable of extracting features between generic utterance sentences and response sentences.
学習時に、
文章中の前後を因果関係で接続する接続助詞を登録した接続助詞テーブルと、
第1の教師データとなる学習文章の群から、接続助詞テーブルに登録された接続助詞を含む学習文章を選別する学習文章選別手段と、
接続助詞を含む学習文章を因果関係有りとして学習する分類型の第1の機械学習エンジンと、
第2の教師データとなる対話コーパスの対となる発話文及び応答文を、第1の機械学習エンジンへ入力し、因果関係有りと推定された発話文及び応答文を選別する発話応答文章選別手段と、
因果関係有りと推定された発話文をエンコーダ側に入力し、応答文をデコーダ側に入力して学習する第2の機械学習エンジンと
して機能させ、
運用時に、
ユーザの発話文を第2の機械学習エンジンへ入力し、応答文を取得する対話手段と
を有することを特徴とする対話装置。 In a dialogue device that generates a response sentence to a user's utterance sentence,
when learning,
a conjunctive particle table in which conjunctive particles that connect the preceding and following sentences in a causal relationship are registered;
learning sentence selection means for selecting learning sentences containing the conjunction particles registered in the conjunction particle table from the group of learning sentences serving as the first training data;
a classification-type first machine learning engine that learns learning sentences containing conjunctive particles as having a causal relationship;
Utterance response sentence selection means for inputting an utterance sentence and a response sentence paired in a dialogue corpus as second training data to a first machine learning engine and selecting an utterance sentence and a response sentence presumed to have a causal relationship. and,
Functioning as a second machine learning engine that inputs an utterance sentence estimated to have a causal relationship to the encoder side and inputs a response sentence to the decoder side for learning,
During operation,
1. A dialogue device, comprising dialogue means for inputting a user's uttered sentence to a second machine learning engine and obtaining a response sentence.
装置は、
学習時に、
文章中の前後を因果関係で接続する接続助詞を登録した接続助詞テーブルと、
第1の教師データとなる学習文章の群から、接続助詞テーブルに登録された接続助詞を含む学習文章を選別し、接続助詞を含む学習文章を因果関係有りとして学習する分類型の第1の機械学習エンジンと、
第2の教師データとなる対話コーパスの対となる発話文及び応答文を、第1の機械学習エンジンへ入力し、因果関係有りと推定された発話文及び応答文を選別し、因果関係有りと推定された発話文をエンコーダ側に入力し、応答文をデコーダ側に入力して学習する第2の機械学習エンジンと
を有し、
運用時に、
ユーザの発話文を第2の機械学習エンジンへ入力し、応答文を取得する
ように実行することを特徴とする装置の対話方法。
In the interaction method for a device that generates a response sentence to a user's utterance sentence,
The device
when learning,
a conjunctive particle table in which conjunctive particles that connect the preceding and following sentences in a causal relationship are registered;
A classification-type first machine that selects learning sentences containing a conjunction particle registered in a conjunction particle table from a group of learning sentences serving as first teacher data, and learns the learning sentences containing the conjunction particles as having a causal relationship. a learning engine;
A pair of utterance sentences and response sentences in the dialogue corpus, which serves as second training data, is input to the first machine learning engine, and utterance sentences and response sentences that are presumed to have a causal relationship are selected, and judged to have a causal relationship. a second machine learning engine that inputs the estimated utterance sentence to the encoder side and inputs the response sentence to the decoder side for learning;
During operation,
A device interaction method, characterized by inputting a user's utterance sentence into a second machine learning engine and executing it so as to obtain a response sentence.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019221898A JP7224278B2 (en) | 2019-12-09 | 2019-12-09 | Apparatus, program and method for estimating response sentence to user's utterance sentence |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019221898A JP7224278B2 (en) | 2019-12-09 | 2019-12-09 | Apparatus, program and method for estimating response sentence to user's utterance sentence |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021092617A JP2021092617A (en) | 2021-06-17 |
JP7224278B2 true JP7224278B2 (en) | 2023-02-17 |
Family
ID=76312609
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019221898A Active JP7224278B2 (en) | 2019-12-09 | 2019-12-09 | Apparatus, program and method for estimating response sentence to user's utterance sentence |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7224278B2 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016156845A (en) | 2015-02-23 | 2016-09-01 | Kddi株式会社 | Interaction support program, server and method for supporting user operation with user interaction system |
-
2019
- 2019-12-09 JP JP2019221898A patent/JP7224278B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016156845A (en) | 2015-02-23 | 2016-09-01 | Kddi株式会社 | Interaction support program, server and method for supporting user operation with user interaction system |
Non-Patent Citations (1)
Title |
---|
佐藤祥多 他,"因果関係に基づくデータサンプリングを利用した雑談応答学習",言語処理学会第24回年次大会 発表論文集,2018年03月05日,pp.1219-1222 |
Also Published As
Publication number | Publication date |
---|---|
JP2021092617A (en) | 2021-06-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10936664B2 (en) | Dialogue system and computer program therefor | |
Nguyen et al. | NEU-chatbot: Chatbot for admission of National Economics University | |
CN104573099B (en) | The searching method and device of topic | |
JP6832501B2 (en) | Meaning generation method, meaning generation device and program | |
JP2013512461A (en) | Foreign language learning apparatus and dialogue system | |
CN112313647A (en) | CAPTCHA automatic assistant | |
CN110853626A (en) | Bidirectional attention neural network-based dialogue understanding method, device and equipment | |
US11270082B2 (en) | Hybrid natural language understanding | |
JP2009139390A (en) | Information processing system, processing method and program | |
US9653078B2 (en) | Response generation method, response generation apparatus, and response generation program | |
WO2020252935A1 (en) | Voiceprint verification method, apparatus and device, and storage medium | |
JP5612720B1 (en) | Dialog control learning apparatus, dialog control apparatus, method and program thereof | |
CN114981885A (en) | Alphanumeric sequence biasing for automatic speech recognition | |
JP2017091368A (en) | Paraphrase device, method, and program | |
JP7224278B2 (en) | Apparatus, program and method for estimating response sentence to user's utterance sentence | |
KR20210051523A (en) | Dialogue system by automatic domain classfication | |
Boza-Quispe et al. | A friendly speech user interface based on Google cloud platform to access a tourism semantic website | |
JP5718406B2 (en) | Utterance sentence generation device, dialogue apparatus, utterance sentence generation method, dialogue method, utterance sentence generation program, and dialogue program | |
JP7295828B2 (en) | Program, device, and method for estimating response sentences according to contextual causality during dialogue | |
Harsha et al. | Lexical Ambiguity in Natural Language Processing Applications | |
Suzuki et al. | Express emoticons choice method for smooth communication of e-business | |
JP5381211B2 (en) | Spoken dialogue apparatus and program | |
JP6985311B2 (en) | Dialogue implementation programs, devices and methods that control response utterance generation by aizuchi determination | |
JP7426919B2 (en) | Program, device and method for estimating causal terms from images | |
Chettiar et al. | Impersonated Human Speech Chatbot with Adaptive Frequency Spectrum |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20211116 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220926 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20221005 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20221007 |
|
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: 20230203 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230207 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7224278 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |