WO2020004401A1 - 回答文選択装置、方法、およびプログラム - Google Patents
回答文選択装置、方法、およびプログラム Download PDFInfo
- Publication number
- WO2020004401A1 WO2020004401A1 PCT/JP2019/025197 JP2019025197W WO2020004401A1 WO 2020004401 A1 WO2020004401 A1 WO 2020004401A1 JP 2019025197 W JP2019025197 W JP 2019025197W WO 2020004401 A1 WO2020004401 A1 WO 2020004401A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- answer sentence
- sentence
- answer
- positive
- theme
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/04—Inference or reasoning models
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
- G06N20/10—Machine learning using kernel methods, e.g. support vector machines [SVM]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/04—Inference or reasoning models
- G06N5/041—Abduction
Definitions
- the present invention relates to an answer sentence selecting apparatus, method, and program for selecting an answer sentence for an input sentence, for example.
- a predicate-argument structure database is created from large-scale text data, records containing words indicating topics of dialogue are selected from the predicate-arrangement database, and the answer sentence is selected.
- a generation method for example, see Patent Document 1.
- Q & A there is a technique of selecting an answer sentence by using the frequency at which a word included in the history of a user's utterance sentence is included in the answer sentence as a score (for example, see Patent Document 2).
- Ogiri has few chronological elements. For this reason, it has been difficult to appropriately select an answer sentence by the technique of scoring based on the history of the words of the user utterance sentence and the words of the subject sentence.
- the present invention has been made in view of the above circumstances, and in one aspect, an object thereof is to provide a technique capable of selecting an appropriate answer sentence for a subject.
- a first aspect of the present invention provides a method for constructing a positive example or a negative example of each answer sentence constructed from a feature amount of a theme Qi to which a positive example or a negative example is added to each answer sentence.
- a positive example negative example determining means for determining a positive example negative example of a given title sentence Q for each answer sentence using a determination model, and an answer sentence determined as a positive example by the positive example negative example determining means.
- An answer sentence score calculating means for obtaining a score of the answer sentence from a feature amount of the theme Qi which is a positive example for the answer sentence and a feature amount of the title sentence Q; Answer sentence selecting means for selecting an answer sentence for the title sentence Q.
- the positive / negative example determining means determines a positive / negative example of the given title Q for each answer sentence.
- the answer sentence is calculated from the feature amount of the subject Qi and the feature amount of the title sentence Q which are positive examples with respect to the answer sentence.
- the score of the answer sentence is obtained by the score calculation means.
- an answer sentence for the title sentence Q is selected by the answer sentence selecting means based on the score of the answer sentence.
- FIG. 1 is a functional block diagram illustrating an example of an answer sentence selection device according to the embodiment.
- FIG. 2 is a diagram illustrating an example of a feature keyword stored in the feature keyword DB 107b.
- FIG. 3 is a diagram illustrating an example of a keyword vector sequence associated with each feature keyword in FIG.
- FIG. 4 is a diagram illustrating an example of a correspondence between a title sentence and an answer sentence that form a positive example pair.
- FIG. 5 is a diagram illustrating an example of a correspondence between a title sentence and an answer sentence that form a negative example pair.
- FIG. 6 is a flowchart illustrating an example of a processing procedure of the answer sentence selection device 1000 according to the embodiment.
- FIG. 7 is a flowchart for explaining the determination of the positive and negative examples and the calculation of the score.
- FIG. 8 is a diagram for explaining answer sentence score data.
- FIG. 1 is a functional block diagram illustrating an example of an answer sentence selection device according to the embodiment.
- the answer sentence selection device 1000 receives a theme sentence from the theme sentence input device 1001, creates an answer sentence for the theme, and outputs it to the information presenting device 1002.
- the theme input device 1001 accepts the theme given by the user, and passes the text data format to the answer sentence selection device 1000.
- the theme input device 1001 is a human-machine interface device such as a personal computer and a smartphone.
- the title is assumed to be input to these devices in text format.
- the title may be given by voice to a voice recognition device such as an AI speaker or a voice input device such as a microphone, and the text may be recognized.
- the information presenting device 1002 is assumed to be a display for displaying an answer sentence in text.
- the answer sentence may be converted into audio data and output from the loudspeaker. If the theme input device 1001 and the information presentation device 1002 are integrated, it can be enjoyed as a gadget that returns an answer to the theme.
- the answer sentence selection device 1000 is a computer, and includes the processor 100 as hardware and a storage unit 107.
- the processor 100 implements the functions according to the embodiment according to the program 107a stored in the storage unit 107.
- the storage unit 107 is a semiconductor memory such as a read only memory (ROM) or a random access memory (RAM), or a storage medium such as a hard disk drive (HDD) or a solid state drive (SSD).
- the storage unit 107 includes a program 107a for causing the processor 100 to function as the answer sentence selection device 1000, a feature keyword database (DB) 107b for storing feature keywords, and a large interest database (DB) 107c for storing a plurality of answer sentences. Is stored.
- DB feature keyword database
- DB large interest database
- the processor 100 includes, as processing functions according to the embodiment, a theme sentence storage unit 101, a keyword extraction unit 102, a theme sentence feature amount calculation unit 103, a positive example negative example determination unit 104, an answer sentence score calculation unit 105, And an answer sentence selection unit 106.
- These functional blocks can be understood as a process in which the program 107a is loaded into the memory and generated during the execution of the program.
- the theme storage unit 101 receives and holds the theme (denoted as theme Q) given from the theme input device 1001, and outputs the theme to the keyword extraction unit 102.
- the keyword extraction unit 102 divides the theme sentence Q passed from the theme sentence storage unit 101 into word units by, for example, a known morphological analysis technique to obtain a word group. Further, the keyword extracting unit 102 removes a predefined word (excluded word) defined in advance from the word group to obtain a word group [w 1 , w 2 ,..., W n ]. n is the word length of the subject Q excluding the excluded word group. The word group [w 1 , w 2 ,..., W n ] derived from the theme sentence Q is sent to the theme feature amount calculation unit 103.
- Contact Daibun feature quantity calculation unit 103 a group word passed from the keyword extraction section 102 [w 1, w 2, ..., w n] from calculating the feature amount F q your Daibun Q.
- the word group [w 1 , w 2 ,..., W n ] can be said to be an array in which each word of the subject Q is vectorized.
- Contact Daibun feature quantity calculation unit 103, and this sequence, calculates the feature amount F q you Daibun Q using the feature keyword DB107b.
- FIG. 2 is a diagram showing an example of a feature keyword stored in the feature keyword DB 107b.
- the characteristic keywords as shown in FIG. 2 can be extracted in advance by a technique such as data mining from an existing database (for example, Wikipedia (registered trademark)).
- Word2Vec is known as one of the techniques for analyzing a large amount of text data and expressing the meaning of each word as a vector.
- FIG. 3 is a diagram showing an example of a keyword vector sequence created by applying, for example, Word2Vec to the feature keyword group of FIG. M shown in FIG. 3 is the number of characteristic keywords.
- the similarity between words can be calculated by, for example, cosine similarity.
- the similarity between the vectors w 1 and t 1 is represented by a scalar quantity cos (w 1 , t 1 ).
- Contact Daibun feature quantity calculation unit 103 SEQ [w 1, w 2, ... , w n] and keyword vector [t 1, t 2, ... , t m] to calculate the cosine similarity between.
- the theme sentence feature calculator 103 uses, for example, equation (1) to calculate the theme sentence Q. Is calculated.
- Max on the right side of Expression (1) represents the maximum value of the cosine similarity, and min represents the minimum value.
- Each element on the right side is the maximum or minimum value of the cosine similarity with the keyword vector [t 1 , t 2 ,..., Tm ] for all the arrays [w 1 , w 2 ,..., W n ]. is there.
- the feature value Fq is a 2m-dimensional vector. The calculated feature amount F q is sent to the positive examples negative cases the determination unit 104.
- a positive example means that a pair of a subject and an answer recalls a user's laugh
- a negative example means that a pair of a subject and an answer laughs at the user. Means not to recall.
- a positive example / negative example determination model constructed in advance can be used to determine whether the case is a positive example or a negative example.
- the positive / negative example determination model can be constructed using, for example, a support vector machine, which is common in natural language analysis.
- other machine learning methods and statistical methods such as the k-nearest neighbor method may be used.
- FIG. 4 and FIG. 5 are diagrams showing an example of the contents stored in the Daikiri DB 107c.
- the Daikiri DB 107c stores a positive example pair of the title sentence and the answer sentence (FIG. 4) and a negative example pair of the theme sentence and the answer sentence (FIG. 5).
- a positive example pair is a pair of a subject and an answer sentence that causes the user to laugh
- a negative example pair is a pair of a title and an answer sentence that does not cause the user to laugh. It is.
- reply sentence A 1, A 2, A 3 , A 4 is your Daibun Q 1, the positive sample pair, reply sentence A 5, A 6, a 7 will your Daibun Q 1 and a negative example pair.
- One answer sentence is an answer sentence that is established for a specific feature of the theme sentence, and thus exists as a positive example pair if other answer sentences have similar features. In other words, whether the answer sentence is a positive example or a negative example depends on a specific feature of the theme sentence.
- objects that include horizontal as a feature include chairs and houses. Therefore, it can be said that the answer sentence "tilted” should be combined with a subject such as "I do not like this chair” or "I do not like this house” as a positive example.
- the determination unit 104 inputs the feature value F q your Daibun Q to positive examples negative cases the determination model, positive cases determined if the output label is 1, determination as a negative example determined if -1 The result is output to answer sentence score calculation section 105.
- the answer sentence score calculation unit 105 acquires the positive example negative example determination result of the title Q for each answer sentence in the large interest DB 107c from the positive example negative example determination unit 104.
- the reply sentence score calculation unit 105 based on the feature amount F q you Daibun Q, for each reply sentence of Daiki interest DB107c, calculates a score indicating a fit with your Daibun Q. The calculated score is passed to the answer sentence selection unit 106.
- the answer sentence selection unit 106 selects an answer sentence showing the maximum score for the thematic sentence Q based on the score passed from the answer sentence score calculation unit 105, and outputs the answer sentence to the information presentation device 1002.
- the information presenting device 1002 presents the selected answer sentence to the user in a form of text display or voice output.
- FIG. 6 is a flowchart illustrating an example of a processing procedure of the answer sentence selection device 1000 according to the embodiment.
- the answer sentence selection device 1000 divides the theme Q into word units and extracts keywords of the theme Q (step S2). ).
- answer sentence selection unit 1000 calculates the feature amount F q you Daibun Q from keywords extracted Contact Daibun Q (step S3)
- answer sentence selection unit 1000, a feature amount F q you Daibun Q, the similarity is calculated between the feature quantity of each contact Daibun included in Daiki interest DB107c, a high degree of similarity Contact Daibun Extract.
- a score is calculated by using the subject answer matching degree (positive example: +1, negative example: -1) of the answer sentence combined with the extracted theme sentence (step S4).
- the answer sentence selecting device 1000 selects an answer sentence for the theme sentence Q from the large gift DB 107c based on the calculated score (step S5).
- FIG. 7 is a flowchart for explaining the determination of the positive and negative examples and the calculation of the score. In one embodiment, it will be described as an example the positive example / negative sample determined in our Daibun Q for reply sentence A 1.
- answer sentence selection unit 1000 a contact Daigun (set) N in our Daigun (set) P and a negative example pairs positive example pair for reply sentence A 1, obtained from Daiki interest DB107c (step S10 ).
- Q 1 and Q 2 are included in the theme group P of the positive example pair
- Q 3 is included in the theme group N of the negative example pair.
- the answer sentence selection device 1000 calculates the feature amount of each theme sentence (Q 1 , Q 2 ) of the group P and the feature amount of each theme sentence (Q 3 ) of the group N. Also in this case, the feature amount of the theme sentence can be calculated based on the cosine similarity.
- the features of the themes Q 1 and Q 2 are F q1 and F q2, and the features of the theme Q 3 are F q3 .
- the answer sentence selecting apparatus 1000 constructs a positive / negative example determination model by machine learning using a support vector machine using F q1 and F q2 as labels 1 and F q3 as labels ⁇ 1 (step S11). .
- the answer sentence selection device 1000 inputs the feature amount F q of the given theme sentence Q to the positive / negative example determination model (step S12), and determines whether the output label is 1 or -1 (step S12). S13). If the output label is 1, the answer sentence selection device 1000 determines a positive example (step S14), and if ⁇ 1, determines a negative example (step S15).
- the positive / negative example determination unit 104 determines a positive / negative example of the subject Q for all the answer sentences stored in the large interest DB 107c.
- answer sentence score calculation unit 105 extracts a set of answer message Contact Daibun Q was positive cases determined (the answer Bungun A p).
- Reply sentence score calculation unit 105 answers for each of the answer message is an element of Bungun A p, determine the set of your Daibun as a positive example pair (a contact Daibungun O p). For example, if it is determined that positive cases Contact Daibun Q is relative reply sentence A 1, Contact Daibungun O p as a positive sample pairs reply sentence A 1 is, Q 1, Q 2 corresponds ( Figure 5).
- answer sentence score calculation unit 105 Contact Daibun Q feature amount F q of your Daibungun O p Contact elements each are of Daibun Q 1, Q 2 of the feature F q1, F q2 to calculate the cosine similarity between, the maximum value is set as the score for the answer sentence a 1 of your Daibun Q.
- the answer sentence selection unit 106 selects an answer sentence for the subject Q based on the answer sentence score data.
- FIG. 8 is a diagram for explaining answer sentence score data.
- scores reply sentence A 1 is 0.8, the highest is in the illustrated. That long as 8, will be selected reply sentence A 1 for us Daibun Q. Note that score calculation is not performed for an answer sentence determined as negative. In FIG. 8, this is indicated by NaN (Not a Number) indicating data loss.
- the subject and the answer forming a positive example pair and the theme and the answer forming a negative example pair are stored in advance in the Daikiri DB 107c.
- a positive example set P and a negative example set for a given answer sentence A with a pair of an answer sentence recalling the user's laughter and a subject sentence as a positive example, and not recalling laughter as a negative example.
- Find N Then, a positive / negative example determination model in which the set P and the set N are learned as teachers is constructed.
- the feature amount F q is calculated by the cosine similarity between the advance database feature keyword. Apply the feature amount F q to positive examples negative cases the determination model determines positive example / negative examples reply sentence A.
- the cosine similarity between a plurality of subject sentences forming a pair of the answer sentence A determined to be a positive example and the subject sentence Q is calculated, and the highest value is set as the score of the answer sentence A. Then, the answer sentence showing the maximum score is selected as the answer sentence to the subject Q and presented.
- a procedure relating to the construction of a positive example / negative example determination model (steps S10 and S11) and a procedure of determining a positive example or a negative example using the positive example / negative example determination model (steps S12 to S15).
- Need not be executed consecutively For example, by repeatedly executing only the procedures of steps S10 and S11, learning of the positive / negative example determination model is accumulated, and an improvement in the accuracy of the determination in steps S12 to S15 can be expected.
- all or at least one of the functional blocks of the processor 100 can be implemented in the cloud computing system. If the processing related to the selection of the answer sentence is entrusted to a cloud service, the burden on the device on the user side can be reduced, and a gadget such as an AI speaker or a smartphone application can be realized.
- the functional configuration of the answer sentence selection device can be variously modified and implemented without departing from the gist of the present invention.
- the invention of the present application is not limited to the above-described embodiment, and can be variously modified in an implementation stage without departing from the gist of the invention.
- the embodiments may be implemented in appropriate combinations as much as possible, in which case the combined effects can be obtained.
- the above embodiments include inventions at various stages, and various inventions can be extracted by appropriate combinations of a plurality of disclosed constituent elements.
- Processor 101 Theme sentence storage unit 102: Keyword extraction unit 103: Theme sentence feature amount calculation unit 104: Positive / negative example determination unit 105: Answer sentence score calculation unit 106: Answer sentence selection unit 107: Storage unit 107a ... Program 107b ... Feature keyword database 107c ... Daikiri database 1000 ... Answer sentence selection device 1001 ... Subject sentence input device 1002 ... Information presentation device
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Evolutionary Computation (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Artificial Intelligence (AREA)
- Databases & Information Systems (AREA)
- Computational Linguistics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Medical Informatics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
お題文特徴量算出部103で、特徴キーワードDB107bの特徴キーワードとのコサイン類似度に基づき、与えられたお題文Qの特徴量Fqを計算する。正例負例判定部104により、特徴量Fqを正例負例判定モデルに適用し、回答文Aの正負を判定する。正例と判定された回答文Aのペアとなる複数のお題文と、お題文Qとのコサイン類似度を回答文スコア算出部105で計算し、その最高値を回答文Aのスコアとする。そして、最大のスコアを示す回答文を、回答文選択部106により、お題文Qに対する回答文として選択する。
Description
この発明は、例えば入力文に対する回答文を選択するための、回答文選択装置、方法、およびプログラムに関する。
『話芸』といわれる演芸のなかでも、言葉使いの妙を楽しむ『なぞかけ』や『大喜利』といったジャンルのファンは多い。大喜利では、例えば「こんな○○○は嫌だ!」といったお題に対して気の利いた答えを返すことが聴衆の笑いを誘うもととなっており、ひとつの芸として評価される。
近年、コンピュータは社会のあらゆる領域で使われていて、例えばタブレットを用いた音声翻訳サービスや、AI(Artificial Intelligence)スピーカの活用などが知られるようになってきている。そのキーとなるのは、入力文に対する適切な回答文を選択する技術であり、この技術が、エンターテインメントの分野でも活用されようとしている。つまり、お題への回答文をコンピュータに生成させるといった用途である。
入力文に対して回答文を選択する技術としては、大規模なテキストデータから述語項構造データベースを作成し、対話の話題を示す単語を含むレコードを述語項構造データベースから選択して、回答文を生成する方式がある(例えば特許文献1を参照)。一般的なQ&Aについては、ユーザの発話文の履歴に含まれる単語が回答文に含まれる頻度をスコアとして、回答文を選択する技術がある(例えば特許文献2を参照)。
大喜利には、大規模テキストデータを用いる手法を適用することが難しい。一般的な大規模テキストデータ内では、大喜利のお題文に対して共起性の低い回答文が正例となるケースが多くなってしまうためで、少なくとも、笑いを生起する述語項構造データベースの構築は困難である。
また、大喜利は、普通の会話とは違って時系列的な要素が少ない。このためユーザ発話文の単語やお題文の単語の履歴に基づくスコアリングでの手法では、回答文を適切に選択することが難しかった。
この発明は、上記事情に着目してなされたもので、その一側面では、お題文に適切な回答文を選択できる技術を提供しようとするものである。
上記課題を解決するためにこの発明の第1の態様は、各回答文に対して、正例あるいは負例が付与されたお題Qiの特徴量から構築された各回答文の正例負例判定モデルを用いて、各回答文に対する与えられた題文Qの正例負例を判定する正例負例判定手段と、前記正例負例判定手段により正例と判定された回答文を対象に、回答文に対して正例であるお題Qiの特徴量と前記題文Qの特徴量とから回答文のスコアを求める回答文スコア算出手段と、前記回答文のスコアに基づいて、前記題文Qに対する回答文を選択する回答文選択手段と、を具備する。
この発明の第1の態様によれば、各回答文に対して、正例あるいは負例が付与されたお題Qiの特徴量から構築された各回答文の正例負例判定モデルを用いて、正例負例判定手段により、各回答文に対する与えられた題文Qの正例負例が判定される。また、前記正例負例判定手段により正例と判定された回答文を対象に、回答文に対して正例であるお題Qiの特徴量と前記題文Qの特徴量とから、回答文スコア算出手段により、回答文のスコアが求められる。そして、前記回答文のスコアに基づいて、前記題文Qに対する回答文が、回答文選択手段により選択される。このような構成であるから、お題文に対する適切な回答文を選択することが可能となる。
次に、図面を参照してこの発明の実施の形態について説明する。以下では、話芸としての大喜利を採りあげ、大喜利の枠組みの中で、お題文に対して聴衆(ユーザ)の笑いを生起する回答文を選択する技術について説明する。
[一実施形態]
(構成)
図1は、実施形態に係わる回答文選択装置の一例を示す機能ブロック図である。一実施形態では、回答文選択装置1000は、お題文入力装置1001からお題文を入力され、このお題文に対して回答文を作成し、情報提示装置1002に出力する。
(構成)
図1は、実施形態に係わる回答文選択装置の一例を示す機能ブロック図である。一実施形態では、回答文選択装置1000は、お題文入力装置1001からお題文を入力され、このお題文に対して回答文を作成し、情報提示装置1002に出力する。
お題文入力装置1001は、ユーザから与えられたお題文を受け付け、テキストデータ形式のお題文を回答文選択装置1000に渡す。お題文入力装置1001は、例えばパソコンやスマートフォン等のヒューマンマシンインタフェース装置である。お題文は、これらの装置にテキスト形式で入力されることが想定される。このほか、AIスピーカ等の音声認識装置や、マイク等の音声入力装置にお題文を音声で与え、テキストに認識させるようにしても良い。
情報提示装置1002は、回答文をテキストで表示するディスプレイ等が想定される。このほか、回答文を音声データに変換してスピーカから拡声出力するようにしても良い。お題文入力装置1001と情報提示装置1002を一体化すれば、お題文に回答を返すガジェットとして楽しむことができる。
回答文選択装置1000は、コンピュータであり、ハードウェアとしてのプロセッサ100と、記憶部107とを備える。
プロセッサ100は、記憶部107に記憶されたプログラム107aに従って、実施形態に係わる機能を実現する。
プロセッサ100は、記憶部107に記憶されたプログラム107aに従って、実施形態に係わる機能を実現する。
記憶部107は、ROM(Read Only Memory)、RAM(Random Access Memory)等の半導体メモリ、あるいはHDD(Hard Disk Drive)やSSD(Solid State Drive)等のストレージメディアである。記憶部107は、プロセッサ100を回答文選択装置1000として機能させるためのプログラム107aと、特徴キーワードを記憶する特徴キーワードデータベース(DB)107bと、複数の回答文を記憶する大喜利データベース(DB)107cとを記憶する。
ところで、プロセッサ100は、実施形態に係わる処理機能として、お題文格納部101、キーワード抽出部102、お題文特徴量算出部103、正例負例判定部104、回答文スコア算出部105、および、回答文選択部106を備える。これらの機能ブロックは、プログラム107aがメモリにロードされ、当該プログラムの実行の過程で生成されるプロセスとして、理解され得る。
お題文格納部101は、お題文入力装置1001から与えられたお題文(お題文Qと表記する)を受け付け、保持し、キーワード抽出部102に出力する。
キーワード抽出部102は、お題文格納部101から渡されたお題文Qを、例えば既知の形態素解析技術により単語の単位にまで分割して単語群を得る。さらにキーワード抽出部102は、この単語群から、事前に定義された既定の単語(除外単語)を除去し、単語群[w1,w2,…,wn]を得る。nは、除外単語群を除いたお題文Qの単語長である。このお題文Qに由来する単語群[w1,w2,…,wn]は、お題文特徴量算出部103に送られる。
お題文特徴量算出部103は、キーワード抽出部102から渡された単語群[w1,w2,…,wn]から、お題文Qの特徴量Fqを計算する。単語群[w1,w2,…,wn]は、お題文Qの各単語をベクトル化した配列といえる。お題文特徴量算出部103は、この配列と、特徴キーワードDB107bとを用いてお題文Qの特徴量Fqを計算する。
図2は、特徴キーワードDB107bに記憶される特徴キーワードの一例を示す図である。図2に示されるような特徴キーワードは、例えば、既存のデータベース(例えばWikipedia(登録商標)等)からのデータマイニング等の手法で予め抽出されることができる。
既存のWord2Vec等の手法を適用すれば、単語の概念をベクトルで表現可能な単語空間を構築することができる。Word2Vecは、大量のテキストデータを解析し、各単語の意味をベクトル表現化す手法の一つとして知られている。図2の特徴キーワード群に対してWord2Vecを適用することにより、特徴キーワード群の要素の特徴キーワードの各々を、それぞれベクトル表現で表すことができる。
図3は、図2の特徴キーワード群に、例えばWord2Vecを適用して作成されたキーワードベクトル列の一例を示す図である。図3に示されるmは、特徴キーワード数である。
単語間の類似度は、例えばコサイン類似度で算出することができる。例えばベクトルw1とt1との類似度は、スカラー量であるcos(w1,t1)で表される。お題文特徴量算出部103は、配列[w1,w2,…,wn]とキーワードベクトル[t1,t2,…,tm]とのコサイン類似度を算出する。そして、お題文特徴量算出部103は、各特徴キーワードに対してお題文Qの各単語の最高類似度と最低類似度とに基づいて、例えば式(1)を用いてお題文Qの特徴量Fqを計算する。
式(1)の右辺におけるmaxはコサイン類似度の最大値を表し、minは最小値を表す。右辺の各要素は、配列[w1,w2,…,wn]の全てについての、キーワードベクトル[t1,t2,…,tm]とのコサイン類似度の最大値または最小値である。式(1)によれば、特徴量Fqは、2m次元ベクトルである。計算された特徴量Fqは、正例負例判定部104に送られる。
正例負例判定部104は、大喜利DB107cに記憶された回答文の全てについて、お題文Qが正例か、または負例かを、お題文Qの特徴量Fqを用いて判別する。一実施形態において、正例とは、お題文と回答文とのペアがユーザの笑いを想起することを意味し、負例とは、お題文と回答文とのペアがユーザの笑いを想起しないことを意味する。
正例か負例かの判別には、予め構築された正例負例判定モデルを用いることができる。ここで、正例負例判定モデルは、例えば、自然言語解析で一般的な、サポートベクトルマシンなどを用いて構築することができる。このほか、k-近傍法などの他の機械学習手法・統計手法を用いてもよい。
図4および図5は、大喜利DB107cに記憶される内容の一例を示す図である。大喜利DB107cは、お題文と回答文との正例ペア(図4)と、お題文と回答文との負例ペア(図5)とを記憶する。一実施形態において、正例ペアとは、ユーザの笑いを生起するお題文と回答文とのペアであり、負例ペアとは、ユーザの笑いを生起しないお題文と回答文とのペアである。例えばお題文Q1について図4、図5を参照すると、回答文A1,A2,A3,A4がお題文Q1と正例ペアになり、回答文A5,A6,A7は、お題文Q1と負例ペアになる。
一つの回答文は、お題文の特定の特徴に対して成立する回答文であるため、他の回答文においても同様の特徴を有していれば正例ペアとして存在する。つまり、回答文が正例となるか、負例となるかは、お題文の特定の特徴に拠っている。
実施形態では、大喜利におけるお題文とその回答文が、お題文の特定の特徴のもとで結合していることに着目する。例えば、「こんなテーブルは嫌だ」というお題文に対し「傾いている」という回答文があるとする。これらは「テーブルは水平である」という特徴のもとで結合している。
一方、水平を特徴として含む対象としては、椅子や家なども該当する。よって「傾いている」という回答文は、「こんな椅子は嫌だ」や「こんな家は嫌だ」といったお題文にも正例として結合するべきといえる。
正例負例判定部104は、正例負例判定モデルにお題文Qの特徴量Fqを入力し、出力ラベルが1であれば正例判定、-1であれば負例判定として判定結果を回答文スコア算出部105に出力する。
回答文スコア算出部105は、大喜利DB107cの各回答文に対するお題文Qの正例負例判定結果を、正例負例判定部104から取得する。そして、回答文スコア算出部105は、お題文Qの特徴量Fqに基づいて、大喜利DB107cの各回答文ごとに、お題文Qとの適合度を示すスコアを計算する。計算されたスコアは、回答文選択部106に渡される。
回答文選択部106は、回答文スコア算出部105から渡されたスコアに基づいて、お題文Qに対して最大のスコアを示す回答文を選択し、情報提示装置1002に出力する。情報提示装置1002は、選択された回答文をテキスト表示、あるいは音声出力などの形態でユーザに提示する。次に、上記構成における作用を説明する。
(作用)
図6は、一実施形態に係わる回答文選択装置1000の処理手順の一例を示すフローチャートである。図6において、お題文Qが与えられると(ステップS1)、回答文選択装置1000は、このお題文Qを単語の単位にまで分割し、お題文Qのキーワードを抽出する(ステップS2)。次に、回答文選択装置1000は、抽出されたお題文Qのキーワードからお題文Qの特徴量Fqを計算する(ステップS3)
次に、回答文選択装置1000は、お題文Qの特徴量Fqと、大喜利DB107cに含まれる各お題文の特徴量との類似度を計算し、類似度の高いお題文を抽出する。そして、この抽出されたお題文に結合する回答文のお題回答適合度(正例:+1,負例:-1)を用いてスコアを算出する(ステップS4)。
図6は、一実施形態に係わる回答文選択装置1000の処理手順の一例を示すフローチャートである。図6において、お題文Qが与えられると(ステップS1)、回答文選択装置1000は、このお題文Qを単語の単位にまで分割し、お題文Qのキーワードを抽出する(ステップS2)。次に、回答文選択装置1000は、抽出されたお題文Qのキーワードからお題文Qの特徴量Fqを計算する(ステップS3)
次に、回答文選択装置1000は、お題文Qの特徴量Fqと、大喜利DB107cに含まれる各お題文の特徴量との類似度を計算し、類似度の高いお題文を抽出する。そして、この抽出されたお題文に結合する回答文のお題回答適合度(正例:+1,負例:-1)を用いてスコアを算出する(ステップS4)。
さらに、回答文選択装置1000は、算出されたスコアに基いて、お題文Qに対する回答文を大喜利DB107cから選択する(ステップS5)。
図7は、正例負例の判定およびスコアの算出について説明するためのフローチャートである。一実施形態では、回答文A1に対するお題文Qの正例/負例判定を例として説明する。
図7において、回答文選択装置1000は、回答文A1に対する正例ペアのお題群(集合)Pと負例ペアのお題群(集合)Nを、大喜利DB107cから取得する(ステップS10)。図4を参照すると、正例ペアのお題群PにはQ1,Q2が含まれ、図5を参照すると、負例ペアのお題群NにはQ3が含まれることが分かる。
次に、回答文選択装置1000は、群Pの各お題文(Q1,Q2)の特徴量と、群Nの各お題文(Q3)の特徴量とを算出する。ここでも、コサイン類似度によりお題文の特徴量を算出することができる。お題文Q1,Q2の特徴量をFq1,Fq2とし、お題文Q3の特徴量をFq3とする。そして回答文選択装置1000は、Fq1,Fq2をそれぞれラベル1とし、Fq3をラベル-1として、サポートベクトルマシンを用いた機械学習により、正例負例判定モデルを構築する(ステップS11)。
次に、回答文選択装置1000は、与えられたお題文Qの特徴量Fqを正例負例判定モデルに入力し(ステップS12)、出力ラベルが1か-1かを判定する(ステップS13)。出力ラベルが1であれば、回答文選択装置1000は正例と判定し(ステップS14)、-1であれば負例と判定する(ステップS15)。
正例負例判定部104は、大喜利DB107cに記憶された全ての回答文について、お題文Qとの正例/負例を判定する。その結果を受けて、回答文スコア算出部105は、お題文Qが正例判定であった回答文の集合(回答文群Apとする)を抽出する。回答文スコア算出部105は、回答文群Apの要素である各々の回答文に対して、正例ペアとなるお題文の集合(お題文群Opとする)を求める。例えば、お題文Qが回答文A1に対して正例と判定されれば、回答文A1に正例ペアとなるお題文群Opは、Q1,Q2が該当する(図5)。
次に、回答文スコア算出部105は、お題文Qの特徴量Fqと、お題文群Opの要素である各々のお題文Q1,Q2の特徴量Fq1,Fq2とのコサイン類似度を計算し、その最高値を、お題文Qの回答文A1に対するスコアとして設定する。そして、この処理を回答文群Apの要素である回答文の全てに対して行うことで、お題文Qに対する回答文スコアデータが作成される。回答文選択部106は、回答文スコアデータに基づいて、お題文Qに対する回答文を選択する。
図8は、回答文スコアデータについて説明するための図である。図8において、回答文A1のスコアは0.8であり、図示される中では最も高い。すなわち図8を参照する限り、お題文Qに対しては回答文A1が選択されることになる。なお負例判定となった回答文については、スコア算出は実施されない。図8においては、データ欠損を示すNaN(Not a Number)でこのことが示される。
(効果)
以上のように一実施形態では、正例ペアをなすお題文と回答文、および負例ペアをなすお題文と回答文を、大喜利DB107cに予め記憶させる。ユーザの笑いを想起する回答文とお題文とのペアを正例とし、笑いを想起しないことを負例として、或る一つの回答文Aに対しお題文の正例集合Pと負例集合Nとを求める。そして、集合Pと集合Nとを教師として学習させた正例負例判定モデルを構築する。
以上のように一実施形態では、正例ペアをなすお題文と回答文、および負例ペアをなすお題文と回答文を、大喜利DB107cに予め記憶させる。ユーザの笑いを想起する回答文とお題文とのペアを正例とし、笑いを想起しないことを負例として、或る一つの回答文Aに対しお題文の正例集合Pと負例集合Nとを求める。そして、集合Pと集合Nとを教師として学習させた正例負例判定モデルを構築する。
お題文Qが与えられると、その特徴量Fqを、予めデータベース化された特徴キーワードとのコサイン類似度により算出する。特徴量Fqを正例負例判定モデルに適用し、回答文Aの正例/負例を判定する。正例と判定された回答文Aのペアとなる複数のお題文と、お題文Qとのコサイン類似度を計算し、その最高値を回答文Aのスコアとする。そして、最大のスコアを示す回答文をお題文Qへの回答文として選択し、提示するようにした。
このようにしたので、述語項構造データベースを用いることなく、また、ユーザの発話履歴を参照する必要もなく、未知のお題文に対して、ユーザの笑いを生起する回答文を選択することができる。すなわちこの発明によれば、お題文に対して適切な回答文を選択することが可能になる。
なお、この発明は上記実施形態に限定されるものではない。例えば図7のフローチャートにおいて、正例負例判定モデルの構築に係わる手順(ステップS10,S11)と、この正例負例判定モデルを用いて正例または負例を判定する手順(ステップS12~S15)とが続けて実行される必要は無い。例えばステップS10,S11の手順だけを繰り返し実行することで、正例負例判定モデルの学習が積み重ねられ、ステップS12~S15における判定の精度の向上が期待できる。
また、プロセッサ100の機能ブロックの全て、あるいは少なくとも1つのブロックをクラウドコンピューティングシステムに実装することも可能である。回答文の選択に係わる処理をクラウドサービスに委託すれば、ユーザ側の装置の負担を軽減することができ、AIスピーカ等のガジェットや、スマホアプリ等の実現形態も可能となる。
このほか、回答文選択装置の機能構成等についても、この発明の要旨を逸脱しない範囲で種々変形して実施可能である。
このほか、回答文選択装置の機能構成等についても、この発明の要旨を逸脱しない範囲で種々変形して実施可能である。
なお、本願発明は、上記実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。また、各実施形態は可能な限り適宜組み合わせて実施してもよく、その場合組み合わせた効果が得られる。更に、上記実施形態には種々の段階の発明が含まれており、開示される複数の構成要件における適当な組み合わせにより種々の発明が抽出され得る。
100…プロセッサ
101…お題文格納部
102…キーワード抽出部
103…題文特徴量算出部
104…正例負例判定部
105…回答文スコア算出部
106…回答文選択部
107…記憶部
107a…プログラム
107b…特徴キーワードデータベース
107c…大喜利データベース
1000…回答文選択装置
1001…お題文入力装置
1002…情報提示装置
101…お題文格納部
102…キーワード抽出部
103…題文特徴量算出部
104…正例負例判定部
105…回答文スコア算出部
106…回答文選択部
107…記憶部
107a…プログラム
107b…特徴キーワードデータベース
107c…大喜利データベース
1000…回答文選択装置
1001…お題文入力装置
1002…情報提示装置
Claims (5)
- 各回答文に対して、正例あるいは負例が付与されたお題Qiの特徴量から構築された各回答文の正例負例判定モデルを用いて、各回答文に対する与えられた題文Qの正例負例を判定する正例負例判定手段と、
前記正例負例判定手段により正例と判定された回答文を対象に、回答文に対して正例であるお題Qiの特徴量と前記題文Qの特徴量とから回答文のスコアを求める回答文スコア算出手段と、
前記回答文のスコアに基づいて、前記題文Qに対する回答文を選択する回答文選択手段と、
を具備する、回答文選択装置。 - 前記お題Qiの特徴量はお題Qiに含まれる単語のキーワードベクトルから求め、
前記題文Qの特徴量は題文Qに含まれる単語のキーワードベクトルから求める、
請求項1に記載の回答文選択装置。 - 前記回答文スコア算出手段は、
前記お題Qiの特徴量と前記題文Qの特徴量とからコサイン類似度を計算し、コサイン類似度の最高値を回答文のスコアとする、
請求項2に記載の回答文選択装置。 - 題文を与えられた回答文選択装置が実行する回答文選択方法であって、
前記回答文選択装置が、各回答文に対して、正例あるいは負例が付与されたお題Qiの特徴量から構築された各回答文の正例負例判定モデルを用いて、各回答文に対する与えられた題文Qの正例負例を判定する過程と、
前記回答文選択装置が、前記正例と判定された回答文を対象に、回答文に対して正例であるお題Qiの特徴量と前記題文Qの特徴量とから回答文のスコアを求める過程と、
前記回答文選択装置が、前記回答文のスコアに基づいて、前記題文Qに対する回答文を選択する過程とを具備する、回答文選択方法。 - 請求項1乃至3のいずれか1項に記載の回答文選択装置が備える前記各部の処理を、当該回答文選択装置が備えるプロセッサに実行させる、プログラム。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US17/255,496 US12026632B2 (en) | 2018-06-29 | 2019-06-25 | Response phrase selection device and method |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018-124735 | 2018-06-29 | ||
| JP2018124735A JP6988715B2 (ja) | 2018-06-29 | 2018-06-29 | 回答文選択装置、方法、およびプログラム |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020004401A1 true WO2020004401A1 (ja) | 2020-01-02 |
Family
ID=68986979
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/JP2019/025197 Ceased WO2020004401A1 (ja) | 2018-06-29 | 2019-06-25 | 回答文選択装置、方法、およびプログラム |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US12026632B2 (ja) |
| JP (1) | JP6988715B2 (ja) |
| WO (1) | WO2020004401A1 (ja) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPWO2023162243A1 (ja) * | 2022-02-28 | 2023-08-31 |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US12561523B2 (en) * | 2023-04-28 | 2026-02-24 | Nec Corporation | Information processing device, information processing method, and recording medium |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013254420A (ja) * | 2012-06-08 | 2013-12-19 | Nippon Telegr & Teleph Corp <Ntt> | 質問応答装置、モデル学習装置、方法、及びプログラム |
| JP2017151926A (ja) * | 2016-02-26 | 2017-08-31 | 富士通株式会社 | 情報処理プログラム、情報処理装置および情報処理方法 |
Family Cites Families (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5519608A (en) * | 1993-06-24 | 1996-05-21 | Xerox Corporation | Method for extracting from a text corpus answers to questions stated in natural language by using linguistic analysis and hypothesis generation |
| US20040167875A1 (en) * | 2003-02-20 | 2004-08-26 | Eriks Sneiders | Information processing method and system |
| JP2006092473A (ja) * | 2004-09-27 | 2006-04-06 | Toshiba Corp | 回答支援システムおよび装置、回答支援プログラム |
| US20070207449A1 (en) * | 2005-05-19 | 2007-09-06 | Feierstein Roslyn E | Method of analyzing question responses to select among defined possibilities and means of accomplishing same |
| JP4755478B2 (ja) | 2005-10-07 | 2011-08-24 | 日本電信電話株式会社 | 応答文生成装置、応答文生成方法、そのプログラムおよび記憶媒体 |
| US9063975B2 (en) * | 2013-03-15 | 2015-06-23 | International Business Machines Corporation | Results of question and answer systems |
| US8024332B2 (en) * | 2008-08-04 | 2011-09-20 | Microsoft Corporation | Clustering question search results based on topic and focus |
| US9305059B1 (en) * | 2011-06-21 | 2016-04-05 | The University Of North Carolina At Chapel Hill | Methods, systems, and computer readable media for dynamically selecting questions to be presented in a survey |
| JP5744150B2 (ja) | 2013-10-17 | 2015-07-01 | 日本電信電話株式会社 | 発話生成装置、方法、及びプログラム |
| US20160098737A1 (en) * | 2014-10-06 | 2016-04-07 | International Business Machines Corporation | Corpus Management Based on Question Affinity |
| US9703860B2 (en) * | 2014-10-06 | 2017-07-11 | International Business Machines Corporation | Returning related previously answered questions based on question affinity |
| CN106980624B (zh) * | 2016-01-18 | 2021-03-26 | 阿里巴巴集团控股有限公司 | 一种文本数据的处理方法和装置 |
| AU2017281763A1 (en) * | 2016-06-23 | 2019-01-24 | Pluralsight, LLC | Extrapolating probabilistic predictions for skills using unanswered questions and determining corresponding instructional content |
| US20180341871A1 (en) * | 2017-05-25 | 2018-11-29 | Accenture Global Solutions Limited | Utilizing deep learning with an information retrieval mechanism to provide question answering in restricted domains |
| CN107688614B (zh) * | 2017-08-04 | 2018-08-10 | 平安科技(深圳)有限公司 | 意图获取方法、电子装置及计算机可读存储介质 |
-
2018
- 2018-06-29 JP JP2018124735A patent/JP6988715B2/ja active Active
-
2019
- 2019-06-25 WO PCT/JP2019/025197 patent/WO2020004401A1/ja not_active Ceased
- 2019-06-25 US US17/255,496 patent/US12026632B2/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013254420A (ja) * | 2012-06-08 | 2013-12-19 | Nippon Telegr & Teleph Corp <Ntt> | 質問応答装置、モデル学習装置、方法、及びプログラム |
| JP2017151926A (ja) * | 2016-02-26 | 2017-08-31 | 富士通株式会社 | 情報処理プログラム、情報処理装置および情報処理方法 |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPWO2023162243A1 (ja) * | 2022-02-28 | 2023-08-31 | ||
| WO2023162243A1 (ja) * | 2022-02-28 | 2023-08-31 | 日本電信電話株式会社 | 障害情報検出装置、障害情報検出方法、および障害情報検出プログラム |
| JP7740495B2 (ja) | 2022-02-28 | 2025-09-17 | Ntt株式会社 | 障害情報検出装置、障害情報検出方法、および障害情報検出プログラム |
Also Published As
| Publication number | Publication date |
|---|---|
| US12026632B2 (en) | 2024-07-02 |
| US20210271990A1 (en) | 2021-09-02 |
| JP2020004224A (ja) | 2020-01-09 |
| JP6988715B2 (ja) | 2022-01-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107193792A (zh) | 基于人工智能的生成文章的方法和装置 | |
| EP3405912A1 (en) | Analyzing textual data | |
| CN107040452B (zh) | 一种信息处理方法、装置和计算机可读存储介质 | |
| CN113140138A (zh) | 互动教学方法、装置、存储介质及电子设备 | |
| WO2020052061A1 (zh) | 用于处理信息的方法和装置 | |
| CN108470188B (zh) | 基于图像分析的交互方法及电子设备 | |
| CN111386686A (zh) | 用于回答与文档相关的查询的机器阅读理解系统 | |
| JP6980411B2 (ja) | 情報処理装置、対話処理方法、及び対話処理プログラム | |
| CN112182255A (zh) | 用于存储媒体文件和用于检索媒体文件的方法和装置 | |
| CN113392273A (zh) | 视频播放方法、装置、计算机设备及存储介质 | |
| WO2020110815A1 (ja) | キーワード抽出装置、キーワード抽出方法、およびプログラム | |
| JP2024174994A (ja) | ビデオ生成および編成モデル取得方法、装置、デバイスおよび記憶媒体 | |
| CN119557462A (zh) | 信息检索方法、装置、设备、可读存储介质和程序产品 | |
| US9728186B2 (en) | Analysis of professional-client interactions | |
| US20230410787A1 (en) | Speech processing system with encoder-decoder model and corresponding methods for synthesizing speech containing desired speaker identity and emotional style | |
| WO2020004401A1 (ja) | 回答文選択装置、方法、およびプログラム | |
| CN112487236A (zh) | 确定关联歌单的方法、装置、设备及存储介质 | |
| JP2021039727A (ja) | テキスト処理方法、装置、電子機器及びコンピュータ読み取り可能な記憶媒体 | |
| US11789944B2 (en) | User-specific computer interaction recall | |
| CN113573128A (zh) | 一种音频处理方法、装置、终端以及存储介质 | |
| CN119088952A (zh) | 会议纪要生成方法、电子设备和可读存储介质 | |
| JP2018045657A (ja) | 学習装置、プログラムパラメータおよび学習方法 | |
| CN121532761A (zh) | 用于生成式模型的提示的生成的选择性记忆检索 | |
| Lane et al. | A computational model for interactive transcription | |
| JP6805927B2 (ja) | インデックス生成プログラム、データ検索プログラム、インデックス生成装置、データ検索装置、インデックス生成方法、及びデータ検索方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19826707 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19826707 Country of ref document: EP Kind code of ref document: A1 |
