JP2010157081A - Response generation device and program - Google Patents
Response generation device and program Download PDFInfo
- Publication number
- JP2010157081A JP2010157081A JP2008334824A JP2008334824A JP2010157081A JP 2010157081 A JP2010157081 A JP 2010157081A JP 2008334824 A JP2008334824 A JP 2008334824A JP 2008334824 A JP2008334824 A JP 2008334824A JP 2010157081 A JP2010157081 A JP 2010157081A
- Authority
- JP
- Japan
- Prior art keywords
- sentence
- input
- response
- user
- input sentence
- 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.)
- Granted
Links
Images
Landscapes
- Machine Translation (AREA)
- Document Processing Apparatus (AREA)
Abstract
Description
本発明は、応答生成装置及びプログラムに係り、特に、ユーザと円滑な対話を行うための応答生成装置及びプログラムに関する。 The present invention relates to a response generation device and a program, and more particularly, to a response generation device and a program for performing a smooth dialogue with a user.
従来、入力されたユーザ発話から概念を抽出して、抽出した概念またはその関連語を用いた複数の応答文を生成し、予め定めた概念毎の「話題の豊富さ」及び「感情」に基づいて、生成された複数の応答文の中から優先度の高い応答文を決定して出力する応答生成装置が提案されている(例えば、特許文献1参照)。
しかしながら、上記の特許文献1の応答生成装置では、ユーザ発話に含まれる概念またはその関連語を用いて応答文を生成するため、異なる意図をもって発話されたものであっても、発話内容が同じ場合には同じ応答文が生成されることになり、自然な対話を行うことができない場合がある、という問題がある。例えば、以下の対話例1及び対話例2について、特許文献1の応答生成装置では、ユーザ発話2の「楽しかったよ」に基づいて、対話例1及び対話例2のいずれの場合も、例えば「楽しかったんだぁ」のような応答文が生成されることになる。
However, since the response generation device of
(対話例1)
ユーザ発話1:遊園地に行ったよ。
システム応答:どうだった?
ユーザ発話2:楽しかったよ。
(対話例2)
ユーザ発話1:雨の中の運動会だったよ。
システム応答:どうだった?
ユーザ発話2:楽しかったよ。
(Dialogue example 1)
User utterance 1: I went to an amusement park.
System response: How was it?
User utterance 2: It was fun.
(Dialogue example 2)
User utterance 1: It was an athletic meet in the rain.
System response: How was it?
User utterance 2: It was fun.
本発明は、上記の問題を解決するためになされたものであり、ユーザからの入力内容に対応した適切な応答文を生成して、自然な対話を行うことができる応答生成装置及びプログラムを提供することを目的とする。 The present invention has been made to solve the above problem, and provides a response generation apparatus and program capable of generating an appropriate response sentence corresponding to the input content from the user and performing a natural conversation. The purpose is to do.
上記目的を達成するために、本発明に係る応答生成装置は、ユーザからの入力文を入力する入力手段と、質問文を出力する前に、前記入力手段によって入力された入力文を第1の入力文として、該第1の入力文の構造を解析した解析結果に基づいて、前記第1の入力文に事態を表す単語または単語と単語との組み合わせが含まれているか否かを判別する事態判別手段と、前記事態判別手段で前記第1の入力文に事態が含まれていると判別された場合に、前記ユーザに感情を尋ねるための予め用意された質問文を出力するように制御する第1の制御手段と、前記事態判別手段で前記第1の入力文に事態が含まれていると判別された場合に、前記第1の入力文の解析結果に基づいて、前記第1の入力文が表す感情極性を推定する推定手段と、前記第1の制御手段により制御されて出力された質問文に対して、前記ユーザから前記入力手段によって入力された入力文を第2の入力文として、該第2の入力文の構造を解析した解析結果から、前記第2の入力文の感情極性を抽出する抽出手段と、前記推定手段で推定された感情極性と、前記抽出手段で抽出された感情極性とが一致する場合には、予め用意された第1の応答文を生成して出力し、一致しない場合には、予め用意された第2の応答文を生成して出力するように制御する第2の制御手段とを含んで構成されている。 In order to achieve the above object, a response generation apparatus according to the present invention includes: an input unit that inputs an input sentence from a user; and an input sentence that is input by the input unit before outputting a question sentence. As an input sentence, based on an analysis result obtained by analyzing the structure of the first input sentence, it is determined whether or not the first input sentence includes a word indicating a situation or a combination of a word and a word Control is performed so as to output a question sentence prepared in advance for asking the user about emotions when it is determined by the determination means and the situation determination means that the first input sentence includes a situation. When the first control means and the situation determination means determine that the first input sentence includes a situation, the first input is based on the analysis result of the first input sentence. Estimating means for estimating the emotion polarity represented by the sentence; An analysis result obtained by analyzing the structure of the second input sentence using the input sentence input from the user by the input means as a second input sentence for the question sentence controlled and output by the first control means From the extraction means for extracting the emotion polarity of the second input sentence, the emotion polarity estimated by the estimation means and the emotion polarity extracted by the extraction means are prepared in advance. A first response sentence is generated and output, and if they do not match, a second response means prepared to generate and output a second response sentence prepared in advance is included. .
また、本発明に係る応答生成プログラムは、コンピュータを、質問文を出力する前に、ユーザからの入力文を入力する入力手段によって入力された入力文を第1の入力文として、該第1の入力文の構造を解析した解析結果に基づいて、前記第1の入力文に事態を表す単語または単語と単語との組み合わせが含まれているか否かを判別する事態判別手段と、前記事態判別手段で前記第1の入力文に事態が含まれていると判別された場合に、前記ユーザに感情を尋ねるための予め用意された質問文を出力するように制御する第1の制御手段と、前記事態判別手段で前記第1の入力文に事態が含まれていると判別された場合に、前記第1の入力文の解析結果に基づいて、前記第1の入力文が表す感情極性を推定する推定手段と、前記第1の制御手段により制御されて出力された質問文に対して、前記ユーザから前記入力手段によって入力された入力文を第2の入力文として、該第2の入力文の構造を解析した解析結果から、前記第2の入力文の感情極性を抽出する抽出手段と、前記推定手段で推定された感情極性と、前記抽出手段で抽出された感情極性とが一致する場合には、予め用意された第1の応答文を生成して出力し、一致しない場合には、予め用意された第2の応答文を生成して出力するように制御する第2の制御手段として機能させるためのプログラムである。 Further, the response generation program according to the present invention uses the input sentence input by the input means for inputting the input sentence from the user as the first input sentence before the computer outputs the question sentence. A situation determination means for determining whether or not the first input sentence includes a word or a combination of words and words based on an analysis result obtained by analyzing a structure of the input sentence; and the situation determination means The first control means for controlling to output a question sentence prepared in advance for asking the user for emotion when it is determined that a situation is included in the first input sentence, When it is determined that a situation is included in the first input sentence by the situation determination unit, the emotion polarity represented by the first input sentence is estimated based on the analysis result of the first input sentence. Estimating means and the first control means From the analysis result obtained by analyzing the structure of the second input sentence using the input sentence input from the user by the input means as the second input sentence for the question sentence controlled and output, When the extraction means for extracting the emotion polarity of the two input sentences matches the emotion polarity estimated by the estimation means and the emotion polarity extracted by the extraction means, a first response prepared in advance This is a program for functioning as a second control means for generating and outputting a sentence and controlling so as to generate and output a second response sentence prepared in advance if they do not match.
本発明に係る応答生成装置及びプログラムによれば、事態判別手段が、質問文を出力する前にユーザからの入力文を入力する入力手段によって入力された入力文を第1の入力文として、第1の入力文の構造を解析した解析結果に基づいて、第1の入力文に事態を表す単語または単語と単語との組み合わせが含まれているか否かを判別する。「事態」とは、何らかの感情が対応付けられる行動、事象、出来事をいう。 According to the response generation device and the program according to the present invention, the situation determination unit uses the input sentence input by the input unit that inputs the input sentence from the user before outputting the question sentence as the first input sentence. Based on the analysis result obtained by analyzing the structure of one input sentence, it is determined whether or not the first input sentence includes a word representing a situation or a combination of a word and a word. “Situation” refers to an action, event, or event associated with some emotion.
そして、第1の制御手段は、事態判別手段で第1の入力文に事態が含まれていると判別された場合に、ユーザに感情を尋ねるための予め用意された質問文を出力するように制御する。この質問文に対して、ユーザから入力手段によって入力された入力文を第2の入力文として、抽出手段が、第2の入力文の構造を解析した解析結果から、第2の入力文の感情極性を抽出する。また、推定手段は、事態判別手段で第1の入力文に事態が含まれていると判別された場合に、第1の入力文の解析結果に基づいて、第1の入力文が表す感情極性を推定する。そして、第2の制御手段が、推定手段で推定された感情極性と、抽出手段で抽出された感情極性とが一致する場合には、予め用意された第1の応答文を生成して出力し、一致しない場合には、予め用意された第2の応答文を生成して出力するように制御する。 The first control means outputs a question sentence prepared in advance for asking the user about emotions when the situation judgment means judges that the situation is included in the first input sentence. Control. With respect to this question sentence, the input sentence input from the user by the input means is used as the second input sentence, and the extraction means analyzes the emotion of the second input sentence from the analysis result obtained by analyzing the structure of the second input sentence. Extract polarity. In addition, when the situation determination unit determines that the situation is included in the first input sentence, the estimation unit determines the emotion polarity represented by the first input sentence based on the analysis result of the first input sentence. Is estimated. When the second control means matches the emotion polarity estimated by the estimation means with the emotion polarity extracted by the extraction means, a first response sentence prepared in advance is generated and output. If they do not match, control is performed so as to generate and output a second response sentence prepared in advance.
このように、第1の入力文から推定される感情極性と、第2の入力文から抽出される感情極性とが一致するか否かによって応答文を異ならせることができるため、ユーザからの入力内容に対応した適切な応答文を生成して、自然な対話を行うことができる。 Thus, the response sentence can be made different depending on whether or not the emotion polarity estimated from the first input sentence matches the emotion polarity extracted from the second input sentence. An appropriate response sentence corresponding to the content can be generated and a natural conversation can be performed.
また、前記第1の応答文を、前記第2の入力文に対して同意を示す応答文とし、前記第2の応答文を、前記第2の入力文に対して驚きを示す応答文、前記ユーザに入力文の入力を促す応答文、または相槌の応答文とすることができる。このように、第1の入力文から推定される感情極性と、第2の入力文から抽出される感情極性とが一致する場合には、同意を示す応答文を出力し、感情極性が一致しない場合には、驚きを示す応答文を出力することにより自然な対話を行うことができる。また、感情極性が一致しない場合には、例えば、音声認識の誤認識やユーザによる入力文の入力ミスがあった可能性があるものと想定して、誤認識の可能性のある解析結果に基づいた応答文を生成するのではなく、ユーザに入力文の入力を促す応答文または相槌の応答文を出力することにより、対話を破綻させることなく進行させることができる。 In addition, the first response sentence is a response sentence indicating consent to the second input sentence, and the second response sentence is a response sentence indicating surprise to the second input sentence, It can be a response sentence that prompts the user to input an input sentence, or a response sentence of a conflict. In this way, when the emotion polarity estimated from the first input sentence matches the emotion polarity extracted from the second input sentence, a response sentence indicating consent is output and the emotion polarities do not match. In some cases, a natural conversation can be performed by outputting a response sentence indicating surprise. Further, if the emotion polarities do not match, for example, it is assumed that there is a possibility that there is a misrecognition of voice recognition or an input error of an input sentence by the user, and based on an analysis result that may be misrecognized. Instead of generating a response sentence, a response sentence that prompts the user to input an input sentence or a response sentence that is compatible can be output without breaking the dialog.
また、本発明の応答生成装置は、前記事態判別手段で前記第1の入力文に事態が含まれていないと判別された場合に、ユーザに入力文の入力を促す応答文、または相槌の応答文を出力するように制御する第3の制御手段を含んで構成することができる。第1の入力文に事態が含まれていない場合には、感情極性を推定することができないため、ユーザに入力文の入力を促す応答文、または相槌の応答文を出力することにより、対話を破綻させることなく進行させることができる。 Further, the response generation apparatus of the present invention provides a response sentence that prompts the user to input an input sentence or a response of a conflict when the situation determination means determines that the first input sentence does not include a situation A third control means for controlling to output a sentence can be included. When the situation is not included in the first input sentence, the emotional polarity cannot be estimated. Therefore, by outputting a response sentence that prompts the user to input the input sentence or a response sentence of the conflict, the dialogue is performed. It is possible to proceed without failing.
以上説明したように、本発明の応答生成装置及びプログラムによれば、ユーザからの入力内容に対応した適切な応答文を生成して、自然な対話を行うことができる、という効果が得られる。 As described above, according to the response generation device and the program of the present invention, it is possible to generate an appropriate response sentence corresponding to the input content from the user and perform a natural conversation.
以下、図面を参照して本発明の実施の形態を詳細に説明する。なお、本実施の形態では、ユーザからの発話を入力として、所定の処理を実行して音声出力する応答生成装置に本発明を適用した場合について説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In the present embodiment, a case will be described in which the present invention is applied to a response generation apparatus that executes a predetermined process and outputs a voice by using an utterance from a user as an input.
図1に示すように、第1の実施の形態に係る応答生成装置10は、ユーザ発話を集音して音声信号を生成するマイク12と、音声出力を行うスピーカ14と、マイク12及びスピーカ14に接続され、かつ、適切な応答文を生成する所定の処理を実行するコンピュータ16とを備えている。
As illustrated in FIG. 1, the
コンピュータ16は、応答生成装置10全体の制御を司るCPU、後述する応答生成プログラム等各種プログラムを記憶した記憶媒体としてのROM、ワークエリアとしてデータを一時格納するRAM、各種情報が記憶された記憶手段としてのHDD、I/O(入出力)ポート、及びこれらを接続するバスを含んで構成されている。I/Oポートには、マイク12及びスピーカ14が接続されている。
The
また、このコンピュータ16を、ハードウエアとソフトウエアとに基づいて定まる機能実現手段毎に分割した機能ブロックで説明すると、図1に示すように、マイク12から入力された音声信号を音声認識して、一般的な形態素解析器を用いて音声認識されたユーザ発話を示す文字列情報に対して形態素解析を行う言語解析部20、言語解析部20による解析結果に基づいて、ユーザ発話に事態が含まれているか否かを判別する事態判別部22、ユーザ発話に事態が含まれている場合に、ユーザ発話が表す感情極性を推定する感情極性推定部24、ユーザ発話に事態が含まれている場合に、ユーザに感情を尋ねる質問文を生成する質問生成部26、質問文に対するユーザ発話を言語解析部20で解析した解析結果から感情極性を抽出する感情極性抽出部28、感情極性推定部24で推定された感情極性と感情極性抽出部28で抽出された感情極性とが一致するか否かを判別する極性一致判別部30、極性一致判別部30の判別結果に基づいて、異なる応答文を生成する応答生成部32、ユーザ発話に事態が含まれていない場合に、定型の応答文を選択する定型応答部34、質問生成部26、応答生成部32、及び定型応答部34で生成または選択された応答文を音声信号に変換してスピーカ14から出力させる出力部36を含んだ構成で表すことができる。
In addition, when the
ここで、本実施の形態では、後述するように、質問文の出力前に入力されたユーザ発話と出力後に入力されたユーザ発話とを区別する必要があるため、前者を「第1のユーザ発話」、後者を「第2のユーザ発話」と称する。 In this embodiment, as described later, since it is necessary to distinguish between a user utterance input before the output of the question sentence and a user utterance input after the output, the former is referred to as “first user utterance”. The latter is referred to as “second user utterance”.
事態判別部22は、第1のユーザ発話に対する言語解析部20での解析結果に、事態を示す単語、または単語と単語との組み合わせが含まれているか否かを判別する。「事態」とは、何らかの感情が対応付けられる行動、事象、出来事であり、ここでは、解析結果に(i)「動詞」が含まれている場合、及び(ii)「事態性名詞+”だ”」が含まれている場合に「事態」が含まれていると判別する。「事態性名詞」とは、例えば「雨」や「運動会」といった出来事を示す名詞である。事態性名詞は、図2に示すような事態性名詞辞書を予め作成しておき、判別の際に、この事態性名詞辞書を参照して判別する。
The
感情極性推定部24は、事態判別部22で、第1のユーザ発話に事態が含まれていると判別された場合に、第1のユーザ発話が表す感情極性がポジティブかネガティブかを推定する。感情極性の推定は、例えば、感情極性が既知の学習データをSVM(Support Vecter Machine)の手法を用いて学習して感情極性モデルを構築し、この感情極性モデルと第1のユーザ発話の解析結果とを比較することにより行う。
The emotion
質問生成部26は、事態判別部22で、第1のユーザ発話に事態が含まれていると判別された場合に、ユーザに感情を尋ねる質問文を生成する。質問文は、基本となる質問文、例えば、「どう思う?」や「どんな感じ?」といった文を予め作成しておき、ユーザ発話の解析結果に基づいて、この基本となる質問文から選択した1つの文の時制や表現(丁寧な表現か砕けた表現かなど)を修正して、質問文を生成する。また、図3に示すような質問文例を予め作成しておき、この中からランダムに選択するようにしてもよい。生成された質問文は、出力部36で音声信号に変換されてスピーカ14から出力される。
The
感情極性抽出部28は、質問生成部26で生成された質問文が出力された後に入力された第2のユーザ発話を言語解析部20で解析した解析結果から感情極性を抽出する。質問生成部26で生成された質問文は、ユーザの感情を尋ねる質問文であるため、ここで入力される第2のユーザ発話には、直接的に感情を表す単語が含まれていると考えられる。そこで、第2のユーザ発話に含まれる感情を表す単語について、図4に示すような感情極性辞書を参照して、感情極性を抽出する。感情極性辞書は、非特許文献「スピンモデルによる単語の感情極性抽出」(高村他、情報処理学会論文誌ジャーナルvol47、No.2、pp.627−637、2006)に記載の手法を用いるなどして、予め作成しておく。
The emotion
応答生成部32は、極性一致判別部30で、感情極性推定部24で推定された感情極性と感情極性抽出部28で抽出された感情極性とが一致すると判別された場合には、「同意」のニュアンスを含んだ応答文を生成し、一致しないと判別された場合には、「驚き」のニュアンスを含んだ応答文を生成する。生成された応答文は、出力部36で音声信号に変換されてスピーカ14から出力される。
If the polarity
「同意」のニュアンスを含んだ応答文は、例えば、図5に示すような応答文例及び応答文例フォーマットを予め用意しておき、この応答文例からランダムに選択したり、応答文例フォーマットを用いて生成したりする。応答文例フォーマットは、例えば、「やっぱり(ユーザの感情)だよねぇ」のようなフォーマットとすることができ、「(ユーザの感情)」の部分に、第2のユーザ発話から抽出した感情を表す単語を挿入して応答文を生成することができる。 For example, a response sentence example and a response sentence example format as shown in FIG. 5 are prepared in advance, and the response sentence including the “agreement” nuance is selected at random from the response sentence example or generated using the response sentence example format. To do. The response sentence example format can be, for example, a format like “After all (user's emotion)”, and expresses the emotion extracted from the second user utterance in the part of “(user's emotion)” A response sentence can be generated by inserting a word.
「驚き」のニュアンスを含んだ応答文は、例えば、図6に示すような応答文例及び応答文例フォーマットを予め用意しておき、この応答文例からランダムに選択したり、応答文例フォーマットを用いて生成したりする。応答文例フォーマットは、例えば、「え?(ユーザの感情)の」のようなフォーマットとすることができ、「(ユーザの感情)」の部分に、第2のユーザ発話から抽出した感情を表す単語を挿入して応答文を生成することができる。また、このように選択及び生成した応答文に、さらに理由を尋ねる応答文、例えば「なんで(ユーザの感情)の?」のような応答文を組み合わせてもよい。 For example, a response sentence example and a response sentence example format as shown in FIG. 6 are prepared in advance, and a response sentence including “surprise” nuances is randomly selected from the response sentence example or generated using the response sentence example format. To do. The response sentence example format can be, for example, a format such as “E? (User's emotion)”, and a word representing the emotion extracted from the second user utterance in the “(user's emotion)” portion. Can be inserted to generate a response sentence. In addition, the response sentence selected and generated in this manner may be combined with a response sentence that asks for a reason, for example, “why (user's emotion)?”.
定型応答部34は、事態判別部22で、第1のユーザ発話に事態が含まれていないと判別された場合に、予め定めた定型応答文からランダムに定型応答文を選択する。選択した定型応答文は、出力部36で音声信号に変換されてスピーカ14から出力される。定型応答文は、例えば、図7に示すように、ユーザへ発話を促すような応答文や相槌の応答文を予め定めておく。
When the
次に、図8を参照して、第1の実施の形態の応答生成装置10における応答生成処理ルーチンについて説明する。本ルーチンは、ROMに記憶された応答生成プログラムをCPUが実行することにより行われる。
Next, a response generation processing routine in the
ステップ100で、マイク12から第1のユーザ発話が入力されたか否かを判断し、第1のユーザ発話が入力された場合には、ステップ102へ進み、入力されない場合には、入力されるまで本ステップの判断を繰り返す。ここでは、第1のユーザ発話「雨の中の運動会だったよ」が入力されたものとする。
In
ステップ102で、入力された第1のユーザ発話を示す音声信号を音声認識して文字列情報とし、この文字列情報に対して形態素解析を行う。
In
次に、ステップ104で、形態素解析の解析結果に基づいて、第1のユーザ発話に「事態」が含まれているか否かを判別する。「事態」が含まれている場合には、ステップ106へ進み、含まれていない場合には、ステップ122へ進む。ここでは、図2に示す事態性名詞辞書に事態性名詞として定められている「運動会」、及び事態性名詞に続く「だ」が含まれており、(ii)「事態性名詞+”だ”」の条件を満たすため、「事態」が含まれていると判別されてステップ106へ進む。
Next, in
ステップ106で、解析結果及び予め定めた感情極性モデルに基づいて、第1のユーザ発話の感情極性を推定する。ここでは、感情極性が「ネガティブ」と推定されるものとする。
In
次に、ステップ108で、ユーザに感情を尋ねるための応答文を生成して、音声信号に変換して出力する。ここでは、図3に示す質問文例の中から、「どう思った?」を選択して出力するものとする。
Next, in
次に、ステップ110で、マイク12から第2のユーザ発話が入力されたか否かを判断し、ユーザ発話が入力された場合には、ステップ112へ進み、入力されたユーザ発話を示す音声信号を音声認識して文字列情報とし、この文字列情報に対して形態素解析を行う。入力されない場合には、入力されるまで本ステップの判断を繰り返す。ここでは、第2のユーザ発話「楽しかったよ」が入力されたものとする。
Next, in
次に、ステップ114で、解析結果及び図4に示す感情極性辞書に基づいて、第2のユーザ発話が表す感情極性を抽出する。ここでは、感情極性辞書を参照して、解析結果に含まれる「楽しかった」から感情極性「ポジティブ」が抽出される。
Next, in
次に、ステップ116で、上記ステップ106で推定された感情極性と、上記ステップ114で抽出された感情極性とが一致するか否かを判断する。一致する場合は、ステップ118へ進み、一致しない場合には、ステップ120へ進む。ここでは、上記ステップ106で推定された感情極性は「ネガティブ」、上記ステップ114で抽出された感情極性は「ポジティブ」で一致しないため、否定されてステップ120へ進む。
Next, in
ステップ120で、「驚き」のニュアンスを含んだ応答文を生成する。例えば、図6に示す応答文例及び応答文例フォーマットから応答文例フォーマット「え?(ユーザの感情)の」を選択し、「(ユーザの感情)」の部分に、第2のユーザ発話から抽出した感情を表す単語を挿入して「え?楽しかったの?」のような応答文を生成する。
In
また、上記ステップ110で、第2のユーザ発話「悲惨だったよ」が入力された場合には、上記ステップ112での解析結果及び感情極性辞書に基づいて、感情極性「ネガティブ」が抽出され、上記ステップ116で、感情極性が一致すると判断されてステップ118へ進む。ステップ118では、「同意」のニュアンスを含んだ応答文を生成する。例えば、図6に示す応答文例及び応答文例フォーマットから応答文例「そりゃそうだよね」を選択する。
When the second user utterance “It was miserable” is input in
また、例えば、第1のユーザ発話が「机だ」であった場合には、上記ステップ104で、第1のユーザ発話に「事態」が含まれていないと判別されてステップ122へ進む。ステップ122で、図7に示す定型応答文例から、例えば、「へー、それで」を選択する。
Further, for example, if the first user utterance is “desk”, it is determined in
次に、ステップ124で、上記ステップ118、ステップ120、及びステップ122で生成または選択された応答文を音声信号に変換して出力して、処理を終了する。
Next, in
なお、上記ステップ110で入力されたと判断されるユーザ発話は、上記ステップ108で質問文が出力された後に入力されるユーザ発話であるため、第2のユーザ発話としているが、ここでのユーザ発話が必ずしも感情を含んだものであるとは限らない。そこで、上記ステップ114で、第2のユーザ発話から感情極性を抽出することができない場合には、この第2のユーザ発話を第1のユーザ発話とみなしてステップ100へ戻ったり、ステップ122へ進んで定型の応答文を選択して出力したりするようにしてもよい。
Note that the user utterance that is determined to be input in
以上説明したように、第1の実施の形態の応答生成装置によれば、第1のユーザ発話から感情極性を推定し、推定した感情極性と第2のユーザ発話から抽出した感情極性とが一致するか否かを判別するため、第2のユーザ発話が同じ内容であったとしても、感情極性が一致する場合には、「同意」を示す応答文が生成され、一致しない場合には、「驚き」を示す応答文が生成される。すなわち、第1のユーザ発話が表す感情極性を推定しておくことにより、第2のユーザ発話の内容が予想通りだった場合と、予想に反する場合とで応答を異ならせることができるため、自然な対話を行うことができる。 As described above, according to the response generation device of the first exemplary embodiment, the emotion polarity is estimated from the first user utterance, and the estimated emotion polarity matches the emotion polarity extracted from the second user utterance. In order to determine whether or not the second user utterance has the same content, if the emotional polarities match, a response sentence indicating “agreement” is generated. A response sentence indicating “surprise” is generated. That is, by estimating the emotion polarity represented by the first user utterance, the response can be different between the case where the content of the second user utterance is as expected and the case where it is contrary to the expectation. Conversations.
なお、第1の実施の形態では、第1のユーザ発話が表す感情極性を、予め学習データから生成した感情極性モデルと比較することにより推定する場合について説明したが、この手法に限定するものではない。例えば、単語毎に感情極性を定めた単語−感情極性辞書を予め作成しておき、第1のユーザ発話に含まれる単語の各々についてこの単語−感情極性辞書を参照して感情極性を得て、第1のユーザ発話中に含まれる感情極性が「ポジティブ」である単語の数、感情極性が「ネガティブ」である単語の数、及び否定表現があるか否か等に基づいて定めたルールに従って、感情極性を推定するようにしてもよい。また、第1のユーザ発話から直接感情極性を推定する場合に限らず、第1のユーザ発話が表す感情を推定して、推定した感情及び図4に示す感情極性辞書を参照して感情極性を推定するようにしてもよい。なお、感情の推定は、感情極性の推定の場合と同様、予め学習データから感情毎に生成した複数の感情モデルと比較することにより推定するなど、周知の技術を用いることができる。 In the first embodiment, the case where the emotion polarity represented by the first user utterance is estimated by comparing with the emotion polarity model generated from learning data in advance has been described. However, the present invention is not limited to this method. Absent. For example, a word-emotion polarity dictionary in which emotion polarity is determined for each word is created in advance, and the emotion polarity is obtained by referring to this word-emotion polarity dictionary for each word included in the first user utterance, According to the rules defined based on the number of words whose emotion polarity is “positive” included in the first user utterance, the number of words whose emotion polarity is “negative”, and whether there is a negative expression, etc. The emotion polarity may be estimated. In addition to estimating the emotion polarity directly from the first user utterance, the emotion polarity represented by the first user utterance is estimated, and the emotion polarity is determined with reference to the estimated emotion and the emotion polarity dictionary shown in FIG. You may make it estimate. As in the case of estimation of emotion polarity, a known technique such as estimation by comparing with a plurality of emotion models previously generated for each emotion from learning data can be used for the estimation of emotion.
次に、第2の実施の形態について説明する。第2の実施の形態では、第1のユーザ発話と第2のユーザ発話との感情極性が一致しなかった場合に、「驚き」を示す応答文を生成するのではなく、定型の応答文を選択する点が第1の実施の形態と異なっている。なお、第1の実施の形態と同様の構成及び処理については、同一の符号を付して説明を省略する。 Next, a second embodiment will be described. In the second embodiment, when the emotion polarities of the first user utterance and the second user utterance do not match, a response sentence indicating “surprise” is not generated, but a standard response sentence is used. The point of selection is different from the first embodiment. In addition, about the structure and process similar to 1st Embodiment, the same code | symbol is attached | subjected and description is abbreviate | omitted.
第2の実施の形態に係る応答生成装置210の構成は、図1に示す第1の実施の形態に係る応答生成装置10の構成と同様である。第2の実施の形態の応答生成装置210において、応答生成部132は、極性一致判別部30で、感情極性推定部24で推定された感情極性と感情極性抽出部28で抽出された感情極性とが一致すると判別された場合には、「同意」のニュアンスを含んだ応答文を生成し、一致しないと判別された場合には、定型の応答文を選択する。生成または選択された応答文は、出力部36で音声信号に変換されてスピーカ14から出力される。「同意」のニュアンスを含んだ応答文の生成については、第1の実施の形態と同様であり、定型の応答文の選択については、第1の実施の形態の定型応答部34の処理と同様に、例えば、図7に示すような定型応答文例の中からランダムに応答文を選択する。
The configuration of the
次に、図9を参照して、第2の実施の形態の応答生成装置210における応答生成処理ルーチンについて説明する。本ルーチンは、ROMに記憶された応答生成プログラムをCPUが実行することにより行われる。
Next, a response generation processing routine in the
ステップ100で、マイク12から第1のユーザ発話が入力されたか否かを判断し、第1のユーザ発話が入力された場合には、ステップ102へ進み、入力された第1のユーザ発話を示す音声信号を音声認識して文字列情報とし、この文字列情報に対して形態素解析を行う。入力されない場合には、入力されるまで本ステップの判断を繰り返す。ここでは、第1のユーザ発話「遊園地に行ったよ」が入力されたものとする。
In
次に、ステップ104で、形態素解析の解析結果に基づいて、第1のユーザ発話に「事態」が含まれているか否かを判別する。「事態」が含まれている場合には、ステップ106へ進み、含まれていない場合には、ステップ122へ進む。ここでは、動詞「行く」が含まれているため、「事態」が含まれていると判別されてステップ106へ進む。
Next, in
ステップ106で、解析結果及び予め定めた感情極性モデルに基づいて、第1のユーザ発話の感情極性を推定する。ここでは、感情極性が「ポジティブ」と推定されるものとする。次に、ステップ108で、ユーザに感情を尋ねるための応答文、例えば、図3に示す質問文例の中から、「どうだった?」を選択して出力する。
In
次に、ステップ110で、マイク12から第2のユーザ発話が入力されたか否かを判断し、第2のユーザ発話が入力された場合には、ステップ112へ進み、入力された第2のユーザ発話を示す音声信号を音声認識して文字列情報とし、この文字列情報に対して形態素解析を行う。入力されない場合には、入力されるまで本ステップの判断を繰り返す。ここでは、第2のユーザ発話「楽しかったよ」が入力され、音声認識において「悲しかったよ」と誤認識されたものとする。
Next, in
次に、ステップ114で、解析結果及び図4に示す感情極性辞書に基づいて、第2のユーザ発話の感情極性を抽出する。ここでは、誤認識された解析結果「悲しかったよ」に基づいて、感情極性辞書を参照して、感情極性「ネガティブ」が抽出される。
Next, in
次に、ステップ116で、上記ステップ106で推定された感情極性と、上記ステップ114で抽出された感情極性とが一致するか否かを判断する。一致する場合は、ステップ118へ進み、一致しない場合には、音声認識を含む第1のユーザ発話の解析結果に誤りがあったものと想定して、ステップ122へ進む。ここでは、上記ステップ106で推定された感情極性は「ポジティブ」、上記ステップ114で抽出された感情極性は「ネガティブ」で一致しないため、否定されてステップ122へ進む。
Next, in
ステップ122で、図7に示す定型応答文例から、例えば、「そうですかぁ」を選択し、次に、ステップ124で、選択した応答文を音声信号に変換して出力して、処理を終了する。
In
以上説明したように、第2の実施の形態の応答生成装置によれば、第1のユーザ発話が表す感情極性を推定し、推定した感情極性と第2のユーザ発話から抽出した感情極性とが一致するか否かを判別し、一致しない場合には、例えば音声認識に誤りがあったものと想定して、相槌の応答文やユーザ発話を促すような応答文などの定型の応答文を出力することができる。これにより、誤認識された解析結果に基づいて不適切な応答文を生成することを防止し、対話を破綻なく進行させることができる。 As described above, according to the response generation device of the second exemplary embodiment, the emotion polarity represented by the first user utterance is estimated, and the estimated emotion polarity and the emotion polarity extracted from the second user utterance are obtained. Determine whether or not they match, and if they do not match, for example, assume that there was an error in speech recognition, and output a standard response sentence such as a response sentence that encourages user speech can do. As a result, it is possible to prevent an inappropriate response sentence from being generated based on the erroneously recognized analysis result, and to allow the dialog to proceed without failure.
なお、上記第1及び第2の実施の形態では、スピーカによる音声出力を行う場合を例に説明したが、これに限定されるものではなく、ディスプレイに応答文を表示するようにしてもよい。また、ユーザから音声がマイクに入力される場合を例に説明したが、ユーザがキーボードなどを用いて入力文としてのテキストを入力するようにしてもよい。 In the first and second embodiments described above, the case where sound is output by a speaker has been described as an example. However, the present invention is not limited to this, and a response sentence may be displayed on a display. Moreover, although the case where audio | voice was input into the microphone from the user was demonstrated to the example, you may make it a user input the text as an input sentence using a keyboard etc.
10、210 応答生成装置
12 マイク
14 スピーカ
16 コンピュータ
20 言語解析部
22 事態判別部
24 感情極性推定部
26 質問生成部
28 感情極性抽出部
30 極性一致判別部
32、132 応答生成部
34 定型応答部
36 出力部
10, 210
Claims (4)
質問文を出力する前に、前記入力手段によって入力された入力文を第1の入力文として、該第1の入力文の構造を解析した解析結果に基づいて、前記第1の入力文に事態を表す単語または単語と単語との組み合わせが含まれているか否かを判別する事態判別手段と、
前記事態判別手段で前記第1の入力文に事態が含まれていると判別された場合に、前記ユーザに感情を尋ねるための予め用意された質問文を出力するように制御する第1の制御手段と、
前記事態判別手段で前記第1の入力文に事態が含まれていると判別された場合に、前記第1の入力文の解析結果に基づいて、前記第1の入力文が表す感情極性を推定する推定手段と、
前記第1の制御手段により制御されて出力された質問文に対して、前記ユーザから前記入力手段によって入力された入力文を第2の入力文として、該第2の入力文の構造を解析した解析結果から、前記第2の入力文の感情極性を抽出する抽出手段と、
前記推定手段で推定された感情極性と、前記抽出手段で抽出された感情極性とが一致する場合には、予め用意された第1の応答文を生成して出力し、一致しない場合には、予め用意された第2の応答文を生成して出力するように制御する第2の制御手段と、
を含む応答生成装置。 An input means for inputting an input sentence from the user;
Before outputting the question sentence, the input sentence input by the input means is used as the first input sentence, and the situation of the first input sentence is determined based on the analysis result obtained by analyzing the structure of the first input sentence. A situation determination means for determining whether or not a word or a combination of a word and a word is included,
First control for controlling to output a question sentence prepared in advance for asking the user about emotions when the situation determination means determines that a situation is included in the first input sentence Means,
When the situation determination means determines that a situation is included in the first input sentence, the emotion polarity represented by the first input sentence is estimated based on the analysis result of the first input sentence An estimation means to
For the question sentence controlled and output by the first control means, the structure of the second input sentence was analyzed using the input sentence inputted by the input means from the user as the second input sentence. Extraction means for extracting the emotion polarity of the second input sentence from the analysis result;
When the emotion polarity estimated by the estimation means matches the emotion polarity extracted by the extraction means, a first response sentence prepared in advance is generated and output. Second control means for controlling to generate and output a second response sentence prepared in advance;
A response generation device including:
質問文を出力する前に、ユーザからの入力文を入力する入力手段によって入力された入力文を第1の入力文として、該第1の入力文の構造を解析した解析結果に基づいて、前記第1の入力文に事態を表す単語または単語と単語との組み合わせが含まれているか否かを判別する事態判別手段と、
前記事態判別手段で前記第1の入力文に事態が含まれていると判別された場合に、前記ユーザに感情を尋ねるための予め用意された質問文を出力するように制御する第1の制御手段と、
前記事態判別手段で前記第1の入力文に事態が含まれていると判別された場合に、前記第1の入力文の解析結果に基づいて、前記第1の入力文が表す感情極性を推定する推定手段と、
前記第1の制御手段により制御されて出力された質問文に対して、前記ユーザから前記入力手段によって入力された入力文を第2の入力文として、該第2の入力文の構造を解析した解析結果から、前記第2の入力文の感情極性を抽出する抽出手段と、
前記推定手段で推定された感情極性と、前記抽出手段で抽出された感情極性とが一致する場合には、予め用意された第1の応答文を生成して出力し、一致しない場合には、予め用意された第2の応答文を生成して出力するように制御する第2の制御手段と、
して機能させるための応答生成プログラム。 Computer
Before outputting the question sentence, based on the analysis result obtained by analyzing the structure of the first input sentence with the input sentence input by the input means for inputting the input sentence from the user as the first input sentence, A situation determination means for determining whether or not the first input sentence includes a word indicating a situation or a combination of a word and a word;
First control for controlling to output a question sentence prepared in advance for asking the user about emotions when the situation determination means determines that a situation is included in the first input sentence Means,
When the situation determination means determines that a situation is included in the first input sentence, the emotion polarity represented by the first input sentence is estimated based on the analysis result of the first input sentence An estimation means to
For the question sentence controlled and output by the first control means, the structure of the second input sentence was analyzed using the input sentence inputted by the input means from the user as the second input sentence. Extraction means for extracting the emotion polarity of the second input sentence from the analysis result;
When the emotion polarity estimated by the estimation means matches the emotion polarity extracted by the extraction means, a first response sentence prepared in advance is generated and output. Second control means for controlling to generate and output a second response sentence prepared in advance;
A response generator to make it function.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008334824A JP5195414B2 (en) | 2008-12-26 | 2008-12-26 | Response generating apparatus and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008334824A JP5195414B2 (en) | 2008-12-26 | 2008-12-26 | Response generating apparatus and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010157081A true JP2010157081A (en) | 2010-07-15 |
JP5195414B2 JP5195414B2 (en) | 2013-05-08 |
Family
ID=42574977
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008334824A Expired - Fee Related JP5195414B2 (en) | 2008-12-26 | 2008-12-26 | Response generating apparatus and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5195414B2 (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014115952A1 (en) * | 2013-01-25 | 2014-07-31 | 포항공과대학교 산학협력단 | Voice dialog system using humorous speech and method thereof |
JP2015110096A (en) * | 2009-07-10 | 2015-06-18 | 株式会社三洋物産 | Game machine |
JP2015148712A (en) * | 2014-02-06 | 2015-08-20 | トヨタ自動車株式会社 | Voice interactive device, voice interactive system, and program |
JP2016024384A (en) * | 2014-07-23 | 2016-02-08 | トヨタ自動車株式会社 | Response production system, response production method, and program |
EP2988298A1 (en) | 2014-08-21 | 2016-02-24 | Toyota Jidosha Kabushiki Kaisha | Response generation method, response generation apparatus, and response generation program |
JP2016080981A (en) * | 2014-10-21 | 2016-05-16 | トヨタ自動車株式会社 | Response generation device, response generation method, and response generation program |
JP2016085478A (en) * | 2016-02-12 | 2016-05-19 | シャープ株式会社 | Interactive household electrical system, server device, interactive household electrical appliance, method for household electrical system to interact, and program for realizing the method by computer |
JP2017037601A (en) * | 2015-08-14 | 2017-02-16 | Psソリューションズ株式会社 | Dialog interface |
JP2017091570A (en) * | 2017-01-19 | 2017-05-25 | Psソリューションズ株式会社 | Interactive interface |
WO2018034169A1 (en) * | 2016-08-17 | 2018-02-22 | ソニー株式会社 | Dialogue control device and method |
JP2018160248A (en) * | 2018-05-01 | 2018-10-11 | トヨタ自動車株式会社 | Response generation method, response generation apparatus, and response generation program |
US10224060B2 (en) | 2014-03-25 | 2019-03-05 | Sharp Kabushiki Kaisha | Interactive home-appliance system, server device, interactive home appliance, method for allowing home-appliance system to interact, and nonvolatile computer-readable data recording medium encoded with program for allowing computer to implement the method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006178063A (en) * | 2004-12-21 | 2006-07-06 | Toyota Central Res & Dev Lab Inc | Interactive processing device |
JP2006201870A (en) * | 2005-01-18 | 2006-08-03 | Toyota Central Res & Dev Lab Inc | Interactive processor |
JP2007219149A (en) * | 2006-02-16 | 2007-08-30 | Toyota Central Res & Dev Lab Inc | Response generation device, method and program |
-
2008
- 2008-12-26 JP JP2008334824A patent/JP5195414B2/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006178063A (en) * | 2004-12-21 | 2006-07-06 | Toyota Central Res & Dev Lab Inc | Interactive processing device |
JP2006201870A (en) * | 2005-01-18 | 2006-08-03 | Toyota Central Res & Dev Lab Inc | Interactive processor |
JP2007219149A (en) * | 2006-02-16 | 2007-08-30 | Toyota Central Res & Dev Lab Inc | Response generation device, method and program |
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015110096A (en) * | 2009-07-10 | 2015-06-18 | 株式会社三洋物産 | Game machine |
WO2014115952A1 (en) * | 2013-01-25 | 2014-07-31 | 포항공과대학교 산학협력단 | Voice dialog system using humorous speech and method thereof |
JP2015148712A (en) * | 2014-02-06 | 2015-08-20 | トヨタ自動車株式会社 | Voice interactive device, voice interactive system, and program |
US10224060B2 (en) | 2014-03-25 | 2019-03-05 | Sharp Kabushiki Kaisha | Interactive home-appliance system, server device, interactive home appliance, method for allowing home-appliance system to interact, and nonvolatile computer-readable data recording medium encoded with program for allowing computer to implement the method |
JP2016024384A (en) * | 2014-07-23 | 2016-02-08 | トヨタ自動車株式会社 | Response production system, response production method, and program |
US9653078B2 (en) | 2014-08-21 | 2017-05-16 | Toyota Jidosha Kabushiki Kaisha | Response generation method, response generation apparatus, and response generation program |
EP2988298A1 (en) | 2014-08-21 | 2016-02-24 | Toyota Jidosha Kabushiki Kaisha | Response generation method, response generation apparatus, and response generation program |
JP2016045655A (en) * | 2014-08-21 | 2016-04-04 | トヨタ自動車株式会社 | Response generation method, response generation apparatus, and response generation program |
JP2016080981A (en) * | 2014-10-21 | 2016-05-16 | トヨタ自動車株式会社 | Response generation device, response generation method, and response generation program |
JP2017037601A (en) * | 2015-08-14 | 2017-02-16 | Psソリューションズ株式会社 | Dialog interface |
JP2016085478A (en) * | 2016-02-12 | 2016-05-19 | シャープ株式会社 | Interactive household electrical system, server device, interactive household electrical appliance, method for household electrical system to interact, and program for realizing the method by computer |
WO2018034169A1 (en) * | 2016-08-17 | 2018-02-22 | ソニー株式会社 | Dialogue control device and method |
JPWO2018034169A1 (en) * | 2016-08-17 | 2019-06-13 | ソニー株式会社 | Dialogue control apparatus and method |
US11183170B2 (en) | 2016-08-17 | 2021-11-23 | Sony Corporation | Interaction control apparatus and method |
JP7036015B2 (en) | 2016-08-17 | 2022-03-15 | ソニーグループ株式会社 | Dialogue control device and method |
JP2017091570A (en) * | 2017-01-19 | 2017-05-25 | Psソリューションズ株式会社 | Interactive interface |
JP2018160248A (en) * | 2018-05-01 | 2018-10-11 | トヨタ自動車株式会社 | Response generation method, response generation apparatus, and response generation program |
Also Published As
Publication number | Publication date |
---|---|
JP5195414B2 (en) | 2013-05-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5195414B2 (en) | Response generating apparatus and program | |
US10460034B2 (en) | Intention inference system and intention inference method | |
JP5323212B2 (en) | Multi-language speech recognition | |
EP3489950B1 (en) | Response sentence generation apparatus, method and program | |
KR20200056261A (en) | Electronic apparatus and method for controlling thereof | |
JP6172417B1 (en) | Language learning system and language learning program | |
JP4729902B2 (en) | Spoken dialogue system | |
JP2010020390A (en) | Emotion estimation device and emotion estimation program | |
WO2022057283A1 (en) | Voiceprint registration method and apparatus, and computer readable storage medium | |
JP2007140200A (en) | Language learning device and program | |
WO2011033834A1 (en) | Speech translation system, speech translation method, and recording medium | |
JP6390264B2 (en) | Response generation method, response generation apparatus, and response generation program | |
JP2008276543A (en) | Interactive processing apparatus, response sentence generation method, and response sentence generation processing program | |
KR20160061071A (en) | Voice recognition considering utterance variation | |
JP5136512B2 (en) | Response generating apparatus and program | |
JP2010224153A (en) | Speech interaction device and program | |
JP2006259641A (en) | Voice recognition device and program | |
JP2014048443A (en) | Voice synthesis system, voice synthesis method, and voice synthesis program | |
KR20190140803A (en) | Interactive system using emotion embedding and recurrent neural network and method thereof | |
JP2016024384A (en) | Response production system, response production method, and program | |
JP2008293098A (en) | Answer score information generation device and interactive processor | |
JPH117292A (en) | Speech recognition device | |
JP2015102914A (en) | Method for learning incomprehensible sentence determination model, and method, apparatus and program for determining incomprehensible sentence | |
JP6176137B2 (en) | Spoken dialogue apparatus, spoken dialogue system, and program | |
JP2009198871A (en) | Voice interaction apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20110719 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20110719 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110905 |
|
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: 20130108 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20130121 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160215 Year of fee payment: 3 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5195414 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160215 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |