JP2018181259A - Dialogue rule collating apparatus, dialogue apparatus, dialogue rule collating method, dialogue method, dialogue rule collating program, and dialogue program - Google Patents
Dialogue rule collating apparatus, dialogue apparatus, dialogue rule collating method, dialogue method, dialogue rule collating program, and dialogue program Download PDFInfo
- Publication number
- JP2018181259A JP2018181259A JP2017084616A JP2017084616A JP2018181259A JP 2018181259 A JP2018181259 A JP 2018181259A JP 2017084616 A JP2017084616 A JP 2017084616A JP 2017084616 A JP2017084616 A JP 2017084616A JP 2018181259 A JP2018181259 A JP 2018181259A
- Authority
- JP
- Japan
- Prior art keywords
- utterance
- user
- speech
- dialogue
- unit
- 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
Landscapes
- Machine Translation (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
【課題】ユーザ発話に対する応答発話を対話ルールを用いて決定する際に、ユーザ発話と対話ルールとを適切に照合させる。【解決手段】ユーザ発話を入力とし、発話パターン及び発話パターンの発話に対する応答発話の組からなる複数の対話ルールに基づいて、ユーザ発話と発話パターンとを照合することによりユーザ発話に対する応答発話を決定する。この際、対話における、ユーザ発話に省略された格要素を補完するか、又は焦点語をユーザ発話に追加する処理、ユーザ発話中の名詞句を類義語に置き換える処理、及び、ユーザ発話を当該ユーザ発話のトピックに置き換える処理の少なくとも1つの処理によりユーザ発話を書き換え、書き換える前のユーザ発話及び書き換えた後のユーザ発話の各々を発話パターンと照合する。【選択図】図1When a response utterance to a user utterance is determined using a dialogue rule, the user utterance and the dialogue rule are appropriately matched. A user utterance is input, and a response utterance for a user utterance is determined by collating the user utterance and the utterance pattern based on a plurality of dialogue rules including a utterance pattern and a response utterance pair for the utterance of the utterance pattern. To do. At this time, in the dialogue, a case element that is omitted from the user utterance is supplemented or a focal word is added to the user utterance, a noun phrase in the user utterance is replaced with a synonym, and the user utterance is converted to the user utterance. The user utterance is rewritten by at least one process of replacing with the topic, and the user utterance before rewriting and the user utterance after rewriting are collated with the utterance pattern. [Selection] Figure 1
Description
本発明は、ユーザ発話の書き換えを用いる対話ルール照合装置、対話装置、対話ルール照合方法、対話方法、対話ルール照合プログラム、及び対話プログラムに関する。 The present invention relates to an interaction rule matching device, an interaction device, an interaction rule matching method, an interaction method, an interaction rule matching program, and an interaction program that use rewriting of user utterances.
対話システムにおいて、人間はコンピュータと対話をすることにより、種々の情報を得たり、要望を満たしたりする。また、所定のタスクを達成するだけではなく、日常会話を行う対話システムも存在し、これらによって、人間は精神的な安定を得たり、承認欲を満たしたり、信頼関係を築いたりする。 In the dialogue system, a human being interacts with a computer to obtain various information and fulfill a request. In addition to achieving a predetermined task, there is also a dialogue system for daily conversation, which allows a person to gain mental stability, satisfy a desire for approval, and build a relationship of trust.
対話システムの類型については、非特許文献1に詳述されている。 The type of dialogue system is described in detail in Non-Patent Document 1.
商用システムにおいて最もよく利用されている対話システムの実装形態は、対話ルールを用いたものである。対話ルールとは、発話パターン(pattern)と応答発話(template)とからなる。この対話ルールを用いた対話システムでは、ユーザ発話が、例えば単語列のマッチングによって発話パターンにマッチした場合に、システムが当該発話パターンに対応する応答発話を用いて応答する。例えば、AIML(Artificial Intelligence Markup Language)と呼ばれる、対話ルールを記述する言語で記述された対話ルールの一例を以下に示す。なお、発話パターンに含まれるアスタリスク「*」は、どんな単語列にでもマッチする記号である。 The most commonly used implementation of dialog systems in commercial systems is the use of dialog rules. The dialogue rule consists of an utterance pattern (pattern) and a response utterance (template). In the dialogue system using this dialogue rule, when the user's utterance matches the utterance pattern, for example, by matching a word string, the system responds using the response utterance corresponding to the utterance pattern. For example, an example of an interaction rule described in a language that describes interaction rules, which is called AIML (Artificial Intelligence Markup Language), is shown below. The asterisk "*" included in the utterance pattern is a symbol that matches any word string.
<category>
<pattern>お酒 * 飲め * か</pattern>
<template>お酒好きです</template>
</category>
<category>
<pattern> Sake * Drink * Or </ pattern>
<template> I like alcohol </ template>
</ category>
例えば、ユーザ発話が「お酒は飲めますか」であった場合、当該ユーザ発話が発話パターンを示す<pattern>の記述内容にマッチする。そのため、システムは、応答発話を示す<template>の記述内容である「お酒好きです」という発話を行う。 For example, if the user's utterance is "Can you drink alcohol?", The user's utterance matches the description content of <pattern> indicating the utterance pattern. Therefore, the system utters "I like alcohol" which is the descriptive content of <template> that indicates the response utterance.
なお、AIMLについては、非特許文献2に詳述されている。 Non-Patent Document 2 describes AIML in detail.
対話ルールを用いて応答処理を行う際、文脈を考慮していないために不具合が起こる場合がある。例えば、以下のようなルールがあったとする。 When performing response processing using interaction rules, problems may occur because context is not considered. For example, suppose that there is the following rule.
<category>
<pattern>かわい いです ね</pattern>
<template>ありがとうございます</template>
</category>
<category>
<pattern>It's pretty </ pattern>
<template> Thank you </ template>
</ category>
この対話ルールによれば、システムは、ユーザに「かわいいですね」と言われた時に「ありがとうございます」と答える。しかし、もし「かわいいですね」という発話の前に、ユーザとシステムとが「猫」の話題で話していたとする。その場合には、「かわいいですね」という発話はおそらく猫のことを言っており、「ありがとうございます」という応答は不適切なものになるだろう。 According to this dialogue rule, the system answers "Thank you" when the user says "You are pretty". However, it is assumed that the user and the system talk on the topic of "cat" before the utterance "It is cute". In that case, the utterance "You are pretty" probably refers to a cat, and the response "Thank you" will be inappropriate.
また、言語において、同じ内容について様々な言い方で発話することが可能である。例えば、相手がお酒が飲めるか確認する際に、「お酒は飲めますか」という表現だけでなく「アルコールは飲めますか?」といった表現も可能である。このように、ユーザ発話として想定し得る全ての言い方に対して応答できるような対話ルールを予め作っておくことは難しい。 In addition, in the language, it is possible to utter the same content in various ways. For example, when confirming whether the other party can drink alcohol, not only the expression "Can you drink alcohol" but also the expression "Can you drink alcohol?" As described above, it is difficult to create in advance a dialogue rule that can respond to all possible expressions of user utterances.
さらに、ユーザ発話と対話ルールの発話パターンとを照合させる際に、単語が一致しなくても内容が大まかに一致していればマッチさせたい場合もある。その場合であっても、現状の対話ルールを用いた手法では、単語が一致しているか否かに基づいて、ユーザ発話と対話ルールの発話パターンとを照合させるため、単語が異なると内容が大まかに一致していてもマッチさせることができない。 Furthermore, when the user's speech and the speech pattern of the dialogue rule are collated, it may be desired to match if the contents roughly match even if the words do not match. Even in this case, in the method using the current dialogue rule, the user's utterance is compared with the utterance pattern of the dialogue rule based on whether or not the word matches, so if the words differ, the contents are roughly Even if it matches, it can not be matched.
本発明は、ユーザ発話に対する応答発話を対話ルールを用いて決定する際に、ユーザ発話と対話ルールとを適切に照合させることができる対話ルール照合装置、対話装置、対話ルール照合方法、対話方法、対話ルール照合プログラム、及び対話プログラムを提供することを目的とする。 The present invention relates to a dialogue rule collating apparatus, a dialogue apparatus, a dialogue rule collating method, and a dialogue method, which can appropriately collate a user speech and a dialogue rule when determining a response speech to a user speech using the dialogue rule. It is an object of the present invention to provide a dialogue rule matching program and a dialogue program.
上記目的を達成するために、本発明の対話ルール照合装置は、ユーザ発話を入力とし、発話パターン及び前記発話パターンの発話に対する応答発話の組からなる複数の対話ルールに基づいて、前記ユーザ発話と前記発話パターンとを照合することにより前記ユーザ発話に対する応答発話を決定する発話ルール照合装置であって、対話における、前記ユーザ発話に省略された格要素を補完するか、又は焦点語を前記ユーザ発話に追加する処理、前記ユーザ発話中の名詞句を類義語に置き換える処理、及び、前記ユーザ発話を当該ユーザ発話のトピックに置き換える処理の少なくとも1つの処理により前記ユーザ発話を書き換え、書き換える前の前記ユーザ発話及び書き換えた後の前記ユーザ発話の各々を前記発話パターンと照合する発話ルールマッチ部を含む。 In order to achieve the above object, the dialogue rule collating apparatus according to the present invention receives the user's utterance, and based on a plurality of dialogue rules including a combination of an utterance pattern and a response utterance to the utterance of the utterance pattern, An utterance rule matching device that determines a response utterance to the user's utterance by collating the utterance pattern, and complements a case element omitted in the user's utterance in a dialogue, or the user speaks a focused word The user's utterance before rewriting and rewriting the user's utterance by at least one process of adding to the user's utterance, replacing the noun phrase in the user's utterance with a synonym, and replacing the user's utterance with the topic of the user's utterance And a speech rule for matching each of the user speech after rewriting with the speech pattern Tsu, including the switch unit.
なお、前記発話ルールマッチ部は、書き換える前の前記ユーザ発話及び書き換えた後の前記ユーザ発話の各々と照合された前記発話パターンの各々との類似度を求め、前記少なくとも1つの処理の各々に対して予め定められた優先順位と、前記類似度とに基づいて、前記ユーザ発話に対する前記応答発話を決定するようにしても良い。 The utterance rule matching unit obtains similarity with each of the utterance pattern before the rewriting and the utterance pattern compared with each of the user utterance after the rewriting and determines the similarity to each of the at least one processing. The response utterance to the user utterance may be determined based on a predetermined priority and the similarity.
上記目的を達成するために、本発明の対話装置は、発話パターン及び前記発話パターンの発話に対する応答発話の組からなる複数の対話ルールに基づいて、ユーザ発話と前記発話パターンとを照合することにより前記ユーザ発話に対する応答発話を決定する発話装置であって、ユーザ発話を入力する入力部と、前記ユーザ発話から名詞句及び焦点語を抽出し、抽出した前記名詞句及び前記焦点語を対話履歴記憶部に記憶させる焦点抽出部と、前記対話履歴記憶部に記憶された前記名詞句及び前記焦点語の少なくとも一方に基づいて、前記ユーザ発話に省略された格要素を補完するか、又は前記焦点語を前記ユーザ発話に追加するゼロ代名詞補完部と、前記ユーザ発話中の名詞句を類義語に置き換える類義語置換部と、前記ユーザ発話を当該ユーザ発話のトピックに置き換えるトピック抽出部と、前記ゼロ代名詞補完部による処理、前記類義語置換部による処理、及び前記トピック抽出部による処理の各々により書き換えられた後の前記ユーザ発話、及び、書き換えられる前の前記ユーザ発話の各々を前記発話パターンと照合することにより、前記ユーザ発話に対する前記応答発話を決定する発話ルールマッチ部と、前記発話ルールマッチ部により決定された前記応答発話を出力する出力部と、を含む。 In order to achieve the above object, the dialogue apparatus according to the present invention collates a user utterance with the utterance pattern based on a plurality of dialogue rules consisting of a combination of an utterance pattern and a response utterance to the utterance of the utterance pattern. A speech apparatus for determining a response speech to the user speech, the input unit for inputting a user speech, extracting a noun phrase and a focused word from the user speech, and storing the extracted noun phrase and the focused word as dialogue history Supplementing a case element omitted in the user's speech based on at least one of a focal point extraction unit stored in a unit and the noun phrase and the focal word stored in the dialogue history storage unit, or the focal word A zero pronoun complementing unit that adds the user utterance to the user utterance; a synonym substitution unit that replaces a noun phrase in the user utterance with a synonym; The user's utterance after being rewritten by the topic extraction unit for replacing the topic in the utterance, the process by the zero pronoun complementation unit, the process by the synonym substitution unit, and the process by the topic extraction unit, and before being rewritten An utterance rule matching unit that determines the response utterance to the user utterance by matching each of the user utterances with the utterance pattern; an output unit that outputs the response utterance determined by the utterance rule matching unit; ,including.
なお、前記発話ルールマッチ部は、書き換える前の前記ユーザ発話及び書き換えた後の前記ユーザ発話の各々と照合された前記発話パターンの各々との類似度を求め、前記ゼロ代名詞補完部による処理、前記類義語置換部による処理、及び前記トピック抽出部による処理の各々に対して予め定められた優先順位と、前記類似度とに基づいて、前記ユーザ発話に対する前記応答発話を決定するようにしても良い。 The utterance rule matching unit obtains the degree of similarity with each of the utterance pattern before the rewriting and the utterance pattern compared with each of the user utterance after the rewriting, and the processing by the zero pronoun complementing unit, The response utterance to the user utterance may be determined based on a predetermined priority for each of the processing by the synonym substitution unit and the processing by the topic extraction unit and the similarity.
上記目的を達成するために、本発明の対話ルール照合方法は、発話ルールマッチ部を含み、ユーザ発話を入力とし、発話パターン及び前記発話パターンの発話に対する応答発話の組からなる複数の対話ルールに基づいて、前記ユーザ発話と前記発話パターンとを照合することにより前記ユーザ発話に対する応答発話を決定する発話ルール照合装置における対話ルール照合方法であって、前記発話ルールマッチ部が、対話における、前記ユーザ発話に省略された格要素を補完するか、又は焦点語を前記ユーザ発話に追加する処理、前記ユーザ発話中の名詞句を類義語に置き換える処理、及び、前記ユーザ発話を当該ユーザ発話のトピックに置き換える処理の少なくとも1つの処理により前記ユーザ発話を書き換えるステップと、前記発話ルールマッチ部が、書き換える前の前記ユーザ発話及び書き換えた後の前記ユーザ発話の各々を前記発話パターンと照合するステップと、を含む。 In order to achieve the above object, the dialogue rule matching method of the present invention includes a speech rule matching unit, a plurality of dialogue rules each having a user speech as an input, and a combination of a speech pattern and a response speech to the speech of the speech pattern. A dialogue rule matching method in a speech rule collating apparatus according to claim 4, wherein said speech rule matching unit determines the response speech to said user speech by collating said user speech and said speech pattern, wherein said speech rule matching unit Processing for complementing case elements omitted in the utterance or adding a focus word to the user utterance, processing for replacing a noun phrase in the user utterance with a synonym, and replacing the user utterance with the topic of the user utterance Rewriting the user utterance by at least one of the processing; and the utterance rule Pitch portion includes the steps of collating said speech pattern of each of said user's utterance after said user's utterance and rewriting before rewriting, the.
なお、本発明の対話ルール照合方法は、前記発話ルールマッチ部が、書き換える前の前記ユーザ発話及び書き換えた後の前記ユーザ発話の各々と照合された前記発話パターンの各々との類似度を求め、前記少なくとも1つの処理の各々に対して予め定められた優先順位と、前記類似度とに基づいて、前記ユーザ発話に対する前記応答発話を決定するステップを更に含むようにしても良い。 In the dialogue rule collating method according to the present invention, the speech rule matching unit determines the similarity to each of the speech pattern collated with each of the user speech before rewriting and the user speech after rewriting. The method may further include determining the response utterance to the user utterance based on a predetermined priority for each of the at least one process and the similarity.
上記目的を達成するために、本発明の対話ルール照合プログラムは、コンピュータを、上記対話ルール照合装置の各部として機能させるためのプログラムである。 In order to achieve the above-mentioned object, a dialogue rule collation program of the present invention is a program for making a computer function as each part of the dialogue rule collation device.
上記目的を達成するために、本発明の対話プログラムは、コンピュータを、上記対話装置の各部として機能させるためのプログラムである。 In order to achieve the above object, the dialogue program of the present invention is a program for causing a computer to function as each part of the dialogue device.
本発明によれば、ユーザ発話に対する応答発話を対話ルールを用いて決定する際に、ユーザ発話と対話ルールとを適切に照合させることが可能となる。 ADVANTAGE OF THE INVENTION According to this invention, when determining the response speech with respect to a user speech using a dialogue rule, it becomes possible to match a user speech and a dialogue rule appropriately.
以下、本実施形態について図面を用いて説明する。 Hereinafter, the present embodiment will be described using the drawings.
図1は、本実施形態に係る対話装置10の機能的な構成を示すブロック図である。図1に示すように、本実施形態に係る対話装置10は、入力部12、焦点抽出部14、対話履歴記憶部16、ゼロ代名詞補完部18、類義語置換部20、トピック抽出部22、対話ルール記憶部24、発話ルールマッチ部26、及び、出力部28を備えている。 FIG. 1 is a block diagram showing a functional configuration of the dialog device 10 according to the present embodiment. As shown in FIG. 1, the dialogue apparatus 10 according to the present embodiment includes an input unit 12, a focus extraction unit 14, a dialogue history storage unit 16, a zero pronoun complementation unit 18, a synonym substitution unit 20, a topic extraction unit 22, dialogue rules A storage unit 24, a speech rule matching unit 26, and an output unit 28 are provided.
入力部12は、ユーザ発話を受け付ける。ユーザ発話は、ユーザによりテキストとして入力された発話でも良く、ユーザ発話の音声が音声認識を用いてテキストに変換された発話であっても良い。入力部12は、入力したユーザ発話を、ゼロ代名詞補完部18、類義語置換部20、及びトピック抽出部22に出力させると共に、対話履歴記憶部16に記憶させる。 The input unit 12 receives a user utterance. The user utterance may be an utterance inputted as a text by the user, or may be an utterance in which the voice of the user utterance is converted into text using speech recognition. The input unit 12 causes the zero pronoun complementation unit 18, the synonym substitution unit 20, and the topic extraction unit 22 to output the input user's utterance, and causes the dialogue history storage unit 16 to store the same.
焦点抽出部14は、ユーザ発話に含まれる焦点語を抽出する。焦点語とは、ユーザ発話に含まれる話題を表す単語列(主に名詞句)である。例えば、ユーザ発話が「昨日ラーメンを食べたんですよ」であれば、「ラーメン」が焦点語になる。本実施形態では、条件付き確率場(Conditional Random Fields,CRF)と呼ばれる機械学習の手法を用いて、焦点抽出器を学習し、学習した焦点抽出器を用いて焦点語を抽出する。CRFとは、所定の系列に対してラベルを付与した学習データがある場合に、学習データから、未知の系列についてラベルを付与することができる推定器を得る一般的な学習手法である。CRFについては、下記非特許文献3に記載されている。 The focus extraction unit 14 extracts a focus word included in the user's utterance. The focus word is a word string (mainly a noun phrase) representing a topic included in the user's utterance. For example, if the user's utterance is "I ate ramen yesterday", then "ramen" is the focus word. In this embodiment, a focus extractor is learned using a machine learning method called Conditional Random Fields (CRF), and a focus word is extracted using the learned focus extractor. The CRF is a general learning method of obtaining an estimator capable of labeling an unknown sequence from learning data when there is learning data in which a label is added to a predetermined sequence. The CRF is described in Non-Patent Document 3 below.
[非特許文献3]言語処理のための機械学習入門(自然言語処理シリーズ),高村大也(著),奥村学(監修),コロナ社,2010. [Non-patent literature 3] Introduction to machine learning for language processing (Natural language processing series), Takaya Takaya (Author), Manabu Okumura (Supervised), Corona, 2010.
本実施形態では、「昨日/<center>ラーメン</center>/を/食べ/た/ん/です/よ」、「<center>イギリス</center>/が/好き/です」といった、発話について焦点語となる箇所に、焦点語であることを意味する<center></center>というタグを付与したデータを大量に準備し、これらのデータから、CRFを用いて、焦点語抽出器を学習する。 In this embodiment, utterances such as "Yesterday / <center> Ramen </ center> // Eat / Tan / I / E" and "<center> England </ center> / I like /" Prepare a large amount of data tagged with <center> </ center>, which means that it is a focus word, at the location where it is a focus word, and learn the focus word extractor from these data using CRF Do.
なお、上記データにおいてスラッシュは形態素の区切りを示すが、これらの形態素の区切りは、形態素解析器を用いて得ることができる。本実施形態では、下記非特許文献4に開示されているJTAGという形態素解析器を用いている。また、CRFの学習に用いる素性テンプレートには、単語の表層形、品詞、及び終止形を含むが、意味情報(例えば、日本語語彙大系から得られる一般名詞属性)等を用いても良い。 In the above data, slashes indicate morpheme delimiters, but these morpheme delimiters can be obtained using a morpheme analyzer. In this embodiment, a morphological analyzer called JTAG, which is disclosed in Non-Patent Document 4 below, is used. In addition, the feature template used for CRF learning includes surface forms, parts of speech, and end forms of words, but semantic information (for example, general noun attributes obtained from Japanese lexical system) and the like may be used.
[非特許文献4]T. Fuchi and S. Takagi, "Japanese Morphological Analyzer using Word Cooccurrence-JTAG", Proc. of COLING-ACL, pp. 409-413, 1998. [Non-patent document 4] T. Fuchi and S. Takagi, "Japanese Morphological Analyzer using Word Co-currence-JTAG", Proc. Of COLING-ACL, pp. 409-413, 1998.
このように、学習された焦点抽出器によれば、例えば「私はコーヒーが好きなんです」とのユーザ発話から、「コーヒー」が焦点語として抽出される。 Thus, according to the learned focus extractor, "coffee" is extracted as a focus word from the user's utterance "I like coffee", for example.
また、焦点抽出部14は、形態素解析の結果を用いて、ユーザ発話から名詞句も抽出する。本実施形態では、名詞句として名詞連続(品詞が名詞の単語を連結したもの)を抽出する。 The focus extraction unit 14 also extracts noun phrases from the user's utterance using the result of morphological analysis. In the present embodiment, noun succession (a part of speech is a concatenation of noun words) is extracted as a noun phrase.
焦点抽出部14は、抽出した名詞句及び焦点語を、対話履歴記憶部16に記憶させる。一つのユーザ発話から、複数の名詞句及び焦点語が抽出されることもある。また、名詞句と焦点語とが同じである場合もある。 The focus extraction unit 14 stores the extracted noun phrases and the focus words in the dialogue history storage unit 16. Multiple noun phrases and focused words may be extracted from one user utterance. Also, the noun phrase and the focused word may be the same.
対話履歴記憶部16は、対話履歴として、過去のユーザ発話、及び過去のユーザ発話から抽出された名詞句及び焦点語を、発話番号と併せて記憶している。発話番号は、各々のユーザ発話を識別するための番号であり、ユーザ発話が入力される度にインクリメントされる連続した発話番号が、各々のユーザ発話に付与される。 The dialogue history storage unit 16 stores, as the dialogue history, past user utterances and noun phrases and focus words extracted from past user utterances, together with the utterance numbers. The utterance number is a number for identifying each user utterance, and a continuous utterance number which is incremented each time a user utterance is input is given to each user utterance.
ゼロ代名詞補完部18は、入力したユーザ発話について照応解析を行い、対話における、ユーザ発話に省略された格要素を補完することにより、ゼロ代名詞を解消する。ゼロ代名詞とは、省略された格要素である。例えば、「猫」を話題にしている時に発話された「かわいいですね」というユーザ発話には、「猫が」もしくは「猫は」という格要素(及び格助詞(又は係助詞))が省略されている。本実施形態では、日本語のゼロ代名詞解消技術として、下記非特許文献5に開示されている技術を用いる。 The zero pronoun complementation unit 18 performs anaphoric analysis on the input user utterance, and eliminates the zero pronoun by complementing the case element omitted in the user utterance in the dialogue. Zero pronouns are abbreviated case elements. For example, when the user speaks "cute" when talking about "cat", the case element (and case particle (or cousin)) "cat is" or "cat is" is omitted. ing. In the present embodiment, the technology disclosed in Non-Patent Document 5 below is used as a Japanese technique for eliminating zero pronouns.
[非特許文献5]今村賢治,東中竜一郎,泉朋子,“対話解析のためのゼロ代名詞照応解析付き述語項構造解析”,自然言語処理,Vol.22, No.1, pp.3-26, 2015. [Non-patent document 5] Kenji Imamura, Ryuichiro Higashinaka and Reiko Izumi, "Predential term analysis with zero pronouns for dialogue analysis," Natural language processing, Vol. 22, No. 1, pp. 3-26 , 2015.
当該技術では、ユーザ発話中の述語(動詞、形容詞、ダ文等)について、必須格辞書を参照し、述語に必須格が欠けていると認められる場合、その格要素を対話履歴中の名詞句及び焦点語の中から探索する。探索の仕方は、学習データに基づいて統計的に決定する。 In this technique, for a predicate (verb, adjective, da sentence, etc.) in the user's speech, the required case dictionary is referenced, and if it is recognized that the required case is missing in the predicate, the case element is a noun phrase in the dialogue history And search from among the focus words. The way of search is determined statistically based on learning data.
本実施形態では、入力したユーザ発話に含まれる述語の各々について、ガ格、ヲ格、ニ格、デ格、ト格、カラ格、及びマデ格の格について、必須格辞書に基づき省略が認められれば、その格要素を抽出する。上記非特許文献5では、ガ格、ヲ格、及びニ格を扱っているが、当該技術に加え、その他の格要素については、別途準備した格フレーム辞書を用いて格要素を抽出する。具体的には、述語と格とに統計的に有意に共起する名詞句を予めテキストコーパスを用いて列挙しておき、対話履歴中の名詞句又は焦点語に、列挙された名詞句と一致するものがあれば、一致する名詞句を省略された格要素として抽出する。 In this embodiment, for each of the predicates included in the input user's utterance, omission is permitted based on the required case dictionary for the case of ga case, case, ni case, de case, to case, kera case, and medeon case. If it is done, the case element is extracted. Although the above Non-Patent Document 5 deals with Ga-grade, Qualification, and Ni-grade, the case element is extracted using a case frame dictionary separately prepared for other case elements in addition to this technique. Specifically, noun phrases statistically significantly co-occurring in a predicate and a case are listed in advance using a text corpus, and the noun phrases listed in the dialogue history are matched with the enumerated noun phrases. If there is something to do, it extracts matching noun phrases as abbreviated case elements.
例えば、「食べる」という述語について「デ格」と有意に共起する名詞句として、「家」、「コンビニ」、「レストラン」等があるとする。もし、「食べる」という述語について省略された「デ格」の格要素を抽出したい場合、文脈中の名詞句又は焦点語に「コンビニ」があれば、「コンビニ」を省略された要素として抽出する。 For example, it is assumed that there are "house", "convenience store", "restaurant" etc. as noun phrases that co-occur with "de-rating" significantly with respect to the predicate "eating". If you want to extract the case element of "de-rating" omitted for the "eat" predicate, if there is "convenience store" in the noun phrase or the focus word in the context, extract "convenience store" as an omitted element .
また、ゼロ代名詞補完部18は、ユーザ発話に省略された格要素を補完しない場合であって、ユーザ発話に焦点語が含まれていない場合に、焦点語をユーザ発話に追加する。 Further, the zero pronoun complementing unit 18 adds a focused word to the user's speech when the case element omitted in the user's speech is not complemented and the focused word is not included in the user's speech.
さて、ゼロ代名詞補完部18は、ユーザ発話について以下の手順で、ゼロ代名詞を補完するか、あるいは焦点語を追加した新しいユーザ発話を生成する。 The zero pronoun complementation unit 18 generates a new user utterance in which the zero pronoun is complemented or a focused word is added according to the following procedure for user utterance.
IF ユーザ発話中に焦点語が存在しない
IF ユーザ発話中にゼロ代名詞(省略された格要素)が存在する
FOR 省略された格要素のそれぞれについて
IF 省略された格要素が「I」、「YOU」、及び「exog」の何れかではない
(書き換え1)当該発話の先頭に、省略された格要素と格助詞を連結した文字列を追加
IF 対話履歴から得られる焦点語が存在する
IF 書き換え1が実施されておらず、かつ、焦点語がユーザ発話に含まれていない
(書き換え2)ユーザ発話の先頭に焦点語と「は」とを連結した文字列を追加
There is no focal word in the IF user's speech
Zero pronouns (abbreviated case elements) exist in the IF user's speech
For each of the omitted case elements
IF Case element omitted is not "I", "YOU", or "exog" (Rewriting 1) Add a string obtained by connecting the case element and case particle to the beginning of the utterance
There is a focused word obtained from IF dialogue history
IF Rewriting 1 has not been performed, and the focal word is not included in the user's utterance (Rewriting 2) Add a character string connecting the focal word and "ha" at the beginning of the user's utterance
ただし、「I」、「YOU」、及び「exog」は、特殊な照応先で、それぞれ、一人称(「私」が省略されている場合)、二人称(「あなた」が省略されている場合)、外界照応(文脈中には存在しない対象が省略されている場合)を指す。対話履歴から得られる焦点語とは、対話履歴に最後に追加された焦点語のことである。すなわち、これまでの対話における、最新の話題を表すものである。 However, “I”, “YOU”, and “exog” are special contacts, respectively, in first person (when “I” is omitted) and second person (when “you” is omitted), Refers to external context (if an object not present in the context is omitted). The focus word obtained from the dialog history is the focus word added last to the dialog history. That is, it represents the latest topic in the previous dialogues.
上述した手順によれば、対話履歴として「イタリアに行きました」というユーザ発話が記憶されている場合に、「いいですね」というユーザ発話が、「イタリアはいいですね」に書き換えられる。また、対話履歴として「ラーメンを食べました」というユーザ発話が記憶されている場合に、「美味しいですよね」というユーザ発話が、「ラーメンが美味しいですよね」に書き換えられる。 According to the above-described procedure, when the user utterance “I went to Italy” is stored as the dialogue history, the user utterance “good” is rewritten to “Italy good”. In addition, when the user's utterance "I ate ramen" is stored as the dialogue history, the user's utterance "I'm delicious" is rewritten as "I'm delicious ramen".
なお、上述した、ゼロ代名詞補完部18が行う、対話履歴記憶部16に記憶された名詞句及び焦点語の少なくとも一方に基づいて、ユーザ発話に対してゼロ代名詞を補完するか、あるいは焦点語を追加した新しいユーザ発話を生成するゼロ代名詞補完処理については、図3に示すフローチャートを用いて、より具体的に後述する。 In addition, based on at least one of the noun phrase and the focus word stored in the dialogue history storage unit 16 performed by the zero pronoun complementing unit 18 described above, the zero pronoun is complemented to the user's speech or the focus word is The zero pronoun complementation process for generating the added new user speech will be described in more detail later using the flowchart shown in FIG.
ゼロ代名詞補完部18は、このようにして書き換えたユーザ発話を、書き換え前のユーザ発話と併せて発話ルールマッチ部26に出力する。 The zero pronoun complementation unit 18 outputs the user utterance thus rewritten together with the user utterance before the rewriting to the utterance rule matching unit 26.
類義語置換部20は、入力したユーザ発話中の名詞句について、類義語辞書を参照し、もし類義語があれば、名詞句をその類義語で置き換えた発話文を作成する。例えば、類義語辞書に「お酒」の類義語として「アルコール」があるとする。その場合、「お酒が好きです」というユーザ発話が入力した際に、「アルコールが好きです」というユーザ発話を生成する。複数の名詞句に書き換え候補とする類義語がある場合、何れかの名詞句に書き換え候補とする類義語が複数ある場合等には、各々の名詞句を各々の類義語で書き換えた全ての発話文を列挙しても良いし、一部の名詞句のみを類義語で書き換えた発話文を生成しても良く、全ての名詞句を一部の類義語のみで書き換えた発話文を生成しても良い。 The synonym substitution unit 20 refers to the synonym dictionary for the noun phrase in the input user utterance, and if there is a synonym, creates an utterance sentence in which the noun phrase is replaced with the synonym. For example, it is assumed that the synonym dictionary has "alcohol" as a synonym of "sake". In that case, when the user utterance "I like alcohol" is input, the user utterance "I like alcohol" is generated. If there are synonyms to be rewrite candidates in multiple noun phrases, and if there are multiple synonyms to be rewrite candidates in any noun phrase, etc., list all utterance sentences in which each noun phrase has been rewritten with each synonym. Alternatively, an utterance sentence in which only some noun phrases are rewritten with synonyms may be generated, or an utterance sentence in which all noun phrases are rewritten with only some synonyms may be generated.
名詞句を類義語で置き換えることにより多くの発話文を生成すると、後段の発話ルールマッチ部26においてユーザ発話と対話ルールの発話パターンとをマッチングさせる際に時間がかかる。そのため、本実施形態では、ユーザ発話中の複数の名詞句のうち、類義語で書き換え可能な名詞句の1つ(例えば、先頭の名詞句)について、1つの類義語で書き換えるものとする。 If many speech sentences are generated by replacing noun phrases with synonyms, it takes time to match the user speech and the speech pattern of the dialogue rule in the speech rule matching unit 26 in the latter stage. Therefore, in the present embodiment, among a plurality of noun phrases in the user's utterance, one of noun phrases that can be rewritten as synonyms (for example, the first noun phrase) is rewritten with one synonym.
類義語置換部20は、このようにして書き換えたユーザ発話を、書き換え前のユーザ発話と併せて発話ルールマッチ部26に出力する。 The synonym substitution unit 20 outputs the user utterance thus rewritten together with the user utterance before the rewriting to the utterance rule matching unit 26.
トピック抽出部22は、入力したユーザ発話に対して、そのユーザ発話のトピック(話題)を表す文字列を取得する。具体的には、まず、ユーザ発話を機械学習の手法を用い複数のクラスに分類する。クラスとは、例えば「スポーツ」、「料理」、「美容」等である。本実施形態では、全部で40程度のクラスが用いられ、分類器を予め学習しておく。分類器を学習する際には、多数のユーザ発話を準備し、各々のユーザ発話に対して正解クラスをラベルとして付与し、ユーザ発話を入力した際にそのユーザ発話をこれらの何れかのクラスに分類する分類器を学習する。 The topic extraction unit 22 acquires, for the input user utterance, a character string representing a topic (topic) of the user utterance. Specifically, first, user utterances are classified into a plurality of classes using a machine learning method. The class is, for example, "sports", "cooking", "beauty" and the like. In the present embodiment, about 40 classes in total are used, and the classifier is learned in advance. When learning a classifier, prepare a large number of user utterances, assign a correct answer class as a label to each user utterance, and enter the user utterances into any of these classes when the user utterances are input. Learn the classifier to classify.
ユーザ発話を何れかのクラスに分類する分類方法としては、一般的なテキスト分類手法を用いることができる。例えば、自然言語の発話から形態素解析を経て得られる単語n−gramを特徴量として、学習データに基づき(すなわち、複数の発話のそれぞれについて、クラスがラベル付されたデータ)、機械学習の手法を用いて、分類器を学習すれば良い。学習アルゴリズムとしては、ロジスティック回帰、サポートベクトルマシン、深層学習による手法等が挙げられる。テキスト分類手法の一般的なアルゴリズムについては、上記非特許文献3に開示されている。また、深層学習による手法については、下記非特許文献6に開示されている。 A general text classification method can be used as a classification method for classifying user speech into any class. For example, using a word n-gram obtained from natural language utterances through morphological analysis as a feature amount, based on learning data (that is, data labeled with a class for each of a plurality of utterances), a method of machine learning You can use it to learn a classifier. Examples of learning algorithms include logistic regression, support vector machines, and deep learning methods. The general algorithm of the text classification method is disclosed in the above non-patent document 3. The deep learning method is disclosed in Non-Patent Document 6 below.
[非特許文献6]Yoon Kim,"Convolutional Neural Networks for Sentence Classification", Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp.1746-1751, 2014. [Non-patent document 6] Yoon Kim, "Convolutional Neural Networks for Sentence Classification", Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 1746-1751, 2014.
トピック抽出部22は、ユーザ発話を分類したクラスのクラス名(例えば、「スポーツ」、「料理」等)を書き換え後のユーザ発話として、書き換え前のユーザ発話と併せて発話ルールマッチ部26に出力する。 The topic extraction unit 22 outputs the class name (for example, "sports", "cooking", etc.) of the class into which the user's speech has been classified as the user's speech after rewriting, together with the user's speech before the rewriting, to the speech rule matching unit 26. Do.
対話ルール記憶部24は、発話パターン及び発話パターンの発話に対する応答発話の組からなる複数の対話ルールを示すデータを記憶している。対話ルールは、上述したAIML形式で記述された対話ルールの集合である。本実施形態では、数万個の対話ルールが作成され、対話ルール記憶部24に記憶されている。 The dialogue rule storage unit 24 stores data indicating a plurality of dialogue rules each including a combination of an utterance pattern and a response utterance to the utterance of the utterance pattern. The dialogue rule is a set of dialogue rules described in the above-described AIML format. In the present embodiment, tens of thousands of dialogue rules are created and stored in the dialogue rule storage unit 24.
発話ルールマッチ部26は、ゼロ代名詞補完部18による処理、類義語置換部20による処理、及びトピック抽出部22による処理の各々により書き換えた後のユーザ発話の各々、及び、書き換える前のユーザ発話を発話パターンと照合する。照合方法としては、例えば、上記非特許文献2に示されるような前方一致によるものを用いればよい。 The utterance rule matching unit 26 utters each of the user utterances after being rewritten by the processing by the zero pronoun complementation unit 18, the processing by the synonym substitution unit 20, and the processing by the topic extraction unit 22, and the user utterances before being rewritten Match the pattern. As the collation method, for example, one based on forward coincidence as shown in the above-mentioned Non-Patent Document 2 may be used.
本実施形態では、対話ルール記憶部24に記憶されている複数の対話ルールの発話パターンの各々に対し、発話パターンにおいて記述されているアスタリスク「*」以外からなる単語集合と、ユーザ発話を形態素分解して得られる単語集合とを、それぞれ単語ベクトルで表現し、TF−IDF(Term Frequency-Inverse Document Frequency)による重み付けを行った上で、単語ベクトル間のコサイン類似度を計算し、コサイン類似度が最も高い発話パターンに対応する応答発話を出力する。TF−IDFの重みは、大量の対話データ、新聞記事等を用いることにより計算される。 In this embodiment, for each of the utterance patterns of the plurality of dialogue rules stored in the dialogue rule storage unit 24, a word set consisting of other than the asterisk "*" described in the utterance pattern and the user utterance are decomposed into morphemes The word set obtained by the calculation is expressed as a word vector, weighted by TF-IDF (Term Frequency-Inverse Document Frequency), and then calculated the cosine similarity between the word vectors, and the cosine similarity is The response utterance corresponding to the highest utterance pattern is output. The weight of TF-IDF is calculated by using a large amount of dialogue data, newspaper articles and the like.
ここで、書き換え前のユーザ発話をU1とし、ゼロ代名詞補完部18による処理により書き換えられたユーザ発話をU2とし、類義語置換部20による処理により書き換えられたユーザ発話をU3とし、トピック抽出部22による処理により書き換えられたユーザ発話をU4とする。この場合、U1、U2、U3、U4のそれぞれを、対話ルール記憶部24に記憶されている複数の対話ルールの発話パターンと照合し、照合結果に基づいてシステムの応答発話を決定する。 Here, let U1 be the user utterance before rewriting, let U2 be the user utterance rewritten by the processing by the zero pronoun complementing unit 18, let U3 be the user utterance rewritten by the processing by the synonym substitution unit 20, and let the topic extracting unit 22 do so. Let U4 be the user utterance rewritten by the process. In this case, each of U1, U2, U3, and U4 is compared with the utterance patterns of the plurality of dialogue rules stored in the dialogue rule storage unit 24, and the response utterance of the system is determined based on the collation result.
U1、U2、U3、U4のそれぞれについて得られるコサイン類似度をcos(U1)、cos(U2)、cos(U3)、cos(U4)とした場合、システムはコサイン類似度が最も高い発話パターンの応答発話を、ユーザ発話に対する応答発話として決定し、決定した応答発話を出力部28に出力する。 If the cosine similarity obtained for each of U1, U2, U3 and U4 is cos (U1), cos (U2), cos (U3) and cos (U4), the system is the speech pattern with the highest cosine similarity. The response utterance is determined as the response utterance to the user utterance, and the determined response utterance is output to the output unit 28.
又は、ゼロ代名詞補完部18による処理、類義語置換部20による処理、及びトピック抽出部22による処理の各々に対して予め定められた優先順位と、コサイン類似度とに基づいて、ユーザ発話に対する応答発話を決定しても良い。例えば、書き換え前、ゼロ代名詞補完部18による処理、類義語置換部20による処理、及びトピック抽出部22による処理の順に優先順位が定められている場合には、cos(U1)が所定の閾値(例えば、0.8)を超えていたらU1を出力し、そうでない場合、cos(U2)が所定の閾値を超えているか確認する。また、cos(U2)が所定の閾値を超えている場合、U2を出力し、そうでない場合、cos(U3)が所定の閾値を超えているか確認する。また、cos(U3)が所定の閾値を超えている場合、U3を出力し、そうでない場合、U4を出力する、といった具合である。 Alternatively, the response utterance to the user's utterance based on the priority determined in advance for each of the processing by the zero pronoun complementation unit 18, the processing by the synonym substitution unit 20, and the processing by the topic extraction unit 22 and the degree of cosine similarity. You may decide For example, when the priority order is determined in the order of the processing by the zero pronoun complementing unit 18, the processing by the synonym replacing unit 20, and the processing by the topic extracting unit 22 before rewriting, cos (U1) is a predetermined threshold (for example, If U exceeds 0.8), output U1; otherwise, check whether cos (U2) exceeds a predetermined threshold. Also, if cos (U2) exceeds the predetermined threshold, U2 is output, and if not, it is checked whether cos (U3) exceeds the predetermined threshold. If cos (U3) exceeds a predetermined threshold, U3 is output, otherwise U4 is output.
なお、類似度の計算方法としては、コサイン類似度を用いる方法に限らず、集合同士の類似度として一般的なJaccard係数を用いる方法等、発話パターンに含まれる単語集合とユーザ発話に含まれる単語集合との類似度を計算することができる方法であれば何れの方法を用いても良い。 The method of calculating the similarity is not limited to the method using cosine similarity, but a method using general Jaccard coefficients as the similarity between sets, such as a word set included in the utterance pattern and a word included in the user's utterance Any method may be used as long as it can calculate the degree of similarity with the set.
出力部28は、発話ルールマッチ部26によって決定された応答発話を、システム発話として出力する。出力方法としては、応答発話を示すデータをディスプレイ等の表示手段に表示させたり、応答発話を示すデータを外部装置に送信したり、応答発話を示す音声を音声出力手段により出力させたりする方法が挙げられる。 The output unit 28 outputs the response utterance determined by the utterance rule matching unit 26 as a system utterance. As an output method, there is a method of displaying data indicating a response utterance on a display means such as a display, transmitting data indicating a response utterance to an external device, or outputting a voice indicating a response utterance by a voice output unit. It can be mentioned.
なお、本実施形態に係る対話装置10は、例えば、CPU(Central Processing Unit)、RAM(Random Access Memory)、各種プログラムを記憶するROM(Read Only Memory)を備えたコンピュータ装置で構成される。また、対話装置10を構成するコンピュータは、ハードディスクドライブ、不揮発性メモリ等の記憶部を備えていても良い。本実施形態では、CPUがROM、ハードディスク等の記憶部に記憶されているプログラムを読み出して実行することにより、上記のハードウェア資源とプログラムとが協働し、上述した機能が実現される。 The dialog device 10 according to the present embodiment is configured by, for example, a computer device provided with a central processing unit (CPU), a random access memory (RAM), and a read only memory (ROM) for storing various programs. Moreover, the computer which comprises the interactive apparatus 10 may be equipped with memory | storage parts, such as a hard-disk drive and non-volatile memory. In the present embodiment, when the CPU reads and executes the program stored in the storage unit such as the ROM and the hard disk, the above-described hardware resource and the program cooperate with each other to realize the above-described function.
次に、本実施形態に係る対話装置10による対話処理の流れを、図2に示すフローチャートを用いて説明する。本実施形態では、対話装置10に、対話処理の実行を開始するための予め定めたデータが入力されたタイミングで対話処理が開始されるが、対話処理が開始されるタイミングはこれに限らず、例えば、ユーザ発話が入力されたタイミングで対話処理が開始されても良い。 Next, the flow of dialogue processing by the dialogue device 10 according to the present embodiment will be described using the flowchart shown in FIG. In the present embodiment, the dialogue processing is started at the timing when predetermined data for starting the execution of the dialogue processing is input to the dialogue device 10, but the timing at which the dialogue processing is started is not limited to this, For example, the dialogue processing may be started at the timing when the user's speech is input.
ステップS101では、入力部12が、ユーザ発話を入力する。 In step S101, the input unit 12 inputs a user utterance.
ステップS103では、焦点抽出部14が、入力したユーザ発話から名詞句及び焦点語を抽出する。 In step S103, the focus extraction unit 14 extracts noun phrases and focus words from the input user speech.
ステップS105では、焦点抽出部14が、入力したユーザ発話と、当該ユーザ発話から抽出した名詞句及び焦点語とを、対話履歴記憶部16に記憶させる。 In step S105, the focus extraction unit 14 causes the dialogue history storage unit 16 to store the input user utterance and the noun phrase and the focused word extracted from the user utterance.
ステップS107では、ゼロ代名詞補完部18が、上述したゼロ代名詞補完処理を行う。 In step S107, the zero pronoun complementation unit 18 performs the above-described zero pronoun complementation processing.
ここで、ゼロ代名詞補完部18によるゼロ代名詞補完処理の流れを、図3に示すフローチャートを用いて説明する。 Here, the flow of the zero pronoun complementation process by the zero pronoun complementation unit 18 will be described using the flowchart shown in FIG.
ステップS201では、ゼロ代名詞補完部18が、入力したユーザ発話を取得する。 In step S201, the zero pronoun complementation unit 18 acquires the input user utterance.
ステップS203では、ゼロ代名詞補完部18が、ユーザ発話に焦点語が存在するか否かを判定する。ステップS203でユーザ発話に焦点語が存在すると判定した場合(S203,Y)は、本ゼロ代名詞補完処理のプログラムの実行を終了し、図2のステップS109に移行する。また、ステップS203でユーザ発話に焦点語が存在しないと判定した場合(S203,N)はステップS205に移行する。 In step S203, the zero pronoun complementation unit 18 determines whether or not a focused word is present in the user's speech. If it is determined in step S203 that a focused word is present in the user's utterance (S203, Y), the execution of the program of this zero pronoun complementation processing is ended, and the process proceeds to step S109 in FIG. If it is determined in step S203 that no focused word is present in the user's utterance (S203, N), the process proceeds to step S205.
ステップS205では、ゼロ代名詞補完部18が、ユーザ発話にゼロ代名詞が存在するか否かを判定する。ステップS205でユーザ発話にゼロ代名詞が存在すると判定した場合(S205,Y)は、ステップS207に移行する。また、ステップS205でユーザ発話にゼロ代名詞が存在しないと判定した場合(S205,N)はステップS215に移行する。 In step S205, the zero pronoun complementation unit 18 determines whether a zero pronoun exists in the user's speech. If it is determined in step S205 that a zero pronoun exists in the user utterance (S205, Y), the process proceeds to step S207. If it is determined in step S205 that no zero pronoun exists in the user's speech (S205, N), the process proceeds to step S215.
ステップS207では、ゼロ代名詞補完部18が、ユーザ発話から、1つの省略された格要素を選択する。 In step S207, the zero pronoun complementation unit 18 selects one omitted case element from the user utterance.
ステップS209では、ゼロ代名詞補完部18が、ステップS207で選択された格要素が「I」、「YOU」、及び「exog」の何れかであるか否かを判定する。ステップS209で、ステップS207で選択された格要素が「I」、「YOU」、及び「exog」の何れかであると判定した場合(S209,Y)は、ステップS213に移行する。また、ステップS209で、ステップS207で選択された格要素が「I」、「YOU」、及び「exog」の何れかでないと判定した場合(S209,N)はステップS211に移行する。 In step S209, the zero pronoun complementing unit 18 determines whether the case element selected in step S207 is any of "I", "YOU", and "exog". If it is determined in step S209 that the case element selected in step S207 is any of "I", "YOU", and "exog" (S209, Y), the process proceeds to step S213. If it is determined in step S209 that the case element selected in step S207 is not one of “I”, “YOU”, and “exog” (S209, N), the process proceeds to step S211.
ステップS211では、ゼロ代名詞補完部18が、ユーザ発話の先頭に、格要素と格助詞とを連結した文字列を追加する。 In step S211, the zero pronoun complementing unit 18 adds a character string in which the case element and the case particle are connected at the beginning of the user's speech.
ステップS213では、ゼロ代名詞補完部18が、未処理の格要素、すなわちステップS207乃至S211の処理を行っていない格要素が存在するか否かを判定する。ステップS213で未処理の格要素が存在すると判定した場合(S213,Y)は、ステップS207に戻って、未処理の格要素を選択する。また、ステップS213で未処理の格要素が存在しないと判定した場合(S213,N)はステップS215に移行する。 In step S213, the zero pronoun complementing unit 18 determines whether there are unprocessed case elements, that is, case elements for which the processes in steps S207 to S211 have not been performed. If it is determined in step S213 that there is an unprocessed case element (S213, Y), the process returns to step S207 to select an unprocessed case element. If it is determined in step S213 that there is no unprocessed case element (S213, N), the process proceeds to step S215.
ステップS215では、ゼロ代名詞補完部18が、上述した、対話履歴から得られる焦点語が存在するか否かを判定する。ステップS215で対話履歴から得られる焦点語が存在すると判定した場合(S215,Y)は、ステップS217に移行する。また、ステップS215で対話履歴から得られる焦点語が存在しないと判定した場合(S215,N)は、本ゼロ代名詞補完処理のプログラムの実行を終了し、図2のステップS109に移行する。 In step S215, the zero pronoun complementation unit 18 determines whether the above-described focused word obtained from the dialogue history exists. If it is determined in step S215 that the in-focus word obtained from the dialogue history is present (S215, Y), the process proceeds to step S217. If it is determined in step S215 that the in-focus word obtained from the dialogue history does not exist (S215, N), the execution of the program of the zero pronoun complementing process is ended, and the process proceeds to step S109 in FIG.
ステップS217では、ゼロ代名詞補完部18が、ゼロ代名詞の補完(上記ステップS211の処理)が行われておらず、かつ焦点語がユーザ発話に含まれていないか否かを判定する。ステップS217でゼロ代名詞の補完が行われておらず、かつ焦点語がユーザ発話に含まれていないと判定した場合(S217,Y)は、ステップS219に移行する。また、ステップS217でゼロ代名詞の補完が行われた、又は焦点語がユーザ発話に含まれていると判定した場合(S217,N)は、本ゼロ代名詞補完処理のプログラムの実行を終了し、図2のステップS109に移行する。 In step S217, the zero pronoun complementation unit 18 determines whether or not the completion of the zero pronoun (the process of step S211) is not performed, and the focused word is not included in the user utterance. When it is determined in step S217 that the zero pronoun complementation has not been performed and the in-focus word is not included in the user's utterance (S217, Y), the process proceeds to step S219. If it is determined in step S217 that the zero pronoun has been complemented or if the in-focus word is included in the user's utterance (S217, N), the execution of the program of this zero pronoun complement processing is terminated, and the figure is It transfers to step S109 of 2.
ステップS219では、ゼロ代名詞補完部18が、ユーザ発話の先頭に、焦点語と「は」とを連結した文字列を追加し、図2のステップS109に移行する。 In step S219, the zero pronoun complementing unit 18 adds a character string obtained by concatenating the focused word and "ha" at the beginning of the user speech, and the process proceeds to step S109 in FIG.
図2のステップS109では、類義語置換部20が、入力したユーザ発話中の名詞句を類義語に置き換える。 In step S109 of FIG. 2, the synonym substitution unit 20 replaces the input noun phrase in the user's utterance with the synonym.
ステップS111では、トピック抽出部22が、入力したユーザ発話を当該ユーザ発話のトピックに置き換える。 In step S111, the topic extraction unit 22 replaces the input user utterance with the topic of the user utterance.
ステップS113では、発話ルールマッチ部26が、ゼロ代名詞補完部18による処理、類義語置換部20による処理、及びトピック抽出部22による処理の各々によりユーザ発話を書き換えられた後のユーザ発話、及び、書き換えられる前のユーザ発話の各々を、対話ルールの発話パターンと照合することにより、ユーザ発話に対する応答発話を決定する。 In step S113, the speech rule matching unit 26 rewrites the user speech after the user speech is rewritten by the processing by the zero pronoun complementing unit 18, the processing by the synonym substitution unit 20, and the processing by the topic extracting unit 22, and rewriting The response utterance to the user utterance is determined by matching each of the user's previous utterances with the utterance pattern of the dialogue rule.
ステップS115では、出力部28が、決定された応答発話を出力し、本対話処理のプログラムの実行を終了する。 In step S115, the output unit 28 outputs the determined response utterance, and ends the execution of the program of the dialogue processing.
このように、本実施形態では、対話における、ユーザ発話に省略された格要素を補完するか、又は焦点語をユーザ発話に追加する処理、ユーザ発話中の名詞句を類義語に置き換える処理、及び、ユーザ発話を当該ユーザ発話のトピックに置き換える処理の少なくとも1つの処理により前記ユーザ発話を書き換え、書き換える前のユーザ発話及び書き換えた後のユーザ発話の各々を発話パターンと照合することにより、ユーザ発話に対する応答発話を決定する。 As described above, in the present embodiment, processing for complementing the case element omitted in the user's utterance or adding a focused word to the user's utterance in the dialogue, processing for replacing the noun phrase in the user's utterance with the synonym, and A response to the user's utterance by rewriting the user's utterance by at least one process of replacing the user's utterance with the topic of the user's utterance, and collating the user's utterance before the rewriting and the user's utterance after the rewriting with the utterance pattern Determine your speech.
これにより、事業者にとって有用な対話ルールのみを用いた発話応答を実現することができる。そして、対話システムを用いた事業の実現性が高まり、人間とコンピュータが効率的に協業することができる。 In this way, it is possible to realize an utterance response using only interaction rules that are useful to the business operator. Then, the possibility of business using the dialogue system is enhanced, and human beings and computers can cooperate efficiently.
なお、本実施形態では、図1に示す機能の構成要素の動作をプログラムとして構築し、対話装置10として利用されるコンピュータにインストールして実行させるが、これに限らず、ネットワークを介して流通させても良い。 In the present embodiment, the operation of the component of the function shown in FIG. 1 is constructed as a program, installed in a computer used as the interactive apparatus 10 and executed, but the present invention is not limited to this. It is good.
また、構築されたプログラムをハードディスク、CD−ROM等の可搬記憶媒体に格納し、コンピュータにインストールしたり、配布したりしても良い。 Further, the constructed program may be stored in a portable storage medium such as a hard disk or a CD-ROM, and may be installed in a computer or distributed.
10 対話装置
12 入力部
14 焦点抽出部
16 対話履歴記憶部
18 ゼロ代名詞補完部
20 類義語置換部
22 トピック抽出部
24 対話ルール記憶部
26 発話ルールマッチ部
28 出力部
DESCRIPTION OF SYMBOLS 10 Dialogue device 12 Input part 14 Focus extraction part 16 Dialogue history storage part 18 Zero pronoun complement part 20 Synonym substitution part 22 Topic extraction part 24 Dialogue rule storage part 26 Speech rule matching part 28 Output part
Claims (8)
対話における、前記ユーザ発話に省略された格要素を補完するか、又は焦点語を前記ユーザ発話に追加する処理、前記ユーザ発話中の名詞句を類義語に置き換える処理、及び、前記ユーザ発話を当該ユーザ発話のトピックに置き換える処理の少なくとも1つの処理により前記ユーザ発話を書き換え、
書き換える前の前記ユーザ発話及び書き換えた後の前記ユーザ発話の各々を前記発話パターンと照合する発話ルールマッチ部
を備えた対話ルール照合装置。 A response utterance to the user utterance is determined by collating the user utterance with the utterance pattern based on a plurality of dialog rules including a user utterance as an input and a combination of an utterance pattern and a response utterance to the utterance of the utterance pattern. A speech rule matching device that
Processing for complementing the case element omitted in the user's speech or adding a focus word to the user's speech in dialogue, processing for replacing a noun phrase in the user's speech with a synonym, and the user's speech Rewrite the user utterance by at least one process of processing to replace the topic of the utterance;
A dialogue rule matching device comprising: a speech rule matching unit which matches each of the user speech before rewriting and the user speech after rewriting with the speech pattern.
請求項1記載の対話ルール照合装置。 The speech rule matching unit obtains similarity between each of the user speech before rewriting and each of the speech patterns collated with each of the user speech after rewriting, and for each of the at least one process in advance The dialogue rule collating apparatus according to claim 1, wherein the response utterance to the user utterance is determined based on a predetermined priority and the similarity.
ユーザ発話を入力する入力部と、
前記ユーザ発話から名詞句及び焦点語を抽出し、抽出した前記名詞句及び前記焦点語を対話履歴記憶部に記憶させる焦点抽出部と、
前記対話履歴記憶部に記憶された前記名詞句及び前記焦点語の少なくとも一方に基づいて、前記ユーザ発話に省略された格要素を補完するか、又は前記焦点語を前記ユーザ発話に追加するゼロ代名詞補完部と、
前記ユーザ発話中の名詞句を類義語に置き換える類義語置換部と、
前記ユーザ発話を当該ユーザ発話のトピックに置き換えるトピック抽出部と、
前記ゼロ代名詞補完部による処理、前記類義語置換部による処理、及び前記トピック抽出部による処理の各々により書き換えられた後の前記ユーザ発話、及び、書き換えられる前の前記ユーザ発話の各々を前記発話パターンと照合することにより、前記ユーザ発話に対する前記応答発話を決定する発話ルールマッチ部と、
前記発話ルールマッチ部により決定された前記応答発話を出力する出力部と、
を含む対話装置。 An utterance apparatus that determines a response utterance to a user's utterance by collating the user's utterance with the utterance pattern based on a plurality of dialogue rules including a combination of an utterance pattern and an utterance response to the utterance of the utterance pattern.
An input unit for inputting user utterances;
A focus extraction unit which extracts a noun phrase and a focused word from the user's speech and stores the extracted noun phrase and the focused word in a dialogue history storage unit;
A zero pronoun that complements the case element omitted in the user's utterance or adds the focal word to the user's utterance based on at least one of the noun phrase and the focal word stored in the dialogue history storage unit The complement section,
A synonym substitution unit that replaces noun phrases in the user utterance with synonyms;
A topic extraction unit that replaces the user utterance with a topic of the user utterance;
The user utterance after being rewritten by the processing by the zero pronoun complementation unit, the processing by the synonym substitution unit, and the processing by the topic extraction unit, and the user utterance before being rewritten are the utterance patterns An utterance rule matching unit that determines the response utterance to the user utterance by matching;
An output unit that outputs the response utterance determined by the utterance rule matching unit;
Interactive device including:
請求項3記載の対話装置。 The utterance rule matching unit obtains the degree of similarity with each of the utterance pattern before rewriting and the utterance pattern matched with each of the user utterance after rewriting, and the processing by the zero pronoun complementation unit, the synonym substitution The interactive apparatus according to claim 3, wherein the response utterance to the user's utterance is determined based on a predetermined priority for each of processing by a part and processing by the topic extraction unit, and the degree of similarity.
前記発話ルールマッチ部が、対話における、前記ユーザ発話に省略された格要素を補完するか、又は焦点語を前記ユーザ発話に追加する処理、前記ユーザ発話中の名詞句を類義語に置き換える処理、及び、前記ユーザ発話を当該ユーザ発話のトピックに置き換える処理の少なくとも1つの処理により前記ユーザ発話を書き換えるステップと、
前記発話ルールマッチ部が、書き換える前の前記ユーザ発話及び書き換えた後の前記ユーザ発話の各々を前記発話パターンと照合するステップと、
を含む対話ルール照合方法。 The user's utterance is input by including an utterance rule matching unit, and the user's utterance is compared with the utterance pattern based on a plurality of dialogue rules including an utterance pattern and a response utterance to the utterance of the utterance pattern. A dialogue rule matching method in a speech rule collating device for determining a response speech to a user speech, comprising:
A process of the speech rule matching unit complementing a case element omitted from the user's speech or adding a focused word to the user's speech in a dialogue, a process of replacing a noun phrase in the user's speech with a synonym, Rewriting the user utterance by at least one process of replacing the user utterance with a topic of the user utterance.
The speech rule matching unit matching the user speech before rewriting and the user speech after rewriting with the speech pattern;
Interaction rule matching method including.
請求項5記載の対話方法。 The speech rule matching unit determines similarity with each of the user speech before rewriting and each of the speech patterns collated with each of the user speech after rewriting, and for each of the at least one process in advance The dialogue method according to claim 5, further comprising the step of determining the response utterance to the user utterance based on a predetermined priority and the similarity.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017084616A JP6775465B2 (en) | 2017-04-21 | 2017-04-21 | Dialogue rule collation device, dialogue device, dialogue rule collation method, dialogue method, dialogue rule collation program, and dialogue program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017084616A JP6775465B2 (en) | 2017-04-21 | 2017-04-21 | Dialogue rule collation device, dialogue device, dialogue rule collation method, dialogue method, dialogue rule collation program, and dialogue program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2018181259A true JP2018181259A (en) | 2018-11-15 |
| JP6775465B2 JP6775465B2 (en) | 2020-10-28 |
Family
ID=64276951
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2017084616A Active JP6775465B2 (en) | 2017-04-21 | 2017-04-21 | Dialogue rule collation device, dialogue device, dialogue rule collation method, dialogue method, dialogue rule collation program, and dialogue program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6775465B2 (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2020123318A (en) * | 2019-01-30 | 2020-08-13 | ベイジン バイドゥ ネットコム サイエンス アンド テクノロジー カンパニー リミテッド | Method, apparatus, electronic device, computer-readable storage medium, and computer program for determining text relevance |
| CN112597777A (en) * | 2021-01-05 | 2021-04-02 | 网易(杭州)网络有限公司 | Multi-turn dialogue rewriting method and device |
| JP2022173178A (en) * | 2021-05-08 | 2022-11-18 | ソフネック株式会社 | Intended information extraction program, intended information extraction apparatus, and intended information extraction method |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003044088A (en) * | 2001-07-27 | 2003-02-14 | Sony Corp | Program, recording medium, and voice interaction apparatus and method |
| JP2006244262A (en) * | 2005-03-04 | 2006-09-14 | Nec Corp | Retrieval system, method and program for answer to question |
| JP2007206888A (en) * | 2006-01-31 | 2007-08-16 | Toyota Central Res & Dev Lab Inc | Response generating apparatus, method, and program |
| JP2009176274A (en) * | 2007-10-05 | 2009-08-06 | Fujitsu Ltd | Implementation of extended search and provision of extended search results |
| JP2014229275A (en) * | 2013-05-27 | 2014-12-08 | 株式会社Nttドコモ | Query answering device and method |
| US20160179939A1 (en) * | 2014-12-22 | 2016-06-23 | International Business Machines Corporation | Using Paraphrase Metrics for Answering Questions |
| JP2017037588A (en) * | 2015-08-14 | 2017-02-16 | 富士ゼロックス株式会社 | Information processor and information processing program |
-
2017
- 2017-04-21 JP JP2017084616A patent/JP6775465B2/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003044088A (en) * | 2001-07-27 | 2003-02-14 | Sony Corp | Program, recording medium, and voice interaction apparatus and method |
| JP2006244262A (en) * | 2005-03-04 | 2006-09-14 | Nec Corp | Retrieval system, method and program for answer to question |
| JP2007206888A (en) * | 2006-01-31 | 2007-08-16 | Toyota Central Res & Dev Lab Inc | Response generating apparatus, method, and program |
| JP2009176274A (en) * | 2007-10-05 | 2009-08-06 | Fujitsu Ltd | Implementation of extended search and provision of extended search results |
| JP2014229275A (en) * | 2013-05-27 | 2014-12-08 | 株式会社Nttドコモ | Query answering device and method |
| US20160179939A1 (en) * | 2014-12-22 | 2016-06-23 | International Business Machines Corporation | Using Paraphrase Metrics for Answering Questions |
| JP2017037588A (en) * | 2015-08-14 | 2017-02-16 | 富士ゼロックス株式会社 | Information processor and information processing program |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2020123318A (en) * | 2019-01-30 | 2020-08-13 | ベイジン バイドゥ ネットコム サイエンス アンド テクノロジー カンパニー リミテッド | Method, apparatus, electronic device, computer-readable storage medium, and computer program for determining text relevance |
| US11520812B2 (en) | 2019-01-30 | 2022-12-06 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Method, apparatus, device and medium for determining text relevance |
| CN112597777A (en) * | 2021-01-05 | 2021-04-02 | 网易(杭州)网络有限公司 | Multi-turn dialogue rewriting method and device |
| JP2022173178A (en) * | 2021-05-08 | 2022-11-18 | ソフネック株式会社 | Intended information extraction program, intended information extraction apparatus, and intended information extraction method |
| JP7312354B2 (en) | 2021-05-08 | 2023-07-21 | ソフネック株式会社 | Intention information extraction program, intention information extraction device, and intention information extraction method |
Also Published As
| Publication number | Publication date |
|---|---|
| JP6775465B2 (en) | 2020-10-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR102256240B1 (en) | Non-factoid question-and-answer system and method | |
| US11328726B2 (en) | Conversational systems and methods for robotic task identification using natural language | |
| Bontcheva et al. | Twitie: An open-source information extraction pipeline for microblog text | |
| US10936664B2 (en) | Dialogue system and computer program therefor | |
| CN109299228B (en) | Computer-implemented text risk prediction method and device | |
| US12001465B2 (en) | Response selecting apparatus, response selecting method, and response selecting program | |
| CN114036300A (en) | Language model training method and device, electronic equipment and storage medium | |
| KR101136007B1 (en) | System and method for anaylyzing document sentiment | |
| Alnawas et al. | Sentiment analysis of Iraqi Arabic dialect on Facebook based on distributed representations of documents | |
| US20140163951A1 (en) | Hybrid adaptation of named entity recognition | |
| Franco-Salvador et al. | Language variety identification using distributed representations of words and documents | |
| JP6743108B2 (en) | PATTERN RECOGNITION MODEL AND PATTERN LEARNING DEVICE, GENERATION METHOD THEREOF, FAQ EXTRACTION METHOD USING THE SAME, PATTERN RECOGNITION DEVICE, AND PROGRAM | |
| Varaprasad et al. | Applications and Techniques of Natural Language Processing: An Overview. | |
| Mandava et al. | Optimized BERT: an effective attention layer based deep learning technique utilizing for multiword term extraction | |
| JP6775465B2 (en) | Dialogue rule collation device, dialogue device, dialogue rule collation method, dialogue method, dialogue rule collation program, and dialogue program | |
| KR20120042562A (en) | Method for constructing named entities using online encyclopedia and apparatus for performing the same | |
| Gerlach | Improving statistical machine translation of informal language: a rule-based pre-editing approach for French forums | |
| CN114707489A (en) | Method and device for acquiring marked data set, electronic equipment and storage medium | |
| JP6067616B2 (en) | Utterance generation method learning device, utterance generation method selection device, utterance generation method learning method, utterance generation method selection method, program | |
| Mammadov et al. | Part-of-speech tagging for azerbaijani language | |
| Rahat et al. | A recursive algorithm for open information extraction from Persian texts | |
| WO2020026229A2 (en) | Proposition identification in natural language and usage thereof | |
| Ta et al. | GAN-BERT, an Adversarial Learning Architecture for Paraphrase Identification. | |
| Siddiqui et al. | Sarcasm detection from Twitter database using text mining algorithms | |
| JORDAN et al. | Real-time Language-Independent Algorithm for Dialogue Agents |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20181026 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20191009 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20191119 |
|
| A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20200120 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200214 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20200519 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200818 |
|
| A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20200827 |
|
| 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: 20200923 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20201006 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6775465 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |