JP2006091993A - Question/answering device and method and question/answering program - Google Patents
Question/answering device and method and question/answering program Download PDFInfo
- Publication number
- JP2006091993A JP2006091993A JP2004273510A JP2004273510A JP2006091993A JP 2006091993 A JP2006091993 A JP 2006091993A JP 2004273510 A JP2004273510 A JP 2004273510A JP 2004273510 A JP2004273510 A JP 2004273510A JP 2006091993 A JP2006091993 A JP 2006091993A
- Authority
- JP
- Japan
- Prior art keywords
- question
- data
- answer
- extracted
- database
- 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.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
この発明は、ユーザからの自然言語による質問に対してデータベースを検索して回答を出力する質問応答装置および方法、質問応答プログラムに関する。 The present invention relates to a question answering apparatus and method and a question answering program that search a database for a question in a natural language from a user and output an answer.
ユーザからの自然言語による質問に対して回答を出力する質問応答システムは、通常、回答用のデータベースを保持し、このデータベースの中から回答を探してユーザに出力する。特に近年では、テキスト情報検索やテキスト情報抽出の分野で開発された技術を利用することにより、大量のテキストデータを記憶するデータベースの中から回答を検索する質問応答システムが実現されている(例えば、非特許文献1参照)。 A question answering system that outputs an answer to a question in a natural language from a user usually holds an answer database, searches for an answer from the database, and outputs it to the user. Particularly in recent years, a question answering system for searching for an answer from a database storing a large amount of text data has been realized by using a technology developed in the field of text information search and text information extraction (for example, Non-patent document 1).
こうした質問応答システムは、例えば、“○×社の社長は誰”という質問があれば、まず質問を用いてデータベースを検索する。検索結果に、例えば、“株式会社○×は、・・・○△氏の社長就任を発表した。”といったテキストデータが含まれている場合、このテキストデータ中から「○△氏」の文字列を抽出して質問に対する回答として出力する。 In such a question answering system, for example, if there is a question “who is the president of XX company”, the database is first searched using the question. For example, if the search result includes text data such as “X Corporation has announced the appointment of Mr. △ President as President”, the text string “Mr. XX” is included in this text data. Is extracted and output as an answer to the question.
こうした質問応答装置では、質問と検索対象のテキストデータにおいて記述された表現に相違がある場合、検索がうまくできなくなる。例えば、質問中では“アメリカ”という語が使われているが、検索対象のテキストデータ中では“米国”と記述されている場合などである。 In such a question answering apparatus, if there is a difference between the expressions described in the question and the text data to be searched, the search cannot be performed well. For example, the word “USA” is used in the question, but “US” is described in the text data to be searched.
このような問題を解消してシステムが回答を得るためには質問とテキストデータ間の表現の相違を解消する必要がある。この解消する方法として、例えば同義語や関連語を利用した検索を行ったり、質問の変形を行ったりすることが考えられている。このようなシステムとして、例えば事前に用意された変形規則を用いて、質問と検索対象のテキストデータとの類似度が高くなるように変形を行った後に回答を得るシステムが知られている(例えば、特開2002−14990公報)。
ここで、“○○の前の”、“○○の次の”、“○○の以前の”などというような、相対的な表現が含まれる質問が質問応答システムに与えられた場合を考える。例えば、“○△氏の前の株式会社○×の社長は誰”という質問が与えられ、検索対象のデータベースには、次のテキストデータA,B,Cが含まれるとする。 Here, consider a case where a question answering system is given a question that includes relative expressions such as “before XX”, “next to XX”, “before XX”, etc. . For example, it is assumed that the question “who is the president of XX Co., Ltd. before Mr. XX” is given, and the search target database includes the following text data A, B, and C.
A:“1995年○月○日、株式会社○×は○◇氏が社長に就任したと発表・・・。”
B:“1997年○月○日、株式会社○×は○△氏が社長に就任したと発表・・・。”
C:“1999年○月○日、株式会社○×は○□氏が社長に就任したと発表・・・。”
こうした相対的な表現が使われる質問に対して正しい回答を得るためには、各テキストデータに記述された日付を比較する必要がある。上記の例の場合は、テキストデータA、B、Cそれぞれに記述された日付を比較することにより、回答はテキストデータAに含まれる“○◇氏”だと分かる。なお、ここでは株式会社○×の社長が交代したときのテキストデータがデータベースに含まれていることを前提としている。
A: “1995, Monday, Sunday, XX Co., Ltd. announced that Mr. ◇ was appointed as President ...”
B: “January, 1997, XX Co., Ltd. announced that Mr. △ took office as President ...”
C: “Monday, Sunday, 1999, XX Co., Ltd. announced that Mr. □ was appointed president.”
In order to obtain correct answers to questions that use such relative expressions, it is necessary to compare the dates described in each text data. In the case of the above example, by comparing the dates described in the text data A, B, and C, it can be understood that the answer is “Mr. Here, it is assumed that text data when the president of XX Co., Ltd. changes is included in the database.
しかし、従来の同義語や関連語を用いた検索や、変形規則を用いた質問の変形では、こうした検索対象の複数テキストデータの内容に応じた処理は行われないため、上述のような、ある観点による軸上(上記の例では時間軸上)での相対的な表現を含む質問に対し、回答を求めるための適切な処理が行えないという問題があった。 However, in the conventional search using synonyms and related words and the modification of the question using the transformation rule, the processing according to the contents of the multiple text data to be searched is not performed. There is a problem that an appropriate process for obtaining an answer cannot be performed on a question including a relative expression on the axis (in the above example, on the time axis) from the viewpoint.
上記の目的を達成するために、この発明においては、予め用意した複数のパターンを用いて、ある軸上で並べ替えが可能な軸データおよび当該データに関連付けられた関連データとを、テキスト情報データベースから抽出し、前記軸データおよび前記関連データを組として前記複数のパターンに応じた複数の抽出情報データからなる抽出情報データベースを生成するデータベース生成手段と、ユーザからの自然言語による質問を入力する入力手段と、前記質問を解析し当該質問に対する回答の回答タイプおよびキーワードを抽出する質問解析手段と、前記入力手段から入力された前記質問から前記軸に対する相対表現を解析する相対表現解析手段と、前記回答タイプおよび前記キーワードを用いて、前記抽出情報データベース中の複数の抽出情報データの内、いずれの抽出情報データを用いるか決定する抽出情報データ決定手段と、この抽出情報データ決定手段により決定された抽出情報データおよび前記相対表現解析手段による解析結果とを用いて、前記抽出情報データベースから前記質問に対する回答を検索する回答検索手段と、この回答検索手段により検索された回答を出力する出力手段を備えることを特徴とする質問応答装置を提供する。 In order to achieve the above object, according to the present invention, a plurality of patterns prepared in advance, axis data that can be rearranged on a certain axis, and related data associated with the data, a text information database A database generating means for generating an extracted information database composed of a plurality of extracted information data corresponding to the plurality of patterns by combining the axis data and the related data, and an input for inputting a question in a natural language from a user Means, analyzing the question and extracting a response type and a keyword of an answer to the question, a relative expression analyzing means for analyzing a relative expression with respect to the axis from the question input from the input means, Using the answer type and the keyword, a plurality of extractions in the extraction information database The extracted information data determining means for determining which extracted information data is used in the report data, the extracted information data determined by the extracted information data determining means and the analysis result by the relative expression analyzing means, There is provided a question answering device comprising answer search means for searching for an answer to the question from an extracted information database, and output means for outputting an answer searched by the answer search means.
なお、装置に係る本発明は方法に係る発明としても成立し、方法に係る本発明は装置に係る発明としても成立する。
また、装置または方法に係る本発明は、コンピュータに当該発明に相当する手順を実行させるための(あるいはコンピュータを当該発明に相当する手段として機能させるための、あるいはコンピュータに当該発明に相当する機能を実現させるための)プログラムとしても成立し、該プログラムを記録したコンピュータ読み取り可能な記録媒体としても成立する。
The present invention relating to the apparatus is also established as an invention relating to a method, and the present invention relating to a method is also established as an invention relating to an apparatus.
Further, the present invention relating to an apparatus or a method has a function for causing a computer to execute a procedure corresponding to the invention (or for causing a computer to function as a means corresponding to the invention, or for a computer to have a function corresponding to the invention. It can also be realized as a program (for realizing the program), and can also be realized as a computer-readable recording medium on which the program is recorded.
本発明による質問応答装置では、順序付けが可能なある観点によりテキストデータ中から関連する情報を抽出した後、同一観点で抽出された情報を抽出内容に基づきデータベースを生成し、このデータベースに対して、質問に含まれる相対表現が示す点または範囲を求めることにより回答を得る。これにより、複数のテキストデータにおける記述内容から回答を求めることが必要となる相対的な表現を含む質問に対し、データベースの検索によって回答を求めることが可能となる。 In the question answering apparatus according to the present invention, after extracting relevant information from text data from a viewpoint that can be ordered, a database is generated based on the extracted contents of information extracted from the same viewpoint. An answer is obtained by obtaining the point or range indicated by the relative expression included in the question. Accordingly, it is possible to obtain an answer by searching a database for a question including a relative expression that requires an answer to be obtained from descriptions in a plurality of text data.
本実施形態は、典型的には、ソフトウェアで制御されるコンピュータにより実現される。この場合のソフトウェアは、プログラムやデータを含み、コンピュータのハードウェアを物理的に活用することで本発明の作用効果を実現するものであり、従来技術を適用可能な部分には好適な従来技術が適用される。さらに、本発明を実現するハードウェアやソフトウェアの具体的な種類や構成、ソフトウェアで処理する範囲などは自由に変更可能である。従って、以下の説明では、本発明を構成する機能ごとにブロック化して図示した仮想的機能ブロック図を用いる。なお、コンピュータを動作させて本発明を実現するためのプログラムも、本発明の一態様である。 This embodiment is typically realized by a computer controlled by software. The software in this case includes programs and data, and realizes the operational effects of the present invention by physically utilizing the computer hardware. Applied. Furthermore, the specific types and configurations of hardware and software that implement the present invention, the scope of processing by software, and the like can be freely changed. Therefore, in the following description, a virtual function block diagram illustrated in a block form for each function constituting the present invention is used. Note that a program for operating a computer to implement the present invention is also an embodiment of the present invention.
以下、図面を参照しながら本発明の実施の形態について説明する。
(第1の実施形態)
図1は、本発明の第1の実施形態に係る質問応答装置のシステム構成を示す図である。
本発明の質問応答装置100は、ユーザの質問を入力する質問入力部101と、質問を処理してキーワード抽出や回答タイプ解析を行う質問処理部102と、質問に含まれる相対表現を解析する相対表現解析部103と、テキスト情報データベース104と、抽出結果の順序付けが可能な観点でテキスト情報データベース104から関連する情報を抽出する関連情報抽出部105と、同一観点で抽出された複数の抽出情報を整理する抽出情報整理部106と、抽出・整理した情報からデータベースを生成するデータベース生成部107と、このデータベース生成部107により生成される抽出情報データベース108と、テキスト情報データベース104または抽出情報データベース108から回答が含まれる情報を検索する回答情報検索部109と、回答情報検索部109の検索結果からユーザに提示する回答を抽出する回答抽出部110と、回答をユーザに出力する回答出力部111とから構成される。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
(First embodiment)
FIG. 1 is a diagram showing a system configuration of a question answering apparatus according to the first embodiment of the present invention.
The
ここで、テキスト情報データベース104は、回答検索対象とするテキストデータを登録したデータベースであり、既存のテキスト情報検索技術で用いられる転置インデックス法などの索引生成技術により生成される。
Here, the
次に、装置全体の動作と、各部の動作について説明する。
装置全体の動作は、事前に回答用の抽出情報データベースを生成するデータベース生成フェーズと、質問に対する応答を行う質問回答フェーズとに分けられる。
以下では、まず、データベース生成フェーズにおける動作について図2のフローチャートを用いて説明し、続いて、質問応答フェーズにおける動作について図3のフローチャートを用いて説明する。
Next, the operation of the entire apparatus and the operation of each unit will be described.
The operation of the entire apparatus is divided into a database generation phase for generating an extraction information database for answers in advance and a question answer phase for responding to questions.
In the following, first, the operation in the database generation phase will be described with reference to the flowchart of FIG. 2, and then the operation in the question answering phase will be described with reference to the flowchart of FIG.
(データベース生成フェーズ)
データベース生成フェーズでは、まず、ステップS201にて、関連情報抽出部105が、予め用意したパターンを用いて、テキスト情報データベース104に登録されているテキストデータから、関連する情報として前記パターンに合うものを抽出する。この抽出に用いるパターンは、予めどのような質問がされるかを想定して種々用意される。例えば、次のようなパターンが用意される。
パターンP1:“@PRODUCTが@DATEに発売”
パターンP2:“@PRODUCT(@DATE発売)”
ここで、抽出対象のテキストデータに、次のような記述がある場合を考える。
テキストT1:“・・・ABCが○月×日に発売された。”
テキストT2:“・・・CDE(○月△日発売)は・・・。”
関連情報抽出部105は、まず入力テキストデータから固有名の抽出を行う。テキストデータからの固有名の抽出は、固有名辞書やパターン照合に基づく抽出ルールなどを用いた既存の技術により抽出する。例えば、人名や地名などは辞書を用いて、日付などは抽出ルールを用いる。上記した例のテキストからは、次のように製品名と日付を抽出することが可能である。ここで、「@PRODUCT」は製品名を、「@DATE」は日付を表す。
テキストT1’:“・・・@PRODUCTが@DATEに発売された。”
テキストT2’:“・・・@PRODUCT(@DATE発売)は・・・。”
この結果と先のパターンP1およびP2とにより、パターンP1とテキストT1’、パターンP2とテキストT2’の照合が成功する。
ここで、テキストT1’に対し、マッチした固有名の部分について元のテキストデータであるテキストT1を参照して、
“(○月×日、ABC)”
が求められる。同様に、テキストT2’に対し、マッチした固有名の部分について元のテキストデータであるテキストT2を参照して、
“(○月△日、CDE)”
が求められる。
また、例えば、
パターンP3:“@COMPANY.*@PERSONが@DATEに@COMPANYの社長に就任”
のような正規表現パターンを用いて(日付、会社名、社長名)を抽出する。なお、このパターンでは@PERSONにより抽出された人名を社長名とする。
例えば、次のテキストデータT3,T4があったとする。
テキストT3:“○×社は・・・○□氏が○年△月×日に社長に就任したと・・・。”
テキストT4:“○×社は・・・○△氏が□年△月×日に社長に就任したと・・・。”
関連情報抽出部105は、テキストデータT3,T4から固有名の抽出を行い、次のように会社名、人名、日付を抽出することが可能である。ここで、「@COMPANY」は会社名を、「@PERSON」は社長名となる人名を、「@DATE」は日付を表す。
テキストT3’:“@COMPANYは・・・@PERSONが@DATEに社長に就任したと・・・。”
テキストT4’:“@COMPANYは・・・@PERSONが@DATEに社長に就任したと・・・。”
などの記述から(日付、会社名、社長名)を抽出し、
“(○年△月×日、○×社、○□氏)”
“(□年△月×日、○×社、○△氏)”
を抽出することができる。
次にステップS202にて、抽出情報整理部106は、同一観点で抽出された複数の情報をまとめ、これらを抽出内容に基づき整理する。
例えば、上記の抽出の例における(日付、製品名)に関する情報を並べ替えた結果は図4のようになる。図4では抽出された各情報が時間順に並べ替えられている。
なお、ここでは(日付、製品名)、(日付、会社名、社長名)などの時間に関する情報について説明しているが、この他、例えば、(価格、製品名)、(地点、建物名)等のような他の情報についても同様の処理が可能である。こうした情報を抽出した場合は、製品名を価格順に並べ替えたり、建物名を南北(あるいは東西)方向に並べ替えたりすることが可能である。
(Database generation phase)
In the database generation phase, first, in step S201, the related
Pattern P1: “@PRODUCT released on @DATE”
Pattern P2: “@PRODUCT (@DATE release)”
Here, consider a case where the text data to be extracted has the following description.
Text T1: “... ABC was released on XX month x day”
Text T2: "... CDE (released on the month and day) ..."
The related
Text T1 ': "... @ PRODUCT has been released to @DATE"
Text T2 ': "... @ PRODUCT (@DATE released) ..."
Based on this result and the previous patterns P1 and P2, the pattern P1 and the text T1 ′ and the pattern P2 and the text T2 ′ are successfully verified.
Here, referring to the text T1 which is the original text data for the matched unique name portion for the text T1 ′,
“(○ month x day, ABC)”
Is required. Similarly, for the text T2 ′, referring to the text T2 that is the original text data for the matched unique name portion,
“(○ month △ day, CDE)”
Is required.
For example,
Pattern P3: “@COMPANY. * @ PERSON becomes the president of @COMPANY at @DATE”
(Date, company name, president name) is extracted using a regular expression pattern such as In this pattern, the name extracted by @PERSON is the president name.
For example, it is assumed that the following text data T3 and T4 exist.
Text T3: “○ × Company ... □ Mr. X □ assumed the post of President on the day of the month △ month × ...”
Text T4: “○ × company is ... △ Mr. △ appointed as president on □ month △ month × day ...”
The related
Text T3 ': “When @COMPANY ... @PERSON became president of @DATE ..."
Text T4 ': “When @COMPANY ... @PERSON became president of @DATE ..."
(Date, company name, president name)
“(○ year △ month × day, ○ × company, Mr. ○ □)”
“(□ year △ month × day, ○ × company, ○ △ Mr.)”
Can be extracted.
In step S202, the extracted
For example, the result of rearranging information on (date, product name) in the above extraction example is as shown in FIG. In FIG. 4, each extracted information is rearranged in order of time.
In addition, although information on time such as (date, product name), (date, company name, president name) is described here, for example, (price, product name), (location, building name) The same processing can be performed for other information such as. When such information is extracted, the product names can be rearranged in order of price, or the building names can be rearranged in the north-south (or east-west) direction.
なお、この実施形態ではデータを並べ替え、この並べ替えたデータから回答を検出する方法が最も自然で効率的な方法と考えられるため、この方法について説明するが、データの比較が可能ならば必ずしも並べ替えずに回答を検出するようにしてもよい。 In this embodiment, a method of rearranging data and detecting a response from the rearranged data is considered to be the most natural and efficient method. Therefore, this method will be described. However, if comparison of data is possible, the method is not necessarily described. You may make it detect an answer, without rearranging.
次にステップS203にて、データベース生成部107は、抽出・整理した情報を検索するための抽出情報データベース108を生成する。ここでは、先に抽出した(日付、製品名)、(日付、会社名、社長名)などの抽出情報を各要素(日付、製品名、会社名、社長名など)から検索するインデックスを生成する。これは各要素をキーとするハッシュ表を生成するなど、既存のデータベース生成技術により実現できる。
In step S <b> 203, the
なお、上記実施形態では、データベース生成部107は、質問を受ける前に抽出情報データベース108を生成したが、必ずしも質問を受ける前に抽出情報データベース108を生成する必要はない。例えば、データベース生成部107は、この後説明する質問応答フェーズでユーザから質問が入力されてから質問処理部102によって当該質問が解析され得られたキーワードおよび回答タイプを用いて、当該質問に必要とされる抽出情報データベース108をテキスト情報データベース104から生成するようにしてもよい。
In the above embodiment, the
もし、このときにテキスト情報データベース104のデータ量が大きいために抽出情報データベース108を生成するのに時間を要す場合には、一旦、質問から抽出されたキーワードによってテキスト情報データベース104を検索し、キーワードと関連の深い例えば上位数十件を抽出する。そして、この抽出されたデータから抽出情報データベース108を生成することにより、少し回答の精度は落ちることになるが、抽出情報データベース108を生成するのに要する時間を短縮することができる。結果として質問を受けてから回答を出力するまでに要する時間を短縮することができる。
If it takes time to generate the extracted
(質問応答フェーズ)
続いて、質問応答フェーズにおける処理を説明する。
(ステップS301)
まず、ステップS301にて、質問入力部101は、ユーザからの質問を入力する。
(ステップS302)
次に、ステップS302にて、質問処理部102は、質問入力部101から入力された質問からキーワードの抽出、回答タイプの解析を行う。このキーワードの抽出は既存の技術を用いて実現できる。例えば、形態素解析技術を用いて、質問の形態素解析結果から特定の品詞情報を持つ形態素(例えば、一般名詞、固有名詞など)を抽出することにより実現できる。回答タイプの解析も既存の技術により実現できる。例えば、回答タイプ毎に対応するルールを用意し、質問との照合結果に基づき解析できる。解析用ルールは、例えば次のようになる。
ルールR1:“.*はだれ”→@PERSON
ルールR2:“.*はいつ”→@DATE
ルールR1は、質問が“.*はだれ”というパターンにマッチした場合、このマッチした回答タイプを@PERSONとする。
ルールR2は、質問が”.*はいつ”というパターンにマッチした場合、その回答タイプを@DATEとする。
(ステップS303)
次に、ステップS303にて、相対表現解析部103が、質問に含まれる相対表現(“前の”、“次の”など)の解析を行う。これは、予め解析対象となる相対表現のパターンを用意し、質問との照合結果に基づき、当該質問に含まれる相対表現を解析する。
(Question answer phase)
Subsequently, processing in the question answering phase will be described.
(Step S301)
First, in step S301, the
(Step S302)
Next, in step S302, the
Rule R1: “. * Who” → @ PERSON
Rule R2: “When is *.” → @ DATE
When the question matches the pattern “. * Who”, the rule R1 sets the matched answer type to @PERSON.
When the question matches the pattern “when is *.”, The rule R2 sets the answer type to @DATE.
(Step S303)
Next, in step S303, the relative
例えば、次のような文字列のパターンを用意する。
パターンB1:“@PERSONの前の”:A=−1
パターンB2:“@PERSONの一代前の”:A=−1
パターンB3:“@PERSONの次の”:A=+1
パターンB4:“@PERSONの前の前の”:A=−2
パターンB5:“@PERSONの二代前の”:A=−2
パターンB6:“@PERSONより前の”:A<@PERSON
ここで、各パターンの“:”の右側は相対表現が表す点または範囲を示す。A=−1は、抽出された@PERSONに対して1つ前、つまり一代前を指している。
ここではステップS301にて、次の質問が入力されたものとして説明する。
Q1:“○△氏の一代前の社長はだれ”
まず、相対表現解析部103は質問文から固有名の抽出を行う。質問からの固有名の抽出は、関連情報抽出部105において説明したように、既存の技術により実現できる。ここで、質問に対して固有名抽出を行うことより次のような結果が得られる。
Q1’:“@PERSONの一代前の社長はだれ”
この結果に対してパターン照合を行うと、パターンB2との照合が成功する。これより質問Q1に相対表現が含まれることが分かり、更に、元の固有名を質問Q1から求めることができる。
この結果、次のような、基点となる固有名と、これに対して相対表現が示す点または範囲が得られる(ステップS303)。
(“○△氏”、A=−1)
次に、回答情報検索部109は、テキスト情報データベース104から質問Q1の回答が含まれるデータを検索する。まず回答情報検索部109は、質問処理部102からは解析されたキーワードおよび回答タイプを得て、相対表現解析部103からは解析結果を得る。
For example, the following character string pattern is prepared.
Pattern B1: “Before @PERSON”: A = −1
Pattern B2: “Before the @PERSON”: A = −1
Pattern B3: “next to @PERSON”: A = + 1
Pattern B4: “Before @PERSON”: A = −2
Pattern B5: “Two generations before @PERSON”: A = −2
Pattern B6: “Before @PERSON”: A <@PERSON
Here, the right side of “:” in each pattern indicates a point or range represented by the relative expression. A = −1 indicates the previous one, that is, one generation before the extracted @PERSON.
Here, it is assumed that the next question has been input in step S301.
Q1: “Who is the previous president of Mr. △?”
First, the relative
Q1 ': “Who is the previous president of @PERSON”
When pattern matching is performed on this result, matching with the pattern B2 succeeds. As a result, it is understood that the question Q1 includes a relative expression, and the original unique name can be obtained from the question Q1.
As a result, the following unique name and the point or range indicated by the relative expression are obtained (step S303).
("Mr. △", A = -1)
Next, the answer
(ステップS304のNo)
ここで、相対表現解析部103において、質問Q1から相対表現が解析されなかった場合(ステップS304のNo)には、質問Q1が相対表現を含まない質問であると判断し、質問Q1から解析されたキーワードと回答タイプのみを用いてテキスト情報データベース104を対象に回答情報を検索し(ステップS306)、例えば上位5件の回答候補をユーザに提示する。このように上位5件の回答候補を抽出するのは、キーワードと回答タイプのみを用いてテキスト情報データベース104から正しい回答を得ることは難しいからである。なお、これらは既存のテキスト情報検索技術を用いて実現することが可能である。
(No in step S304)
Here, when the relative expression is not analyzed from the question Q1 in the relative expression analysis unit 103 (No in step S304), it is determined that the question Q1 is a question that does not include the relative expression, and is analyzed from the question Q1. The answer information is searched for the
(ステップS304のYes)
反対に、相対表現解析部103において、質問Q1から相対表現が解析された場合(ステップS304のYes)、この解析結果に基づき回答情報検索部109は抽出情報データベース108を対象に回答情報を検索する(ステップS305)。
(Yes in step S304)
On the other hand, when the relative expression is analyzed from the question Q1 in the relative expression analysis unit 103 (Yes in step S304), the answer
まず、回答情報検索部109は、解析結果における固有名を用いて抽出情報データベース108を検索する。
次に、この検索結果に対し、相対表現が示す点または範囲の情報を回答情報として、抽出情報データベース108中から取り出す。例えば、相対表現解析部108の解析結果が、(“○△氏”、A=−1)のようになる場合は、まず固有名の”○△氏”を用いて抽出情報データベース108を検索する。
ここで、抽出情報データベース108には図5に示すような情報(日時、会社名、社長名)が登録されているものとする。なお、図5には、この他にも製品が何時発売されたかに関する抽出情報データ等、種々の抽出情報データが登録されているものとする。
First, the answer
Next, information on the point or range indicated by the relative expression is extracted from the extracted
Here, it is assumed that information (date and time, company name, president name) as shown in FIG. 5 is registered in the extracted
回答情報検索部109は、質問処理部102から入力されたキーワードおよび回答タイプを用いて、抽出情報データベース108からデータを検索する。例えば上記の例では、キーワード:“○△氏”,“○×社”,“社長”、回答タイプ:@PERSONが用いられる。
The answer
回答情報検索部109は、このとき回答タイプの@PERSONおよびキーワード“社長”より、社長名(PERSON)が含まれる抽出情報データが検索対象とし、更にこの抽出情報データから、キーワード“○×社”、“○△氏”により検索を行うことで、
At this time, the response
“(2003年4月1日、○×社、○△氏)”、
…、
“(2004年3月28日、○×社、○△氏)”、
という検索結果を得る。
さらに抽出情報データベース108において、A=−1から、これら情報より1つ前の情報、すなわち
“(2003年3月31日、○×社、□△氏)”
が検索され、この検索結果から“□△氏”が回答情報とされる。
詳細には、抽出情報データベース108に登録されている情報の中から、情報の日時が2003年4月1日よりも過去のデータであって、キーワード:“○×社”,“社長”、回答タイプ:@PERSONのデータを抽出して日時で並べ替えることにより、図5の
“(1999年10月11日、○×社、◇×氏)”、
…、
“(2003年3月29日、○×社、□△氏)”、
“(2003年3月31日、○×社、□△氏)”
を得る。そしてこの並べ替えた中から最も新しいデータから検索していき、“○△氏”から初めて(1回目に)変わる社長名のデータである、
“(2003年3月31日、○×社、□△氏)”
が検索され、この検索結果から“□△氏”が回答情報とされる。
なお、質問の内容が一代前ではなく二代前であった場合には、“○△氏”から2回目に変わる社長名のデータが検索され回答情報を得ることになる。
また、検索方法の変形例としては、一旦、キーワード:“○×社”,“社長”、回答タイプ:@PERSONを用いて抽出情報データベース108から全ての日時に関するデータを検索し、この検索結果から、“○△氏”から初めて(1回目に)変わる社長名のデータを回答とするようにしても、同じ回答を得ることができる。
“(April 1, 2003, ○ × company, Mr. ○ △)”,
…,
“(March 28, 2004, ○ × company, Mr. ○ △)”,
The search result is obtained.
Further, in the extracted
Is searched, and "Mr.
Specifically, from the information registered in the extracted
…,
“(March 29, 2003, XX company, Mr. □ △)”,
“(March 31, 2003, ○ × company, Mr. □ △)”
Get. The search is performed from the newest data among the sorted data, and is the data of the president's name that changes for the first time (first time) from “Mr.
“(March 31, 2003, ○ × company, Mr. □ △)”
Is searched, and "Mr.
When the content of the question is not the previous generation but the second generation, the data of the president name that changes the second time from “Mr.
As a modified example of the search method, data on all dates and times is searched from the extracted
なお、ここで検索が失敗して、抽出情報データベース108から回答情報が得られなかった場合は、質問から相対表現情報が解析されなかった場合であるステップS304のNoと同様の方法を用いて、改めてテキスト情報データベース104を対象に回答情報を検索する。
If the search fails and no answer information is obtained from the extracted
次に、ステップS307にて、回答抽出部110は、回答情報検索部109の検索結果から回答を抽出する。これは既存の質問応答システムに用いられている技術で可能である。固有名抽出により検索結果から回答タイプと同じタイプの情報を抽出し、この抽出された各情報と質問Q1中の各キーワードとの距離等に基づき、適切と考えられる回答を選択することができる。固有名抽出についても、関連情報抽出部105における処理と同様に可能である。
Next, in step S307, the
最後に、ステップS308にて、回答出力部111は、回答抽出部110で得た回答をユーザに出力する。
なお、この実施形態では例として、日付(@DATE)に関する相対表現が質問に含まれる場合について説明を行った。しかし、本発明は日付等の時間軸上での相対表現に限定するものではない。例えば、(価格、製品名)のような情報を抽出して“○□の次に安い○◇は何”という質問に回答したり、(地点、建物名)のような情報を抽出して“○×の北にある○△は何”という質問に回答したりすることも可能である。このように抽出した情報が順序づけて並べ替え可能であれば、任意の観点において抽出される情報に対して同様に適用できる。
Finally, in step S308, the
In this embodiment, as an example, a case where a relative expression related to the date (@DATE) is included in the question has been described. However, the present invention is not limited to relative expressions on the time axis such as date. For example, you can extract information such as (price, product name) and answer the question “What is the cheapest ○ ◇ next to ○ □”, or extract information such as (location, building name) It is also possible to answer the question “What is △ in the north of XX”. If the information extracted in this way can be rearranged in order, it can be similarly applied to information extracted from an arbitrary viewpoint.
以上説明した通り本発明によれば、複数のテキストデータにおける記述内容から回答を求めることが必要となる相対的な表現を含む質問に対し、データベースの検索によって回答を求めることが可能となる。 As described above, according to the present invention, it is possible to obtain an answer by searching a database for a question including a relative expression that requires an answer to be obtained from descriptions in a plurality of text data.
なお、本願発明はテキスト情報データベース104に蓄積されている範囲から分かる範囲内の回答であり、例えば質問された内容に関するテキスト情報がテキスト情報データベース104に全く蓄積されていないような場合には正しい答えが導き出されない。しかし、これは本発明では誤差の範囲内である。
It should be noted that the present invention is an answer within a range that can be understood from the range stored in the
(第2の実施形態)
図6は、本発明の第2の実施形態に係る質問応答装置のシステム構成を示す図である。
この実施形態に係る質問応答装置は、更に、外部のデータを入力するデータ入力手段601を更し、外部データベース等の外部データ602を抽出情報データベース108の生成に利用することもできる。このシステムでは、データ入力部601から入力される外部データが関連情報抽出部105に送られ、抽出情報データベース108の生成に利用される。この他の構成や動作は第1の実施形態と同様であり説明を省略する。
(Second Embodiment)
FIG. 6 is a diagram showing a system configuration of a question answering apparatus according to the second embodiment of the present invention.
The question answering apparatus according to this embodiment can further include data input means 601 for inputting external data, and can use
以上説明した通り本発明によれば、複数のテキストデータにおける記述内容から回答を求めることが必要となる相対的な表現を含む質問に対し、データベースの検索によって回答を求めることが可能となる。 As described above, according to the present invention, it is possible to obtain an answer by searching a database for a question including a relative expression that requires an answer to be obtained from descriptions in a plurality of text data.
100…質問応答装置、101…質問入力部、102…質問処理部、103…相対表現解析部、104…テキスト情報データベース、105…関連情報抽出部、106…抽出情報整理部、107…データベース生成部、108…抽出情報データベース、109…回答情報検索部、110…回答抽出部、111…回答出力部。
DESCRIPTION OF
Claims (4)
ユーザからの自然言語による質問を入力する入力手段と、
前記質問を解析し当該質問に対する回答の回答タイプおよびキーワードを抽出する質問解析手段と、
前記入力手段から入力された前記質問から前記軸に対する相対表現を解析する相対表現解析手段と、
前記回答タイプおよび前記キーワードを用いて、前記抽出情報データベース中の複数の抽出情報データの内、いずれの抽出情報データを用いるか決定する抽出情報データ決定手段と、
この抽出情報データ決定手段により決定された抽出情報データおよび前記相対表現解析手段による解析結果とを用いて、前記抽出情報データベースから前記質問に対する回答を検索する回答検索手段と、
この回答検索手段により検索された回答を出力する出力手段を備えることを特徴とする質問応答装置。 Using a plurality of patterns prepared in advance, axis data that can be rearranged on a certain axis and related data associated with the data are extracted from a text information database, and the axis data and the related data are grouped Database generating means for generating an extraction information database comprising a plurality of extraction information data corresponding to the plurality of patterns;
An input means for inputting natural language questions from users;
A question analysis means for analyzing the question and extracting an answer type and a keyword of an answer to the question;
Relative expression analysis means for analyzing a relative expression for the axis from the question input from the input means;
Extraction information data determination means for determining which extraction information data to use among a plurality of extraction information data in the extraction information database using the answer type and the keyword;
Using the extracted information data determined by the extracted information data determining means and the analysis result by the relative expression analyzing means, an answer searching means for searching for an answer to the question from the extracted information database;
A question answering apparatus comprising output means for outputting an answer searched by the answer searching means.
前記データベース生成手段は、前記外部データ入力部が入力したテキスト情報から前記軸データおよび前記関連データを抽出することを特徴とする請求項1記載の質問応答装置。 Furthermore, an external data input unit for inputting text information from the outside is provided.
The question answering apparatus according to claim 1, wherein the database generation unit extracts the axis data and the related data from text information input by the external data input unit.
ユーザからの自然言語による質問を入力し、
前記質問を解析し当該質問に対する回答の回答タイプおよびキーワードを抽出し、
前記質問から前記軸に対する相対表現を解析し、
前記回答タイプおよび前記キーワードを用いて、前記抽出情報データベース中の複数の抽出情報データの内、いずれの抽出情報データを用いるか決定し、
この決定された抽出情報データおよび前記相対表現の解析結果とを用いて、前記抽出情報データベースから前記質問に対する回答を検索し、
この検索された回答を出力することを特徴とする質問応答方法。 Using a plurality of patterns prepared in advance, axis data that can be rearranged on a certain axis and related data associated with the data are extracted from a text information database, and the axis data and the related data are grouped Generating an extraction information database comprising a plurality of extraction information data corresponding to the plurality of patterns;
Enter natural language questions from users,
Analyzing the question and extracting answer types and keywords for answers to the question,
Analyzing the relative expression for the axis from the question,
Using the answer type and the keyword, it is determined which extracted information data to use among a plurality of extracted information data in the extracted information database,
Using the determined extraction information data and the analysis result of the relative expression, search for an answer to the question from the extraction information database,
A question answering method characterized by outputting the retrieved answer.
前記プログラムは、前記コンピュータに、
予め用意した複数のパターンを用いて、ある軸上で並べ替えが可能な軸データおよび当該データに関連付けられた関連データとを、テキスト情報データベースから抽出し、前記軸データおよび前記関連データを組として前記複数のパターンに応じた複数の抽出情報データからなる抽出情報データベースを生成させ、
ユーザからの自然言語による質問を入力させ、
前記質問を解析し当該質問に対する回答の回答タイプおよびキーワードを抽出させ、
前記入力手段から入力された前記質問から前記軸に対する相対表現を解析させ、
前記回答タイプおよび前記キーワードを用いて、前記抽出情報データベース中の複数の抽出情報データの内、いずれの抽出情報データを用いるか決定させ、
この決定された抽出情報データおよび前記相対表現の解析結果とを用いて、前記抽出情報データベースから前記質問に対する回答を検索させ、
この検索された回答を出力させることを特徴とする質問応答プログラム。 In a program for causing a computer to function as a question answering device,
The program is stored in the computer.
Using a plurality of patterns prepared in advance, axis data that can be rearranged on a certain axis and related data associated with the data are extracted from a text information database, and the axis data and the related data are grouped Generating an extraction information database including a plurality of extraction information data corresponding to the plurality of patterns;
Let users enter questions in natural language,
Analyzing the question and extracting the answer type and keyword of the answer to the question,
Analyzing a relative expression for the axis from the question input from the input means;
Using the answer type and the keyword, it is determined which extracted information data to use among a plurality of extracted information data in the extracted information database,
Using the determined extraction information data and the analysis result of the relative expression, the answer to the question is searched from the extraction information database,
A question answering program for outputting the retrieved answer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004273510A JP2006091993A (en) | 2004-09-21 | 2004-09-21 | Question/answering device and method and question/answering program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004273510A JP2006091993A (en) | 2004-09-21 | 2004-09-21 | Question/answering device and method and question/answering program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006091993A true JP2006091993A (en) | 2006-04-06 |
Family
ID=36232942
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004273510A Pending JP2006091993A (en) | 2004-09-21 | 2004-09-21 | Question/answering device and method and question/answering program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006091993A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8452788B2 (en) | 2007-10-05 | 2013-05-28 | Nec Corporation | Information retrieval system, registration apparatus for indexes for information retrieval, information retrieval method and program |
-
2004
- 2004-09-21 JP JP2004273510A patent/JP2006091993A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8452788B2 (en) | 2007-10-05 | 2013-05-28 | Nec Corporation | Information retrieval system, registration apparatus for indexes for information retrieval, information retrieval method and program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Ray | ChatGPT: A comprehensive review on background, applications, key challenges, bias, ethics, limitations and future scope | |
Balsmeier et al. | Machine learning and natural language processing on the patent corpus: Data, tools, and new measures | |
US20110029545A1 (en) | Syllabic search engines and related methods | |
JP2006252382A (en) | Question answering system, data retrieval method and computer program | |
JP4347226B2 (en) | Information extraction program, recording medium thereof, information extraction apparatus, and information extraction rule creation method | |
CN108780439A (en) | For system and method abundant in content and for instructing reading and realizing understanding | |
JP2005115468A (en) | Text mining apparatus, text mining method and text mining program | |
JP2008112363A (en) | Document processor and document processing program | |
JP4361299B2 (en) | Evaluation expression extraction apparatus, program, and storage medium | |
JP2006091993A (en) | Question/answering device and method and question/answering program | |
CN112732885A (en) | Answer extension method and device for question-answering system and electronic equipment | |
JP4341077B2 (en) | Document processing apparatus, document processing method, and document processing program | |
JP2007164462A (en) | Question answering system, question answering method and question answering program | |
JP2009140048A (en) | Reputation relation extracting device, its method, and program | |
Kasliwal | Natural Language Processing with Python Quick Start Guide: Going from a Python Developer to an Effective Natural Language Processing Engineer | |
JP2007199876A (en) | Question answering system, question answering processing method, and question answering program | |
Chodhary et al. | Semantic Analysis of Tweets using LSA and SVD | |
WO2024069741A1 (en) | Software technological field extraction device and software technological field extraction method | |
Jade et al. | SAS Text Analytics for Business Applications: Concept Rules for Information Extraction Models | |
JP4049141B2 (en) | Document processing apparatus, document processing method, and document processing program | |
JP2011095802A (en) | Machine translation device and program | |
JP7100542B2 (en) | Search support device and search support method | |
King | Re-presenting visual content for blind people. | |
JP2005234635A (en) | Document summarizing device and method | |
JPH1145249A (en) | Information retrieval device and computer-readable recording medium where program for making computer function as same device is recorded |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20081113 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20081118 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090114 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20090324 |