[go: up one dir, main page]

JP2015153261A - Dialogue sentence generating device, dialogue sentence generating method, and program - Google Patents

Dialogue sentence generating device, dialogue sentence generating method, and program Download PDF

Info

Publication number
JP2015153261A
JP2015153261A JP2014027966A JP2014027966A JP2015153261A JP 2015153261 A JP2015153261 A JP 2015153261A JP 2014027966 A JP2014027966 A JP 2014027966A JP 2014027966 A JP2014027966 A JP 2014027966A JP 2015153261 A JP2015153261 A JP 2015153261A
Authority
JP
Japan
Prior art keywords
sentence
word
pattern
dialogue
laplacian
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
Application number
JP2014027966A
Other languages
Japanese (ja)
Other versions
JP6180340B2 (en
Inventor
慶 内海
Kei Uchiumi
慶 内海
塚原 裕史
Yasushi Tsukahara
裕史 塚原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso IT Laboratory Inc
Original Assignee
Denso IT Laboratory Inc
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Denso IT Laboratory Inc filed Critical Denso IT Laboratory Inc
Priority to JP2014027966A priority Critical patent/JP6180340B2/en
Publication of JP2015153261A publication Critical patent/JP2015153261A/en
Application granted granted Critical
Publication of JP6180340B2 publication Critical patent/JP6180340B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Machine Translation (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a method which generates dialogue sentences by using data automatically acquired from a dialogue log corpus.SOLUTION: A dialogue sentence generation device 1 includes storage parts 17, 18 which store a graph Laplacian which is calculated according to the degree of association between a word generated on the basis of dialogue sentences that are extracted from a dialogue log corpus 30 and a sentence pattern, and a sentence pattern transition matrix among sentence patterns of the dialogue log corpus. When sentences are inputted, the dialogue sentences generation device 1 uses a sentence pattern transition matrix and obtains a sentence pattern of a response sentence corresponding to the sentence pattern of the inputted sentence, and obtains a feature word from words that are extracted as specific expressions from the inputted sentence. With the sentence pattern of the response sentence and the feature word as a seed, Laplacian label propagation is performed on the graph Laplacian, a word of high degree of association with the feature word is obtained, the obtained word is inputted in the sentence pattern of the response sentence, and a response sentence is generated.

Description

本発明は、対話処理における対話文生成に関する。   The present invention relates to dialogue sentence generation in dialogue processing.

対話文生成とは、人間の行った発話に対して、自然な対話となるよう機械が自動的に応答文を生成することであり、Siri等をはじめとする音声対話システムで用いられている。従来、対話文の生成には人間の手による文のテンプレートが用いられてきた(特許文献1、2)。   Dialog generation is a process in which a machine automatically generates a response so that a natural conversation can be made with respect to an utterance made by a human, and is used in a voice dialog system such as Siri. Conventionally, sentence templates created by human hands have been used to generate dialogue sentences (Patent Documents 1 and 2).

特開2010−72578号公報JP 2010-72578 A 特開2004−110524号公報JP 2004-110524 A

しかし、人間がテンプレートを生成するコストは高く、そのために機械が生成できる文の型には限りがある。そこで、大量の対話のログを用いて自動的に文のテンプレートを獲得し、対話文を生成する技術が望まれる。   However, the cost of generating templates by humans is high, so the types of sentences that machines can generate are limited. Thus, a technique for automatically acquiring a sentence template using a large amount of dialog logs and generating a dialog sentence is desired.

そこで、本発明は、人手による文テンプレートの問題を解決し、大規模な対話ログから文テンプレートを獲得するとともに、テンプレートのスロットを埋める単語集合についても自動で獲得する手法を提案する。   Therefore, the present invention proposes a method for solving the problem of manual sentence templates, acquiring sentence templates from a large-scale dialogue log, and automatically acquiring a word set that fills a slot of the template.

本発明の対話文生成装置は、対話ログコーパスより抽出した対話文に基づいて生成した単語と文パターンとの間の関連度から計算したグラフラプラシアンと、対話ログコーパスの文パターン間の遷移行列とを記憶した記憶部と、文の入力を受け付ける文入力部と、入力文から固有表現を抽出する固有表現抽出部と、抽出した固有表現に基づいて入力文の文パターンを判定するパターン判定部と、前記記憶部に記憶された遷移行列を読み出し、前記遷移行列を用いて入力文の文パターンに対応する応答文のパターンシードを抽出するパターンシード抽出部と、前記固有表現抽出部にて抽出された固有表現から特徴語を抽出する特徴語抽出部と、前記記憶部から前記グラフラプラシアンを読み出し、前記グラフラプラシアン上で、前記応答文のパターンシードと前記特徴語を初期値としてラプラシアンラベル伝搬を行い、応答文に含めるべき単語を求めるラプラシアンラベル伝搬部と、前記応答文のパターンに前記ラプラシアンラベル伝搬部にて求めた単語を入れて応答文を生成する応答文生成部と、前記応答文を出力する出力部とを備える。   The dialog sentence generation apparatus of the present invention includes a graph Laplacian calculated from the degree of association between a word and a sentence pattern generated based on a dialog sentence extracted from the dialog log corpus, a transition matrix between sentence patterns of the dialog log corpus, A storage unit that stores the sentence, a sentence input unit that receives a sentence input, a specific expression extraction unit that extracts a specific expression from the input sentence, a pattern determination unit that determines a sentence pattern of the input sentence based on the extracted specific expression, The transition matrix stored in the storage unit is read, and the pattern seed extraction unit that extracts the pattern seed of the response sentence corresponding to the sentence pattern of the input sentence using the transition matrix is extracted by the specific expression extraction unit. A feature word extraction unit that extracts a feature word from the specific expression, and reads the graph Laplacian from the storage unit, and on the graph Laplacian A Laplacian label propagation unit that performs Laplacian label propagation using the initial seed and the feature word as an initial value and obtains a word to be included in the response sentence, and a response sentence that includes the word obtained by the Laplacian label propagation unit in the response sentence pattern The response sentence generation part which produces | generates, and the output part which outputs the said response sentence are provided.

従来、単語の意味カテゴリ獲得のためにラプラシアンラベル伝搬を用いた研究は知られていたが、ラプラシアンラベル伝搬を用いて対話文を生成する試みはなされていなかった。本発明では、入力文の文パターンを判定した上で、入力文の文パターンに対応する応答文の文パターンを抽出し、応答文のパターンシードと特徴語を初期値としてラプラシアンラベル伝搬を行うことにより、入力文に対する応答文を生成する。このように、入力された文をそのまま使うのではなく、文パターンという形に抽象化して集約することにより、グラフがスパースになり過ぎないように工夫し、単語獲得の再現率を上げている。また、固有表現抽出を用いて単語クラスを文パターンおよび獲得される単語に付与しているので、
文パターン中の適切な箇所を獲得した単語で置き換えることが可能となる。ここで、グラフラプラシアンは、対話ログコーパスより抽出した対話文に基づいて生成しているので、応答文生成に必要なデータを人手によらず、自動で生成することができる。なお、グラフラプラシアンとは、グラフの構造を正規化した行列で表現したものである。本発明では、グラフラプラシアンを用いたラプラシアンラベル伝搬を用いたことにより、初期値である特徴語から関連性の低い単語へとラベル伝搬することが起こりにくく、意味ドリフトを抑制できる。
Conventionally, research using Laplacian label propagation for word semantic category acquisition has been known, but no attempt has been made to generate a dialog sentence using Laplacian label propagation. In the present invention, after determining the sentence pattern of the input sentence, the sentence pattern of the response sentence corresponding to the sentence pattern of the input sentence is extracted, and Laplacian label propagation is performed using the pattern seed of the response sentence and the feature word as initial values. Thus, a response sentence for the input sentence is generated. In this way, the input sentence is not used as it is, but is abstracted and aggregated into a sentence pattern so that the graph is not sparse and the word acquisition recall rate is increased. In addition, since the word class is assigned to the sentence pattern and the acquired word using proper expression extraction,
It is possible to replace an appropriate part in the sentence pattern with the acquired word. Here, since the graph Laplacian is generated based on the dialogue sentence extracted from the dialogue log corpus, the data necessary for generating the response sentence can be automatically generated without human intervention. Note that the graph Laplacian is a normalized matrix of the graph structure. In the present invention, since Laplacian label propagation using graph Laplacian is used, label propagation is unlikely to occur from a characteristic word that is an initial value to a word having low relevance, and semantic drift can be suppressed.

また、本発明の別の態様の対話文生成装置は、対話ログコーパスより抽出した対話文に基づいて生成した単語と文パターンとの間の関連度から計算したグラフラプラシアンを記憶した記憶部と、単語の入力を受け付ける入力部と、前記記憶部から前記グラフラプラシアンを読み出し、前記グラフラプラシアン上で、前記単語を初期値としてラプラシアンラベル伝搬を行い、文パターンと、文に含めるべき単語を求めるラプラシアンラベル伝搬部と、前記ラプラシアンラベル伝搬部にて求めた文パターン及び単語を用いて応答文を生成する応答文生成部と、前記応答文を出力する出力部とを備える。   In another aspect of the present invention, a dialog sentence generation apparatus includes a storage unit that stores a graph Laplacian calculated from the degree of association between a word and a sentence pattern generated based on a dialog sentence extracted from a dialog log corpus; A Laplacian label that reads the graph Laplacian from the storage unit and performs Laplacian label propagation with the word as an initial value on the graph Laplacian to obtain a sentence pattern and a word to be included in the sentence A propagation unit; a response sentence generation unit that generates a response sentence using a sentence pattern and a word obtained by the Laplacian label propagation unit; and an output unit that outputs the response sentence.

このように単語から関連する文を生成する場合にも、本発明を適用することができる。これにより、入力された単語の概念を含む文を生成することができる。   Thus, the present invention can also be applied when generating a related sentence from a word. Thereby, a sentence including the concept of the input word can be generated.

本発明の対話文生成方法は、対話ログコーパスより抽出した対話文に基づいて生成した単語と文パターンとの間の関連度から計算したグラフラプラシアンと、対話ログコーパスの文パターン間の遷移行列とを記憶した記憶部とを備える対話文生成装置によって対話文を生成する方法であって、前記対話文生成装置が、文の入力を受け付けるステップと、前記対話文生成装置が、入力文から固有表現を抽出するステップと、前記対話文生成装置が、抽出した固有表現に基づいて入力文の文パターンを判定するステップと、前記対話文生成装置が、前記記憶部に記憶された遷移行列を読み出し、前記遷移行列を用いて入力文の文パターンに対応する応答文のパターンシードを抽出するステップと、前記対話文生成装置が、入力文から抽出された固有表現から特徴語を抽出するステップと、前記対話文生成装置が、前記記憶部から前記グラフラプラシアンを読み出し、前記グラフラプラシアン上で、前記応答文のパターンシードと前記特徴語を初期値としてラプラシアンラベル伝搬を行い、応答文に含めるべき単語を求めるステップと、前記対話文生成装置が、前記応答文のパターンに、ラプラシアンラベル伝搬部によって求めた単語を入れて応答文を生成するステップと、前記対話文生成装置が、前記応答文を出力するステップとを備える。   The dialog sentence generation method of the present invention includes a graph Laplacian calculated from the degree of association between a word generated based on a dialog sentence extracted from the dialog log corpus and a sentence pattern, a transition matrix between sentence patterns of the dialog log corpus, A dialogue sentence generation device comprising: a storage unit storing a statement, wherein the dialogue sentence generation device receives a sentence input; and the dialogue sentence generation device includes a specific expression from the input sentence. Extracting the sentence pattern of the input sentence based on the extracted unique expression, and reading the transition matrix stored in the storage unit, Extracting a response seed pattern seed corresponding to the sentence pattern of the input sentence using the transition matrix; and Extracting a feature word from the expression; and the dialog sentence generation device reads the graph Laplacian from the storage unit, and on the graph Laplacian, propagates a Laplacian label using the pattern seed of the response sentence and the feature word as initial values. Performing the step of obtaining a word to be included in the response sentence, generating the response sentence by inserting the word obtained by a Laplacian label propagation unit into the response sentence pattern, and the dialog sentence And a generation device that outputs the response sentence.

また、本発明の別の態様の対話文生成方法は、対話ログコーパスより抽出した対話文に基づいて生成した単語と文パターンとの間の関連度から計算したグラフラプラシアンを記憶した記憶部を備える対話文生成装置によって、対話文を生成する方法であって、前記対話文生成装置が、単語の入力を受け付けるステップと、前記対話文生成装置が、前記記憶部から前記グラフラプラシアンを読み出し、前記グラフラプラシアン上で、前記単語を初期値としてラプラシアンラベル伝搬を行い、文パターンと、文に含めるべき単語を求めるステップと、前記対話文生成装置が、求めた文パターン及び単語を用いて応答文を生成するステップと、前記対話文生成装置が、前記応答文を出力するステップとを備える。   According to another aspect of the present invention, there is provided a dialog sentence generation method including a storage unit that stores a graph Laplacian calculated from a degree of association between a word generated based on a dialog sentence extracted from a dialog log corpus and a sentence pattern. A method for generating a dialogue sentence by a dialogue sentence generation device, wherein the dialogue sentence generation device receives an input of a word, the dialogue sentence generation device reads the graph Laplacian from the storage unit, and the graph On the Laplacian, Laplacian label propagation is performed with the word as an initial value, and a sentence pattern and a word to be included in the sentence are obtained, and the dialogue sentence generation device generates a response sentence using the obtained sentence pattern and word And the dialog sentence generating device includes the step of outputting the response sentence.

本発明のプログラムは、コンピュータに上記対話文生成方法を実行させるプログラムである。   The program of the present invention is a program for causing a computer to execute the above-described dialog sentence generation method.

本発明によれば、これまで人手によって作られてきた文テンプレートを、対話ログを用いることで自動的に獲得することができる。これによって、従来は、コスト面で難しかった多様な文の生成を、ログデータを増やすだけで実現できるようになる。加えて、パターンのスロットを埋める単語候補についても、同義語辞書やシソーラスといった言語資源を必要とせずにログデータから取得することができる。   According to the present invention, a sentence template that has been manually created so far can be automatically acquired by using a dialogue log. As a result, it is possible to generate various sentences that have been difficult in terms of cost by simply increasing the log data. In addition, word candidates for filling a pattern slot can also be acquired from log data without requiring language resources such as a synonym dictionary and a thesaurus.

第1の実施の形態の対話文生成装置の構成を示す図である。It is a figure which shows the structure of the dialogue production | generation apparatus of 1st Embodiment. ラプラシアンラベル伝搬の説明図である。It is explanatory drawing of Laplacian label propagation. 第1の実施の形態の対話文生成装置の動作を示す図である。It is a figure which shows operation | movement of the dialogue production | generation apparatus of 1st Embodiment. 第1の実施の形態の対話文生成装置の動作を示す図である。It is a figure which shows operation | movement of the dialogue production | generation apparatus of 1st Embodiment. 第2の実施の形態の対話文生成装置の構成を示す図である。It is a figure which shows the structure of the dialogue production | generation apparatus of 2nd Embodiment. 第2の実施の形態の対話文生成装置の動作を示す図である。It is a figure which shows operation | movement of the dialogue production | generation apparatus of 2nd Embodiment.

以下、本発明の実施の形態の対話文生成装置について、図面を参照しながら説明する。
図1は、実施の形態に係る対話文生成装置1の構成を示す図である。対話文生成装置1のハードウェアは、CPU、RAM、ROM、ハードディスク、ディスプレイ、キーボード、マウス、通信インターフェース等を備えたコンピュータである。コンピュータに、対話文生成のプログラムを実行させることにより、図1に示す対話文生成装置1が実現される。このように対話文生成装置1を実現するプログラムも本発明の範囲に含まれる。
Hereinafter, a dialogue generation apparatus according to an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram illustrating a configuration of a dialogue sentence generation device 1 according to an embodiment. The hardware of the dialog statement generating apparatus 1 is a computer including a CPU, RAM, ROM, hard disk, display, keyboard, mouse, communication interface, and the like. By causing a computer to execute a dialogue generation program, the dialogue generation device 1 shown in FIG. 1 is realized. Thus, the program which implement | achieves the dialog sentence production | generation apparatus 1 is also contained in the scope of the present invention.

対話文生成装置1は、事前計算部10と、文生成部20とを有している。事前計算部10は、応答文の生成に用いる文パターン遷移行列と、グラフラプラシアンを生成する機能を有する。文パターン遷移行列とグラフラプラシアンは、それぞれ文パターン遷移行列記憶部17およびグラフラプラシアン記憶部18に記憶される。文生成部20は、文パターン遷移行列およびグラフラプラシアンを用いて、入力された文に応答する応答文を生成する機能を有する。   The dialogue sentence generation device 1 includes a pre-calculation unit 10 and a sentence generation unit 20. The pre-calculation unit 10 has a function of generating a sentence pattern transition matrix used for generating a response sentence and a graph Laplacian. The sentence pattern transition matrix and the graph Laplacian are stored in the sentence pattern transition matrix storage unit 17 and the graph Laplacian storage unit 18, respectively. The sentence generation unit 20 has a function of generating a response sentence that responds to an input sentence using a sentence pattern transition matrix and a graph Laplacian.

対話文生成装置1には対話ログコーパス30のデータベースがネットワーク等を介して接続されており、対話文生成装置1は、対話ログコーパス30から対話ログのデータを取得する。なお、対話文生成装置1は、対話ログコーパス30からではなく、例えば、インターネット上にあるインタビュー等の対話形式の記事や掲示板のデータから対話ログを取得してもよい。   A dialog log corpus 30 database is connected to the dialog statement generating apparatus 1 via a network or the like, and the dialog sentence generating apparatus 1 acquires dialog log data from the dialog log corpus 30. Note that the dialog sentence generation device 1 may acquire the dialog log from the dialog log corpus 30, for example, from an interactive article such as an interview on the Internet or data from a bulletin board.

事前計算部10は、対話ログ入力部11と、固有表現抽出部12と、文パターン抽出部13と、文パターン遷移行列構築部14と、2部グラフ構築部15と、グラフラプラシアン計算部16とを有している。対話ログ入力部11は、対話ログコーパス30から対話ログの入力を受け付ける機能を有する。   The pre-calculation unit 10 includes a dialogue log input unit 11, a specific expression extraction unit 12, a sentence pattern extraction unit 13, a sentence pattern transition matrix construction unit 14, a bipartite graph construction unit 15, a graph Laplacian calculation unit 16, have. The dialogue log input unit 11 has a function of accepting dialogue log input from the dialogue log corpus 30.

固有表現抽出部12は、対話ログから固有表現を抽出する機能を有する。固有表現抽出は、計算機を用いた自然言語処理技術の一つであり、固有名詞(人名、地名など)や日付、時間表現などを抽出する技術である。IREX(Information Retrieval and Extraction Exercise)の定義によれば、固有表現には、組織名(ORGANIZATION)、人名(PERSON)、地名(LOCATION)、日付表現(DATE)、時間表現(TIME)、金額表現(MONEY)、割合表現(PERCENT)、固有物名(ARTIFACT)の8種類があり、本実施の形態の対話文生成装置1は、これを用いる。   The specific expression extraction unit 12 has a function of extracting a specific expression from the dialogue log. The named entity extraction is one of natural language processing techniques using a computer, and is a technique for extracting a proper noun (person name, place name, etc.), date, time expression, and the like. According to the definition of IREX (Information Retrieval and Extraction Exercise), specific names include organization name (ORGANIZATION), person name (PERSON), place name (LOCATION), date expression (DATE), time expression (TIME), monetary expression ( There are eight types, MONEY), ratio expression (PERCENT), and unique object name (ARTIFACT), and the dialog sentence generation apparatus 1 of this embodiment uses these.

文パターン抽出部13は、対話ログから抽出した固有表現をスロットに置き換えて文パターンを生成する機能も有する。例えば、「今日はかぐや姫を見ました。」という文から固有表現を抽出すると、「今日(DATE)は(O)かぐや姫(ARTIFACT)を(O)見ま(O)した(O)。」となり、「今日」と「かぐや姫」が固有表現として抽出される。なお、「O」は、固有表現ではない(OUTSIDE)という意味である。上記例文の固有表現をスロットに置き換えると、「(DATE)は(ARTIFACT)を見ました。」となる。これが、文パターンである。文パターン抽出部13は、対話ログコーパス30から取得した対話ログの文パターンを生成する。この際、異なる対話文から同じ文パターンが生成される場合もあり、文パターンが集約される。   The sentence pattern extraction unit 13 also has a function of generating a sentence pattern by replacing the unique expression extracted from the dialogue log with a slot. For example, if we extracted a specific expression from the sentence "I saw Kaguya Hime today", "Today (DATE) (O) looked at (O) Hime Kaguya (O) (O). “Today” and “Princess Kaguya” are extracted as specific expressions. Note that “O” means not a unique expression (OUTSIDE). If you replace the specific expression of the above example with a slot, “(DATE) saw (ARTIFACT).” This is a sentence pattern. The sentence pattern extraction unit 13 generates a sentence pattern of the dialog log acquired from the dialog log corpus 30. At this time, the same sentence pattern may be generated from different dialogue sentences, and the sentence patterns are aggregated.

文パターン遷移行列構築部14は、発話文の文パターンからどの応答文の文パターンに遷移したかを定義する遷移行列を構築する機能を有する。文パターン遷移行列構築部14は、文パターン抽出部13にて生成した文パターンを受け取り、発話文の文パターンから応答文の文パターンへの遷移に基づいて、発話文の文パターンと応答文の文パターンの遷移行列を構築する。具体的には、発話文の全ての文パターンを行に、応答文の全ての文パターンを列にとり、発話文の文パターンから応答文の文パターンに遷移した回数を要素とした行列を生成する。このような遷移行列を用いることで、発話文の文パターンから応答文の文パターンに遷移する確率を求めることができる。文パターン遷移行列構築部14は、構築した文パターン遷移行列を文パターン遷移行列記憶部17に記憶する。   The sentence pattern transition matrix construction unit 14 has a function of constructing a transition matrix that defines which sentence pattern of the response sentence has changed from the sentence pattern of the utterance sentence. The sentence pattern transition matrix construction unit 14 receives the sentence pattern generated by the sentence pattern extraction unit 13, and based on the transition from the sentence pattern of the utterance sentence to the sentence pattern of the response sentence, the sentence pattern of the utterance sentence and the response sentence Construct a transition matrix of sentence patterns. Specifically, all sentence patterns of utterance sentences are taken as rows, all sentence patterns of response sentences are taken as columns, and a matrix with the number of transitions from the sentence pattern of utterance sentences to the sentence pattern of response sentences as an element is generated. . By using such a transition matrix, the probability of transition from the sentence pattern of the spoken sentence to the sentence pattern of the response sentence can be obtained. The sentence pattern transition matrix construction unit 14 stores the constructed sentence pattern transition matrix in the sentence pattern transition matrix storage unit 17.

2部グラフ構築部15は、単語と文パターンとの間の関連度をエッジの重みとした2部グラフを生成する機能を有する。2部グラフとは、頂点集合を二つの部分集合に分割して各集合内の頂点同士の間には辺がないようにできるグラフのことである。   The bipartite graph construction unit 15 has a function of generating a bipartite graph with the degree of association between words and sentence patterns as edge weights. A bipartite graph is a graph in which a vertex set can be divided into two subsets so that there are no edges between vertices in each set.

図2は、本実施の形態の2部グラフ構築部15が構築する2部グラフの例を示す図である。図2に示すように、左側に単語の集合、右側に文パターンの集合があり、関連を有する単語と文パターンとの間にはエッジが張られている。このエッジは、単語と文パターンの関連の強さを表すものである。   FIG. 2 is a diagram illustrating an example of a bipartite graph constructed by the bipartite graph construction unit 15 of the present embodiment. As shown in FIG. 2, there is a set of words on the left side and a set of sentence patterns on the right side, and an edge is provided between the related word and the sentence pattern. This edge represents the strength of the relationship between the word and the sentence pattern.

2部グラフ構築部15は、固有表現抽出部12にて固有表現として抽出した単語を受け取り、文パターン抽出部13にて抽出した文パターンを受け取る。2部グラフ構築部15は、文パターンとその文パターンで出現する単語に基づいて、単語と文パターンの関連度を求め、2部グラフを構築する。対話文生成装置1において、2部グラフの構造は行列の形で保持される。すなわち、固有表現抽出部12にて抽出された全ての単語を行に、文パターン抽出部13にて抽出された全ての文パターンを列にとり、文パターンにおける単語の出現回数を要素とした行列を生成する。以下の説明において、この行列を「単語−文パターン行列W」という。   The bipartite graph construction unit 15 receives the word extracted as the specific expression by the specific expression extraction unit 12 and receives the sentence pattern extracted by the sentence pattern extraction unit 13. The bipartite graph construction unit 15 obtains the degree of association between the word and the sentence pattern based on the sentence pattern and the word appearing in the sentence pattern, and constructs the bipartite graph. In the dialogue generating apparatus 1, the structure of the bipartite graph is held in the form of a matrix. That is, a matrix having all words extracted by the unique expression extraction unit 12 as rows, all sentence patterns extracted by the sentence pattern extraction unit 13 as columns, and the number of occurrences of words in the sentence pattern as elements. Generate. In the following description, this matrix is referred to as “word-sentence pattern matrix W”.

グラフラプラシアン計算部16は、2部グラフからグラフラプラシアンLを計算する。グラフラプラシアンLは次の式によって計算される。
L=I−D(A)-1/2・A・D(A)-1/2
ここで、Aは隣接行列で、A=WT・Wである。隣接行列Aは、単語どうしの共起頻度を表す行列である。D(A)は次数対角行列であり、その要素は次の式で表される。

Figure 2015153261
The graph Laplacian calculator 16 calculates a graph Laplacian L from the bipartite graph. The graph Laplacian L is calculated by the following formula.
L = ID (A) -1/2 , A, D (A) -1/2
Here, A is an adjacency matrix, and A = W T · W. The adjacency matrix A is a matrix representing the co-occurrence frequency of words. D (A) is an order diagonal matrix, and its elements are represented by the following equations.
Figure 2015153261

このようにグラフラプラシアンは、次数対角行列を平方根で割った行列を隣接行列Aの前後から掛けて得られた行列を、単位行列から引くことにより、グラフラプラシアンLの列方向と行方向の総和はそれぞれ0となる。このように正規化したグラフラプラシアンを用いたラプラシアンラベル伝搬は、グラフ中の自己類似度の重みを減じる効果があるため、ジェネリックパターンに高い重みを付与することがなく、意味ドリフトが起こりにくい。グラフラプラシアン計算部16は、求めたグラフラプラシアンのデータをグラフラプラシアン記憶部18に記憶する。   Thus, the graph Laplacian sums the graph Laplacian L in the column direction and the row direction by subtracting the matrix obtained by multiplying the matrix obtained by dividing the diagonal matrix by the square root from before and after the adjacency matrix A from the unit matrix. Respectively become 0. Laplacian label propagation using the graph Laplacian normalized in this way has an effect of reducing the weight of the self-similarity in the graph, so that a high weight is not given to the generic pattern, and semantic drift hardly occurs. The graph Laplacian calculation unit 16 stores the obtained graph Laplacian data in the graph Laplacian storage unit 18.

[文生成部20の構成]
次に、文生成部20の構成について説明する。文生成部20は、入力された対話文に対して応答する応答文を生成する。文生成部20は、文入力部21と、固有表現抽出部22と、入力文パターン判定部23と、応答文パターンシード抽出部24と、特徴語抽出部25と、ラプラシアンラベル伝搬部26と、応答文生成部27と、応答文出力部28とを有している。
[Configuration of sentence generator 20]
Next, the configuration of the sentence generation unit 20 will be described. The sentence generation unit 20 generates a response sentence that responds to the input dialogue sentence. The sentence generation unit 20 includes a sentence input unit 21, a specific expression extraction unit 22, an input sentence pattern determination unit 23, a response sentence pattern seed extraction unit 24, a feature word extraction unit 25, a Laplacian label propagation unit 26, The response sentence generation unit 27 and the response sentence output unit 28 are provided.

文入力部21は、対話文の入力を受け付ける機能を有する。固有表現抽出部22は、事前計算部10が備える固有表現抽出部12と同じ機能を有する。すなわち、固有表現抽出部22は、入力された対話文から固有表現を抽出する。   The sentence input unit 21 has a function of receiving input of a dialog sentence. The specific expression extraction unit 22 has the same function as the specific expression extraction unit 12 included in the pre-calculation unit 10. That is, the specific expression extraction unit 22 extracts a specific expression from the input dialogue sentence.

入力文パターン判定部23は、入力された対話文に含まれる固有表現をスロットに置き換えて文パターンを生成し、入力された文パターンと既存の文パターンとを照合して、入力文パターンがどの文パターンに該当するかを判定する機能を有する。応答文パターンシード抽出部24は、文パターン遷移行列記憶部17に記憶された文パターン遷移行列を読み出す。そして、応答文パターンシード抽出部24は、入力文パターン判定部23にて判定された入力文パターンから遷移する可能性の高い応答文の文パターンを、文パターン遷移行列のデータを用いて求める機能を有する。   The input sentence pattern determination unit 23 generates a sentence pattern by replacing the specific expression included in the input dialogue sentence with a slot, and compares the input sentence pattern with an existing sentence pattern to determine which input sentence pattern is It has a function of determining whether it corresponds to a sentence pattern. The response sentence pattern seed extraction unit 24 reads out the sentence pattern transition matrix stored in the sentence pattern transition matrix storage unit 17. The response sentence pattern seed extracting unit 24 uses the sentence pattern transition matrix data to determine the sentence pattern of the response sentence that is likely to change from the input sentence pattern determined by the input sentence pattern determining unit 23. Have

特徴語抽出部25は、固有表現抽出部22にて固有表現として抽出した単語の中から、ラプラシアンラベル伝搬においてシードとして用いるべき特徴語を抽出する。本実施の形態では、抽出された単語のすべてを特徴語として用いるが、入力された文パターンに特徴的な単語を特徴語として用いてもよい。例えば、「今日」、「私」等のように文脈等に関係なく表れる一般的な単語を排除することにより、意味ドリフトの発生を抑制することができる。ここで、ある単語が一般的な単語であるかどうかを判定するためには、例えば、TF−IDF法を用いることができる。   The feature word extraction unit 25 extracts a feature word to be used as a seed in Laplacian label propagation from the words extracted as the specific expression by the specific expression extraction unit 22. In the present embodiment, all of the extracted words are used as feature words. However, words characteristic of the input sentence pattern may be used as feature words. For example, the occurrence of semantic drift can be suppressed by eliminating common words such as “today” and “me” that appear regardless of context. Here, in order to determine whether a certain word is a general word, for example, a TF-IDF method can be used.

ラプラシアンラベル伝搬部26は、グラフラプラシアン記憶部18からグラフラプラシアンのデータを読み出す。そして、ラプラシアンラベル伝搬部26は、応答文パターンシード抽出部24にて抽出した応答文の文パターンと特徴語抽出部25にて抽出した特徴語とをシードとして、ラプラシアンラベル伝搬を行う。ラプラシアンラベル伝搬は、次の式に従って行う。

Figure 2015153261
ここで、F(0)はシードのラベル、F(t)はグラフ上で伝搬させた各ノードのラベルを表す。αはシードベクトルとグラフのどちらをどの程度重視するかの調整パラメータであり、ラプラシアンラベル伝搬をリスタート付きのランダムウォークと考えた場合では、αはリスタート確率と見なすことができる。 The Laplacian label propagation unit 26 reads graph Laplacian data from the graph Laplacian storage unit 18. Then, the Laplacian label propagation unit 26 performs Laplacian label propagation using the sentence pattern of the response sentence extracted by the response sentence pattern seed extraction unit 24 and the feature word extracted by the feature word extraction unit 25 as seeds. Laplacian label propagation is performed according to the following equation.
Figure 2015153261
Here, F (0) represents the label of the seed, and F (t) represents the label of each node propagated on the graph. α is an adjustment parameter indicating how much importance is placed on the seed vector or the graph. When Laplacian label propagation is considered as a random walk with restart, α can be regarded as a restart probability.

本実施の形態のように、特徴語に加えて応答文の文パターンをシードとして用いる場合には、隣接行列とシードベクトルとの積を取る際にもう一方のシードベクトルを重みづけて加える。すなわち、上記式(1)は、次のように表される。   When the sentence pattern of the response sentence is used as a seed in addition to the feature word as in the present embodiment, the other seed vector is weighted when taking the product of the adjacency matrix and the seed vector. That is, the above formula (1) is expressed as follows.

Figure 2015153261

グラフラプラシアンLを再掲する。
L=I−D(A)-1/2・A・D(A)-1/2
Figure 2015153261

Reprint Graph Laplacian L.
L = ID (A) -1/2 , A, D (A) -1/2

この式は密行列となるためデータが大きくなった場合にはメモリ上に展開できない。そのため、実際には(1)式の第一項は以下のように変形して疎なままで扱う。

Figure 2015153261
上記の式の第二項、TWD(WTW)-1/2F(t)は、文パターンのスコアベクトルとなる。
ここで、文パターンのスコアベクトルを
Figure 2015153261
とおく。文パターンからのラベル伝搬にも、文パターンシードベクトルを導入し、確率的なリスタートを行うように上記を以下のように変更する。
Figure 2015153261
これを(1)式に代入した、文パターンと特徴語の両方をシードとして利用可能なラベル伝搬の式を以下に示す。
Figure 2015153261
ここで、Fv(0)は特徴語のシードのラベル、Fp(0)は文パターンシードのラベル、Fv(t)は単語の各ノードのラベルを表す。αは単語のシードベクトルとグラフのどちらをどの程度重視するかの調整パラメータであり、βは文パターンのシードベクトルとグラフのどちらをどの程度重視するかの調整パラメータである。 Since this equation is a dense matrix, it cannot be expanded in memory when the data becomes large. Therefore, in practice, the first term of equation (1) is modified as follows and treated as sparse.
Figure 2015153261
The second term of the above equation, T WD (W T W) −1/2 F (t), is a sentence pattern score vector.
Where the sentence pattern score vector
Figure 2015153261
far. The sentence pattern seed vector is also introduced to the label propagation from the sentence pattern, and the above is changed as follows to perform a probabilistic restart.
Figure 2015153261
An expression for label propagation that can be used with both sentence patterns and feature words as seeds, substituting this into expression (1), is shown below.
Figure 2015153261
Here, Fv (0) represents the seed label of the feature word, Fp (0) represents the label of the sentence pattern seed, and Fv (t) represents the label of each node of the word. α is an adjustment parameter indicating how much importance is given to the word seed vector and the graph, and β is an adjustment parameter indicating how much importance is attached to the seed vector of the sentence pattern and the graph.

Fv(t)は、単語の全要素数を次元数とするベクトルであり、Fv(t)のi番目の次元の値は、i番目の単語が特徴語と関連する度合いを表す。すなわち、Fv(t)は対象の特徴語に対するスコアベクトルである。入力として与えるFv(0)は、シードとして与えられる特徴語の次元値を1とし、それ以外を0とすることで作成する。また、Fp(0)も同様に、シードとして与えられる文パターンの次元値を1とし、それ以外を0とすることで作成する。ラプラシアンラベル伝搬部26は、このようにして作成されたFv(0)、Fp(0)を用いて、グラフラプラシアン上でラプラシアンラベル伝搬を行い、収束するまで上記式を繰り返し計算していく。これにより、最終的に収束したFv(t)が出力される。Fv(t)は、tステップ終了時の単語のスコアベクトルである。ラプラシアンラベル伝搬部26は、スコアの高い単語を応答文に含めるべき単語として求める。   Fv (t) is a vector whose number of dimensions is the total number of elements of the word, and the value of the i-th dimension of Fv (t) represents the degree to which the i-th word is related to the feature word. That is, Fv (t) is a score vector for the target feature word. Fv (0) given as an input is created by setting the dimension value of a feature word given as a seed to 1 and setting the others to 0. Similarly, Fp (0) is created by setting the dimension value of a sentence pattern given as a seed to 1 and setting the others to 0. The Laplacian label propagation unit 26 performs Laplacian label propagation on the graph Laplacian using Fv (0) and Fp (0) created in this way, and repeatedly calculates the above expression until convergence. As a result, finally converged Fv (t) is output. Fv (t) is a score vector of the word at the end of t step. The Laplacian label propagation unit 26 obtains a word having a high score as a word to be included in the response sentence.

応答文生成部27は、ラプラシアンラベル伝搬部26にて求めた単語を、応答文の文パターンのスロットに入力して応答文を生成する。応答文出力部28は、生成された応答文を出力する。応答文の出力は、例えば、ディスプレイに表示してもよいし、スピーカーから音声出力してもよい。   The response sentence generation unit 27 inputs the word obtained by the Laplacian label propagation unit 26 into the slot of the sentence pattern of the response sentence and generates a response sentence. The response sentence output unit 28 outputs the generated response sentence. The output of the response sentence may be displayed on a display, for example, or may be output as audio from a speaker.

[対話文生成装置1の動作]
次に、本実施の形態の対話文生成装置1の動作について説明する。
図3は、対話文生成装置1が対話文生成の事前準備の動作を示すフローチャートである。対話文生成装置1は、まず、対話ログコーパス30から対話ログを取得する(S10)。対話文生成装置1は、取得した対話ログに含まれる各文の固有表現を抽出すると共に、各文の固有表現をスロットに置き換えて、文パターンを生成する(S11)。
[Operation of Dialog Generation Device 1]
Next, the operation of the dialogue sentence generation device 1 according to the present embodiment will be described.
FIG. 3 is a flowchart showing the preparatory operation for generating the dialog text by the dialog text generating apparatus 1. The dialog statement generating apparatus 1 first acquires a dialog log from the dialog log corpus 30 (S10). The dialogue sentence generation device 1 extracts a unique expression of each sentence included in the acquired dialogue log, and replaces the unique expression of each sentence with a slot to generate a sentence pattern (S11).

続いて、対話文生成装置1は、対話文における文パターンの遷移に基づいて、文パターンの遷移行列を構築する(S12)。具体的には、前述したとおり、発話文の文パターンから応答文の文パターンに遷移した回数を要素とした行列を生成する。対話文生成装置1は、構築した文パターン遷移行列を文パターン遷移行列記憶部17に記憶する。   Subsequently, the dialogue sentence generation device 1 constructs a sentence pattern transition matrix based on the sentence pattern transitions in the dialogue sentence (S12). Specifically, as described above, a matrix having the number of transitions from the sentence pattern of the utterance sentence to the sentence pattern of the response sentence as an element is generated. The dialogue sentence generation device 1 stores the constructed sentence pattern transition matrix in the sentence pattern transition matrix storage unit 17.

次に、対話文生成装置1は、単語と文パターンとの2部グラフを構築する(S13)。2部グラフの具体例は、図2に示すとおりである。続いて、対話文生成装置1は、2部グラフからグラフラプラシアンを計算し(S14)、グラフラプラシアンのデータをグラフラプラシアン記憶部18に記憶する。以上の動作により、対話ログコーパス30から取得した大量の対話ログを用いて、文パターン遷移行列とグラフラプラシアンを準備することができる。   Next, the dialog sentence generation apparatus 1 constructs a bipartite graph of words and sentence patterns (S13). A specific example of the bipartite graph is as shown in FIG. Subsequently, the dialog sentence generating apparatus 1 calculates a graph Laplacian from the bipartite graph (S14), and stores the graph Laplacian data in the graph Laplacian storage unit 18. With the above operation, a sentence pattern transition matrix and a graph Laplacian can be prepared using a large amount of dialogue logs acquired from the dialogue log corpus 30.

図4は、対話文生成装置1が入力された文に応じて応答文を生成する動作を示すフローチャートである。対話文生成装置1は、文の入力を受け付けると(S20)、入力された文から、固有表現を抽出すると共に、固有表現をスロットに置き換えて文パターンを生成する(S21)。続いて、対話文生成装置1は、抽出した固有表現の中からラプラシアンラベル伝搬に用いる特徴語を抽出する(S22)。本実施の形態では、対話文生成装置1は、固有表現として抽出されたすべての単語を特徴語として用いる。   FIG. 4 is a flowchart showing an operation of generating a response sentence according to the input sentence by the dialog sentence generating apparatus 1. When receiving the input of a sentence (S20), the dialog sentence generating apparatus 1 extracts a specific expression from the input sentence and generates a sentence pattern by replacing the specific expression with a slot (S21). Subsequently, the dialog sentence generating apparatus 1 extracts feature words used for Laplacian label propagation from the extracted unique expressions (S22). In the present embodiment, the dialog sentence generation apparatus 1 uses all words extracted as specific expressions as feature words.

次に、対話文生成装置1は、入力文のパターンの判定を行う(S23)。ここでは、入力文パターン判定部23が、固有表現抽出部22にて抽出された固有表現をスロットに置き換えて文パターンを生成し、生成された文パターンが既存のどの文パターンに該当するかを判定する。対話文生成装置1は、文パターン遷移行列記憶部17から文パターン遷移行列を読み出し、読み出した文パターン遷移行列を用いて、入力文の文パターンに対する応答文の文パターンを抽出する(S24)。求めた応答文の文パターンをラプラシアンラベル伝搬のパターンシードとする。   Next, the dialog sentence generating apparatus 1 determines the pattern of the input sentence (S23). Here, the input sentence pattern determination unit 23 generates a sentence pattern by replacing the specific expression extracted by the specific expression extraction unit 22 with a slot, and determines which existing sentence pattern the generated sentence pattern corresponds to. judge. The dialogue sentence generation device 1 reads the sentence pattern transition matrix from the sentence pattern transition matrix storage unit 17, and extracts the sentence pattern of the response sentence with respect to the sentence pattern of the input sentence using the read sentence pattern transition matrix (S24). The sentence pattern of the obtained response sentence is used as a pattern seed for Laplacian label propagation.

対話文生成装置1は、入力文に含まれる特徴語と、応答文の文パターンをシードとしてラプラシアンラベル伝搬を行う(S25)。対話文生成装置1は、ラプラシアンラベル伝搬の結果、スコアの高かった単語を応答文の文パターンのスロットに入れて応答文を生成し、出力する(S26)。   The dialog sentence generation device 1 performs Laplacian label propagation using the feature words included in the input sentence and the sentence pattern of the response sentence as seeds (S25). As a result of Laplacian label propagation, the dialogue sentence generation device 1 puts a word having a high score in the sentence pattern slot of the response sentence, generates a response sentence, and outputs it (S26).

以上、本発明の実施の形態の対話文生成装置1の構成及び動作について説明した。実施の形態の対話文生成装置1は、対話ログコーパス30から取得した対話ログを用いて、自動的に生成した文パターン遷移行列及びグラフラプラシアンを用いて対話文を生成するので、従来は、コスト面で難しかった多様な文の生成を、ログデータを増やすだけで実現できるようになる。また、パターンのスロットを埋める単語候補についても、同義語辞書やシソーラスといった言語資源を必要とせずにログデータから取得することができる。   Heretofore, the configuration and operation of the dialogue sentence generation device 1 according to the embodiment of the present invention have been described. Since the dialogue generation apparatus 1 according to the embodiment uses the dialogue log acquired from the dialogue log corpus 30 to generate a dialogue sentence using the automatically generated sentence pattern transition matrix and graph Laplacian, conventionally, Generation of various sentences, which was difficult in terms of aspect, can be realized simply by increasing the log data. In addition, word candidates for filling a slot of a pattern can be acquired from log data without requiring language resources such as a synonym dictionary and a thesaurus.

本実施の形態の対話文生成装置1は、入力された文に含まれる特徴語と入力文に対応する応答文の文パターンをシードとして、グラフラプラシアンを用いたラプラシアンラベル伝搬を行うので、意味ドリフトの発生を抑制し、適切な応答文を生成がすることができる。   The dialogue sentence generation device 1 according to the present embodiment performs Laplacian label propagation using a graph Laplacian by using a feature word included in the inputted sentence and a sentence pattern of a response sentence corresponding to the input sentence as a seed. The generation of an appropriate response sentence can be generated.

以上、本発明の対話文生成装置1について実施の形態を挙げて詳細に説明したが、本発明は上記した実施の形態に限定されるものではない。   As mentioned above, although the dialogue sentence generation device 1 of the present invention has been described in detail with reference to the embodiment, the present invention is not limited to the above-described embodiment.

上記した実施の形態の対話文生成装置1においては、入力された文に応答する応答文を生成する例を挙げたが、単語の入力に基づいて文を生成することも可能である。例えば、ある単語と同じような意味の単語を含む対話文を生成したい場合等に用いる対話文生成装置2(上記実施の形態の変形例)も本発明の範囲に含まれる。   In the dialog sentence generation device 1 according to the above-described embodiment, an example of generating a response sentence that responds to an input sentence has been described. However, it is also possible to generate a sentence based on a word input. For example, a dialog sentence generation device 2 (a modification of the above embodiment) used when generating a dialog sentence including a word having the same meaning as a certain word is also included in the scope of the present invention.

図5は、変形例に係る対話文生成装置2の構成を示す図である。図5に示す対話文生成装置2の基本的な構成は、上記した実施の形態の対話文生成装置1と同じであるが、図5に示す対話文生成装置2では、事前計算部10が文パターン遷移行列構築部14を有しておらず、文生成部20が入力文パターン判定部23、応答文パターンシード抽出部24、特徴語抽出部25を有してない点で異なる。また、文生成部20は、文入力部21の代わりに単語入力部29を備えている。対話文生成装置2が、対話ログからグラフラプラシアンを求めて、事前準備を行う動作は、上記した実施の形態の対話文生成装置1の動作と同じである。   FIG. 5 is a diagram illustrating a configuration of the dialogue sentence generation device 2 according to the modification. The basic configuration of the dialog statement generation device 2 shown in FIG. 5 is the same as that of the dialog statement generation device 1 of the above-described embodiment, but in the dialog statement generation device 2 shown in FIG. The difference is that the pattern transition matrix construction unit 14 is not provided, and the sentence generation unit 20 does not include the input sentence pattern determination unit 23, the response sentence pattern seed extraction unit 24, and the feature word extraction unit 25. The sentence generation unit 20 includes a word input unit 29 instead of the sentence input unit 21. The operation in which the dialog statement generating device 2 obtains the graph Laplacian from the dialog log and makes the preparation in advance is the same as the operation of the dialog statement generating device 1 in the above-described embodiment.

図6は、変形例に係る対話文生成装置2によって対話文を生成する動作を示す図である。対話文生成装置2は、単語の入力を受け付ける(S30)。対話文生成装置2は、グラフラプラシアン記憶部18からグラフラプラシアンのデータを読み出し、入力された単語をシードとして、ラプラシアンラベル伝搬を行う(S31)。対話文生成装置2は、ラプラシアンラベル伝搬の結果、ベクトルスコアの高かった文パターン及び単語を求め、求めた文パターンのスロットに単語を入れて対話文を生成し、出力する(S32)。   FIG. 6 is a diagram illustrating an operation of generating a dialogue sentence by the dialogue sentence generating apparatus 2 according to the modification. The dialog sentence generation device 2 receives an input of a word (S30). The dialog sentence generation device 2 reads graph Laplacian data from the graph Laplacian storage unit 18, and performs Laplacian label propagation using the input word as a seed (S31). As a result of Laplacian label propagation, the dialogue sentence generation device 2 obtains a sentence pattern and a word having a high vector score, generates a dialogue sentence by inserting the word into the slot of the obtained sentence pattern, and outputs it (S32).

このように単語−文パターン行列を含むグラフラプラシアンを用いてラプラシアンラベル伝搬を行うことにより、入力された単語のみから対話文を生成することができる。   In this way, by performing Laplacian label propagation using a graph Laplacian including a word-sentence pattern matrix, a dialogue sentence can be generated only from the input word.

本発明によれば、対話ログコーパスから取得した対話ログを用いることで、対話文を生成するためのグラフラプラシアンを自動的に生成することができるという効果を有し、音声対話システム等に有用である。   According to the present invention, it is possible to automatically generate a graph Laplacian for generating a dialog sentence by using the dialog log acquired from the dialog log corpus, which is useful for a voice dialog system and the like. is there.

1,2 対話文生成装置
10 事前計算部
11 対話ログ入力部
12 固有表現抽出部
13 文パターン抽出部
14 文パターン遷移行列構築部
15 2部グラフ構築部
16 グラフラプラシアン計算部
17 文パターン遷移行列記憶部
18 グラフラプラシアン記憶部
20 文生成部
21 文入力部
22 固有表現抽出部
23 入力文パターン判定部
24 応答文パターンシード抽出部
25 特徴語抽出部
26 ラプラシアンラベル伝搬部
27 応答文生成部
28 応答文出力部
29 単語入力部
DESCRIPTION OF SYMBOLS 1, 2 Dialogue sentence production | generation apparatus 10 Prior calculation part 11 Dialogue log input part 12 Specific expression extraction part 13 Sentence pattern extraction part 14 Sentence pattern transition matrix construction part 15 Second part Graph construction part 16 Graph Laplacian calculation part 17 Sentence pattern transition matrix memory | storage Unit 18 Graph Laplacian Storage Unit 20 Sentence Generation Unit 21 Sentence Input Unit 22 Specific Expression Extraction Unit 23 Input Sentence Pattern Determination Unit 24 Response Sentence Pattern Seed Extraction Unit 25 Feature Word Extraction Unit 26 Laplacian Label Propagation Unit 27 Response Sentence Generation Unit 28 Response Sentence Output unit 29 Word input unit

Claims (6)

対話ログコーパスより抽出した対話文に基づいて生成した単語と文パターンとの間の関連度から計算したグラフラプラシアンと、対話ログコーパスの文パターン間の遷移行列とを記憶した記憶部と、
文の入力を受け付ける文入力部と、
入力文から固有表現を抽出する固有表現抽出部と、
抽出した固有表現に基づいて入力文の文パターンを判定するパターン判定部と、
前記記憶部に記憶された遷移行列を読み出し、前記遷移行列を用いて入力文の文パターンに対応する応答文のパターンシードを抽出するパターンシード抽出部と、
前記固有表現抽出部にて抽出された固有表現から特徴語を抽出する特徴語抽出部と、
前記記憶部から前記グラフラプラシアンを読み出し、前記グラフラプラシアン上で、前記応答文のパターンシードと前記特徴語を初期値としてラプラシアンラベル伝搬を行い、応答文に含めるべき単語を求めるラプラシアンラベル伝搬部と、
前記応答文のパターンに前記ラプラシアンラベル伝搬部にて求めた単語を入れて応答文を生成する対話文生成部と、
前記応答文を出力する出力部と、
を備える対話文生成装置。
A storage unit that stores a graph Laplacian calculated from the degree of association between a word and a sentence pattern generated based on a dialog sentence extracted from the dialog log corpus, and a transition matrix between sentence patterns of the dialog log corpus;
A sentence input unit that accepts sentence input;
A specific expression extraction unit that extracts a specific expression from an input sentence;
A pattern determination unit that determines a sentence pattern of an input sentence based on the extracted specific expression;
A pattern seed extraction unit that reads the transition matrix stored in the storage unit and extracts a pattern seed of a response sentence corresponding to a sentence pattern of an input sentence using the transition matrix;
A feature word extraction unit for extracting a feature word from the specific expression extracted by the specific expression extraction unit;
Reading the graph Laplacian from the storage unit, performing Laplacian label propagation using the pattern seed of the response sentence and the feature word as initial values on the graph Laplacian, and obtaining a word to be included in the response sentence; a Laplacian label propagation unit;
A dialog sentence generation unit that generates a response sentence by putting the word obtained by the Laplacian label propagation unit into the pattern of the response sentence;
An output unit for outputting the response sentence;
A dialogue sentence generation device comprising:
対話ログコーパスより抽出した対話文に基づいて生成した単語と文パターンとの間の関連度から計算したグラフラプラシアンを記憶した記憶部と、
単語の入力を受け付ける入力部と、
前記記憶部から前記グラフラプラシアンを読み出し、前記グラフラプラシアン上で、前記単語を初期値としてラプラシアンラベル伝搬を行い、文パターンと、文に含めるべき単語を求めるラプラシアンラベル伝搬部と、
前記ラプラシアンラベル伝搬部にて求めた文パターン及び単語を用いて対話文を生成する対話文生成部と、
前記対話文を出力する出力部と、
を備える対話文生成装置。
A storage unit storing a graph Laplacian calculated from the degree of association between a word generated based on a dialogue sentence extracted from a dialogue log corpus and a sentence pattern;
An input unit that accepts input of words;
Reading the graph Laplacian from the storage unit, performing Laplacian label propagation using the word as an initial value on the graph Laplacian, a Laplacian label propagation unit for obtaining a sentence pattern and a word to be included in the sentence,
A dialog sentence generation unit that generates a dialog sentence using the sentence pattern and the word obtained by the Laplacian label propagation unit;
An output unit for outputting the dialogue sentence;
A dialogue sentence generation device comprising:
対話ログコーパスより抽出した対話文に基づいて生成した単語と文パターンとの間の関連度から計算したグラフラプラシアンと、対話ログコーパスの文パターン間の遷移行列とを記憶した記憶部とを備える対話文生成装置によって対話文を生成する方法であって、
前記対話文生成装置が、文の入力を受け付けるステップと、
前記対話文生成装置が、入力文から固有表現を抽出するステップと、
前記対話文生成装置が、抽出した固有表現に基づいて入力文の文パターンを判定するステップと、
前記対話文生成装置が、前記記憶部に記憶された遷移行列を読み出し、前記遷移行列を用いて入力文の文パターンに対応する応答文のパターンシードを抽出するステップと、
前記対話文生成装置が、入力文から抽出された固有表現から特徴語を抽出するステップと、
前記対話文生成装置が、前記記憶部から前記グラフラプラシアンを読み出し、前記グラフラプラシアン上で、前記応答文のパターンシードと前記特徴語を初期値としてラプラシアンラベル伝搬を行い、応答文に含めるべき単語を求めるステップと、
前記対話文生成装置が、前記応答文のパターンに、ラプラシアンラベル伝搬部によって求めた単語を入れて応答文を生成するステップと、
前記対話文生成装置が、前記応答文を出力するステップと、
を備える対話文生成方法。
Dialogue comprising a graph Laplacian calculated from the degree of association between a word and a sentence pattern generated based on a dialogue sentence extracted from the dialogue log corpus, and a storage unit storing a transition matrix between sentence patterns of the dialogue log corpus A method for generating a dialogue sentence by a sentence generator,
The interactive sentence generation device accepting an input of a sentence;
The dialog sentence generation device extracting a specific expression from an input sentence;
The dialog sentence generation device determines a sentence pattern of an input sentence based on the extracted specific expression;
The dialogue sentence generation device reads a transition matrix stored in the storage unit, and extracts a pattern seed of a response sentence corresponding to a sentence pattern of an input sentence using the transition matrix;
The dialog sentence generating device extracting a feature word from a specific expression extracted from an input sentence;
The dialogue sentence generation device reads the graph Laplacian from the storage unit, performs Laplacian label propagation using the pattern seed of the response sentence and the feature word as initial values on the graph Laplacian, and selects a word to be included in the response sentence. Seeking steps,
The dialogue sentence generating device generating a response sentence by putting a word obtained by a Laplacian label propagation unit in the response sentence pattern;
The dialog sentence generating device outputting the response sentence;
A dialog sentence generation method comprising:
対話ログコーパスより抽出した対話文に基づいて生成した単語と文パターンとの間の関連度から計算したグラフラプラシアンを記憶した記憶部を備える対話文生成装置によって、対話文を生成する方法であって、
前記対話文生成装置が、単語の入力を受け付けるステップと、
前記対話文生成装置が、前記記憶部から前記グラフラプラシアンを読み出し、前記グラフラプラシアン上で、前記単語を初期値としてラプラシアンラベル伝搬を行い、文パターンと、文に含めるべき単語を求めるステップと、
前記対話文生成装置が、求めた文パターン及び単語を用いて応答文を生成するステップと、
前記対話文生成装置が、前記応答文を出力するステップと、
を備える対話文生成方法。
A method for generating a dialogue sentence by a dialogue sentence generation device including a storage unit storing a graph Laplacian calculated from a degree of association between a word generated based on a dialogue sentence extracted from a dialogue log corpus and a sentence pattern. ,
The interactive sentence generating device accepting an input of a word;
The dialogue sentence generation device reads the graph Laplacian from the storage unit, performs Laplacian label propagation with the word as an initial value on the graph Laplacian, and obtains a sentence pattern and a word to be included in the sentence;
The interactive sentence generation device generates a response sentence using the obtained sentence pattern and word;
The dialog sentence generating device outputting the response sentence;
A dialog sentence generation method comprising:
対話ログコーパスより抽出した対話文に基づいて生成した単語と文パターンとの間の関連度から計算したグラフラプラシアンと、対話ログコーパスの文パターン間の遷移行列とを記憶した記憶部とを備えるコンピュータに、対話文を生成させるプログラムであって、前記コンピュータに、
文の入力を受け付けるステップと、
入力文から固有表現を抽出するステップと、
抽出した固有表現に基づいて入力文の文パターンを判定するステップと、
前記記憶部に記憶された遷移行列を読み出し、前記遷移行列を用いて入力文の文パターンに対応する応答文のパターンシードを抽出するステップと、
入力文から抽出された固有表現から特徴語を抽出するステップと、
前記記憶部から前記グラフラプラシアンを読み出し、前記グラフラプラシアン上で、前記応答文のパターンシードと前記特徴語を初期値としてラプラシアンラベル伝搬を行い、応答文に含めるべき単語を求めるステップと、
前記応答文のパターンに、ラプラシアンラベル伝搬部によって求めた単語を入れて応答文を生成するステップと、
前記応答文を出力するステップと、
を実行させるプログラム。
A computer comprising a storage unit that stores a graph Laplacian calculated from the degree of association between a word generated based on a dialogue sentence extracted from a dialogue log corpus and a sentence pattern, and a transition matrix between sentence patterns of the dialogue log corpus A program for generating a dialogue sentence, wherein the computer
Receiving a sentence input;
Extracting a specific expression from the input sentence;
Determining a sentence pattern of the input sentence based on the extracted specific expression;
Reading the transition matrix stored in the storage unit, and using the transition matrix to extract the pattern seed of the response sentence corresponding to the sentence pattern of the input sentence;
Extracting a feature word from the specific expression extracted from the input sentence;
Reading the graph Laplacian from the storage unit, performing Laplacian label propagation with the pattern seed of the response sentence and the feature word as initial values on the graph Laplacian, and obtaining a word to be included in the response sentence;
Generating a response sentence by putting the word obtained by the Laplacian label propagation unit into the response sentence pattern;
Outputting the response sentence;
A program that executes
対話ログコーパスより抽出した対話文に基づいて生成した単語と文パターンとの間の関連度から計算したグラフラプラシアンを記憶した記憶部を備えるコンピュータに、対話文を生成させるプログラムであって、
単語の入力を受け付けるステップと、
前記記憶部から前記グラフラプラシアンを読み出し、前記グラフラプラシアン上で、前記単語を初期値としてラプラシアンラベル伝搬を行い、文パターンと、文に含めるべき単語を求めるステップと、
求めた文パターン及び単語を用いて応答文を生成するステップと、
前記応答文を出力するステップと、
を実行させるプログラム。
A program that causes a computer including a storage unit that stores a graph Laplacian calculated from the degree of association between a word generated based on a dialog sentence extracted from a dialog log corpus and a sentence pattern to generate a dialog sentence,
Receiving a word input;
Reading the graph Laplacian from the storage unit, performing Laplacian label propagation with the word as an initial value on the graph Laplacian, obtaining a sentence pattern and a word to be included in the sentence;
Generating a response sentence using the obtained sentence pattern and word;
Outputting the response sentence;
A program that executes
JP2014027966A 2014-02-17 2014-02-17 Dialog sentence generating apparatus, dialog sentence generating method and program Expired - Fee Related JP6180340B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014027966A JP6180340B2 (en) 2014-02-17 2014-02-17 Dialog sentence generating apparatus, dialog sentence generating method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014027966A JP6180340B2 (en) 2014-02-17 2014-02-17 Dialog sentence generating apparatus, dialog sentence generating method and program

Publications (2)

Publication Number Publication Date
JP2015153261A true JP2015153261A (en) 2015-08-24
JP6180340B2 JP6180340B2 (en) 2017-08-16

Family

ID=53895405

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014027966A Expired - Fee Related JP6180340B2 (en) 2014-02-17 2014-02-17 Dialog sentence generating apparatus, dialog sentence generating method and program

Country Status (1)

Country Link
JP (1) JP6180340B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018181250A (en) * 2017-04-21 2018-11-15 Kddi株式会社 Device, program and method for generating dialogue scenario according to context
JP2018195006A (en) * 2017-05-16 2018-12-06 日本放送協会 Automatic document generator and program
JP2019087123A (en) * 2017-11-09 2019-06-06 Kddi株式会社 INTERACTION CONTROL DEVICE, PROGRAM, AND METHOD CAPABLE OF CONTINUING WITH MULTIPLE TYPES OF INTERACTION
CN112597748A (en) * 2020-12-18 2021-04-02 深圳赛安特技术服务有限公司 Corpus generation method, apparatus, device and computer readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008293098A (en) * 2007-05-22 2008-12-04 Toyota Central R&D Labs Inc Response score information generation device, dialogue processing device
WO2013080406A1 (en) * 2011-11-28 2013-06-06 Necソフト株式会社 Dialog system, redundant message removal method and redundant message removal program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008293098A (en) * 2007-05-22 2008-12-04 Toyota Central R&D Labs Inc Response score information generation device, dialogue processing device
WO2013080406A1 (en) * 2011-11-28 2013-06-06 Necソフト株式会社 Dialog system, redundant message removal method and redundant message removal program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
内海 慶 外1名: "ウェブ検索クエリログとクリックスルーログを用いた同義語獲得", 情報処理学会論文誌 論文誌トランザクション 2012(平成24)年度2 [CD−ROM], vol. 第6巻第1号, JPN6017024550, 15 April 2013 (2013-04-15), JP, pages 16 - 28, ISSN: 0003590714 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018181250A (en) * 2017-04-21 2018-11-15 Kddi株式会社 Device, program and method for generating dialogue scenario according to context
JP2018195006A (en) * 2017-05-16 2018-12-06 日本放送協会 Automatic document generator and program
JP2019087123A (en) * 2017-11-09 2019-06-06 Kddi株式会社 INTERACTION CONTROL DEVICE, PROGRAM, AND METHOD CAPABLE OF CONTINUING WITH MULTIPLE TYPES OF INTERACTION
CN112597748A (en) * 2020-12-18 2021-04-02 深圳赛安特技术服务有限公司 Corpus generation method, apparatus, device and computer readable storage medium
CN112597748B (en) * 2020-12-18 2023-08-11 深圳赛安特技术服务有限公司 Corpus generation method, corpus generation device, corpus generation equipment and computer-readable storage medium

Also Published As

Publication number Publication date
JP6180340B2 (en) 2017-08-16

Similar Documents

Publication Publication Date Title
CN113962315B (en) Model pre-training methods, devices, equipment, storage media and program products
CN116127020B (en) Generative large language model training method and model-based search method
CN111462751B (en) Method, apparatus, computer device and storage medium for decoding voice data
CN114036300A (en) Language model training method and device, electronic equipment and storage medium
JP5540335B2 (en) Natural language sentence generation device and computer program
CN107239443A (en) The training method and server of a kind of term vector learning model
US10354646B2 (en) Bilingual corpus update method, bilingual corpus update apparatus, and recording medium storing bilingual corpus update program
JP6180340B2 (en) Dialog sentence generating apparatus, dialog sentence generating method and program
US20230368080A1 (en) Automated communication data summarization using artificial intelligence techniques
CN107193806B (en) A method and device for automatic prediction of lexical sememe
JP2012146263A (en) Language model learning device, language model learning method, language analysis device, and program
JP2016224483A (en) Model learning device, method and program
CN105243053A (en) Method and apparatus for extracting key sentence of document
CN113920987B (en) A method, device, equipment and storage medium for speech recognition
CN120124610A (en) Large language model decision optimization method, device and electronic equipment
US20240086768A1 (en) Learning device, inference device, non-transitory computer-readable medium, learning method, and inference method
CN112307181A (en) Corpus-specific-corpus-based corpus extraction method and corpus extractor
CN115510206B (en) Semantic question answering method, device, electronic device and storage medium
JP5807966B2 (en) Document evaluation learning apparatus, document evaluation apparatus, method, and program
JP2012181676A (en) Base tree acquisition device, syntax analysis device, method, and program
Vu et al. Building a vietnamese sentiwordnet using vietnamese electronic dictionary and string kernel
JP5860439B2 (en) Language model creation device and method, program and recording medium
JP5718406B2 (en) Utterance sentence generation device, dialogue apparatus, utterance sentence generation method, dialogue method, utterance sentence generation program, and dialogue program
Boldt et al. XferBench: a data-driven benchmark for emergent language
JP4499003B2 (en) Information processing method, apparatus, and program

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20151113

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160720

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170512

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: 20170704

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170718

R150 Certificate of patent or registration of utility model

Ref document number: 6180340

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees