JP2008242607A - Device, method and program for selecting proper candidate from language processing result - Google Patents
Device, method and program for selecting proper candidate from language processing result Download PDFInfo
- Publication number
- JP2008242607A JP2008242607A JP2007079381A JP2007079381A JP2008242607A JP 2008242607 A JP2008242607 A JP 2008242607A JP 2007079381 A JP2007079381 A JP 2007079381A JP 2007079381 A JP2007079381 A JP 2007079381A JP 2008242607 A JP2008242607 A JP 2008242607A
- Authority
- JP
- Japan
- Prior art keywords
- unit
- dependency
- candidate
- occurrence probability
- dependency structure
- 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
- Machine Translation (AREA)
Abstract
Description
この発明は、音声認識や文字認識などから得られる複数の認識候補系列を入力として、係り受け解析によって妥当な系列を選択する装置、方法およびプログラムに関する。 The present invention relates to an apparatus, method, and program for selecting an appropriate sequence by dependency analysis using a plurality of recognition candidate sequences obtained from speech recognition, character recognition, and the like as input.
従来から、人が発話する音声や紙に記された文字イメージを対象にして、文字列や単語列に変換する音声認識および文字認識などの自然言語の認識処理技術が広く知られている。このような認識処理では、入力者が意図した文字列や単語列を100%正しく認識する処理を実現することは困難である。例えば、音声認識では、特徴が類似する音韻の存在や背景雑音に起因して、ほとんどの場合認識誤りが発生する。
2. Description of the Related Art Conventionally, natural language recognition processing techniques such as speech recognition and character recognition for converting speech uttered by humans and character images written on paper into character strings and word strings are widely known. In such a recognition process, it is difficult to realize a process that correctly recognizes a character string or word string intended by the
一般的な音声認識の処理では、まず、マイクロフォンなどによって取り込んだユーザの音声信号からFFT(高速フーリエ変換)分析などを適用して特徴量データを抽出する。続いて、あらかじめ保持している各音素の特徴量データの標準パターンを格納した音素辞書や、各単語を構成する音素記号列と単語見出しとの対応情報を格納した単語辞書を用いて、音声を文字列に変換する。 In general speech recognition processing, first, feature amount data is extracted from a user's speech signal captured by a microphone or the like by applying FFT (Fast Fourier Transform) analysis or the like. Subsequently, using a phoneme dictionary storing a standard pattern of feature value data of each phoneme stored in advance or a word dictionary storing correspondence information between phoneme symbol strings and word headings constituting each word, Convert to string.
代表的な音声認識手法であるHMM(隠れマルコフモデル)方式では、音素間の遷移関係を単語ネットワークで表現し、ネットワーク中のノード(音素に対応)間のリンクに確率値が付与されたデータを単語辞書に格納する。そして、入力された音声の特徴量データと音素辞書に格納された標準パターンと照合することにより、各音素との類似度を求め、この類似度に基づき、単語辞書に格納されている単語ネットワークを用いて、入力音声と最も類似度の高い単語候補を求める。 In the HMM (Hidden Markov Model) method, which is a typical speech recognition method, the transition relationship between phonemes is expressed by a word network, and data with probability values assigned to links between nodes (corresponding to phonemes) in the network is represented. Store in word dictionary. Then, by comparing the input feature data of the voice with the standard pattern stored in the phoneme dictionary, the similarity with each phoneme is obtained, and the word network stored in the word dictionary is obtained based on the similarity. The word candidate having the highest similarity to the input speech is used.
複数の単語から構成される文章を認識対象とする場合、上述のような単語認識を行うとともに、入力された音声信号に対して、正しい単語列を得ることが必要となる。例えば、候補として得られる複数の単語系列から最も確からしい単語系列を得るために、複数の単語に関する連接のしやすさを表現したn−gramなどの言語モデルが用いられる。 When a sentence composed of a plurality of words is used as a recognition target, it is necessary to perform word recognition as described above and obtain a correct word string for the input voice signal. For example, in order to obtain the most probable word sequence from a plurality of word sequences obtained as candidates, a language model such as n-gram expressing the ease of connection of a plurality of words is used.
HMM方式によれば、このn−gramを用いた候補の絞込み処理も、単語認識処理と統一的に行うことができる。単語辞書における音素間の遷移確率や、n−gramにおける単語間の遷移確率は、音声データやテキストコーパスからあらかじめ学習することが可能である。また、大量の音声データやテキストコーパスを利用することで信頼度の高い音声認識が実行可能となる。 According to the HMM method, the candidate narrowing process using the n-gram can be performed in a unified manner with the word recognition process. The transition probability between phonemes in the word dictionary and the transition probability between words in the n-gram can be learned in advance from speech data or a text corpus. Moreover, highly reliable speech recognition can be performed by using a large amount of speech data and a text corpus.
上述のような認識処理は、入力系列をIと記述し、出力として得られる単語系列をWと記述した場合、入力系列Iが与えられたときの条件付確率P(W|I)を最大とするような単語系列Wを求めること(argmaxW P(W|I)と記述される)に相当する。ここで、P(W|I)は、ベイズの定理によって、P(W|I)=P(I|W)・P(W)/P(I)と変形できる。また、入力系列Iは与えられる値であるため、分母P(I)は固定と考えることができる。したがって、argmaxW P(I|W)・P(W)となる単語系列Wを求める問題として上記認識処理を定式化することができる。 In the above recognition processing, when the input sequence is described as I and the word sequence obtained as an output is described as W, the conditional probability P (W | I) when the input sequence I is given is maximized. This is equivalent to obtaining a word sequence W such as argmax WP (W | I). Here, P (W | I) can be transformed to P (W | I) = P (I | W) · P (W) / P (I) by Bayes' theorem. Further, since the input sequence I is a given value, the denominator P (I) can be considered to be fixed. Therefore, the above recognition process can be formulated as a problem of obtaining a word sequence W that is argmax W P (I | W) · P (W).
一方、例えば日本語を入力して認識処理を行った場合、認識した単語系列から得られる文節間の係り受け構造を、係り受け解析処理によって求める必要がある。係り受け解析とは、単語間の修飾・被修飾関係を解析して係り受け構造を求める処理である。係り受け解析の方法としては、品詞を解析の手掛かりとして文の統語的構造を求める構文解析の後、係り受け先の候補を絞り込み、係り受け構造を求める方法や、単語系列から直接係り受け解析を行って依存構造を求める方法などが存在する。非特許文献1では、単語間の係り受けに関する強度を依存確率としてモデル化し、確率的に係り受け解析を行う技術が提案されている。
On the other hand, for example, when the recognition process is performed by inputting Japanese, it is necessary to obtain a dependency structure between phrases obtained from the recognized word series by a dependency analysis process. The dependency analysis is a process for obtaining a dependency structure by analyzing a modification / modification relationship between words. Dependency analysis methods include syntactic analysis to find the syntactic structure of sentences using part-of-speech as a clue for analysis, then narrow down the candidates for dependency destinations to obtain dependency structure, and direct dependency analysis from word sequences. There are methods to go and find the dependency structure. Non-Patent
しかしながら、非特許文献1の方法は、入力された1つの文節列から最適な係り受け構造を選択するものであるため、複数の文節列から最適な文節列を選択する処理に適用することができないという問題があった。
However, since the method of Non-Patent
例えば、音声認識で得られた複数の認識結果の候補から、最適な係り受け構造を有する候補を選択可能であれば、音声認識の精度の向上が実現できると考えられる。しかし、そもそも非特許文献1の方法は、与えられた1つの文節列を対象として最尤の係り受け構造を求めるものである。また、求められた係り受け構造は、単に入力された単語系列に対する最尤な構造であるため、別の単語系列から得られる構造とは比較することができない。したがって、非特許文献1の方法によって、複数の文節列から、係り受け構造を考慮して最適な文節列を選択するという処理を実現することはできない。
For example, if a candidate having an optimum dependency structure can be selected from a plurality of recognition result candidates obtained by speech recognition, it is considered that the accuracy of speech recognition can be improved. However, in the first place, the method of Non-Patent
本発明は、上記に鑑みてなされたものであって、係り受け解析の解析結果を考慮して、認識処理などの処理結果の候補から適切な処理結果を選択することができる装置、方法およびプログラムを提供することを目的とする。 The present invention has been made in view of the above, and an apparatus, method, and program capable of selecting an appropriate processing result from candidates for processing results such as recognition processing in consideration of an analysis result of dependency analysis The purpose is to provide.
上述した課題を解決し、目的を達成するために、本発明は、文の構成単位についての処理結果の候補から前記処理結果を選択する言語処理装置であって、前記構成単位と、前記構成単位の生起確率とを対応づけて記憶する第1記憶部と、係り先となる前記構成単位および係り元となる前記構成単位によって表される係り受け関係と、前記係り先となる前記構成単位に対して前記係り元となる前記構成単位が出現する条件付確率とを対応づけて記憶する第2記憶部と、前記処理結果の候補の入力を受付ける入力受付部と、受付けた前記処理結果の候補のそれぞれについて、前記構成単位間の前記係り受け関係の組合せを表す係り受け構造を解析する解析部と、解析された前記係り受け構造の候補のそれぞれについて、文末の前記構成単位に対応する前記生起確率を前記第1記憶部から取得するとともに、前記係り受け構造に含まれる前記係り受け関係それぞれに対応する前記条件付確率を前記第2記憶部から取得し、取得したすべての前記条件付確率の積と取得した前記生起確率との積である前記係り受け構造の候補の生起確率を算出する算出部と、算出した前記生起確率が最大となる前記係り受け構造の候補を求め、求めた前記係り受け構造の候補に対応する前記処理結果の候補を前記処理結果として選択する選択部と、を備えたことを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention provides a language processing apparatus that selects a processing result from processing result candidates for a sentence constituent unit, the constituent unit and the constituent unit. A first storage unit that stores the occurrence probability of the relationship, a dependency relationship represented by the structural unit that is a dependency destination and the structural unit that is a dependency source, and the structural unit that is the dependency destination A second storage unit that stores the conditional probability of occurrence of the constituent unit that is the source of the association, an input receiving unit that receives an input of the candidate processing result, and the received candidate processing result For each of the analysis unit for analyzing the dependency structure representing the combination of the dependency relationships between the structural units, and for each of the analyzed dependency structure candidates, the analysis unit corresponds to the structural unit at the end of the sentence. The occurrence probability is acquired from the first storage unit, the conditional probabilities corresponding to the dependency relationships included in the dependency structure are acquired from the second storage unit, and all the acquired conditions are acquired. A calculation unit that calculates the occurrence probability of the dependency structure candidate that is a product of the product of the attached probability and the acquired occurrence probability, and obtains the determination of the dependency structure candidate that maximizes the calculated occurrence probability. And a selection unit that selects the processing result candidate corresponding to the dependency structure candidate as the processing result.
また、本発明は、上記装置を実行することができる方法およびプログラムである。 Further, the present invention is a method and program capable of executing the above-described apparatus.
本発明によれば、係り受け解析の解析結果を考慮して、認識処理などの処理結果の候補から適切な処理結果を選択することができるという効果を奏する。 According to the present invention, it is possible to select an appropriate processing result from candidates for processing results such as recognition processing in consideration of the analysis result of dependency analysis.
以下に添付図面を参照して、この発明にかかる装置、方法およびプログラムの最良な実施の形態を詳細に説明する。 Exemplary embodiments of an apparatus, a method, and a program according to the present invention will be described below in detail with reference to the accompanying drawings.
(第1の実施の形態)
第1の実施の形態にかかる言語処理装置は、音声認識処理などの言語処理による複数の処理結果の候補を入力し、係り受け解析の結果を参照して最適な処理結果を選択するものである。なお、以下では、日本語を対象とした言語処理を例として説明するが、対象言語は日本語に限られるものではない。
(First embodiment)
The language processing apparatus according to the first embodiment inputs a plurality of processing result candidates by language processing such as speech recognition processing, and selects an optimum processing result by referring to the result of dependency analysis. . In the following, language processing for Japanese is described as an example, but the target language is not limited to Japanese.
図1は、第1の実施の形態にかかる言語処理装置100の構成を示すブロック図である。図1に示すように、言語処理装置100は、第1記憶部121と、第2記憶部122と、第3記憶部123と、入力受付部101と、制御部102と、出力部105とを備えている。
FIG. 1 is a block diagram illustrating a configuration of a
第1記憶部121は、文節の生起確率を格納する生起確率テーブル121aを記憶するものである。図2は、第1の実施の形態の生起確率テーブル121aのデータ構造の一例を示す説明図である。図2に示すように、生起確率テーブル121aは、文節と、文節の生起確率とを対応づけて格納している。文節の生起確率は、大量の音声データやテキストコーパスを利用して事前に算出した値を生起確率テーブル121aに格納する。
The 1st memory |
第2記憶部122は、係り受け関係の条件付確率を格納する条件付確率テーブル122aを記憶するものである。係り受け関係の条件付確率とは、係り受け関係の係り先となる文節に対して、係り受け関係の係り元となる文節が出現する確率を表すものである。係り受け関係の条件付確率についても、大量の音声データやテキストコーパスを利用して事前に算出した値を条件付確率テーブル122aに格納する。
The
図3は、第1の実施の形態の条件付確率テーブル122aのデータ構造の一例を示す説明図である。図3に示すように、条件付確率テーブル122aは、係り元の文節と、係り先の文節と、条件付確率とを対応づけて格納している。 FIG. 3 is an explanatory diagram illustrating an example of a data structure of the conditional probability table 122a according to the first embodiment. As shown in FIG. 3, the conditional probability table 122 a stores a relation source clause, a relation destination clause, and a conditional probability in association with each other.
生起確率テーブル121aおよび条件付確率テーブル122aは、後述する算出部103aが係り受け構造の生起確率を算出する際に参照される。
The occurrence probability table 121a and the conditional probability table 122a are referred to when the
第3記憶部123は、各単語の品詞情報などの辞書情報を格納する辞書テーブル123aを記憶するものである。図4は、辞書テーブル123aのデータ構造の一例を示す説明図である。図4に示すように、辞書テーブル123aは、単語の見出しと、品詞と、自立語か付属語かを表すカテゴリとを対応づけて格納している。
The
後述するように、本実施の形態では、原則として文節系列の入力を受付けて係り受け解析等の処理を行うが、単語系列の入力を受付け、単語系列から生成した文節系列を対象として、同様の処理を行うように構成することができる。そして、辞書テーブル123aは、単語系列から文節系列を生成するときに参照されるテーブルである。文節系列の生成処理の詳細については後述する。 As will be described later, in this embodiment, in principle, an input of a phrase sequence is received and dependency analysis or the like is performed, but the input of a word sequence is accepted and the same applies to a phrase sequence generated from the word sequence. It can be configured to perform processing. The dictionary table 123a is a table that is referred to when a phrase series is generated from a word series. Details of the phrase series generation processing will be described later.
なお、第1記憶部121、第2記憶部122、および第3記憶部123は、HDD(Hard Disk Drive)、光ディスク、メモリカード、RAM(Random Access Memory)などの一般的に利用されているあらゆる記憶媒体により構成することができる。
Note that the
入力受付部101は、係り受け解析の対象となる文の構成単位として、文節系列の入力を受け付けるものである。入力受付部101は、例えば、音声認識、文字認識、および形態素解析などの言語処理の結果として得られた文節系列の入力を受付ける。 The input receiving unit 101 receives a phrase series input as a constituent unit of a sentence to be subjected to dependency analysis. For example, the input receiving unit 101 receives an input of a phrase series obtained as a result of language processing such as speech recognition, character recognition, and morphological analysis.
図5は、入力される文節系列の一例を示す説明図である。同図は、「太郎はまずい料理を食べた」を意味する日本語の音声に対する音声認識処理によって、類似する5つの音声認識結果の候補が生成され、それぞれに対応する5つの文節系列が入力された例を示している。本実施の形態の方法によれば、これら5つの候補のそれぞれについて文節間の係り受け関係が解析され、係り受け関係の解析結果を参照して音声認識結果として最も適切な候補1つを選択することが可能となる。 FIG. 5 is an explanatory diagram showing an example of an input phrase series. In the figure, five similar speech recognition result candidates are generated by speech recognition processing for Japanese speech meaning “Taro ate bad food”, and five corresponding phrase sequences are input. An example is shown. According to the method of the present embodiment, the dependency relationship between clauses is analyzed for each of these five candidates, and the most suitable candidate is selected as the speech recognition result with reference to the analysis result of the dependency relationship. It becomes possible.
なお、受付ける文の構成単位は文節系列に限られるものではなく、係り受け関係の解析対象とする単位であれば、単語などのその他の文の構成単位を受付けるように入力受付部101を構成してもよい。例えば、中国語のように助詞が存在しない言語を処理対象とする場合は、単語系列の入力を受付けて係り受け解析を行うように構成することができる。 Note that the composition unit of the sentence to be accepted is not limited to the phrase series, and the input reception unit 101 is configured to accept the composition unit of other sentences such as words as long as it is a unit subject to dependency relation analysis. May be. For example, when a language that does not have a particle, such as Chinese, is to be processed, a dependency analysis can be performed by receiving an input of a word sequence.
また、日本語のように文節系列に対して係り受け解析を行う場合であっても、まず単語系列の入力を受付け、辞書テーブル123aを参照して単語系列から文節系列を生成するように構成してもよい。この場合、入力受付部101は、受付けた単語系列内の単語のカテゴリを辞書テーブル123aから取得し、単語のカテゴリが付属語である場合に、カテゴリが自立語である直前の単語に付加することにより文節系列を生成していく。 Further, even when dependency analysis is performed on a phrase sequence such as Japanese, first, an input of a word sequence is received, and a phrase sequence is generated from the word sequence with reference to the dictionary table 123a. May be. In this case, the input receiving unit 101 acquires the category of the word in the accepted word sequence from the dictionary table 123a, and adds the word category to the immediately preceding word that is an independent word when the category of the word is an attached word. The phrase sequence is generated by
制御部102は、入力受付部101により受付けられた文節系列から最適な文節系列を処理結果として選択する処理を制御するものであり、解析部103と、選択部104とを備えている。
The
解析部103は、入力受付部101により受付けられた文節系列に対して係り受け解析を行い、各文節間の係り受け関係の組合せによって表される係り受け構造の候補を生成するものである。また、解析部103は、係り受け解析処理の中で、生成された係り受け構造の候補の生起確率を算出する算出部103aを備えている。
The
選択部104は、入力された文節系列の中から、係り受け解析の結果を参照して最適な文節系列を処理結果として選択するものである。具体的には、選択部104は、まず、解析部103によって解析された係り受け構造の候補と、各候補について算出部103aによって算出された生起確率とを参照し、生起確率が最大となる係り受け構造の候補を求める。そして、選択部104は、求めた係り受け構造の候補に対応する文節系列を処理結果として選択する。
The
出力部105は、選択部104によって選択された処理結果を出力するものである。
The
係り受け解析を行って最適な候補を選択する候補選択処理の詳細について説明する前に、係り受け構造の表現形式と、生起確率および係り受け構造の逐次的な生成過程について説明する。 Before describing the details of candidate selection processing for selecting an optimal candidate by performing dependency analysis, the expression format of the dependency structure, the occurrence probability, and the sequential generation process of the dependency structure will be described.
図6は、係り受け構造の表現形式の一例を示す説明図である。図6では、4文節からなる文節系列の例(文節系列201〜205)と、各文節系列について文節間の係り受け関係を図示した係り受け構造206〜210と、リスト構造で表現した係り受け構造(リスト構造211〜215)とが対応づけて示されている。
FIG. 6 is an explanatory diagram illustrating an example of a representation format of the dependency structure. In FIG. 6, an example of a phrase series including four phrases (
同図は、(1)文節間の係り受け関係が交差しない、(2)前の文節は後ろ文節に係る、という2つの条件を仮定した場合に、与えられた文節系列に対して解析されうる係り受け構造の例を示している。 This figure can be analyzed for a given phrase sequence, assuming two conditions: (1) the dependency relationship between clauses does not intersect; (2) the previous clause is related to the subsequent clause. An example of a dependency structure is shown.
文節系列が与えられたとき、前方の文節から後方の文節への係り受け関係が交差しない係り受け構造のうち、意味的に妥当な係り受け構造が存在する。例えば、4文節からなる文節系列の場合、図6に示すように5つの妥当な係り受け構造が存在する。なお、文節系列や係り受け構造内の数値は、文節を識別する値であって、文頭から文末に向けて1から始まる連番を付与している。 When a phrase series is given, there is a semantically valid dependency structure among dependency structures in which the dependency relationship from the preceding phrase to the subsequent phrase does not intersect. For example, in the case of a phrase sequence consisting of four phrases, there are five appropriate dependency structures as shown in FIG. The numerical values in the phrase series and the dependency structure are values for identifying the phrases, and are assigned serial numbers starting from 1 from the beginning to the end of the sentence.
例えば、文節系列201は係り受け構造206に対応しており、係り受け構造206は、1番目の文節(太郎の)が2番目の文節(姉の)に係り、2番目の文節(姉の)が3番目の文節(料理を)に係り、3番目の文節(料理を)が4番目の文節(食べた)に係ることを表している。なお、以下ではi番目の文節を第i文節という場合がある。
For example, the
また、リスト構造211は、係り受け構造206をリスト形式で表したものである。なお、d(i,j)は、第i文節が第j文節に係る係り受け関係を表している。
The
次に、係り受け構造の生起確率について図7を用いて説明する。図7は、係り受け構造の生起確率の一例を示す説明図である。図7では、図6の係り受け構造206〜210それぞれに対する生起確率306〜310が示されている。
Next, the occurrence probability of the dependency structure will be described with reference to FIG. FIG. 7 is an explanatory diagram showing an example of the occurrence probability of the dependency structure. In FIG. 7, the
なお、同図で、wiは第i文節、P(wi)はwiの生起確率、P(wi,wj)はwiとwjが同時に生起する確率、P(wi|wj)は、wjに対するwiの条件付確率を表す。これにより、例えば、係り受け構造206の生起確率は、{P(w1,w2)/P(w2)}・{P(w2,w3)/P(w3)}・P(w3,w4)=P(w1|w2)・P(w2|w3)・P(w3|w4)・P(w4)で表すことができる。
In the figure, w i is the i-th clause, P (w i ) is the probability of occurrence of w i , P (w i , w j ) is the probability of occurrence of w i and w j simultaneously, and P (w i | w j ) represents the conditional probability of w i with respect to w j . Thus, for example, the occurrence probability of the
これを一般化することにより、N文節からなる文節系列から得られる係り受け構造Sの生起確率は、Sに含まれるすべての係り受け関係d(i,j)に対応する条件付確率P(wi|wj)の積と、文末の文節の生起確率P(WN)の積からなる以下の(1)式で表すことができる。
次に、係り受け構造の候補を求める過程を図8および図9を用いて説明する。図8は、4文節の文節系列から、可能な係り受け構造を求める過程を示した説明図である。 Next, a process for obtaining a dependency structure candidate will be described with reference to FIGS. FIG. 8 is an explanatory diagram showing a process of obtaining a possible dependency structure from a four-phrase phrase sequence.
まず、文末の2文節、すなわち第3文節と第4文節の係り受けを考える。2つの文節間での可能な係り受け関係はただ1つであり、この1つの係り受け関係からなる係り受け構造401が得られる。次に、2文節目を加えて可能な係り受け関係を考えると、第2文節からは第3文節に係るか、第4文節に係るかの2つの可能性しか存在しない。したがって、それらの可能性に対応して、係り受け構造402と係り受け構造403とが得られる。
First, consider the dependency of the last two clauses, that is, the third and fourth clauses. There is only one possible dependency relationship between two phrases, and a
最後に、1文節目を加えて可能な係り受け関係を考える。係り受け構造402から導出される係り受け構造としては、係り受け構造206、207、および208の3種類が存在する。これは、第1文節を係り元とする場合、第2文節へ係り受けする場合、第3文節へ係り受けする場合、第4文節へ係り受けする場合の3種類の可能性が存在することに対応している。
Finally, consider the possible dependency relationships by adding the first sentence. There are three types of dependency structures derived from the dependency structure 402:
また、係り受け構造403からは、係り受け構造209および210の2種類の構造が導出される。係り受け構造403を前提とした場合、第1文節からは第2文節と第4文節に対しては、互いに非交差な係り受け関係を構成することが可能である。これに対し、第1文節からは第3文節に対する係り受け関係は、第2文節から第4文節への係り受け関係と交差することになり、上述の係り受け構造の条件を満たさない。このため、係り受け構造403からは2種類の構造が導出される。
Further, from the
図8では、4文節の場合についての係り受け構造の候補の生成過程について説明したが、文節数が増えた場合も同様に文末の文節から逐次的に構造を生成していくこと可能である。 In FIG. 8, the process of generating dependency structure candidates in the case of four clauses has been described. However, when the number of clauses increases, a structure can be sequentially generated from the clauses at the end of the sentence.
次に、(1)式に示した生起確率を求める過程を図9〜図11を用いて説明する。図9〜11は、図8で示した係り受け構造の生成過程に対応して、係り受け構造の生起確率を求める過程の一例を示す図である。 Next, the process for obtaining the occurrence probability shown in the equation (1) will be described with reference to FIGS. FIGS. 9-11 is a figure which shows an example of the process of calculating | requiring the occurrence probability of a dependency structure corresponding to the generation process of the dependency structure shown in FIG.
図9は、文末の2文節に1文節加えた係り受け構造の生起確率を算出する過程を示す説明図である。図9の係り受け構造401に対しては、文末の文節の生起確率と、文末の文節に対する直前の文節の条件付確率との積によって生起確率が算出される。この例では、P(w3|w4)・P(w4)で表すことができる。
FIG. 9 is an explanatory diagram showing a process of calculating the occurrence probability of a dependency structure in which one sentence is added to two sentences at the end of the sentence. For the
係り受け構造401を元に、係り受け構造402と係り受け構造403とを生成する場合、新たに第2文節から第3文節への係り受け関係と、第2文節から第4文節への係り受け関係とを、それぞれ係り受け構造401に付加することになる。したがって、各係り受け構造402および403の生起確率は、付加した係り受け関係に対応する条件付確率であるP(w2|w3)およびP(w2|w4)を、係り受け構造401の生起確率P(w3|w4)・P(w4)に乗じて算出することができる。これにより、係り受け構造402および係り受け構造403の生起確率は、それぞれP(w2|w3)・P(w3|w4)・P(w4)およびP(w2|w4)・P(w3|w4)・P(w4)となる。
When the
図10は、さらに1文節加えた係り受け構造の生起確率を算出する過程を示す説明図である。図10は、係り受け構造402および403の生起確率から、係り受け構造206〜210の生起確率を算出する過程を示している。
FIG. 10 is an explanatory diagram showing a process of calculating the occurrence probability of the dependency structure with one more sentence added. FIG. 10 shows a process of calculating the occurrence probabilities of the
係り受け構造402および構造403に対し、さらに第1文節を付加した係り受け構造の生起確率についても、上述と同様に、新たに付加する係り受け関係に対応する条件付確率を、係り受け構造402または係り受け構造403の生起確率に乗ずることにより算出することができる。
As for the occurrence probability of the dependency structure in which the first clause is further added to the
図11は、上記のような生起確率の算出過程を一般化した場合を説明するための模式図である。図11は、I+1文節からN文節までの部分的な文節系列に対して、係り受け構造S(係り受け構造1101)の生起確率Pが得られているときに、その直前に文節I(文節1102)を付け加えた場合の生起確率の算出方法を示している。 FIG. 11 is a schematic diagram for explaining a case where the process of calculating the occurrence probability as described above is generalized. FIG. 11 shows that when the occurrence probability P of the dependency structure S (the dependency structure 1101) is obtained for a partial clause sequence from the I + 1 clause to the N clause, the clause I (the clause 1102) immediately before that is obtained. ) Is added, the calculation method of the occurrence probability is shown.
この場合、I+1文節からN文節までの文節に対して、係り受けが非交差となる文節Iに対する係り先の文節を文節iとすると、付加される係り受け関係はd(I,i)となる。このため、新たに生成される係り受け構造S’は[d(I,i)|S]となる。ここで、[d(I,i)|S]とは、係り受け構造Sに係り受け関係d(I,i)を追加した係り受け構造を表す。また、係り受け構造S’の生起確率P’は、Pに条件付確率P(wI|wi)を乗じた値となる。 In this case, with respect to the clauses from the I + 1 clause to the N clause, if the dependency clause for the clause I whose dependency is non-intersecting is the clause i, the dependency relationship added is d (I, i). . Therefore, the newly generated dependency structure S ′ is [d (I, i) | S]. Here, [d (I, i) | S] represents a dependency structure in which the dependency relationship d (I, i) is added to the dependency structure S. Further, the occurrence probability P ′ of the dependency structure S ′ is a value obtained by multiplying P by the conditional probability P (w I | w i ).
以上説明したように、本実施の形態では、文末から逐次的に係り受け構造を生成し、生成した係り受け構造の生起確率を算出する。 As described above, in this embodiment, a dependency structure is sequentially generated from the end of a sentence, and the occurrence probability of the generated dependency structure is calculated.
次に、このように構成された第1の実施の形態にかかる言語処理装置100による候補選択処理について図12を用いて説明する。図12は、第1の実施の形態における候補選択処理の全体の流れを示すフローチャートである。
Next, candidate selection processing by the
まず、入力受付部101は、複数の文節系列の入力を受付ける(ステップS1201)。なお、上述のように、入力受付部101が単語系列の入力を受付け、辞書テーブル123aを参照して文節系列を生成するように構成してもよい。 First, the input receiving unit 101 receives an input of a plurality of phrase series (step S1201). As described above, the input receiving unit 101 may receive an input of a word series and generate a phrase series by referring to the dictionary table 123a.
次に、制御部102は、生起確率の最大値Pmaxを0で初期化する(ステップS1202)。次に、解析部103は、受付けた複数の文節系列から1つの文節系列を取得し、取得した文節系列について文節間の係り受け関係を解析する係り受け解析処理を実行する(ステップS1203)。係り受け解析処理では、解析された係り受け構造の候補と、各候補の生起確率とが出力される。係り受け解析処理の詳細については後述する。
Next, the
次に、選択部104は、係り受け解析処理の処理結果である係り受け構造の候補と、各候補の生起確率とを参照し、生起確率の最大値Pを選択する(ステップS1204)。続いて、選択部104は、選択した最大値PがPmaxより大きいか否かを判断する(ステップS1205)。
Next, the
PがPmaxより大きい場合は(ステップS1205:YES)、選択部104は、PをPmaxに設定し、Pに対応する係り受け構造の候補を、出力する処理結果の候補(出力候補)として選択する(ステップS1206)。
When P is larger than Pmax (step S1205: YES), the
出力候補を選択した後、または、ステップS1205でPがPmaxより大きくないと判断された場合(ステップS1205:NO)、制御部102は、すべての文節系列を処理したか否かを判断する(ステップS1207)。
After selecting an output candidate or when it is determined in step S1205 that P is not greater than Pmax (step S1205: NO), the
すべての文節系列を処理していない場合は(ステップS1207:NO)、解析部103は、次の文節系列を選択して処理を繰り返す(ステップS1203)。すべての文節系列を処理した場合は(ステップS1207:YES)、出力部105は、選択された出力候補を出力し(ステップS1208)、候補選択処理を終了する。
If all the phrase series have not been processed (step S1207: NO), the
このように、従来の方法では、1つの文節系列に対して最適な係り受け関係を選択するだけであったのに対し、本実施の形態によれば、複数の文節系列のそれぞれの係り受け関係を解析し、最適な係り受け関係が得られる文節系列を、最適な文節系列として選択することが可能となる。 As described above, in the conventional method, only the optimum dependency relationship is selected for one phrase sequence, but according to the present embodiment, each dependency relationship of a plurality of phrase sequences is selected. It is possible to select a phrase sequence from which the optimal dependency relationship is obtained as the optimal phrase sequence.
次に、ステップS1203の係り受け解析処理の詳細について図13および図14を用いて説明する。図13は、第1の実施の形態における係り受け解析処理の全体の流れの概要を示すフローチャートである。図14は、第1の実施の形態における係り受け解析処理の全体の流れの詳細を示すフローチャートである。 Next, details of the dependency analysis processing in step S1203 will be described with reference to FIGS. FIG. 13 is a flowchart showing an outline of the entire flow of dependency analysis processing according to the first embodiment. FIG. 14 is a flowchart showing details of the entire flow of dependency analysis processing according to the first embodiment.
すなわち、図14は図13で示した係り受け解析処理の概要を表すフローチャートを詳細化したフローチャートに相当する。なお、図13の各ステップと図14の各ステップとの対応は、図14内に示している。 That is, FIG. 14 corresponds to a detailed flowchart of the flowchart representing the outline of the dependency analysis process shown in FIG. The correspondence between each step in FIG. 13 and each step in FIG. 14 is shown in FIG.
図13で、まず、解析部103は、指定された文節系列の文節数が2であるか否かを判断する(ステップS1301)。後述するように、係り受け解析処理は、文節系列から先頭の文節を削除した文節系列に対して再帰的に実行される。このため、文節の削除を繰り返して最終的に文末の2文節に到達したか否かを判断し、この場合に実行される係り受け解析処理では、特別に算出した生起確率等を返す必要がある。このための判定処理がステップS1301の処理に相当する。
In FIG. 13, the
文節数が2である場合は(ステップS1301:YES)、算出部103aは、文末の2文節についての係り受け構造を生成して出力するとともに、生成した係り受け構造の生起確率を算出して出力する(ステップS1302)。この場合、算出部103aは、図8および図9で示した方法によって、係り受け構造の生成と、生起確率の算出を行う。
When the number of clauses is 2 (step S1301: YES), the
文節数が2でない場合は(ステップS1301:NO)、指定された文節系列の先頭の文節を除いた文節系列に対して再帰的に係り受け解析処理を実行する(ステップS1303)。係り受け解析処理では、上述のように、解析された係り受け構造の候補と、各候補の生起確率とが出力される。 If the number of phrases is not 2 (step S1301: NO), the dependency analysis process is recursively performed on the phrase series excluding the first phrase of the specified phrase series (step S1303). In the dependency analysis process, as described above, the analyzed dependency structure candidates and the occurrence probabilities of the candidates are output.
なお、文節数が1の文節系列が入力された場合は係り受け解析を行う必要がないため処理を終了するが、同図では省略している。 Note that when a phrase series having the number of phrases of 1 is input, the dependency analysis is not necessary, and thus the processing is terminated, but is omitted in FIG.
次に、解析部103は、係り受け解析処理の解析結果である係り受け構造の各候補に対して、直前の文節を追加した係り受け構造を生成する(ステップS1304)。このとき、解析部103は、新たに付加される係り受け関係が、既存の係り受け構造の各係り受け関係と交差しないような係り受け構造を生成する。
Next, the
次に、算出部103aは、追加した文節との係り受け関係に対応する条件付確率を用いて、生成した係り受け構造の生起確率を算出する(ステップS1305)。このとき、算出部103aは、新たに付加される係り受け関係に対応する条件付確率を、条件付確率テーブル122aから取得して生起確率の算出に利用する。
Next, the
なお、ステップS1304で新たに生成される係り受け構造の候補が複数存在する場合があるため、ステップS1305では、算出部103aは各候補に対してそれぞれ生起確率を算出する。
Since there may be a plurality of dependency structure candidates newly generated in step S1304, the
次に、解析部103は、生成した係り受け構造の候補と、各候補について算出した生起確率とを出力して係り受け解析処理を終了する(ステップS1306)。
Next, the
このように、本実施の形態では、係り受け解析処理を再帰的に呼び出すことにより、文末側から係り受け構造の候補を逐次生成するとともに、生成した候補の生起確率を逐次算出することができる。また、本実施の形態では、このとき、事前に準備された生起確率テーブル121aに記憶された文末の文節の生起確率を用いて係り受け構造の生起確率を順次算出している。 As described above, in the present embodiment, the dependency analysis process is recursively called, whereby the dependency structure candidates are sequentially generated from the sentence end side, and the occurrence probability of the generated candidates can be sequentially calculated. In this embodiment, the occurrence probability of the dependency structure is sequentially calculated using the occurrence probability of the sentence at the end of the sentence stored in the occurrence probability table 121a prepared in advance.
このように、生起確率テーブル121aに記憶された文節の生起確率を用いて係り受け構造の生起確率を算出しているため、複数の文節系列それぞれに対して算出された係り受け構造の生起確率を相互に比較することが可能となる。このため、生起確率を比較することによって生起確率が最大となる係り受け構造を求め、求めた係り受け構造に対応する文節系列を最適な処理結果として選択することが可能となる。 Thus, since the occurrence probability of the dependency structure is calculated using the occurrence probability of the phrase stored in the occurrence probability table 121a, the occurrence probability of the dependency structure calculated for each of the plurality of phrase sequences is calculated. It becomes possible to compare with each other. For this reason, it is possible to obtain a dependency structure that maximizes the occurrence probability by comparing the occurrence probabilities, and to select a phrase series corresponding to the obtained dependency structure as an optimum processing result.
次に、係り受け解析処理の詳細について図14を用いて説明する。まず、解析部103は、指定された開始文節Iと、文節数Nと、文節系列Wとを取得する(ステップS1401)。
Next, details of the dependency analysis process will be described with reference to FIG. First, the
次に、解析部103は、文節数Nが2であるか否かを判断し(ステップS1402)、文節数が2である場合は(ステップS1402:YES)、係り受け構造の集合SLとして[d(1,2)]を、生起確率の集合PLとして[P(w1|w2)・P(w2)]を出力し(ステップS1403)、係り受け解析処理を終了する。ステップS1403での出力内容は、再帰的に係り受け解析処理が実行され、最終的に文末の2文節に対する係り受け解析処理が実行されたときの出力内容を表している。
Next, the
文節数が2でない場合は(ステップS1402:NO)、解析部103は、さらに文節数が2以上であるか否かを判断する(ステップS1404)。2以上でない場合は(ステップS1404:NO)、係り受け解析ができないので係り受け解析処理を終了する。
When the number of phrases is not 2 (step S1402: NO), the
文節数が2以上である場合は(ステップS1404:YES)、解析部103は、先頭の文節を除き、開始文節をI+1、文節数をN−1、文節系列をWとして指定して再帰的に係り受け解析処理を実行する(ステップS1405)。
When the number of clauses is 2 or more (step S1404: YES), the
次に、解析部103は、解析結果として、係り受け構造の候補の集合L2と、各候補の生起確率の集合P2とを取得する(ステップS1406)。続いて、解析部103は、直前の文節を追加した場合の係り受け構造の候補を生成するとともに各候補の生起確率を算出するため、以下のステップS1407〜ステップS1417を実行する。
Next, the
まず、解析部103は、生成する係り受け構造の候補を格納するための集合L3と、各候補の生起確率を格納するための集合P3を空リストに初期化する(ステップS1407)。
First, the
次に、解析部103は、L2の最初の要素である係り受け構造の候補Sと、P2の最初の要素であるSの生起確率Pとを取得する(ステップS1408)。次に、解析部103は、文節位置iに開始文節の位置を表すI+1を設定する(ステップS1409)。
Next, the
以下の処理(ステップS1410〜ステップS1415)では、文末に向けて係り先となる文節位置iを移動させながら、係り元の文節である直前の文節(文節位置I)と係り先の文節(文節位置i)による係り受け関係が、S内の各係り受け関係と交差するかを判定し、交差しない場合に当該係り受け関係を含む新たな係り受け構造の候補を生成して生起確率を算出する。 In the following processing (steps S1410 to S1415), the immediately preceding phrase (phrase position I) that is the source phrase and the related phrase (sentence position) are moved while moving the related phrase position i toward the end of the sentence. It is determined whether the dependency relationship of i) intersects with each dependency relationship in S, and if not, a new dependency structure candidate including the dependency relationship is generated and the occurrence probability is calculated.
まず、解析部103は、文節位置iと係り受け構造の候補Sとを指定して、係り受け関係の交差を判定する交差判定処理を実行する(ステップS1410)。交差判定処理の詳細については後述する。
First, the
次に、解析部103は、交差判定処理の結果を元に、新たに追加すべき係り受け関係がS内の係り受け関係と交差しているか否かを判断する(ステップS1411)。交差していない場合は(ステップS1411:NO)、解析部103は、係り受け構造の候補Sの先頭に係り受け関係d(I,i)を付加した係り受け構造を生成し、集合L3に追加する(ステップS1412)。
Next, the
続いて、算出部103aが、生成した係り受け構造の生起確率として、P(wI|wi)・Pを算出し、集合P3に追加する(ステップS1413)。P(wI|wi)は、文節wIと文節wiとの係り受け関係に対応する条件付確率であり、条件付確率テーブル122aから取得することができる。
Subsequently, the
生起確率を集合P3に追加した後、または、係り受け関係が交差している場合は(ステップS1411:YES)、解析部103は、i=i+1とすることによって文節位置iを文末側にずらす(ステップS1414)。
After adding the occurrence probability to the set P3 or when the dependency relationship intersects (step S1411: YES), the
次に、解析部103は、iが文節数Nより大きいか否かを判断し(ステップS1415)、大きくない場合は(ステップS1415:NO)、新たな文節位置について交差判定処理を繰り返す(ステップS1410)。
Next, the
iが文節数より大きい場合は(ステップS1415:YES)、係り受け構造の候補Sについて、すべての係り受け関係との交差判定処理が終了したことになるため、解析部103は、集合L2および集合P2から、それぞれSおよびPを削除する(ステップS1416)。
If i is larger than the number of clauses (step S1415: YES), since the intersection determination process with all the dependency relationships has been completed for the dependency structure candidate S, the
次に、解析部103は、L2が空リストであるか否かを判断し(ステップS1417)、空リストでない場合は(ステップS1417:NO)、さらに次の係り受け構造の候補を取得して処理を繰り返す(ステップS1408)。
Next, the
L2が空リストである場合、すなわち、すべての係り受け構造の候補について処理が終了した場合は(ステップS1417:YES)、解析部103は、それまでに追加された新たな係り受け構造の候補および生起確率それぞれの集合である集合L3および集合P3を出力し(ステップS1418)、係り受け解析処理を終了する。
If L2 is an empty list, that is, if the processing is completed for all the dependency structure candidates (step S1417: YES), the
次に、ステップS1410の交差判定処理の詳細について図15を用いて説明する。図15は、第1の実施の形態における交差判定処理の全体の流れの詳細を示すフローチャートである。 Next, details of the intersection determination process in step S1410 will be described with reference to FIG. FIG. 15 is a flowchart showing details of the overall flow of the intersection determination process in the first embodiment.
まず、解析部103は、指定された文節位置iと係り受け構造の候補Sとを取得する(ステップS1501)。次に、解析部103は、係り受け構造Sに含まれる係り受け関係d(a,b)を取得する(ステップS1502)。
First, the
続いて、解析部103は、文節位置iと、係り元の文節位置aおよび係り先の文節位置bとの関係から、係り先をiとする係り受け関係と係り受け関係d(a,b)とが交差するか否かを判断する。具体的には、解析部103は、iがaより大きく、かつ、iがbより小さいか否かを判断する(ステップS1503)。iがaより大きく、かつ、iがbより小さい場合以外であれば(ステップS1503:NO)、係り先をiとする係り受け関係と係り受け関係d(a,b)とは交差しないと判断できる。
Subsequently, the
この場合は、解析部103は、S内のすべての係り受け関係を処理したか否かを判断し(ステップS1504)、処理していない場合は(ステップS1504:NO)、次の係り受け関係を取得して処理を繰り返す(ステップS1502)。
In this case, the
すべての係り受け関係を処理したと判断した場合は(ステップS1504:YES)、解析部103は、係り先をiとする係り受け関係は、S内のすべての係り受け関係と交差していないと判定して(ステップS1505)、交差判定処理を終了する。
If it is determined that all the dependency relationships have been processed (step S1504: YES), the
一方、ステップS1503で、iがaより大きく、かつ、iがbより小さい場合は(ステップS1503:YES)、係り先をiとする係り受け関係と係り受け関係d(a,b)とが交差すると判断される。このため、解析部103は、係り受け関係が交差していると判定して(ステップS1506)、交差判定処理を終了する。
On the other hand, if i is greater than a and i is smaller than b in step S1503 (step S1503: YES), the dependency relationship with the dependency destination i intersects with the dependency relationship d (a, b). It is judged. Therefore, the
このように、第1の実施の形態にかかる言語処理装置では、言語処理の処理結果として複数の文節系列の候補を入力し、各文節系列について求めた係り受け解析の結果を参照して、複数の候補から最適な候補を処理結果として選択することができる。 As described above, in the language processing apparatus according to the first embodiment, a plurality of phrase series candidates are input as the processing result of the language processing, and a plurality of phrase series results are obtained with reference to the dependency analysis results obtained for each phrase series. The optimal candidate can be selected as the processing result from the candidates.
(第2の実施の形態)
第1の実施の形態では、文内の文節数を考慮せずに求められた生起確率および条件付確率を用いて係り受け構造の生起確率を算出していた。これに対し、第2の実施の形態にかかる言語処理装置は、文内の文節数ごとに求められた文節の生起確率および係り受け関係の条件付確率を用いることにより、高精度に係り受け構造の生起確率を算出するものである。
(Second Embodiment)
In the first embodiment, the occurrence probability of the dependency structure is calculated using the occurrence probability and the conditional probability obtained without considering the number of clauses in the sentence. On the other hand, the language processing apparatus according to the second embodiment uses the phrase occurrence probability and the conditional probability of the dependency relationship obtained for each number of clauses in the sentence, so that the dependency structure is highly accurate. The occurrence probability of is calculated.
図16は、第2の実施の形態にかかる言語処理装置1600の構成を示すブロック図である。図16に示すように、言語処理装置1600は、第1記憶部1621と、第2記憶部1622と、第3記憶部123と、入力受付部101と、制御部1602と、出力部105とを備えている。
FIG. 16 is a block diagram illustrating a configuration of a
第2の実施の形態では、第1記憶部1621、第2記憶部1622、および制御部1602の構成または機能が第1の実施の形態と異なっている。その他の構成および機能は、第1の実施の形態にかかる言語処理装置100の構成を表すブロック図である図1と同様であるので、同一符号を付し、ここでの説明は省略する。
In the second embodiment, the configurations or functions of the
第1記憶部1621は、文内の文節数ごとに事前に求められた生起確率を格納するように拡張された生起確率テーブル1621aを記憶するものである。図17は、第2の実施の形態の生起確率テーブル1621aのデータ構造の一例を示す説明図である。図17に示すように、生起確率テーブル1621aは、文節と、文内の文節数ごとに求められた文節の生起確率とを対応づけて格納している。
The 1st memory |
同図のΩnは、文節数nの文節系列の集合を表している。なお、観測空間Ωを全ての可能な文節系列とすると、Ωは以下の(2)式のように表すことができる。
ここで、nが異なるΩnについては互いに共通部分を持たないため、各部分空間Ωnの確率P(Ωn)について、以下の(3)式が成り立つ。
第2記憶部1622は、文内の文節数ごとに事前に求められた条件付確率を格納するように拡張された条件付確率テーブル1622aを記憶するものである。図18は、第2の実施の形態の条件付確率テーブル1622aのデータ構造の一例を示す説明図である。図18に示すように、条件付確率テーブル1622aは、係り元の文節と、係り先の文節と、文内の文節数ごとに求められた係り受け関係の条件付確率とを対応づけて格納している。
The
制御部1602は、第1の実施の形態の制御部102と同様に、受付けられた文節系列から最適な文節系列を処理結果として選択する処理を制御するものであるが、解析部1603の機能が制御部102と異なっている。選択部104の構成および機能は第1の実施の形態の図1と同様であるので、同一符号を付し、ここでの説明は省略する。
Similar to the
解析部1603は、上記拡張された各テーブルを参照して係り受け構造の生起確率を算出する算出部1603aを備えた点が、第1の実施の形態の解析部103と異なっている。
The
なお、算出部1603aによって算出される係り受け構造の生起確率は、以下の(4)式で表すことができる。ここで、P(wi|wj、Ωn)は、Ωnにおけるwjに対するwiの条件付確率、P(wN,Ωn)は、ΩnにおけるwNの生起確率、P(Ωn)はΩnの生起確率を表す。P(Ωn)は、事前に算出されて図示しない記憶部等に記憶されている値を参照する。
次に、このように構成された第2の実施の形態にかかる言語処理装置1600による候補選択処理について説明する。第2の実施の形態の候補選択処理の全体の流れは、第1の実施の形態の候補選択処理の全体の流れを示す図12と同様である。ただし、図12のステップS1203の係り受け解析処理の詳細が第1の実施の形態と異なっている。
Next, candidate selection processing by the
以下では、第2の実施の形態における係り受け解析処理について図19を用いて説明する。図19は、第2の実施の形態における係り受け解析処理の全体の流れを示すフローチャートである。 Below, the dependency analysis process in 2nd Embodiment is demonstrated using FIG. FIG. 19 is a flowchart showing an overall flow of dependency analysis processing according to the second embodiment.
まず、解析部1603は、指定された文節系列の文節数が2であるか否かを判断する(ステップS1901)。文節数が2である場合は(ステップS1901:YES)、算出部1603aは、文末の2文節についての係り受け構造を生成して出力するとともに、生成した係り受け構造の生起確率を算出して出力する(ステップS1902)。このとき、算出部1603aは、文末の文節の生起確率として、入力された文節系列における文節数に対応する値を生起確率テーブル1621aから取得する。
First, the
ここで、入力された文節系列における文節数とは、ステップS1901で判定する文節数とは異なる値であり、ステップS1201で入力を受付けた状態での各文節系列の文節数に相当するものである。この値は、例えば、係り受け解析処理を実行するときに文節系列とは別に指定し、係り受け解析処理内で参照可能とするように構成すればよい。 Here, the number of phrases in the input phrase series is a value different from the number of phrases determined in step S1901, and corresponds to the number of phrases in each phrase series in a state where the input is accepted in step S1201. . For example, this value may be specified separately from the phrase series when the dependency analysis process is executed, and may be configured so that it can be referred to in the dependency analysis process.
ステップS1903からステップS1904までの、係り受け解析処理(再帰処理)、係り受け構造生成処理は、第1の実施の形態にかかる言語処理装置100におけるステップS1303からステップS1304までと同様の処理なので、その説明を省略する。
The dependency analysis processing (recursion processing) and dependency structure generation processing from step S1903 to step S1904 are the same as steps S1303 to S1304 in the
次に、算出部1603aは生成した係り受け構造の生起確率を算出する(ステップS1905)。算出部1603aは、追加した文節との係り受け関係だけでなく、文節数も考慮して適切な条件付確率を条件付確率テーブル1622aから取得して、生起確率を算出する。具体的には、算出部1603aは、追加した文節との係り受け関係と、入力された文節系列における文節数とに対応する条件付確率を条件付確率テーブル1622aから取得し、生起確率の算出に用いる。
Next, the
最後に、解析部1603は、生成した係り受け構造の候補と、各候補について算出した生起確率とを出力して係り受け解析処理を終了する(ステップS1906)。
Finally, the
このように、第2の実施の形態にかかる言語処理装置では、文内の文節数ごとに求められた生起確率および条件付確率を用いて、係り受け構造の生起確率を算出しているため、より高精度に係り受け構造の生起確率を算出することができる。そして、このように高精度に算出された生起確率によって最適な処理結果を高精度に選択することが可能となる。 Thus, in the language processing device according to the second embodiment, the occurrence probability of the dependency structure is calculated using the occurrence probability and the conditional probability obtained for each number of clauses in the sentence. The occurrence probability of the dependency structure can be calculated with higher accuracy. And it becomes possible to select an optimal process result with high precision by the occurrence probability calculated with high precision in this way.
次に、第1または第2の実施の形態にかかる言語処理装置のハードウェア構成について図20を用いて説明する。図20は、第1または第2の実施の形態にかかる言語処理装置のハードウェア構成を示す説明図である。 Next, the hardware configuration of the language processing apparatus according to the first or second embodiment will be described with reference to FIG. FIG. 20 is an explanatory diagram of a hardware configuration of the language processing apparatus according to the first or second embodiment.
第1または第2の実施の形態にかかる言語処理装置は、CPU(Central Processing Unit)51などの制御装置と、ROM(Read Only Memory)52やRAM53などの記憶装置と、ネットワークに接続して通信を行う通信I/F54と、HDD(Hard Disk Drive)、CD(Compact Disc)ドライブ装置などの外部記憶装置と、ディスプレイ装置などの表示装置と、キーボードやマウスなどの入力装置と、各部を接続するバス61を備えており、通常のコンピュータを利用したハードウェア構成となっている。
The language processing device according to the first or second embodiment communicates with a control device such as a CPU (Central Processing Unit) 51 and a storage device such as a ROM (Read Only Memory) 52 and a
第1または第2の実施の形態にかかる言語処理装置で実行される候補選択プログラムは、インストール可能な形式又は実行可能な形式のファイルでCD−ROM(Compact Disk Read Only Memory)、フレキシブルディスク(FD)、CD−R(Compact Disk Recordable)、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録されて提供される。 The candidate selection program executed by the language processing apparatus according to the first or second embodiment is a file in an installable format or an executable format, and is a CD-ROM (Compact Disk Read Only Memory), a flexible disk (FD). ), A CD-R (Compact Disk Recordable), a DVD (Digital Versatile Disk), and the like.
また、第1または第2の実施の形態にかかる言語処理装置で実行される候補選択プログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。また、第1または第2の実施の形態にかかる言語処理装置で実行される候補選択プログラムをインターネット等のネットワーク経由で提供または配布するように構成してもよい。 Further, the candidate selection program executed by the language processing apparatus according to the first or second embodiment is stored on a computer connected to a network such as the Internet and is provided by being downloaded via the network. It may be configured. Further, the candidate selection program executed by the language processing apparatus according to the first or second embodiment may be provided or distributed via a network such as the Internet.
また、第1または第2の実施の形態の候補選択プログラムを、ROM等に予め組み込んで提供するように構成してもよい。 The candidate selection program according to the first or second embodiment may be provided by being incorporated in advance in a ROM or the like.
第1または第2の実施の形態にかかる言語処理装置で実行される候補選択プログラムは、上述した各部(入力受付部、制御部、出力部)を含むモジュール構成となっており、実際のハードウェアとしてはCPU51(プロセッサ)が上記記憶媒体から候補選択プログラムを読み出して実行することにより上記各部が主記憶装置上にロードされ、上述した各部が主記憶装置上に生成されるようになっている。 The candidate selection program executed by the language processing apparatus according to the first or second embodiment has a module configuration including the above-described units (input reception unit, control unit, output unit), and actual hardware. As described above, the CPU 51 (processor) reads out and executes the candidate selection program from the storage medium, whereby the above-described units are loaded onto the main storage device, and the above-described units are generated on the main storage device.
以上のように、本発明にかかる装置、方法およびプログラムは、音声認識、文字認識、形態素解析などの処理による複数の処理結果の候補から最適な処理結果を選択する装置、方法およびプログラムに適している。 As described above, the apparatus, method, and program according to the present invention are suitable for an apparatus, method, and program that select an optimum processing result from a plurality of processing result candidates by processing such as speech recognition, character recognition, and morphological analysis. Yes.
51 CPU
52 ROM
53 RAM
54 通信I/F
61 バス
100 言語処理装置
101 入力受付部
102 制御部
103 解析部
103a 算出部
104 選択部
105 出力部
121 第1記憶部
121a 生起確率テーブル
122 第2記憶部
122a 条件付確率テーブル
123 第3記憶部
123a 辞書テーブル
201、202、203、204、205 文節系列
206、207、208、209、210 係り受け構造
211、212、213、214、215 リスト構造
306、307、308、309、310 生起確率
401、402、403 係り受け構造
1101 係り受け構造
1102 文節
1600 言語処理装置
1602 制御部
1603 解析部
1603a 算出部
1621 第1記憶部
1621a 生起確率テーブル
1622 第2記憶部
1622a 条件付確率テーブル
51 CPU
52 ROM
53 RAM
54 Communication I / F
61
Claims (10)
前記構成単位と、前記構成単位の生起確率とを対応づけて記憶する第1記憶部と、
係り先となる前記構成単位および係り元となる前記構成単位によって表される係り受け関係と、前記係り先となる前記構成単位に対して前記係り元となる前記構成単位が出現する条件付確率とを対応づけて記憶する第2記憶部と、
前記処理結果の候補の入力を受付ける入力受付部と、
受付けた前記処理結果の候補のそれぞれについて、前記構成単位間の前記係り受け関係の組合せを表す係り受け構造を解析する解析部と、
解析された前記係り受け構造の候補のそれぞれについて、文末の前記構成単位に対応する前記生起確率を前記第1記憶部から取得するとともに、前記係り受け構造に含まれる前記係り受け関係それぞれに対応する前記条件付確率を前記第2記憶部から取得し、取得したすべての前記条件付確率の積と取得した前記生起確率との積である前記係り受け構造の候補の生起確率を算出する算出部と、
算出した前記生起確率が最大となる前記係り受け構造の候補を求め、求めた前記係り受け構造の候補に対応する前記処理結果の候補を前記処理結果として選択する選択部と、
を備えたことを特徴とする言語処理装置。 A language processing apparatus that selects the processing result from processing result candidates for a sentence unit,
A first storage unit that stores the structural unit and the occurrence probability of the structural unit in association with each other;
A dependency relationship represented by the constituent unit that is the destination and the constituent unit that is the source of the relationship, and a conditional probability that the constituent unit that is the source of the relation appears for the constituent unit that is the destination A second storage unit for storing
An input receiving unit that receives input of candidates for the processing result;
For each of the accepted processing result candidates, an analysis unit that analyzes a dependency structure that represents a combination of the dependency relationships between the structural units;
For each of the analyzed dependency structure candidates, the occurrence probability corresponding to the constituent unit at the end of a sentence is acquired from the first storage unit, and also corresponds to each of the dependency relationships included in the dependency structure. A calculation unit that acquires the conditional probability from the second storage unit, and calculates a probability of occurrence of the dependency structure candidate that is a product of the acquired product of all the conditional probabilities and the acquired probability of occurrence; ,
A selection unit that obtains the candidate of the dependency structure that has the maximum occurrence probability calculated, and selects the candidate of the processing result corresponding to the obtained candidate of the dependency structure as the processing result;
A language processing apparatus comprising:
を特徴とする請求項1に記載の言語処理装置。 The calculation unit, for each non-end-end unit that is the constituent unit other than the constituent unit at the end of the sentence, in the order from the non-end-end unit at the end of the sentence toward the non-end-end unit at the beginning of the sentence, is behind the non-end-end unit. Acquiring the conditional probability corresponding to the dependency relationship with respect to the structural unit from the second storage unit, and sequentially multiplying the acquired conditional probability with respect to the occurrence probability acquired from the first storage unit. To calculate the occurrence probability of the dependency structure candidate,
The language processing apparatus according to claim 1.
前記選択部は、(1)式の生起確率PL(k,lk)が最大となる整数kおよび整数lkを求め、求めた整数kに対応するk番目の前記処理結果の候補を前記処理結果として選択すること、
を特徴とする請求項1に記載の言語処理装置。
The selection unit obtains an integer k and an integer l k that maximize the occurrence probability PL (k, l k ) in the equation (1), and sets the kth candidate for the processing result corresponding to the obtained integer k as the process. Select as a result,
The language processing apparatus according to claim 1.
前記第2記憶部は、前記係り受け関係と、前記単位数と、前記構成単位の個数が前記単位数である文における前記条件付確率とを対応づけて記憶し、
前記算出部は、解析された前記係り受け構造の候補のそれぞれについて、前記係り受け構造の候補に対応する前記処理結果の候補に含まれる前記構成単位の個数をさらに求め、文末の前記構成単位と求めた前記個数とに対応する前記生起確率を前記第1記憶部から取得するとともに、前記係り受け構造に含まれる前記係り受け関係と求めた前記個数とに対応する前記条件付確率を前記第2記憶部から取得し、取得した前記生起確率と取得した前記条件付確率との積である前記係り受け構造の候補の生起確率を算出すること、
を特徴とする請求項1に記載の言語処理装置。 The first storage unit associates the structural unit, the number of units representing the number of the structural units in a sentence, and the occurrence probability of the structural unit in a sentence in which the number of structural units is the unit number. Remember,
The second storage unit stores the dependency relationship, the number of units, and the conditional probability in a sentence in which the number of structural units is the number of units, in association with each other.
The calculation unit further determines, for each of the analyzed dependency structure candidates, the number of the structural units included in the processing result candidate corresponding to the dependency structure candidate, and the structural unit at the end of the sentence. The occurrence probability corresponding to the determined number is acquired from the first storage unit, and the conditional probability corresponding to the dependency relationship included in the dependency structure and the determined number is the second probability. Obtaining from the storage unit, calculating the occurrence probability of the dependency structure candidate that is the product of the acquired occurrence probability and the acquired conditional probability;
The language processing apparatus according to claim 1.
前記選択部は、(2)式の生起確率PL(k,lk)が最大となる整数kおよび整数lkを求め、求めた整数kに対応するk番目の前記処理結果の候補を前記処理結果として選択すること、
を特徴とする請求項4に記載の言語処理装置。
The selection unit obtains an integer k and an integer l k maximizing the occurrence probability PL (k, l k ) of the expression (2), and sets the kth processing result candidate corresponding to the obtained integer k as the process. Select as a result,
The language processing apparatus according to claim 4.
を特徴とする請求項1に記載の言語処理装置。 The input receiving unit receives an input of a recognition result candidate of a speech recognition process for recognizing a voice and dividing it into the constituent units as a candidate for the processing result;
The language processing apparatus according to claim 1.
を特徴とする請求項1に記載の言語処理装置。 The input accepting unit accepts input of a recognition result candidate of a character recognition process for recognizing a character and dividing it into the constituent units as a candidate for the processing result;
The language processing apparatus according to claim 1.
を特徴とする請求項1に記載の言語処理装置。 The input receiving unit receives input of analysis result candidates of a morpheme analysis process in which a sentence is morphologically analyzed and divided into morphemes as the constituent units as the processing result candidates,
The language processing apparatus according to claim 1.
前記言語処理装置は、
前記構成単位と、前記構成単位の生起確率とを対応づけて記憶する第1記憶部と、
係り先となる前記構成単位および係り元となる前記構成単位によって表される係り受け関係と、前記係り先となる前記構成単位に対して前記係り元となる前記構成単位が出現する条件付確率とを対応づけて記憶する第2記憶部と、を備え、
入力受付部によって、前記処理結果の候補の入力を受付ける入力受付ステップと、
解析部によって、受付けた前記処理結果の候補のそれぞれについて、前記構成単位間の前記係り受け関係の組合せを表す係り受け構造を解析する解析ステップと、
算出部によって、解析された前記係り受け構造の候補のそれぞれについて、文末の前記構成単位に対応する前記生起確率を前記第1記憶部から取得するとともに、前記係り受け構造に含まれる前記係り受け関係それぞれに対応する前記条件付確率を前記第2記憶部から取得し、取得したすべての前記条件付確率の積と取得した前記生起確率との積である前記係り受け構造の候補の生起確率を算出する算出ステップと、
選択部によって、算出した前記生起確率が最大となる前記係り受け構造の候補を求め、求めた前記係り受け構造の候補に対応する前記処理結果の候補を前記処理結果として選択する選択ステップと、
を備えたことを特徴とする候補選択方法。 A candidate selection method in a language processing device for selecting a processing result from processing result candidates for a sentence unit,
The language processing device includes:
A first storage unit that stores the structural unit and the occurrence probability of the structural unit in association with each other;
A dependency relationship represented by the constituent unit that is the destination and the constituent unit that is the source of the relationship, and a conditional probability that the constituent unit that is the source of the relation appears for the constituent unit that is the destination A second storage unit that stores the information in association with each other,
An input receiving step of receiving input of the candidate processing result by an input receiving unit;
An analysis step of analyzing a dependency structure representing a combination of the dependency relationships between the structural units for each of the processing result candidates received by the analysis unit;
For each of the dependency structure candidates analyzed by the calculation unit, the occurrence probability corresponding to the constituent unit at the end of a sentence is acquired from the first storage unit, and the dependency relationship included in the dependency structure is obtained. The conditional probabilities corresponding to each are acquired from the second storage unit, and the occurrence probability of the candidate of the dependency structure, which is the product of the acquired product of all the conditional probabilities and the acquired occurrence probability, is calculated. A calculating step to
A selection step of obtaining a candidate for the dependency structure that maximizes the calculated occurrence probability by a selection unit, and selecting the processing result candidate corresponding to the obtained candidate for the dependency structure as the processing result;
A candidate selection method characterized by comprising:
前記言語処理装置は、
前記構成単位と、前記構成単位の生起確率とを対応づけて記憶する第1記憶部と、
係り先となる前記構成単位および係り元となる前記構成単位によって表される係り受け関係と、前記係り先となる前記構成単位に対して前記係り元となる前記構成単位が出現する条件付確率とを対応づけて記憶する第2記憶部と、を備え、
前記処理結果の候補の入力を受付ける入力受付手順と、
受付けた前記処理結果の候補のそれぞれについて、前記構成単位間の前記係り受け関係の組合せを表す係り受け構造を解析する解析手順と、
解析された前記係り受け構造の候補のそれぞれについて、文末の前記構成単位に対応する前記生起確率を前記第1記憶部から取得するとともに、前記係り受け構造に含まれる前記係り受け関係それぞれに対応する前記条件付確率を前記第2記憶部から取得し、取得したすべての前記条件付確率の積と取得した前記生起確率との積である前記係り受け構造の候補の生起確率を算出する算出手順と、
算出した前記生起確率が最大となる前記係り受け構造の候補を求め、求めた前記係り受け構造の候補に対応する前記処理結果の候補を前記処理結果として選択する選択手順と、
をコンピュータに実行させる候補選択プログラム。 A candidate selection program in a language processing apparatus for selecting the processing result from processing result candidates for a sentence unit,
The language processing device includes:
A first storage unit that stores the structural unit and the occurrence probability of the structural unit in association with each other;
A dependency relationship represented by the constituent unit that is the destination and the constituent unit that is the source of the relationship, and a conditional probability that the constituent unit that is the source of the relation appears for the constituent unit that is the destination A second storage unit that stores the information in association with each other,
An input acceptance procedure for accepting input of candidate processing results;
An analysis procedure for analyzing a dependency structure representing a combination of the dependency relationships between the structural units for each of the accepted processing result candidates;
For each of the analyzed dependency structure candidates, the occurrence probability corresponding to the constituent unit at the end of a sentence is acquired from the first storage unit, and also corresponds to each of the dependency relationships included in the dependency structure. A calculation procedure for acquiring the conditional probability from the second storage unit, and calculating the occurrence probability of the candidate of the dependency structure, which is a product of the acquired product of all the conditional probabilities and the acquired occurrence probability; ,
A selection procedure for obtaining a candidate for the dependency structure that maximizes the calculated occurrence probability, and selecting the processing result candidate corresponding to the obtained candidate for the dependency structure as the processing result;
A candidate selection program that causes a computer to execute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007079381A JP2008242607A (en) | 2007-03-26 | 2007-03-26 | Device, method and program for selecting proper candidate from language processing result |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007079381A JP2008242607A (en) | 2007-03-26 | 2007-03-26 | Device, method and program for selecting proper candidate from language processing result |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008242607A true JP2008242607A (en) | 2008-10-09 |
Family
ID=39913913
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007079381A Pending JP2008242607A (en) | 2007-03-26 | 2007-03-26 | Device, method and program for selecting proper candidate from language processing result |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008242607A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010151922A (en) * | 2008-12-24 | 2010-07-08 | Fujitsu Ltd | Question creating program, question creating device, question creating method |
JP2010224536A (en) * | 2009-03-20 | 2010-10-07 | Honda Motor Co Ltd | Language processor |
US9455940B2 (en) | 2012-11-29 | 2016-09-27 | Fujitsu Limited | Information processing apparatus and information processing method |
-
2007
- 2007-03-26 JP JP2007079381A patent/JP2008242607A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010151922A (en) * | 2008-12-24 | 2010-07-08 | Fujitsu Ltd | Question creating program, question creating device, question creating method |
JP2010224536A (en) * | 2009-03-20 | 2010-10-07 | Honda Motor Co Ltd | Language processor |
US9455940B2 (en) | 2012-11-29 | 2016-09-27 | Fujitsu Limited | Information processing apparatus and information processing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3720068B2 (en) | Question posting method and apparatus | |
JP4302326B2 (en) | Automatic classification of text | |
Schuster et al. | Japanese and korean voice search | |
US9818401B2 (en) | Systems and methods for adaptive proper name entity recognition and understanding | |
JP4215418B2 (en) | Word prediction method, speech recognition method, speech recognition apparatus and program using the method | |
US9280967B2 (en) | Apparatus and method for estimating utterance style of each sentence in documents, and non-transitory computer readable medium thereof | |
US8346537B2 (en) | Input apparatus, input method and input program | |
JP5099953B2 (en) | Generation of unified task-dependent language model by information retrieval method | |
US6681206B1 (en) | Method for generating morphemes | |
KR101143030B1 (en) | Discriminative training of language models for text and speech classification | |
US8200491B2 (en) | Method and system for automatically detecting morphemes in a task classification system using lattices | |
JP7162648B2 (en) | Systems and methods for intent discovery from multimedia conversations | |
JP3768205B2 (en) | Morphological analyzer, morphological analysis method, and morphological analysis program | |
JP3481497B2 (en) | Method and apparatus using a decision tree to generate and evaluate multiple pronunciations for spelled words | |
JP2007256836A (en) | Voice recognition apparatus, voice recognition method and voice recognition program | |
JP2008134475A (en) | Technique for recognizing accent of input voice | |
JP2006243728A (en) | Method for converting phoneme to text, and its computer system and computer program | |
Neubig et al. | Bayesian learning of a language model from continuous speech | |
AU2022263497A1 (en) | Systems and methods for adaptive proper name entity recognition and understanding | |
CN113901079A (en) | System and method for content-based medical macro classification and search system | |
EP2329489A1 (en) | Stochastic phoneme and accent generation using accent class | |
KR101410601B1 (en) | Spoken dialogue system using humor utterance and method thereof | |
TW201822190A (en) | Speech recognition system and method thereof, vocabulary establishing method and computer program product | |
JP5097802B2 (en) | Japanese automatic recommendation system and method using romaji conversion | |
JP2008242607A (en) | Device, method and program for selecting proper candidate from language processing result |