JP6630701B2 - Answer candidate generation device, method, and program - Google Patents
Answer candidate generation device, method, and program Download PDFInfo
- Publication number
- JP6630701B2 JP6630701B2 JP2017079662A JP2017079662A JP6630701B2 JP 6630701 B2 JP6630701 B2 JP 6630701B2 JP 2017079662 A JP2017079662 A JP 2017079662A JP 2017079662 A JP2017079662 A JP 2017079662A JP 6630701 B2 JP6630701 B2 JP 6630701B2
- Authority
- JP
- Japan
- Prior art keywords
- word
- answer
- extended
- score
- candidate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、回答候補生成装置、方法、及びプログラムに係り、特に、対話システムで使用する回答候補を生成する回答候補生成装置、方法、及びプログラムに関する。 The present invention relates to an answer candidate generating device, a method, and a program, and more particularly, to an answer candidate generating device, a method, and a program for generating an answer candidate used in an interactive system.
一般的に、ロボット等の対話システムと話をする際、ユーザから発話を行い、返答することが多かった。しかし、最近では、システム側から話しかける雑談対話のようなものも存在し、シナリオベースで展開されている。システムから何かを問うといった発話の場合、相手の回答に対して、こちらがその回答を認識し、再び発話する必要がある。このようなシナリオを生成する際、システムの質問に対して、どういった回答の可能性があるかを人手で予測し、シナリオに起こすことが多い。 In general, when talking with a dialogue system such as a robot, the user often speaks and responds. However, recently, there is a kind of chat dialogue from the system side, which is developed on a scenario basis. In the case of an utterance such as asking something from the system, it is necessary to recognize the answer to the other party's answer and speak again. When such a scenario is generated, it is often the case that a possible answer to a question of the system is manually predicted and the scenario is generated.
しかし、相手の返答パターンは膨大であるため、対話システムにおいて想定される回答の多くを網羅することは困難であり、実行するにはコストが膨大であるという問題がある。 However, since the response pattern of the other party is enormous, it is difficult to cover many of the supposed answers in the interactive system, and there is a problem that the cost is enormous to execute.
本発明は、上記問題点を解決するために成されたものであり、質問文に対する適切かつ多様な回答候補を得ることができる回答候補生成装置、方法、及びプログラムを提供することを目的とする。 The present invention has been made to solve the above problems, and has as its object to provide an answer candidate generation device, a method, and a program that can obtain appropriate and various answer candidates for a question sentence. .
上記目的を達成するために、第1の発明に係る回答候補生成装置は、テキスト集合に含まれる単語の各々について、前記単語の概念を表す概念ベクトルを生成する概念ベクトルモデル生成部と、前記テキスト集合に含まれる単語のNグラムに基づいて言語モデルを生成する言語モデル生成部と、入力された質問文から、単語に置き換えるためのタグを付与した文パターンを生成する文パターン生成部と、前記質問文に対する回答単語の各々と前記質問文に含まれる単語の各々とに類似する単語の各々を、前記概念ベクトルのスコアに基づいて求めて、拡張回答単語候補とする拡張単語候補生成部と、前記文パターンに含まれる前記タグを拡張回答単語候補に置き換えたときに得られる、前記言語モデルのスコア、及び前記拡張回答単語候補についての前記概念ベクトルのスコアに基づく統合スコアが上位N個の拡張回答単語候補を求める拡張単語候補リランキング部と、を含んで構成されている。 In order to achieve the above object, an answer candidate generating apparatus according to a first aspect of the present invention includes: a concept vector model generating unit configured to generate a concept vector representing a concept of the word for each of words included in a text set; A language model generation unit that generates a language model based on N-grams of words included in the set, a sentence pattern generation unit that generates a sentence pattern to which a tag for replacing with a word is added from an input question sentence, An expanded word candidate generation unit that obtains each of the words similar to each of the answer words to the question sentence and each of the words included in the question sentence based on the score of the concept vector, and sets them as extended answer word candidates; The score of the language model, which is obtained when replacing the tag included in the sentence pattern with an extended answer word candidate, and the extended answer word candidate Total score based on the score of the concept vector of have is configured to include, and extension word candidate reranking unit for obtaining the top N expansion answer word candidates.
また、第1の発明に係る回答候補生成装置において、前記拡張単語候補リランキング部は、前記言語モデルのスコアを、前記文パターンの単語長の長さを考慮して求めるようにしてもよい。 Further, in the answer candidate generation device according to the first invention, the extended word candidate reranking unit may calculate the score of the language model in consideration of the word length of the sentence pattern.
また、第2の発明に係る回答候補生成装置は、テキスト集合に含まれる単語の各々について、前記単語の概念を表す概念ベクトルを生成する概念ベクトルモデル生成部と、
前記テキスト集合に含まれる単語のNグラムに基づいて言語モデルを生成する言語モデル生成部と、入力された質問文から、単語に置き換えるためのタグを付与した文パターンを生成する文パターン生成部と、前記質問文に対する回答単語の各々と前記質問文に含まれる単語の各々とに類似する単語の各々を、前記概念ベクトルのスコアに基づいて求めて、拡張回答単語候補とする拡張単語候補生成部と、前記文パターンに含まれる前記タグを拡張回答単語候補に置き換えたクエリを用いて検索を実行した結果得られるヒット数のスコア、及び前記拡張回答単語候補についての前記概念ベクトルのスコアに基づく統合スコアが上位N個の拡張回答単語候補を求める拡張単語候補リランキング部と、を含んで構成されている。
The answer candidate generation device according to the second invention is a concept vector model generation unit that generates a concept vector representing a concept of the word for each of the words included in the text set,
A language model generation unit that generates a language model based on the N-gram of a word included in the text set; and a sentence pattern generation unit that generates a sentence pattern to which a tag for replacing with a word has been added from an input question sentence. An extended word candidate generating unit that obtains each word similar to each of the answer words to the question sentence and each of the words included in the question sentence based on the score of the concept vector, and sets the word as an extended answer word candidate And integration based on a score of the number of hits obtained as a result of executing a search using a query in which the tags included in the sentence pattern are replaced with extended answer word candidates, and a score of the concept vector for the extended answer word candidates And an extended word candidate reranking unit that obtains the top N extended answer word candidates with a score.
第3の発明に係る回答候補生成方法は、概念ベクトルモデル生成部が、テキスト集合に含まれる単語の各々について、前記単語の概念を表す概念ベクトルを生成するステップと、言語モデル生成部が、前記テキスト集合に含まれる単語のNグラムに基づいて言語モデルを生成するステップと、文パターン生成部が、入力された質問文から、単語に置き換えるためのタグを付与した文パターンを生成するステップと、拡張単語候補生成部が、前記質問文に対する回答単語の各々と前記質問文に含まれる単語の各々とに類似する単語の各々を、前記概念ベクトルのスコアに基づいて求めて、拡張回答単語候補とするステップと、拡張単語候補リランキング部が、前記文パターンに含まれる前記タグを拡張回答単語候補に置き換えたときに得られる、前記言語モデルのスコア、及び前記拡張回答単語候補についての前記概念ベクトルのスコアに基づく統合スコアが上位N個の拡張回答単語候補を求めるステップと、を含んで実行することを特徴とする。 The answer candidate generation method according to a third aspect, wherein the concept vector model generation unit generates, for each of the words included in the text set, a concept vector representing the concept of the word; A step of generating a language model based on the N-gram of a word included in the text set, and a step of generating a sentence pattern with a tag for replacing the word from the input question sentence by the sentence pattern generation unit; The extended word candidate generation unit obtains each of words similar to each of the answer words to the question sentence and each of the words included in the question sentence based on the score of the concept vector, Obtained when the extended word candidate reranking unit replaces the tag included in the sentence pattern with an extended answer word candidate. Score of the language model, and wherein the total score based on the score of the concept vectors for the extended answer word candidate is executed includes determining a top N expansion answer word candidates, a.
また、第3の発明に係る回答候補生成方法は、前記拡張単語候補リランキング部は、前記言語モデルのスコアを、前記文パターンの単語長の長さを考慮して求めるようにしてもよい。 In the answer candidate generation method according to a third aspect, the extended word candidate reranking unit may determine the score of the language model in consideration of the word length of the sentence pattern.
第4の発明に係る回答候補生成方法は、概念ベクトルモデル生成部が、テキスト集合に含まれる単語の各々について、前記単語の概念を表す概念ベクトルを生成するステップと、言語モデル生成部が、前記テキスト集合に含まれる単語のNグラムに基づいて言語モデルを生成するステップと、文パターン生成部が、入力された質問文から、単語に置き換えるためのタグを付与した文パターンを生成するステップと、拡張単語候補生成部が、前記質問文に対する回答単語の各々と前記質問文に含まれる単語の各々とに類似する単語の各々を、前記概念ベクトルのスコアに基づいて求めて、拡張回答単語候補とするステップと、拡張単語候補リランキング部が、前記文パターンに含まれる前記タグを拡張回答単語候補に置き換えたクエリを用いて検索を実行した結果得られるヒット数のスコア、及び前記拡張回答単語候補についての前記概念ベクトルのスコアに基づく統合スコアが上位N個の拡張回答単語候補を求めるステップと、を含んで実行することを特徴とする。 The answer candidate generation method according to a fourth aspect, wherein the concept vector model generation unit generates, for each of the words included in the text set, a concept vector representing the concept of the word; A step of generating a language model based on the N-gram of a word included in the text set, and a step of generating a sentence pattern with a tag for replacing the word from the input question sentence by the sentence pattern generation unit; The extended word candidate generation unit obtains each of words similar to each of the answer words to the question sentence and each of the words included in the question sentence based on the score of the concept vector, And an extended word candidate reranking unit uses a query obtained by replacing the tag included in the sentence pattern with an extended answer word candidate. Determining the top N extended answer word candidates based on the score of the number of hits obtained as a result of executing the search, and the integrated score based on the concept vector score of the extended answer word candidate. Features.
また、第5の発明に係るプログラムは、コンピュータを、第1及び第2の発明に係る回答候補生成装置の各部として機能させるためのプログラムである。 A program according to a fifth invention is a program for causing a computer to function as each unit of the answer candidate generation device according to the first and second inventions.
また、本発明の回答候補生成装置、方法、及びプログラムによれば、入力された質問文から、単語に置き換えるためのタグを付与した文パターンを生成し、質問文に対する回答単語の各々と質問文に含まれる単語の各々とに類似する単語の各々を、概念ベクトルのスコアに基づいて求めて、拡張回答単語候補とし、文パターンに含まれるタグを拡張回答単語候補に置き換えたときに得られる、言語モデルのスコア、及び概念ベクトルのスコアに基づく統合スコアが上位N個の拡張回答単語候補を求めることにより、質問文に対する適切かつ多様な回答候補を得ることができる、という効果が得られる。 Further, according to the answer candidate generating apparatus, method, and program of the present invention, a sentence pattern to which a tag for replacing a word is added is generated from an input question sentence, and each of the answer words to the question sentence and the question sentence are generated. Each of the words similar to each of the words included in the is obtained based on the score of the concept vector, as an extended answer word candidate, obtained when replacing the tag included in the sentence pattern with the extended answer word candidate, By obtaining the top N extended answer word candidates having an integrated score based on the score of the language model and the score of the concept vector, it is possible to obtain appropriate and diverse answer candidates for the question sentence.
以下、図面を参照して本発明の実施の形態を詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
<本発明の実施の形態に係る概要> <Overview according to Embodiment of the Present Invention>
まず、本発明の実施の形態における概要を説明する。 First, an outline of an embodiment of the present invention will be described.
上述した問題点に対して、本実施の形態では、大量のテキストを用いた統計情報、質問の言語情報及び統計情報を利用し、対話システムがした質問文に対して、ユーザの回答内容を予測することで、対話シナリオの作成支援を実現する。 In order to solve the above-mentioned problems, in the present embodiment, a user's answer content is predicted for a question sentence made by a dialog system using statistical information using a large amount of text, linguistic information of a question and statistical information. By doing so, support for creating a dialog scenario is realized.
本実施の形態の回答候補生成装置は、対話システムのシナリオに関して、システムが発する質問文と、その質問文の回答となる単語(回答シード)を数語与えることで、回答単語を拡張し、質問に対する様々な回答となる単語を出力する装置である。 The answer candidate generation device according to the present embodiment expands an answer word by giving a question sentence from the system and a few words (answer seed) to be an answer of the question sentence, with respect to a scenario of the dialogue system. Is a device that outputs various answers to words.
本実施の形態では、ブログ記事などの大量のテキストを統計処理し、単語の意味を表現する概念ベクトルを作成する。概念ベクトルの類似度に基づいて、出力する拡張単語候補を決定する。また、質問文を言語解析して、文パターンを生成する。概念ベクトルに基づいて出力された拡張単語候補を文パターンに当てはめて、言語モデル的に妥当であるかを判定することで、質問に対して妥当な回答となる単語をより高精度に出力できることに特徴がある。 In the present embodiment, a large amount of text such as a blog article is statistically processed, and a concept vector expressing the meaning of a word is created. An extended word candidate to be output is determined based on the similarity between the concept vectors. In addition, a sentence pattern is generated by language analysis of the question sentence. By applying extended word candidates output based on concept vectors to sentence patterns and determining whether they are valid as a language model, it is possible to output words that are valid answers to questions with higher accuracy There are features.
また、上記手法によって出力した拡張回答単語の集合を回答シードとして再度入力することでより多様な拡張単語候補を入手することもできる。このとき、再度入力する拡張単語候補を意味が近いもの同士でまとめるクラスタリングを行い、各クラスタで単語を拡張することで、より多様な拡張単語候補を得ることができるという特徴がある。 Further, by inputting a set of extended answer words output by the above method as an answer seed again, more diverse extended word candidates can be obtained. At this time, there is a feature that by performing clustering for re-entering extended word candidates with similar meanings and expanding words in each cluster, it is possible to obtain more diverse extended word candidates.
<本発明の実施の形態に係る回答候補生成装置の構成> <Configuration of answer candidate generating apparatus according to an embodiment of the present invention>
次に、本発明の実施の形態に係る回答候補生成装置の構成について説明する。図1に示すように、本発明の実施の形態に係る回答候補生成装置100は、CPUと、RAMと、後述する回答候補生成処理ルーチンを実行するためのプログラムや各種データを記憶したROMと、を含むコンピュータで構成することが出来る。この回答候補生成装置100は、機能的には図1に示すように入力部10と、演算部20と、出力部50とを備えている。 Next, the configuration of the answer candidate generation device according to the embodiment of the present invention will be described. As shown in FIG. 1, an answer candidate generating device 100 according to an embodiment of the present invention includes a CPU, a RAM, a ROM storing a program and various data for executing an answer candidate generating process routine described below, And a computer including The answer candidate generation device 100 functionally includes an input unit 10, a calculation unit 20, and an output unit 50 as shown in FIG.
入力部10は、質問文、及び質問文に対する回答単語の各々(以下「(元の)回答シード」とも記載する)の入力を受け付ける。本実施の形態では、質問文として「できたてで食べたい食べ物は?」を受け付け、回答単語の各々として、「パン、揚げ物、ご飯、麺類、焼肉」を受け付けた場合を例に説明する。 The input unit 10 receives input of a question sentence and each of answer words to the question sentence (hereinafter, also referred to as “(original) answer seed”). In the present embodiment, a case will be described as an example where a question sentence “What is the food you want to eat freshly and want to eat?” Is received and “Bread, fried food, rice, noodles, yakiniku” is received as each of the answer words.
演算部20は、概念ベクトルモデル生成部22と、概念ベクトルモデル24と、言語モデル生成部26と、言語モデル28と、文パターン生成部30と、拡張単語候補生成部32と、拡張回答単語候補リランキング部34と、クラスタリング部36と、条件判定部38とを含んで構成されている。 The operation unit 20 includes a concept vector model generation unit 22, a concept vector model 24, a language model generation unit 26, a language model 28, a sentence pattern generation unit 30, an extended word candidate generation unit 32, an extended answer word candidate It includes a re-ranking unit 34, a clustering unit 36, and a condition determining unit 38.
概念ベクトルモデル生成部22は、テキスト集合に含まれる単語の各々について、単語の概念を表す概念ベクトルを生成し、概念ベクトルモデル24として記憶する。概念ベクトルは、テキスト集合から単語の出現情報に基づくものであり、本実施の形態では、概念ベクトルの作成手法はニューラルネットワークを活用したもの(Word2vec)を使用する。また、特異値分解を利用したものなど任意のものを使用して良い。但し、後述する拡張単語候補生成部32では、複数の単語ベクトルを合成する処理を行うため、概念ベクトルモデル生成部22で採用する概念ベクトルは、合成ベクトルとしても利用可能なものとする。合成方法については特に指定しない。 The concept vector model generation unit 22 generates a concept vector representing a concept of a word for each word included in the text set, and stores the concept vector as a concept vector model 24. The concept vector is based on word appearance information from a text set. In the present embodiment, a concept vector creation method using a neural network (Word2vec) is used. Also, any one such as one using singular value decomposition may be used. However, since the extended word candidate generation unit 32, which will be described later, performs a process of synthesizing a plurality of word vectors, the concept vector adopted by the concept vector model generation unit 22 can be used as a synthesized vector. The method of synthesis is not specified.
言語モデル生成部26は、テキスト集合に含まれる単語のNグラムに基づいて言語モデル28を生成する。この時、言語モデルの作成方法は特に指定しないが、モデルを効率的に活用するため、「は」「が」などの助動詞を「*」に置き換える。ただし、ここで作成する言語モデル28は後述する文パターン生成部30で生成する文パターンを使用できる形式であることとする。 The language model generation unit 26 generates a language model 28 based on N-grams of words included in the text set. At this time, the method of creating the language model is not particularly specified, but auxiliary verbs such as “ha” and “ga” are replaced with “*” in order to use the model efficiently. However, the language model 28 created here is in a format that can use a sentence pattern generated by a sentence pattern generation unit 30 described later.
文パターン生成部30は、入力部10で受け付けた質問文から、単語に置き換えるためのタグを付与した文パターンを生成する。具体的には、まず、文パターン生成部30では、入力された質問文を構文解析する。ここでの構文解析とは、係り受け解析である。係り受け解析された質問文に対してまず、「なぜ」「なに」「いつ」「どこ」「誰」といった5W1Hの表現を検索する。該当した5W1Hの表現を、単語に置き換えるためのタグ(<cand>)に置き換える。次に、係り受け解析結果で動詞や動詞語幹が含まれる文節を見つける。この文節を基準文節として、残りの文節を基準文節の前と後に分け、それぞれで係り受け関係に従い文節を合成する。ここで、基準文節の前の文節と合成する場合には、まず基準文節の前に、タグを含む“<cand> *”を付与(*は任意の助詞)し、その後、係り受け関係によって文節を合成する。基準文節の後の文節との合成には、質問文の最後の文節の最後に置き換えタグ“<cand>”を付与し(句読点や疑問符は削除)、そこから係り受け関係に従い合成を繰り返す。 The sentence pattern generation unit 30 generates a sentence pattern to which a tag for replacing with a word has been added from the question sentence received by the input unit 10. Specifically, first, the sentence pattern generation unit 30 parses the input question sentence. The syntax analysis here is dependency analysis. First, a 5W1H expression such as “why”, “what”, “when”, “where”, and “who” is searched for the question text subjected to the dependency analysis. The corresponding expression of 5W1H is replaced with a tag (<cand>) for replacing with a word. Next, a phrase containing a verb or a verb stem is found from the result of the dependency analysis. With this clause as a reference clause, the remaining clauses are divided before and after the reference clause, and the clauses are combined according to the dependency relations. Here, when combining with the clause before the reference clause, “<cand> *” including a tag is added before the reference clause (* is an arbitrary particle), and then the clause is determined by the dependency relation. Are synthesized. To combine with the clause after the reference clause, a replacement tag “<cand>” is added to the end of the last clause of the question sentence (punctuation marks and question marks are deleted), and the composition is repeated from there according to the dependency relation.
「できたてで食べたい食べ物は?」という質問文の基準文節は「食べ たい」の部分となる。この基準文節の前の文節との合成では「<cand> * 食べ たい」「<cand> * できたて で 食べ たい」という2つの文パターンが生成され、後ろの文節との合成によって「食べ物 は <cand>」、「食べ たい 食べ物 は <cand>」、「できたて で 食べ たい 食べ物 は <cand>」という3つの文パターンが生成される。よって、合計で5つの文パターンが生成される。個々で置き換えタグ<cand>は自由に設定してよく、また「は」などの助詞を*に置き換えた文パターンを作成しても良い。 The standard phrase in the question "What food do you want to eat freshly?" Is the part you want to eat. In the composition with the clause before this reference clause, two sentence patterns of “<cand> * I want to eat” and “<cand> * I want to eat freshly made” are generated. Three sentence patterns are generated: <cand>, <cand> is the food you want to eat, and <cand> is the food you want to eat. Therefore, a total of five sentence patterns are generated. The replacement tag <cand> may be freely set individually, or a sentence pattern in which a particle such as "ha" is replaced with * may be created.
以下は文パターンの出力例である。この例では、「は」などの助詞を*に置き換えている。 The following is an output example of a sentence pattern. In this example, particles such as "wa" are replaced with *.
文パターン1:<cand> * 食べ た い
文パターン2:<cand> * できたて * 食べ た い
文パターン3:食べ物 * <cand>
文パターン4:食べ た い 食べ物 * <cand>
文パターン5:できたて * 食べ た い 食べ物 * <cand>
Sentence pattern 1: <cand> * Sentence pattern 2 you want to eat: <cand> * Freshly made * Sentence pattern 3 you want to eat: Food * <cand>
Sentence pattern 4: Food you want to eat * <cand>
Sentence pattern 5: Freshly made * Food you want to eat * <cand>
拡張単語候補生成部32は、入力部10で受け付けた質問文に対する回答単語の各々と質問文に含まれる単語の各々とに類似する単語の各々を、概念ベクトルモデル24に基づいて求めて、拡張回答単語候補とする。また、後述するクラスタリング部36で得られたクラスタ毎に、クラスタに属する単語の各々と質問文に含まれる単語の各々とに類似する単語の各々を、概念ベクトルモデル24に基づいて求めて、拡張回答単語候補とする。 The expanded word candidate generation unit 32 obtains each of words similar to each of the answer words to the question sentence received by the input unit 10 and each of the words included in the question sentence based on the concept vector model 24, and Answer word candidates. Further, for each cluster obtained by the clustering unit 36 described later, each word similar to each of the words belonging to the cluster and each of the words included in the question sentence is obtained based on the concept vector model 24, and expanded. Answer word candidates.
拡張単語候補生成部32では、概念ベクトルモデル24の単語の概念ベクトルを用いて、出力となる拡張回答単語の候補となる単語を生成する。入力となる回答単語(回答シード)の集合をαとする。質問文を形態素解析した結果の集合Qを用意する。ここで、αにQ中のある単語qを加えたときの集合α+qの単語の概念ベクトルの合成ベクトルを The extended word candidate generation unit 32 generates a candidate word for an output extended answer word using the concept vector of the word of the concept vector model 24. A set of input answer words (answer seeds) is represented by α. A set Q of the result of morphological analysis of a question sentence is prepared. Here, a composite vector of the concept vectors of the words in the set α + q when a certain word q in Q is added to α
と表すとすると、ある単語wの概念ベクトルのスコアは以下(1)式の通りに計算できる。 Then, the score of the concept vector of a certain word w can be calculated as in the following equation (1).
・・・(1)
... (1)
ここで、 here,
は、単語qの各々について作成された合成ベクトル Is a composite vector created for each of the words q
と単語wの概念ベクトル And word w concept vector
との類似度である。類似度の計算方法は、数値が大きいほど類似性が高いことを表すものであれば任意のものを使用できる。概念ベクトルモデルに含まれる全ての単語に対して、上記のスコアを計算し、スコアを降順に並べたときの上位n語を拡張回答単語候補として次の拡張回答単語候補リランキング部34で使用する。 Is the degree of similarity. As a method of calculating the similarity, any method can be used as long as the larger the numerical value is, the higher the similarity is. The above score is calculated for all the words included in the concept vector model, and the top n words when the scores are arranged in descending order are used as the extended answer word candidates in the next extended answer word candidate reranking section 34. .
また、拡張単語候補生成部32では、クラスタリング部36によるクラスタリング後は、例えば、クラスタ毎の拡張回答単語候補の集合Qkが得られるため、単語wについて、クラスタ毎に上記スコアを計算する。そして、全てのクラスタについて計算されたスコアを降順に並べたときの上位n語を拡張回答単語候補として次の拡張回答単語候補リランキング部34で使用する。なお、単語wについてクラスタ毎に計算されたスコアを合計したスコアを用いても良い。また、上記(1)式の計算に、拡張回答単語候補が属するクラスタに属する単語数を係数として導入した計算方法としても良い。例えば、全クラスタの単語数が100であり、あるクラスタの単語数が5であれば、5/100を係数とする等すればよい。 Further, the extended word candidate generating unit 32, the clustered by the clustering unit 36, for example, because the set Q k of the extended answer word candidate for each cluster is obtained, for the word w, for calculating the score for each cluster. Then, the top n words obtained when the scores calculated for all clusters are arranged in descending order are used by the next extended answer word candidate reranking unit 34 as extended answer word candidates. Note that a score obtained by summing the scores calculated for each cluster for the word w may be used. Further, a calculation method may be adopted in which the number of words belonging to the cluster to which the extended answer word candidate belongs is introduced as a coefficient in the calculation of the above equation (1). For example, if the number of words in all clusters is 100 and the number of words in a certain cluster is 5, 5/100 may be used as a coefficient.
拡張回答単語候補リランキング部34は、上位n語の拡張回答単語候補の各々について、文パターンに含まれるタグを当該拡張回答単語候補に置き換えたときに得られる、言語モデル28のスコア、及び当該拡張回答単語候補について計算された概念ベクトルのスコアに基づく統合スコアを算出し、統合スコアが上位N個の拡張回答単語候補を求める。また、クラスタリング部36によるクラスタリング後も同様に、上位n語の拡張回答単語候補の各々について、文パターンに含まれるタグを当該拡張回答単語候補に置き換えたときに得られる、言語モデル28のスコア、及び当該拡張回答単語候補について計算された概念ベクトルのスコアに基づく統合スコアを算出し、統合スコアが上位N個の拡張回答単語候補を求める。クラスタリング後の統合スコアは、言語モデル28のスコア、及び当該拡張回答単語候補が属するクラスタに属する単語数を係数として概念ベクトルのスコアに乗算したスコアに基づいて求められる。 The extended answer word candidate re-ranking unit 34 obtains the score of the language model 28 obtained when each of the top n extended answer word candidates replaces the tag included in the sentence pattern with the extended answer word candidate. An integrated score is calculated based on the score of the concept vector calculated for the extended answer word candidate, and the top N extended answer word candidates with the integrated score are obtained. Similarly, after the clustering by the clustering unit 36, the score of the language model 28 obtained when the tag included in the sentence pattern is replaced with the extended answer word candidate for each of the upper n extended word candidates. Then, an integrated score based on the score of the concept vector calculated for the extended answer word candidate is calculated, and the top N extended answer word candidates with the integrated score are obtained. The integrated score after clustering is obtained based on the score of the language model 28 and the score obtained by multiplying the score of the concept vector by using the number of words belonging to the cluster to which the extended answer word candidate belongs as a coefficient.
具体的には、拡張回答単語候補リランキング部34では、まず、拡張回答単語候補の各々について、文パターンの置き換えタグ<cand>の部分を当該拡張回答単語候補に置き換えることにより、拡張回答単語候補の各単語を文パターンに当てはめる。そして、置き換えた文を言語モデル28に入力して言語モデル28のスコアを計算する。ここで、言語モデル28のスコア算出方法については任意のものを使用できる。本実施の形態では、例えば、一般的な言語モデルにおけるスコアとして、単語の条件付き確率を用い、以下(2)式の通り、拡張回答単語候補wのスコアScore(w)を計算する。 Specifically, the extended answer word candidate reranking unit 34 first replaces the part of the sentence pattern replacement tag <cand> with the extended answer word candidate for each of the extended answer word candidates, thereby Is applied to the sentence pattern. Then, the replaced sentence is input to the language model 28, and the score of the language model 28 is calculated. Here, any method of calculating the score of the language model 28 can be used. In the present embodiment, for example, the score Score (w) of the extended answer word candidate w is calculated using the conditional probability of a word as a score in a general language model, as in the following equation (2).
・・・(2)
... (2)
ここで、上記(2)式において、wはある拡張回答単語候補、pは文パターンを表している。上記(2)式では、拡張回答単語候補wと全ての文パターンpとの組み合わせの各々についてScore(w,p)を計算し、leng(p)を重みとして乗算して合計している。leng(p)は文パターンpの単語長を表している。単語長が長いほど、重みを大きくするようにして、単語長を考慮することで、長い文パターンの影響が大きくなる。長い文パターンの方が、修飾語などが含まれた質問文に近い文になるため長い文パターンで出現しやすい語の方が、より質問文に関連のある文書になる。 Here, in the above equation (2), w represents a certain extended answer word candidate, and p represents a sentence pattern. In the above equation (2), Score (w, p) is calculated for each combination of the extended answer word candidate w and all sentence patterns p, and the sum is obtained by multiplying length (p) as a weight. length (p) represents the word length of the sentence pattern p. The longer the word length, the greater the weight, and considering the word length, the greater the effect of long sentence patterns. Since a long sentence pattern is a sentence closer to a question sentence including a modifier or the like, a word that is likely to appear in a long sentence pattern is a document that is more relevant to the question sentence.
また、言語モデル28の代替として、拡張回答単語候補wを置き換えた文パターンpをクエリ(q(w、p))としたWeb検索を実行して、検索ヒット数をスコアとして用いて下記(3)式のようにSore(w,p)の計算をすることも可能である。 Further, as an alternative to the language model 28, a Web search is executed using the sentence pattern p in which the extended answer word candidate w is replaced as a query (q (w, p)), and the number of search hits is used as a score (3) It is also possible to calculate Sore (w, p) as in equation (1).
・・・(3)
... (3)
ここでH(q(w、p))はクエリq(w、p)でWeb検索したときの検索ヒット数を示している。このとき、上記(3)式で計算されたSore(w,p)を用いて、上記(2)式の右側に従って、拡張回答単語候補wのスコアScore(w)が計算される。 Here, H (q (w, p)) indicates the number of search hits when performing a Web search using the query q (w, p). At this time, the score Score (w) of the extended answer word candidate w is calculated according to the right side of the above equation (2) using Sore (w, p) calculated by the above equation (3).
そして、拡張回答単語候補wの各々について、言語モデル28のスコアScore(w)と、拡張単語候補生成部32で拡張回答単語候補wについて計算された概念ベクトルのスコアを用いて、最終的な統合スコアを計算する。ここで、統合スコアの計算方法は、言語モデル28のスコアと概念ベクトルのスコアとがどちらも考慮されている手法であれば、任意のものを使用できる。言語モデル28のスコアと概念ベクトルのスコアとの平均値を使用しても良いし、言語モデル28のスコアで降順に並べたスコアの順位と、概念ベクトルのスコアで降順に並べたときの順位との平均値を利用しても良い。 Then, for each of the extended answer word candidates w, final integration is performed using the score Score (w) of the language model 28 and the score of the concept vector calculated for the extended answer word candidate w by the extended word candidate generation unit 32. Calculate the score. Here, as a calculation method of the integrated score, any method can be used as long as both the score of the language model 28 and the score of the concept vector are considered. The average of the score of the language model 28 and the score of the concept vector may be used, or the rank of the score arranged in descending order by the score of the language model 28 and the order of the score arranged in descending order by the score of the concept vector. May be used.
統合スコアを降順に拡張回答単語候補を並べたとき、上位N件を出力部50に出力する。また、次のクラスタリング部36で使用する単語集合とする。ここで、拡張単語候補生成部32の拡張回答単語候補の出力数nと最終的な出力数であるNは、n>Nであれば自由に設定して良い。また、クラスタリングを用いた場合の統合スコア計算手法についても、上記と同様の計算手法でも良いし、上記の計算方法に加えて例えば、拡張回答単語候補の概念ベクトルのスコアに、拡張回答単語候補が属するクラスタに属する単語数を係数として導入した計算方法としても良い。これは、拡張回答単語候補リランキング部34で出力される拡張回答単語候補の多くは、回答シードと質問文に合致するものだが、中には間違いとなるような拡張回答単語候補が含まれる事がある。このような拡張回答単語候補は他の出力と大きく傾向が違う単語であることが多いため、独立したクラスタを形成する傾向がある。単語数を係数として処理をしておくと、小さいクラスタ(単語数が少ないクラスタ)から出力された拡張回答単語候補のスコアが小さくなる傾向があるので、このような拡張回答単語候補が、多く出力されないようにすることが可能である。 When the extended answer word candidates are arranged in descending order of the integrated score, the top N items are output to the output unit 50. In addition, a word set used in the next clustering unit 36 is used. Here, the output number n and the final output number N of the extended answer word candidates of the extended word candidate generation unit 32 may be freely set if n> N. In addition, as for the integrated score calculation method when clustering is used, the same calculation method as described above may be used, or in addition to the above calculation method, for example, the extended answer word candidate A calculation method may be adopted in which the number of words belonging to the cluster to which the cluster belongs is introduced as a coefficient. This is because many of the extended answer word candidates output by the extended answer word candidate reranking unit 34 match the answer seed and the question sentence, but include extended answer word candidates that are incorrect. There is. Such an extended answer word candidate is often a word having a tendency greatly different from other outputs, and thus tends to form an independent cluster. If the processing is performed using the number of words as a coefficient, the score of the extended answer word candidate output from a small cluster (a cluster with a small number of words) tends to be small. It is possible not to be done.
以下は、N=10とした場合の統合スコア上位10件の拡張回答単語候補の出力例である。 The following is an output example of the extended answer word candidates of the top 10 integrated scores when N = 10.
カレー、唐揚げ、ハンバーグ、カレーライス、焼きそば、総菜、丼飯、パスタ、トンカツ、から揚げ Curry, fried chicken, hamburger, curry rice, yakisoba, side dish, rice bowl, pasta, tonkatsu, fried
以下は、上記10件をクラスタリングし、クラスタ毎に求められた拡張回答単語候補を用いて、更に求めた統合スコア上位10件の拡張回答単語候補の出力例である。 The following is an example of output of the extended answer word candidates of the top 10 integrated scores further obtained by clustering the above 10 cases and using the extended answer word candidates obtained for each cluster.
コロッケ、チャーハン、オムライス、餃子、たらこスパ、ポテトフライ、炒飯、カツ丼、焼き飯、カニクリームコロッケ Croquette, fried rice, omelet, gyoza, tarako spa, fried rice, fried rice, katsudon, fried rice, crab cream croquette
クラスタリング部36は、上位N個の拡張回答単語候補と、質問文に対する回答単語とを含む単語集合に対して、概念ベクトルモデル24に基づいてクラスタリングを行う。クラスタリングの手法については、任意の手法を使用して良い。クラスタ数を事前に設定する方法(k-means法)やクラスタ数を自動的に決定する手法(Affinity Propagation)を用いても良い。 The clustering unit 36 performs clustering based on the concept vector model 24 on a word set including the top N extended answer word candidates and answer words for the question sentence. As for the clustering method, any method may be used. A method of setting the number of clusters in advance (k-means method) or a method of automatically determining the number of clusters (Affinity Propagation) may be used.
本実施の形態でクラスタリングを行う理由を以下に説明する。 The reason for performing clustering in the present embodiment will be described below.
本実施の形態では、入力の質問文と回答シードを与えることで、回答シードを拡張した拡張回答単語集合を得ることが出来るが、ここでまでの拡張単語候補生成部32、及び拡張回答単語候補リランキング部34の処理を複数回実行することで、より多様かつ多数の拡張回答単語候補の集合を得ることができる。その場合、拡張回答単語候補リランキング部34で出力したN語を次回の拡張の回答シードとして使用する。出力した拡張回答単語候補の集合を次回の回答シードとすることで、初期に入力した元の回答シードや前回の出力とは異なる単語を得ることができるが、出力されたN個の拡張回答単語候補の集合は元の回答シードと比較して単語数が多い。この状態で拡張単語候補生成部32の拡張回答単語候補の計算を行った場合、回答シードから作成する単語の概念ベクトルの合成ベクトルは、多数の単語の意味が平均化されたものになってしまい、入手できる単語の多様性が失われるという問題があった。 In the present embodiment, an extended answer word set in which the answer seed is extended can be obtained by giving the input question sentence and the answer seed, but the extended word candidate generation unit 32 and the extended answer word candidate By executing the processing of the re-ranking unit 34 a plurality of times, it is possible to obtain a more diverse and large set of extended answer word candidates. In this case, the N words output by the extended answer word candidate reranking unit 34 are used as the answer seed for the next extension. By using the set of output extended answer word candidates as the next answer seed, it is possible to obtain a word different from the original answer seed initially input or the previous output, but the N extended answer words output The set of candidates has more words than the original answer seed. In this state, if the extended word candidate generation unit 32 calculates the extended answer word candidate, the composite vector of the concept vectors of the words created from the answer seeds is one in which the meanings of many words are averaged. However, there is a problem that the variety of available words is lost.
クラスタリング部36では、上記の問題を解決するために、回答シードとして使用するN語に対して、概念ベクトルモデル24の単語の概念ベクトルの類似性に基づくクラスタリングを行い、複数のクラスタに分割する。そして、拡張単語候補生成部32ではクラスタごとに上記(1)式の計算を行い、全てのクラスタについての上位n個の拡張回答単語候補を求める。そして、拡張回答単語候補リランキング部34で、全ての拡張回答単語候補の各々について、上記(2)式で拡張回答単語候補wのスコアScore(w)を計算して、更に、統合スコアを計算することによって、ループ2回目以降の出力単語を決定する。クラスタリングを行う際には、新しく使用するN語に、元の回答シードの単語集合αを追加した単語集合で行うものとする。拡張回答単語候補リランキング部34で出力されたN語は元の回答シードを拡張した語であるが質問文や言語モデルを考慮しているため回答シードよりも多様な語の集合となる。この状態でクラスタを作成すると、クラスタが分散しやすくなる。また、N語の中には解析ミスで出力される語も含まれており、これら不適切な語の集合でクラスタが作成されてしまうと2回目以降の出力される回答が不適切な単語で占められる可能性がでる。そのため、元の回答シードの単語集合αは意味が近い可能性が高く、間違いなく正しい単語であるため、元の回答シード単語集合αを含めてクラスタリングを行ったほうが、クラスタのまとまりがよくなり、かつ不適切なクラスタが大量に生成されることを防ぐ働きがある。 In order to solve the above problem, the clustering unit 36 clusters N words used as answer seeds based on the similarity of the concept vectors of the words of the concept vector model 24, and divides the N words into a plurality of clusters. Then, the extended word candidate generation unit 32 calculates the above equation (1) for each cluster, and obtains the top n extended answer word candidates for all clusters. Then, the extended answer word candidate reranking section 34 calculates the score Score (w) of the extended answer word candidate w for each of all the extended answer word candidates by the above equation (2), and further calculates the integrated score. By doing so, output words after the second loop are determined. When clustering is performed, the word set is obtained by adding the word set α of the original answer seed to N words to be newly used. The N words output by the extended answer word candidate reranking unit 34 are words obtained by expanding the original answer seed, but are a set of more diverse words than the answer seed because the question sentence and the language model are taken into account. When a cluster is created in this state, the cluster is easily dispersed. In addition, some of the N words include words output due to an analysis error, and if a cluster is created with a set of these inappropriate words, the answer output from the second time onward is an inappropriate word. Could be occupied. Therefore, the word set α of the original answer seed is likely to have a similar meaning and is definitely a correct word, so clustering including the original answer seed word set α improves the unity of clusters, In addition, it has a function of preventing a large number of inappropriate clusters from being generated.
クラスタごとに単語の拡張を行うことで、より多様性に富んだ拡張語を取得できるようになるという特徴がある。図2にクラスタリングを使用した場合と使用していない場合の拡張語の探索イメージの比較を示す。図2中の各黒丸は、概念ベクトルで表現された回答シードの単語を示し、星印は合成ベクトルを示している。点線で囲まれた範囲が合成ベクトルの類似度によって探索できる範囲を示している。この例では合成ベクトルは各単語の概念ベクトルの重心によって表現されているものとする。 There is a feature that by expanding words for each cluster, it is possible to acquire expanded words with more variety. FIG. 2 shows a comparison between search images for extended words when clustering is used and when clustering is not used. Each black circle in FIG. 2 indicates an answer seed word represented by a concept vector, and an asterisk indicates a composite vector. A range surrounded by a dotted line indicates a range that can be searched for based on the similarity of the combined vector. In this example, it is assumed that the composite vector is represented by the center of gravity of the concept vector of each word.
以下はクラスタの出力例である。 The following is an example of cluster output.
クラスタ(ア):カレー、カレーライス、 焼きそば
クラスタ(イ):総菜
クラスタ(ウ):パスタ
クラスタ(エ):唐揚げ、ハンバーグ、丼飯、トンカツ、から揚げ
Cluster (A): Curry, Curry rice, Yakisoba Cluster (A): Dish dish cluster (U): Pasta cluster (D): Fried, hamburger, rice bowl, tonkatsu, fried
条件判定部38は、予め定められた条件を満たすまで拡張単語候補生成部32、拡張回答単語候補リランキング部34、及びクラスタリング部36の処理を繰り返す。条件は、例えば回数や、出力された単語数とすればよい。 The condition determination unit 38 repeats the processing of the extended word candidate generation unit 32, the extended answer word candidate reranking unit 34, and the clustering unit 36 until a predetermined condition is satisfied. The condition may be, for example, the number of times or the number of output words.
<本発明の実施の形態に係る回答候補生成装置の作用> <Operation of Answer Candidate Generation Apparatus According to Embodiment of Present Invention>
次に、本発明の実施の形態に係る回答候補生成装置100の作用について説明する。回答候補生成装置100では、予め、概念ベクトルモデル生成部22によって概念ベクトルモデル24を、言語モデル生成部26によって言語モデル28を求めておく。入力部10において質問文、及び質問文に対する回答単語の各々を受け付けると、回答候補生成装置100は、図3に示す回答候補生成処理ルーチンを実行する。 Next, the operation of the answer candidate generating apparatus 100 according to the embodiment of the present invention will be described. In the answer candidate generation device 100, the concept vector model 24 is obtained in advance by the concept vector model generation unit 22, and the language model 28 is obtained by the language model generation unit 26 in advance. When the input unit 10 receives each of the question sentence and the answer word corresponding to the question sentence, the answer candidate generating device 100 executes an answer candidate generating process routine shown in FIG.
まず、ステップS100では、入力部10で受け付けた質問文から、単語に置き換えるためのタグを付与した文パターンを生成する。 First, in step S100, from the question sentence received by the input unit 10, a sentence pattern to which a tag for replacing with a word is added is generated.
次に、ステップS102では、入力部10で受け付けた質問文に対する回答単語の各々と質問文に含まれる単語の各々とに類似する単語の各々を、上記(1)式で計算される概念ベクトルモデル24における単語の概念ベクトルのスコアに基づいて求めて、スコアを降順に並べたときの上位n語を拡張回答単語候補とする。 Next, in step S102, each of the answer words to the question sentence received by the input unit 10 and each of the words similar to each of the words included in the question sentence are converted into a concept vector model calculated by the above equation (1). The top n words obtained when the scores are arranged in descending order are obtained based on the scores of the concept vectors of the words in 24, and are set as extended answer word candidates.
ステップS104では、文パターンに含まれるタグを拡張回答単語候補に置き換えたときに得られる、上記(2)式で計算される言語モデル28のスコア、及び拡張回答単語候補について計算された概念ベクトルのスコアに基づく統合スコアが上位N個(n>N)の拡張回答単語候補を求める。 In step S104, the score of the language model 28 calculated by the above equation (2) and the concept vector of the concept vector calculated for the extended answer word candidate obtained when the tag included in the sentence pattern is replaced with the extended answer word candidate The top N (n> N) extended answer word candidates with integrated scores based on the scores are obtained.
ステップS106では、ステップS104又は前回のステップS110で求められた上位N個の拡張回答単語候補と、質問文に対する回答単語とを含む単語集合に対して、概念ベクトルモデル24に基づいてクラスタリングを行う。 In step S106, clustering is performed based on the concept vector model 24 on a word set including the top N extended answer word candidates obtained in step S104 or the previous step S110 and answer words to the question sentence.
ステップS108では、クラスタ毎に、クラスタに属する単語の各々と質問文に含まれる単語の各々とに類似する単語の各々を、上記(1)式で計算される概念ベクトルモデル24における単語の概念ベクトルのスコアに基づいて求めて、スコアを降順に並べたときの上位n語を拡張回答単語候補とする。 In step S108, for each cluster, each word similar to each of the words belonging to the cluster and each of the words included in the question sentence is converted into the concept vector of the word in the concept vector model 24 calculated by the above equation (1). And the top n words when the scores are arranged in descending order are set as extended answer word candidates.
ステップS110では、ステップS108で得られた、文パターンに含まれるタグをクラスタについて求められた拡張回答単語候補に置き換えたときに得られる、言語モデル28のスコアを算出し、上記(2)式で計算される言語モデル28のスコア、及び拡張回答単語候補について計算された概念ベクトルのスコアに基づく統合スコアが上位N個の拡張回答単語候補を求める。ここで、統合スコアは、言語モデル28のスコア、及び拡張回答単語候補が属するクラスタに属する単語数を係数として概念ベクトルのスコアに乗算したスコアに基づいて求める。 In step S110, the score of the language model 28, which is obtained when the tag included in the sentence pattern obtained in step S108 is replaced with the extended answer word candidate obtained for the cluster, is calculated, and the score is calculated by the above equation (2). The integrated score based on the calculated score of the language model 28 and the score of the concept vector calculated for the extended answer word candidate finds the top N extended answer word candidates. Here, the integrated score is obtained based on the score of the concept vector, multiplied by the score of the language model 28 and the number of words belonging to the cluster to which the extended answer word candidate belongs as a coefficient.
ステップS112では、繰り返しの終了の条件を満たすかを判定し、条件を満たせばステップS114へ移行し、満たさなければステップS106に戻って処理を繰り返す。 In step S112, it is determined whether a condition for terminating the repetition is satisfied. If the condition is satisfied, the process proceeds to step S114. If not, the process returns to step S106 to repeat the process.
ステップS114では、ステップS104〜S112の処理で得られた拡張回答単語候補を出力部50に出力して処理を終了する。 In step S114, the extended answer word candidates obtained in steps S104 to S112 are output to the output unit 50, and the process ends.
以上説明したように、本発明の実施の形態に係る回答候補生成装置によれば、単語に置き換えるためのタグを付与した文パターンを生成し、質問文に対する回答単語の各々と質問文に含まれる単語の各々とに類似する単語の各々を、概念ベクトルのスコアに基づいて求めて、拡張回答単語候補とし、文パターンに含まれるタグを拡張回答単語候補に置き換えたときに得られる、言語モデルのスコア、及び拡張回答単語候補についての概念ベクトルのスコアに基づく統合スコアが上位N個の拡張回答単語候補を求めることにより、対話システムで使用するための多様な回答候補を得ることができる。 As described above, according to the answer candidate generating device according to the embodiment of the present invention, a sentence pattern to which a tag for replacing with a word is added is generated and included in each of the answer words to the question sentence and the question sentence. Each of the words similar to each of the words is obtained based on the score of the concept vector, and is set as an extended answer word candidate. The language model obtained when the tag included in the sentence pattern is replaced with the extended answer word candidate is obtained. By obtaining the top N extended answer word candidates whose integrated score is based on the score and the concept vector score of the extended answer word candidate, various answer candidates for use in the interactive system can be obtained.
本発明の実施の形態の手法を利用することで、対話システムのシナリオ作成者は、システムが発する質問文と、その質問に対する回答となる単語を数語(5語程度)回答シードとして与えることで、様々な回答単語(拡張回答単語候補)を得ることが出来る。 By using the method according to the embodiment of the present invention, the scenario creator of the dialogue system can give a question sentence from the system and a few words (approximately five words) as answers to the question as answer seeds. , Various answer words (extended answer word candidates) can be obtained.
また、雑談対話のようなオープンドメイン対話では、質問に対する回答は多岐にわたるため、それらの回答をシナリオ作成者が全て想起することは難しいが、本発明の実施の形態の手法を利用することで、シナリオ作成者は自信で回答内容を多数考える必要が無くなるため、シナリオ作成のコストが低減できるという利点がある。同時に、対話シナリオにおいて、予測できる回答数が増えるため、より多くのユーザの回答に対しての満足の行く返答が出来る可能性が高まるため、対話システムの品質や満足度の向上も期待できる。 Also, in an open domain dialogue such as a chat dialogue, since the answers to the questions are various, it is difficult for the scenario creator to recall all the answers, but by using the method of the embodiment of the present invention, Since the scenario creator does not need to consider many answers with confidence, there is an advantage that the cost of scenario creation can be reduced. At the same time, in the dialogue scenario, the number of answers that can be predicted increases, and the possibility of being able to provide a satisfactory response to the answers of more users increases, so that the quality and satisfaction of the dialogue system can be expected to be improved.
また、本発明の実施の形態の手法は対話シナリオに対して、ユーザの回答内容の予測を拡張するものである。対話シナリオでは、システムが質問し、ユーザがその質問に答えた後、システムはユーザの回答を受けてもう一言発話する3つ組み形式が一般的である。本発明の実施の形態においても、拡張された回答に対して、システムの3発話目はシステム作成者が自身で作成する。ここで、本発明の実施の形態で出力される回答単語を参考に3発話目を作成しても良い。本発明の実施の形態では多様な観点から多数の回答単語が出力されるため、その中にはユーザの回答の予測だけでなく、3発話目として活用できるもの含まれるためである。また、3発話目の作成に従来の自動発話生成装置を組み合わせることで、対話シナリオ自体を自動で生成することも可能である。 Further, the method according to the embodiment of the present invention extends the prediction of the answer content of the user to the dialog scenario. In a dialogue scenario, it is common that the system asks a question, and after the user answers the question, the system receives the user's answer and speaks another word. Also in the embodiment of the present invention, the third utterance of the system for the extended answer is created by the system creator by himself. Here, the third utterance may be created with reference to the answer word output in the embodiment of the present invention. This is because, in the embodiment of the present invention, a large number of answer words are output from various viewpoints, which include not only prediction of the user's answer but also those that can be used as the third utterance. Further, by combining a conventional automatic utterance generation device with the creation of the third utterance, the dialogue scenario itself can be automatically generated.
なお、本発明は、上述した実施の形態に限定されるものではなく、この発明の要旨を逸脱しない範囲内で様々な変形や応用が可能である。 The present invention is not limited to the above-described embodiment, and various modifications and applications can be made without departing from the spirit of the present invention.
例えば、上述した実施の形態では、回答候補生成装置はクラスタリング部、及び条件判定部を含んで構成する場合を例に説明したが、これに限定されるものではない。例えば、回答候補生成装置の演算部は、概念ベクトルモデル生成部と、概念ベクトルモデルと、言語モデル生成部と、言語モデルと、文パターン生成部と、拡張単語候補生成部と、拡張回答単語候補リランキング部とを含んで構成するようにし、入力として、質問文、及び質問文に対する回答単語の各々を受け付け、拡張回答単語候補リランキング部が上位N個の拡張回答単語候補を出力するようにしてもよい。 For example, in the above-described embodiment, an example has been described in which the answer candidate generating device is configured to include the clustering unit and the condition determining unit, but the present invention is not limited to this. For example, the calculation unit of the answer candidate generation device includes a concept vector model generation unit, a concept vector model, a language model generation unit, a language model, a sentence pattern generation unit, an extended word candidate generation unit, and an extended answer word candidate. And a re-ranking unit. The input unit accepts a question sentence and an answer word corresponding to the question sentence as inputs, and the extended answer word candidate re-ranking unit outputs the top N extended answer word candidates. You may.
また、例えば、言語モデルのスコアではなく、拡張回答単語候補wを置き換えた文パターンpをクエリ(q(w、p))としたWeb検索を実行して、検索ヒット数をスコアとして用いる場合には、回答候補生成装置の演算部は、概念ベクトルモデル生成部と、概念ベクトルモデルと、文パターン生成部と、拡張単語候補生成部と、拡張回答単語候補リランキング部とを含んで構成するようにしてもよい。また、この構成に、条件判定部を含めて、拡張単語候補生成部、及び拡張回答単語候補リランキング部の処理を繰り返すようにしてもよい。 Also, for example, when a Web search is performed using a sentence pattern p replacing the extended answer word candidate w as a query (q (w, p)) instead of the language model score, and the number of search hits is used as a score. The arithmetic unit of the answer candidate generating device includes a concept vector model generating unit, a concept vector model, a sentence pattern generating unit, an extended word candidate generating unit, and an extended answer word candidate reranking unit. It may be. In addition, the configuration may include a condition determining unit, and the processing of the extended word candidate generating unit and the extended answer word candidate reranking unit may be repeated.
10 入力部
20 演算部
22 概念ベクトルモデル生成部
24 概念ベクトルモデル
26 言語モデル生成部
28 言語モデル
30 文パターン生成部
32 拡張単語候補生成部
34 拡張回答単語候補リランキング部
36 クラスタリング部
38 条件判定部
50 出力部
100 回答候補生成装置
10 Input unit 20 Operation unit 22 Concept vector model generation unit 24 Concept vector model 26 Language model generation unit 28 Language model 30 Sentence pattern generation unit 32 Extended word candidate generation unit 34 Extended response word candidate reranking unit 36 Clustering unit 38 Condition determination unit 50 output unit 100 answer candidate generation device
Claims (7)
前記テキスト集合に含まれる単語のNグラムに基づいて言語モデルを生成する言語モデル生成部と、
入力された質問文から、単語に置き換えるためのタグを付与した文パターンを生成する文パターン生成部と、
前記質問文に対する回答単語の各々と前記質問文に含まれる単語の各々とに類似する単語の各々を、前記概念ベクトルのスコアに基づいて求めて、拡張回答単語候補とする拡張単語候補生成部と、
前記文パターンに含まれる前記タグを拡張回答単語候補に置き換えたときに得られる、前記言語モデルのスコア、及び前記拡張回答単語候補についての前記概念ベクトルのスコアに基づく統合スコアが上位N個の拡張回答単語候補を求める拡張単語候補リランキング部と、
を含む回答候補生成装置。 For each of the words included in the text set, a concept vector model generation unit that generates a concept vector representing the concept of the word,
A language model generation unit that generates a language model based on an N-gram of a word included in the text set;
A sentence pattern generation unit that generates a sentence pattern with a tag for replacing with a word from the input question sentence,
An expanded word candidate generation unit that obtains each of words similar to each of the answer words to the question sentence and each of the words included in the question sentence based on the score of the concept vector, and sets them as extended answer word candidates; ,
When the tag included in the sentence pattern is replaced with an extended answer word candidate, the integrated score based on the score of the language model and the concept vector for the extended answer word candidate is the top N extended scores. An extended word candidate reranking section for finding answer word candidates,
An answer candidate generation device including:
前記テキスト集合に含まれる単語のNグラムに基づいて言語モデルを生成する言語モデル生成部と、
入力された質問文から、単語に置き換えるためのタグを付与した文パターンを生成する文パターン生成部と、
前記質問文に対する回答単語の各々と前記質問文に含まれる単語の各々とに類似する単語の各々を、前記概念ベクトルのスコアに基づいて求めて、拡張回答単語候補とする拡張単語候補生成部と、
前記文パターンに含まれる前記タグを拡張回答単語候補に置き換えたクエリを用いて検索を実行した結果得られるヒット数のスコア、及び前記拡張回答単語候補についての前記概念ベクトルのスコアに基づく統合スコアが上位N個の拡張回答単語候補を求める拡張単語候補リランキング部と、
を含む回答候補生成装置。 For each of the words included in the text set, a concept vector model generation unit that generates a concept vector representing the concept of the word,
A language model generation unit that generates a language model based on an N-gram of a word included in the text set;
A sentence pattern generation unit that generates a sentence pattern with a tag for replacing with a word from the input question sentence,
An expanded word candidate generation unit that obtains each of words similar to each of the answer words to the question sentence and each of the words included in the question sentence based on the score of the concept vector, and sets them as extended answer word candidates; ,
The score of the number of hits obtained as a result of executing a search using a query in which the tag included in the sentence pattern is replaced with an extended answer word candidate, and the integrated score based on the concept vector score for the extended answer word candidate are: An extended word candidate reranking unit for obtaining top N extended answer word candidates;
An answer candidate generation device including:
言語モデル生成部が、前記テキスト集合に含まれる単語のNグラムに基づいて言語モデルを生成するステップと、
文パターン生成部が、入力された質問文から、単語に置き換えるためのタグを付与した文パターンを生成するステップと、
拡張単語候補生成部が、前記質問文に対する回答単語の各々と前記質問文に含まれる単語の各々とに類似する単語の各々を、前記概念ベクトルのスコアに基づいて求めて、拡張回答単語候補とするステップと、
拡張単語候補リランキング部が、前記文パターンに含まれる前記タグを拡張回答単語候補に置き換えたときに得られる、前記言語モデルのスコア、及び前記拡張回答単語候補についての前記概念ベクトルのスコアに基づく統合スコアが上位N個の拡張回答単語候補を求めるステップと、
を含む回答候補生成方法。 A concept vector model generating unit, for each of the words included in the text set, generating a concept vector representing the concept of the word;
A language model generation unit that generates a language model based on N-grams of words included in the text set;
A step in which the sentence pattern generation unit generates, from the input question sentence, a sentence pattern to which a tag for replacing with a word is added;
The extended word candidate generation unit obtains each of words similar to each of the answer words to the question sentence and each of the words included in the question sentence based on the score of the concept vector, Steps to
The extended word candidate reranking unit is based on a score of the language model and a score of the concept vector for the extended answer word candidate, obtained when the tag included in the sentence pattern is replaced with an extended answer word candidate. Obtaining the top N extended answer word candidates with the integrated score;
Answer candidate generation method including
言語モデル生成部が、前記テキスト集合に含まれる単語のNグラムに基づいて言語モデルを生成するステップと、
文パターン生成部が、入力された質問文から、単語に置き換えるためのタグを付与した文パターンを生成するステップと、
拡張単語候補生成部が、前記質問文に対する回答単語の各々と前記質問文に含まれる単語の各々とに類似する単語の各々を、前記概念ベクトルのスコアに基づいて求めて、拡張回答単語候補とするステップと、
拡張単語候補リランキング部が、前記文パターンに含まれる前記タグを拡張回答単語候補に置き換えたクエリを用いて検索を実行した結果得られるヒット数のスコア、及び前記拡張回答単語候補についての前記概念ベクトルのスコアに基づく統合スコアが上位N個の拡張回答単語候補を求めるステップと、
を含む回答候補生成方法。 A concept vector model generating unit, for each of the words included in the text set, generating a concept vector representing the concept of the word;
A language model generation unit that generates a language model based on N-grams of words included in the text set;
A step in which the sentence pattern generation unit generates, from the input question sentence, a sentence pattern to which a tag for replacing with a word is added;
The extended word candidate generation unit obtains each of words similar to each of the answer words to the question sentence and each of the words included in the question sentence based on the score of the concept vector, Steps to
An extended word candidate reranking unit, the score of the number of hits obtained as a result of executing a search using a query in which the tag included in the sentence pattern is replaced with an extended answer word candidate, and the concept of the extended answer word candidate Obtaining a top N extended answer word candidate whose integrated score based on the vector score;
Answer candidate generation method including
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017079662A JP6630701B2 (en) | 2017-04-13 | 2017-04-13 | Answer candidate generation device, method, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017079662A JP6630701B2 (en) | 2017-04-13 | 2017-04-13 | Answer candidate generation device, method, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2018180938A JP2018180938A (en) | 2018-11-15 |
| JP6630701B2 true JP6630701B2 (en) | 2020-01-15 |
Family
ID=64276735
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2017079662A Active JP6630701B2 (en) | 2017-04-13 | 2017-04-13 | Answer candidate generation device, method, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6630701B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111813902B (en) * | 2020-05-21 | 2024-02-23 | 车智互联(北京)科技有限公司 | Intelligent response method, system and computing device |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2006163623A (en) * | 2004-12-03 | 2006-06-22 | Nippon Hoso Kyokai <Nhk> | Question answering apparatus, question answering program, and television receiver |
| JP2006338342A (en) * | 2005-06-02 | 2006-12-14 | Nippon Telegr & Teleph Corp <Ntt> | Word vector generation device, word vector generation method and program |
| JP5540335B2 (en) * | 2010-10-04 | 2014-07-02 | 独立行政法人情報通信研究機構 | Natural language sentence generation device and computer program |
| JP5591871B2 (en) * | 2012-06-04 | 2014-09-17 | 日本電信電話株式会社 | Answer type estimation apparatus, method, and program |
| JP5710581B2 (en) * | 2012-12-18 | 2015-04-30 | 日本電信電話株式会社 | Question answering apparatus, method, and program |
-
2017
- 2017-04-13 JP JP2017079662A patent/JP6630701B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2018180938A (en) | 2018-11-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6857754B2 (en) | Answer candidate generation device, answer candidate generation method, and program | |
| JP6709748B2 (en) | Clustering device, answer candidate generation device, method, and program | |
| US20200395008A1 (en) | Personality-Based Conversational Agents and Pragmatic Model, and Related Interfaces and Commercial Models | |
| JP6772388B2 (en) | Pointer sentinel mixed architecture | |
| Lloyd et al. | Automatic construction and natural-language description of nonparametric regression models | |
| JP2021528796A (en) | Neural network acceleration / embedded compression system and method using active sparsification | |
| CN111291549B (en) | Text processing method and device, storage medium and electronic equipment | |
| WO2018165932A1 (en) | Generating responses in automated chatting | |
| EP3327592A1 (en) | Information processing method, information processing apparatus, and non-transitory recording medium | |
| EP1091303A3 (en) | Method and system for providing alternatives for text derived from stochastic input sources | |
| CN110909142B (en) | Question and sentence processing method and device of question-answer model, electronic equipment and storage medium | |
| CN101454826A (en) | Speech recognition word dictionary/language model making system, method, and program, and speech recognition system | |
| JP7169770B2 (en) | Artificial intelligence programming server and its program | |
| Chu | Recipe bot: The application of conversational ai in home cooking assistant | |
| JP2020135289A (en) | Question answering device, learning device, question answering method and program | |
| JP6976155B2 (en) | Similar text extractor, automatic response system, similar text extraction method, and program | |
| WO2019106758A1 (en) | Language processing device, language processing system and language processing method | |
| CN112151021B (en) | Language model training method, speech recognition method, device and electronic equipment | |
| WO2022022049A1 (en) | Long difficult text sentence compression method and apparatus, computer device, and storage medium | |
| CN106503066A (en) | Process Search Results method and apparatus based on artificial intelligence | |
| JP6630701B2 (en) | Answer candidate generation device, method, and program | |
| JP2022140337A (en) | Piece-of-writing evaluation system, piece-of-writing evaluation method and piece-of-writing evaluation program | |
| JP2019046099A (en) | Learning method, utilization method of learning result, learnt model, data structure, creating method, learning program and learning device | |
| CN109002498B (en) | Man-machine conversation method, device, equipment and storage medium | |
| JP5057516B2 (en) | Document distance calculation device and program |
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: 20191023 |
|
| 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: 20191203 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20191209 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6630701 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 |