JP5295576B2 - Natural language analysis apparatus, natural language analysis method, and natural language analysis program - Google Patents

Natural language analysis apparatus, natural language analysis method, and natural language analysis program Download PDF

Info

Publication number
JP5295576B2
JP5295576B2 JP2008014133A JP2008014133A JP5295576B2 JP 5295576 B2 JP5295576 B2 JP 5295576B2 JP 2008014133 A JP2008014133 A JP 2008014133A JP 2008014133 A JP2008014133 A JP 2008014133A JP 5295576 B2 JP5295576 B2 JP 5295576B2
Authority
JP
Japan
Prior art keywords
dependency
word
destination candidate
type
destination
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2008014133A
Other languages
Japanese (ja)
Other versions
JP2009176062A (en
Inventor
学 颯々野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yahoo Japan Corp
Original Assignee
Yahoo Japan Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yahoo Japan Corp filed Critical Yahoo Japan Corp
Priority to JP2008014133A priority Critical patent/JP5295576B2/en
Publication of JP2009176062A publication Critical patent/JP2009176062A/en
Application granted granted Critical
Publication of JP5295576B2 publication Critical patent/JP5295576B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Machine Translation (AREA)
  • Document Processing Apparatus (AREA)

Description

本発明は、文節に区切ることが可能で、文節間の係り受け関係が存在する、日本語等の自然言語文の解析技術に関する。   The present invention relates to a technique for analyzing a natural language sentence such as Japanese, which can be divided into phrases and has a dependency relationship between phrases.

日本語の文の解析では、形態素解析を行った単語(形態素)列を文節としてまとめ、その文節間の係り受け関係(依存関係)で解析結果を表現するのが主流である。この場合、係り受け解析の手法としては、係り受け関係の解析を行う前段の処理として、形態素列を文節にまとめ上げておくことが必要である(例えば、特許文献1、非特許文献1を参照)。
特開2004−310638号公報 Manabu Sassano. 2004. "Linear-time dependency analysis for Japanese", COLING 2004. 颯々野学. 2007."日本語係り受け解析の線形時間アルゴリズム",自然言語処理 ,Vol.14, No.1, pp. 3 - 18.
In the analysis of Japanese sentences, it is the mainstream to summarize the word (morpheme) strings that have been subjected to morphological analysis as clauses and to express the analysis results by the dependency relationship (dependency relationship) between the clauses. In this case, as a method of dependency analysis, it is necessary to collect morpheme strings into clauses as a previous process for performing dependency relationship analysis (see, for example, Patent Document 1 and Non-Patent Document 1). ).
JP 2004-310638 A Manabu Sassano. 2004. "Linear-time dependency analysis for Japanese", COLING 2004. Manabu Sugano. 2007. "Linear time algorithm for Japanese dependency analysis", Natural language processing, Vol.14, No.1, pp 3-18.

上述したように、従来は形態素解析処理の他に、文節にまとめ上げる処理と係り受け解析処理の2段階の処理が必要であったため、次のような問題点が指摘されていた。
(1)文節をまとめるための処理モジュールと、文節間の係り受け関係を解析する処理モジュールとが別途必要になり、プログラムの開発およびメンテナンスが困難となる。
(2)文節にまとめ上げる処理と係り受け解析処理とで、文を何度もスキャン(読取)する必要があり、処理が遅くなる。
As described above, conventionally, in addition to morphological analysis processing, processing in two steps, that is, processing for grouping into clauses and dependency analysis processing, is required, and the following problems have been pointed out.
(1) A processing module for grouping clauses and a processing module for analyzing dependency relations between clauses are separately required, and program development and maintenance become difficult.
(2) It is necessary to scan (read) a sentence many times in the process of grouping it into phrases and the dependency analysis process, which slows down the process.

本発明は上記の従来の問題点に鑑み提案されたものであり、その目的とするところは、単一の処理モジュールで文節にまとめ上げる処理と係り受け解析処理とを同時に行うことができ、文のスキャンを一度で済むようにして処理を速めることのできる自然言語解析装置、自然言語解析方法および自然言語解析プログラムを提供することにある。   The present invention has been proposed in view of the above-described conventional problems, and the object of the present invention is to simultaneously perform the processing of grouping into clauses and dependency analysis processing with a single processing module. It is an object of the present invention to provide a natural language analysis apparatus, a natural language analysis method, and a natural language analysis program capable of speeding up the processing by performing one scan only.

上記の課題を解決するため、本発明にあっては、請求項1に記載されるように、文節に区切ることが可能で、文節間の係り受け関係が存在する自然言語文を解析する自然言語解析装置であって、解析対象の文を形態素に分解する形態素解析手段と、形態素列の各単語間の依存関係を決定してくことで、文節のまとめ上げと係り受け解析とを行う文節まとめ上げ係り受け解析手段とを備え、前記文節まとめ上げ係り受け解析手段は、処理の開始時に、依存先未決スタックに初期値「0」をプッシュし、依存先候補単語IDを初期値「1」に設定し、次いで、終了条件判断処理として、依存先候補単語IDが文末の単語IDより大きいか否か判断し、大きいと判断した場合は処理を終了し、大きくないと判断した場合、依存先未決スタックからポップした値を依存元単語IDに設定し、次いで、依存元単語ID判断処理として、依存元単語IDがNULLであるか否か判断し、NULLではないと判断した場合、依存元単語と依存先候補単語の依存関係を解析して、依存元単語と依存先候補単語が同一文節を構成することを示すタイプB、依存元単語が末尾となる文節が、依存先候補単語が末尾となる文節に係ることを示すタイプD、上記以外の場合であることを示すタイプOのいずれであるかを判定し、次いで、タイプ判断処理として、判定結果がタイプB、Dのいずれかであるか否か判断し、タイプB、Dのいずれかであると判断した場合、依存元単語の依存先に依存先候補単語IDを設定し、依存元単語のタイプに判定結果を設定し、依存元単語IDを依存先未決スタックからポップした値で更新し、前記依存元単語ID判断処理に移行し、前記依存元単語ID判断処理で依存元単語IDがNULLであると判断した場合、依存先未決スタックに依依存先候補単語IDをプッシュし、依存先候補単語IDをインクリメントし、前記終了条件判断処理に移行し、前記タイプ判断処理で判定結果がタイプOである場合、依存先未決スタックに依存元単語IDをプッシュし、依存先未決スタックに依依存先候補単語IDをプッシュし、依存先候補単語IDをインクリメントし、前記終了条件判断処理に移行する自然言語解析装置を要旨としている。 In order to solve the above-described problem, in the present invention, as described in claim 1, a natural language that analyzes a natural language sentence that can be divided into phrases and has a dependency relationship between phrases exists. a analyzer clauses performed decomposing morphological analysis means statements analyzed into morphemes, in Kukoto has determined the dependencies between each word morpheme strings, and a receiving dependency collectively raise clause analysis A grouping dependency analysis unit, and the phrase grouping dependency analysis unit pushes an initial value “0” to the dependency destination pending stack at the start of processing, and sets the dependency destination candidate word ID to an initial value “1”. Then, as an end condition determination process, it is determined whether or not the dependence destination candidate word ID is larger than the word ID at the end of the sentence. If it is determined to be large, the process is terminated. From pending stack If the dependency source word ID is NULL as a dependency source word ID determination process, and it is determined that the dependency source word ID is not NULL, Type B indicating that the dependency source word and the dependency destination candidate word constitute the same clause by analyzing the dependency relationship of the destination candidate word, and the clause whose dependency source word is the end, the clause whose dependency destination candidate word is the end It is determined whether it is type D indicating that it is related to the above, or type O indicating that it is a case other than the above, and then, as a type determination process, whether the determination result is either type B or D If it is determined that it is either type B or D, the dependency destination candidate word ID is set to the dependency destination of the dependency source word, the determination result is set to the type of the dependency source word, and the dependency source word ID is set to From the dependency pending stack When the dependence source word ID judgment process determines that the dependence source word ID is NULL, the dependence destination candidate word is added to the dependence destination pending stack. Push the ID, increment the dependence destination candidate word ID, proceed to the end condition judgment processing, and when the judgment result is type O in the type judgment processing, push the dependence source word ID to the dependence destination pending stack, The gist of the invention is a natural language analyzer that pushes a dependence destination candidate word ID to the dependence destination pending stack, increments the dependence destination candidate word ID, and proceeds to the end condition determination processing .

また、請求項2に記載されるように、請求項1に記載の自然言語解析装置において、前記文節まとめ上げ係り受け解析手段における依存関係の判定は、依存元および依存先候補の単語の品詞、位置関係等の条件に応じた判定結果のタイプを対応付けた文法定義テーブルに基づいて行うようにすることができる。   Also, as described in claim 2, in the natural language analysis apparatus according to claim 1, the determination of the dependency relationship in the phrase grouping dependency analysis unit is performed by determining the part of speech of the dependency source and dependency destination candidate words, It can be performed based on a grammar definition table in which types of determination results corresponding to conditions such as positional relationships are associated.

また、請求項3に記載されるように、請求項1に記載の自然言語解析装置において、前記文節まとめ上げ係り受け解析手段における依存関係の判定は、SVMにより機械学習された文法ルールに基づいて行うようにすることができる。   Also, as described in claim 3, in the natural language analysis device according to claim 1, the determination of the dependency in the phrase grouping dependency analysis unit is based on a grammar rule machine-learned by SVM. Can be done.

また、請求項4に記載されるように、自然言語解析装置が実行する方法であって、文節に区切ることが可能で、文節間の係り受け関係が存在する自然言語文を解析する自然言語解析方法であって、解析対象の文を形態素に分解する形態素解析工程と、形態素列の各単語間の依存関係を決定してくことで、文節のまとめ上げと係り受け解析とを行う文節まとめ上げ係り受け解析工程とを備え、前記文節まとめ上げ係り受け解析工程は、処理の開始時に、依存先未決スタックに初期値「0」をプッシュし、依存先候補単語IDを初期値「1」に設定し、次いで、終了条件判断処理として、依存先候補単語IDが文末の単語IDより大きいか否か判断し、大きいと判断した場合は処理を終了し、大きくないと判断した場合、依存先未決スタックからポップした値を依存元単語IDに設定し、次いで、依存元単語ID判断処理として、依存元単語IDがNULLであるか否か判断し、NULLではないと判断した場合、依存元単語と依存先候補単語の依存関係を解析して、依存元単語と依存先候補単語が同一文節を構成することを示すタイプB、依存元単語が末尾となる文節が、依存先候補単語が末尾となる文節に係ることを示すタイプD、上記以外の場合であることを示すタイプOのいずれであるかを判定し、次いで、タイプ判断処理として、判定結果がタイプB、Dのいずれかであるか否か判断し、タイプB、Dのいずれかであると判断した場合、依存元単語の依存先に依存先候補単語IDを設定し、依存元単語のタイプに判定結果を設定し、依存元単語IDを依存先未決スタックからポップした値で更新し、前記依存元単語ID判断処理に移行し、前記依存元単語ID判断処理で依存元単語IDがNULLであると判断した場合、依存先未決スタックに依依存先候補単語IDをプッシュし、依存先候補単語IDをインクリメントし、前記終了条件判断処理に移行し、前記タイプ判断処理で判定結果がタイプOである場合、依存先未決スタックに依存元単語IDをプッシュし、依存先未決スタックに依依存先候補単語IDをプッシュし、依存先候補単語IDをインクリメントし、前記終了条件判断処理に移行する自然言語解析方法として構成することができる。 According to a fourth aspect of the present invention, there is provided a natural language analysis method for executing a natural language analysis apparatus for analyzing a natural language sentence that can be divided into phrases and has a dependency relationship between phrases. a method, clause collectively performing a morphological analysis decomposing the sentence to be analyzed into morphemes, in Kukoto has determined the dependencies between each word morpheme strings, and a receiving dependency collectively raise clause analysis And the clause grouping dependency analysis step pushes the initial value “0” onto the dependency destination pending stack at the start of processing, and sets the dependency destination candidate word ID to the initial value “1”. Then, as an end condition determination process, it is determined whether or not the dependency destination candidate word ID is larger than the word ID at the end of the sentence. If it is determined to be larger, the process is terminated. Stack When the popped value is set as the dependency source word ID, and then, as the dependency source word ID determination process, it is determined whether or not the dependency source word ID is NULL, and when it is determined that the dependency source word ID is not NULL, the dependency source word and the dependency destination Analyzing the dependency relationship of the candidate word, type B indicating that the dependency source word and the dependency destination candidate word constitute the same phrase, and the phrase having the dependency source word at the end become the phrase having the dependency destination candidate word at the end It is determined whether it is type D indicating that it is related or type O indicating that it is a case other than the above, and then determining whether the determination result is either type B or D as type determination processing If it is determined that the type is either type B or D, the dependency destination candidate word ID is set as the dependency destination of the dependency source word, the determination result is set as the type of the dependency source word, and the dependency source word ID is dependent. Is it a pending stack? Update with the popped value, move to the dependency source word ID determination process, and when the dependency source word ID determination processing determines that the dependency source word ID is NULL, the dependency destination candidate word ID is added to the dependency destination pending stack , Increments the dependency destination candidate word ID, proceeds to the end condition determination processing, and when the determination result is type O in the type determination processing, pushes the dependency source word ID to the dependency destination pending stack, It can be configured as a natural language analysis method that pushes the dependence destination candidate word ID to the first pending stack, increments the dependence destination candidate word ID, and proceeds to the end condition determination processing .

また、請求項5に記載されるように、文節に区切ることが可能で、文節間の係り受け関係が存在する自然言語文を解析する自然言語解析プログラムであって、自然言語解析装置を構成するコンピュータを、解析対象の文を形態素に分解する形態素解析手段、形態素列の各単語間の依存関係を決定してくことで、文節のまとめ上げと係り受け解析とを行う文節まとめ上げ係り受け解析手段として機能させ、前記文節まとめ上げ係り受け解析手段は、処理の開始時に、依存先未決スタックに初期値「0」をプッシュし、依存先候補単語IDを初期値「1」に設定し、次いで、終了条件判断処理として、依存先候補単語IDが文末の単語IDより大きいか否か判断し、大きいと判断した場合は処理を終了し、大きくないと判断した場合、依存先未決スタックからポップした値を依存元単語IDに設定し、次いで、依存元単語ID判断処理として、依存元単語IDがNULLであるか否か判断し、NULLではないと判断した場合、依存元単語と依存先候補単語の依存関係を解析して、依存元単語と依存先候補単語が同一文節を構成することを示すタイプB、依存元単語が末尾となる文節が、依存先候補単語が末尾となる文節に係ることを示すタイプD、上記以外の場合であることを示すタイプOのいずれであるかを判定し、次いで、タイプ判断処理として、判定結果がタイプB、Dのいずれかであるか否か判断し、タイプB、Dのいずれかであると判断した場合、依存元単語の依存先に依存先候補単語IDを設定し、依存元単語のタイプに判定結果を設定し、依存元単語IDを依存先未決スタックからポップした値で更新し、前記依存元単語ID判断処理に移行し、前記依存元単語ID判断処理で依存元単語IDがNULLであると判断した場合、依存先未決スタックに依依存先候補単語IDをプッシュし、依存先候補単語IDをインクリメントし、前記終了条件判断処理に移行し、前記タイプ判断処理で判定結果がタイプOである場合、依存先未決スタックに依存元単語IDをプッシュし、依存先未決スタックに依依存先候補単語IDをプッシュし、依存先候補単語IDをインクリメントし、前記終了条件判断処理に移行する自然言語解析プログラムとして構成することができる。 According to a fifth aspect of the present invention, there is provided a natural language analysis program that analyzes a natural language sentence that can be divided into phrases and that has a dependency relationship between phrases, and constitutes a natural language analysis apparatus. the computer, morpheme degrade morphological analysis means statements analyzed, in Kukoto has determined the dependencies between each word morpheme string, receiving clauses collectively raised relates performing a receiving dependency collectively raise clause analysis The clause grouping dependency analysis unit functions as an analysis unit, pushes the initial value “0” to the dependency destination pending stack at the start of processing, sets the dependency destination candidate word ID to the initial value “1”, Next, as an end condition determination process, it is determined whether or not the dependence destination candidate word ID is larger than the word ID at the end of the sentence. If it is determined to be larger, the process is terminated. When the value popped from the stack is set as the dependency source word ID, and then, as the dependency source word ID determination process, it is determined whether or not the dependency source word ID is NULL. Analyzing the dependency relationship of the dependency destination candidate word, type B indicating that the dependency source word and the dependency destination candidate word constitute the same phrase, the phrase having the dependency source word at the end, and the dependency destination candidate word at the end It is determined whether it is type D indicating that it is related to a phrase or type O indicating a case other than the above, and then, as a type determination process, whether the determination result is either type B or D If it is determined that it is either type B or D, the dependence destination candidate word ID is set as the dependence destination of the dependence source word, the judgment result is set as the type of the dependence source word, and the dependence source word ID Dependent not yet Update with the value popped from the stack, shift to the dependency source word ID determination process, and when the dependency source word ID determination processing determines that the dependency source word ID is NULL, the dependency destination candidate is added to the dependency destination pending stack Pushes the word ID, increments the dependence destination candidate word ID, proceeds to the end condition judgment processing, and pushes the dependence source word ID to the dependence destination pending stack when the judgment result is type O in the type judgment processing The dependence destination candidate word ID is pushed onto the dependence destination undecided stack, the dependence destination candidate word ID is incremented, and the program can be configured as a natural language analysis program that shifts to the end condition determination process .

本発明の自然言語解析装置、自然言語解析方法および自然言語解析プログラムにあっては、文節まとめ上げと係り受け解析を同時に行なうことができるため、文を一度スキャンするだけでよい。そのため、文節まとめ上げと係り受け解析で独立したモジュールを必要としないとともに、処理を高速化することができる。   In the natural language analysis apparatus, the natural language analysis method, and the natural language analysis program of the present invention, the sentence grouping and dependency analysis can be performed at the same time, so it is only necessary to scan the sentence once. This eliminates the need for independent modules for sentence grouping and dependency analysis, and speeds up the processing.

以下、本発明の好適な実施形態につき説明する。   Hereinafter, preferred embodiments of the present invention will be described.

図1は本発明の一実施形態にかかる自然言語解析装置の構成例を示す図である。なお、以下では日本語を対象とした例について説明するが、文節に区切ることが可能で、文節間の係り受け関係が存在する言語であれば同様に適用することができる。   FIG. 1 is a diagram showing a configuration example of a natural language analyzing apparatus according to an embodiment of the present invention. In the following, an example for Japanese will be described. However, the present invention can be similarly applied to any language that can be divided into phrases and has a dependency relationship between phrases.

図1において、自然言語解析装置1は、解析の対象となる文を入力する解析対象文入力部101と、この解析対象文入力部101により入力された文に対して形態素解析を行い、解析結果を一文単位に解析文格納部103に格納する形態素解析部102とを備えている。解析文格納部103のデータ構造については後述する。   In FIG. 1, the natural language analyzing apparatus 1 performs an morphological analysis on an analysis target sentence input unit 101 that inputs a sentence to be analyzed, a sentence input by the analysis target sentence input unit 101, and an analysis result Is stored in the analysis sentence storage unit 103 in a sentence unit. The data structure of the analysis sentence storage unit 103 will be described later.

また、自然言語解析装置1は、解析文格納部103から一文単位に情報を読み取る一文読み取り部104と、この一文読み取り部104により読み取った情報に基づいて文節のまとめ上げと文節間の係り受け関係の解析を同時に行い、処理結果を解析文格納部103にその都度格納していく文節まとめ上げ係り受け解析部105とを備えている。   The natural language analyzing apparatus 1 also includes a one-sentence reading unit 104 that reads information in units of one sentence from the analysis sentence storage unit 103, and a grouping of phrases and a dependency relationship between phrases based on the information read by the one-sentence reading unit 104. And a phrase grouping dependency analysis unit 105 that stores the processing results in the analysis statement storage unit 103 each time.

また、自然言語解析装置1は、この文節まとめ上げ係り受け解析部105により作業用データ領域として用いられる依存元単語ID格納エリア106、依存先候補単語ID格納エリア107および依存先未決スタック108と、文節まとめ上げ係り受け解析部105の処理において単語間の依存関係の判定に用いられる依存関係判定部109と、解析結果を出力する解析結果出力部111とを備えている。依存元単語ID格納エリア106には処理過程で依存元となる単語IDを保持し、依存先候補単語ID格納エリア107は処理過程で依存先候補となる単語IDを保持し、依存先未決スタック108は依存先が決まらなかった依存元の単語IDを後入れ先出し(LIFO:Last In First Out)で保持する。   Further, the natural language analyzing apparatus 1 includes a dependency source word ID storage area 106, a dependency destination candidate word ID storage area 107, and a dependency destination undecided stack 108 that are used as a work data area by the phrase grouping dependency analysis unit 105. A dependency determination unit 109 used for determining a dependency relationship between words in the processing of the phrase grouping dependency analysis unit 105 and an analysis result output unit 111 that outputs an analysis result are provided. The dependence source word ID storage area 106 holds the word ID that becomes the dependence source in the processing process, the dependence destination candidate word ID storage area 107 holds the word ID that becomes the dependence destination candidate in the processing process, and the dependence destination pending stack 108 Holds the dependency source word ID for which the dependency destination has not been determined, in a last-in first-out (LIFO) format.

また、依存関係判定部109は文法定義テーブル110を有している。ただし、文法定義テーブル110はIF―THEN形式等のデータ構造として保持するほか、SVM(Support Vector Machine)による機械学習により生成されたモデルとして保持する場合も含む。文法定義テーブル110の例については後述する。   The dependency relationship determination unit 109 has a grammar definition table 110. However, the grammar definition table 110 is held as a data structure in the IF-THEN format or the like, and also includes a case where it is held as a model generated by machine learning using SVM (Support Vector Machine). An example of the grammar definition table 110 will be described later.

図2はSVMを用いた場合の依存関係判定部109の構成例を示す図である。   FIG. 2 is a diagram illustrating a configuration example of the dependency relationship determination unit 109 when SVM is used.

図2において、依存関係判定部109は、機械学習のための教師データを入力する教師データ入力部1091と、この教師データ入力部1091により入力された教師データに基づいてSVMにより機械学習を行う機械学習部1092と、機械学習により生成されたモデルを保持する文法ルール記憶部1093とを備えている。   In FIG. 2, a dependency relationship determination unit 109 inputs teacher data for machine learning, and a machine that performs machine learning using SVM based on teacher data input by the teacher data input unit 1091. A learning unit 1092 and a grammar rule storage unit 1093 that holds a model generated by machine learning are provided.

また、依存関係判定部109は、文節まとめ上げ係り受け解析部105(図1)から依存元単語ID、依存先候補単語IDおよび形態素列を引数に依存関係判定要求を受け付ける依存関係判定要求受付部1094と、この依存関係判定要求受付部1094で受け付けた依存関係判定要求に基づき、文法ルール記憶部1093を用いて依存関係を判定し、判定結果を文節まとめ上げ係り受け解析部105に返す依存関係判定実行部1095とを備えている。   In addition, the dependency determination unit 109 receives a dependency determination request reception unit that receives the dependency source word ID, the dependency destination candidate word ID, and the morpheme string as arguments from the phrase grouping dependency analysis unit 105 (FIG. 1). 1094 and the dependency relationship determination request received by the dependency relationship determination request receiving unit 1094, the dependency relationship is determined using the grammar rule storage unit 1093, and the determination result is returned to the phrase grouping dependency analysis unit 105 A determination execution unit 1095.

図3は解析文格納部103の例を示す図であり、一文を構成する単語(形態素)毎に、単語を識別する「単語ID」フィールドと、単語の文字列を示す「単語」フィールドと、品詞を示す「品詞」フィールドと、依存先の単語IDを示す「依存先」フィールドと、依存先の単語との依存関係のタイプを示す「タイプ」フィールドとを含んでいる。なお、構文解析が行われた直後の状態では、「単語ID」「単語」「品詞」のフィールドが埋められ、「依存先」「タイプ」のフィールドはブランクである。   FIG. 3 is a diagram illustrating an example of the analysis sentence storage unit 103. For each word (morpheme) constituting one sentence, a “word ID” field for identifying a word, a “word” field indicating a character string of the word, A “part of speech” field indicating a part of speech, a “dependence destination” field indicating a dependency destination word ID, and a “type” field indicating a type of a dependency relationship with the dependency destination word are included. In the state immediately after the parsing, the “word ID”, “word”, and “part of speech” fields are filled, and the “dependence destination” and “type” fields are blank.

図4は文法定義テーブル110の例を示す図であり、依存元および依存先候補の単語の品詞、位置関係等の条件に応じた判定結果のタイプが対応付けられている。ここでは、「依存元単語が名詞(普通名詞、人名等) AND 依存先候補単語が格助詞 AND 依存元単語の直後に依存先候補単語」等の場合に「依存元単語と依存先候補単語が同一文節を構成」することを示すタイプ「B」が、「依存元単語が格助詞 AND 依存先候補単語が動詞」もしくは「依存元単語が連体詞 AND 依存先候補単語が格助詞」等の場合に「依存元単語が末尾となる文節が、依存先候補単語が末尾となる文節に係る」ことを示すタイプ「D」、上記以外の場合(例:依存元単語が格助詞 AND 依存先候補単語が格助詞等)であることを示すタイプ「O」が設定されている。   FIG. 4 is a diagram showing an example of the grammar definition table 110, in which types of determination results corresponding to conditions such as part of speech and positional relationship of words of dependence source and dependence destination candidates are associated. Here, when the source word is a noun (common noun, personal name, etc.) AND the destination candidate word is a case particle AND the destination candidate word immediately after the source word, etc. When the type “B” indicating that “the same phrase is composed” is “the dependent word is a case particle AND the dependent candidate word is a verb” or “the dependent word is a conjunction particle and the dependent candidate word is a case particle”, etc. Type “D” indicating that “the clause whose dependency source word ends is related to the clause whose dependency destination candidate word ends”, in cases other than the above (for example, the dependency source word is a case particle AND the dependency destination candidate word is A type “O” is set to indicate a case particle.

図5は文節まとめ上げ係り受け解析部105の処理例を示すフローチャートである。   FIG. 5 is a flowchart showing a processing example of the phrase grouping dependency analysis unit 105.

図5において、ステップS1、S2は依存先未決スタック108および依存先候補単語ID格納エリア107への初期値設定処理であり、ステップS3は終了条件判断処理である。ステップS3では、依存先候補単語IDが文末の単語IDよりも大きくなった場合、文末まで処理したものとして、文節まとめ上げ係り受け解析処理を終了する。   In FIG. 5, steps S1 and S2 are initial value setting processing for the dependency destination pending stack 108 and the dependency destination candidate word ID storage area 107, and step S3 is end condition determination processing. In step S3, when the dependence destination candidate word ID is larger than the word ID at the end of the sentence, the sentence grouping dependency analysis process is terminated as it is processed up to the end of the sentence.

ステップS4は、依存先未決スタック108から依存元単語ID格納エリア106への依存元単語IDの設定処理である。依存先未決スタック108に単語IDが積まれていない場合、依存元単語IDはNULL(以下の例では「−1」)となる。   Step S4 is a process of setting the dependence source word ID from the dependence destination pending stack 108 to the dependence source word ID storage area 106. When no word ID is stacked on the dependence-destination pending stack 108, the dependence-source word ID is NULL (“−1” in the following example).

ステップS5は依存先未決スタック108からポップ(pop)した依存元単語ID格納エリア106の依存元単語IDがNULLであるか否かによる分岐処理である。依存元単語IDがNULLの場合、ステップS13で依存先未決スタック108に依存先候補単語ID格納エリア107の依存先候補単語IDをプッシュ(push)し、ステップS14で依存先候補単語ID格納エリア107の依存先候補単語IDをインクリメント(1加算)し、ステップS3に戻る。   Step S5 is a branching process depending on whether or not the dependency source word ID of the dependency source word ID storage area 106 popped from the dependency destination pending stack 108 is NULL. When the dependence source word ID is NULL, the dependence destination candidate word ID of the dependence destination candidate word ID storage area 107 is pushed onto the dependence destination pending stack 108 in step S13, and the dependence destination candidate word ID storage area 107 is pushed in step S14. Is incremented (added by 1), and the process returns to step S3.

ステップS6は依存関係判定部109による依存関係判定処理である。依存関係判定部109は文法定義テーブル110(文法ルール記憶部1093のモデルによる場合を含む)に基づいて依存元の単語と依存先候補の単語の依存関係を判定し、判定結果のタイプを返す。   Step S 6 is a dependency determination process performed by the dependency determination unit 109. The dependency relationship determination unit 109 determines the dependency relationship between the dependency source word and the dependency destination candidate word based on the grammar definition table 110 (including the case based on the model of the grammar rule storage unit 1093), and returns the determination result type.

ステップS7は依存関係判定結果のタイプによる分岐処理であり、タイプ「B」「D」の場合は依存関係が決定されたものとして、ステップS8で解析文格納部103の依存元単語に対応する「依存先」フィールドに依存先候補単語IDを設定し、ステップS9で「タイプ」フィールドに判定結果のタイプを設定し、ステップS10で依存元単語ID格納エリア106の依存元単語IDを依存先未決スタック108からポップした値で更新し、ステップS5に戻る。   Step S7 is a branching process depending on the type of the dependency determination result. In the case of types “B” and “D”, it is assumed that the dependency is determined, and “S” corresponds to the dependency source word in the analysis sentence storage unit 103 in step S8. The dependency destination candidate word ID is set in the “dependence destination” field, the type of the determination result is set in the “type” field in step S9, and the dependency source word ID in the dependency source word ID storage area 106 is set in the dependency destination pending stack in step S10. Update with the value popped from 108, and return to step S5.

タイプ「B」「D」以外の場合は依存関係が決定されなかったものとして、ステップS11で依存元単語ID格納エリア106の依存元単語IDがNULL以外であるか否か判断し、NULL以外であればステップS12で依存先未決スタック108に依存元単語ID格納エリア106の依存元単語IDをプッシュする。その後、ステップS13で依存先未決スタック108に依存先候補単語ID格納エリア107の依存先候補単語IDをプッシュし、ステップS14で依存先候補単語ID格納エリア107の依存先候補単語IDをインクリメントし、ステップS3に戻る。   In cases other than the types “B” and “D”, it is determined that the dependency relationship has not been determined. In step S11, it is determined whether or not the dependency source word ID in the dependency source word ID storage area 106 is other than NULL. If there is, the dependence source word ID of the dependence source word ID storage area 106 is pushed onto the dependence destination pending stack 108 in step S12. Thereafter, in step S13, the dependency destination candidate word ID in the dependency destination candidate word ID storage area 107 is pushed onto the dependency destination pending stack 108, and in step S14, the dependency destination candidate word ID in the dependency destination candidate word ID storage area 107 is incremented. Return to step S3.

以下、形態素解析結果「健/が/彼女/に/あの/本/を/あげた」(図3)という具体例について、図6〜図8を用いて図5の処理を説明する。   In the following, a specific example of the morphological analysis result “ken / ga / her / ni / that / book / lifted” (FIG. 3) will be described with reference to FIGS.

図5において、文節まとめ上げ係り受け解析部105は処理を開始すると、依存先未決スタック108に初期値として「0」をプッシュし(ステップS1)、依存先候補単語ID格納エリア107の依存先候補単語IDを初期値「1」に設定する(ステップS2)。この状態を図6(a)に示している。   In FIG. 5, when starting the processing, the phrase grouping dependency analysis unit 105 pushes “0” as an initial value to the dependency destination pending stack 108 (step S1), and the dependency destination candidate in the dependency destination candidate word ID storage area 107 is pushed. The word ID is set to an initial value “1” (step S2). This state is shown in FIG.

図5に戻り、文節まとめ上げ係り受け解析部105は依存先候補単語ID格納エリア107の依存先候補単語IDが解析文格納部103の文末の単語IDより大きいか否か判断するが(ステップS3)、この時点で依存先候補単語IDは「1」、文末の単語IDは「7」であるため、依存先候補単語IDが文末の単語IDより大きくないと判断する(ステップS3のNo)。   Returning to FIG. 5, the phrase grouping dependency analysis unit 105 determines whether or not the dependence destination candidate word ID in the dependence destination candidate word ID storage area 107 is larger than the word ID at the end of the sentence in the analysis sentence storage unit 103 (step S3). At this time, the dependence destination candidate word ID is “1” and the word ID at the end of the sentence is “7”, so it is determined that the dependence destination candidate word ID is not larger than the word ID at the end of the sentence (No in step S3).

次いで、文節まとめ上げ係り受け解析部105は依存先未決スタック108からポップした値「0」を依存元単語ID格納エリア106の依存元単語IDに設定する(ステップS4)。ポップしたことで依存先未決スタック108はブランクになる。この状態を図6(b)に示している。   Next, the phrase grouping dependency analysis unit 105 sets the value “0” popped from the dependency destination pending stack 108 as the dependency source word ID in the dependency source word ID storage area 106 (step S4). By popping, the dependency-destination pending stack 108 becomes blank. This state is shown in FIG.

図5に戻り、文節まとめ上げ係り受け解析部105は依存元単語ID格納エリア106の依存元単語IDがNULLであるか否か判断するが(ステップS5)、この時点で依存元単語IDは「0」であるため、NULLではないと判断する(ステップS5のNo)。   Returning to FIG. 5, the phrase grouping dependency analysis unit 105 determines whether or not the dependency source word ID in the dependency source word ID storage area 106 is NULL (step S5). Since it is “0”, it is determined that it is not NULL (No in step S5).

次いで、文節まとめ上げ係り受け解析部105は、依存関係判定部109により、依存元単語と依存先候補単語の依存関係を解析する(ステップS6)。依存元単語「単語ID:0、単語:健、品詞:人名」と依存先候補単語「単語ID:1、単語:が、品詞:格助詞」につき、依存関係判定部109は文法定義テーブル110(図4)に基づいてタイプ「B」と判定する。   Next, the phrase grouping dependency analysis unit 105 causes the dependency relationship determination unit 109 to analyze the dependency relationship between the dependency source word and the dependency destination candidate word (step S6). For the dependence source word “word ID: 0, word: health, part of speech: personal name” and the dependence destination candidate word “word ID: 1, word: but part of speech: case particle”, the dependency relationship determination unit 109 uses the grammar definition table 110 ( Based on FIG. 4, the type “B” is determined.

次いで、文節まとめ上げ係り受け解析部105は判定結果がタイプ「B」「D」のいずれかであるか否か判断するが(ステップS7)、ここではタイプ「B」であるため、タイプ「B」「D」のいずれかであると判断する(ステップS7のYes)。   Next, the phrase grouping dependency analysis unit 105 determines whether the determination result is any of the types “B” and “D” (step S7). However, since the type is “B” here, the type “B” is determined. "D" is determined (Yes in step S7).

次いで、文節まとめ上げ係り受け解析部105は解析文格納部103の依存元単語に対応する「依存先」フィールドに依存先候補単語ID格納エリア107の依存先候補単語ID「1」を設定し(ステップS8)、「タイプ」フィールドに判定結果のタイプ「B」を設定する(ステップS9)。また、依存元単語ID格納エリア106の依存元単語IDを依存先未決スタック108からポップした値で更新するが(ステップS10)、依存先未決スタック108はブランクであるため依存元単語IDは「−1」となる。この状態を図6(c)に示している。   Next, the phrase grouping dependency analysis unit 105 sets the dependency destination candidate word ID “1” of the dependency destination candidate word ID storage area 107 in the “dependency destination” field corresponding to the dependency source word of the analysis sentence storage unit 103 ( In step S8), the determination result type “B” is set in the “type” field (step S9). Also, the dependency source word ID in the dependency source word ID storage area 106 is updated with the value popped from the dependency destination pending stack 108 (step S10), but the dependency source word ID is “−” because the dependency destination pending stack 108 is blank. 1 ". This state is shown in FIG.

図5に戻り、文節まとめ上げ係り受け解析部105は依存元単語ID格納エリア106の依存元単語IDがNULLであるか否か判断するが(ステップS5)、この時点で依存元単語IDは「−1」であるため、NULLであると判断する(ステップS5のYes)。これにより、文節まとめ上げ係り受け解析部105は依存先未決スタック108に依存先候補単語ID格納エリア107の依存先候補単語ID「1」をプッシュする(ステップS13)。この状態を図7(a)に示している。   Returning to FIG. 5, the phrase grouping dependency analysis unit 105 determines whether or not the dependency source word ID in the dependency source word ID storage area 106 is NULL (step S5). -1 ", it is determined to be NULL (Yes in step S5). As a result, the phrase grouping dependency analysis unit 105 pushes the dependence destination candidate word ID “1” of the dependence destination candidate word ID storage area 107 to the dependence destination pending stack 108 (step S13). This state is shown in FIG.

図5に戻り、文節まとめ上げ係り受け解析部105は依存先候補単語ID格納エリア107の依存先候補単語IDをインクリメントし、「2」とする(ステップS14)。この状態を図7(b)に示している。   Returning to FIG. 5, the phrase grouping dependency analysis unit 105 increments the dependence destination candidate word ID in the dependence destination candidate word ID storage area 107 to “2” (step S14). This state is shown in FIG.

図5に戻り、文節まとめ上げ係り受け解析部105は依存先候補単語ID格納エリア107の依存先候補単語IDが解析文格納部103の文末の単語IDより大きいか否か判断するが(ステップS3)、この時点で依存先候補単語IDは「2」、文末の単語IDは「7」であるため、依存先候補単語IDが文末の単語IDより大きくないと判断する(ステップS3のNo)。   Returning to FIG. 5, the phrase grouping dependency analysis unit 105 determines whether or not the dependence destination candidate word ID in the dependence destination candidate word ID storage area 107 is larger than the word ID at the end of the sentence in the analysis sentence storage unit 103 (step S3). At this time, the dependence destination candidate word ID is “2” and the word ID at the end of the sentence is “7”, so it is determined that the dependence destination candidate word ID is not larger than the word ID at the end of the sentence (No in step S3).

次いで、文節まとめ上げ係り受け解析部105は依存先未決スタック108からポップした値「1」を依存元単語ID格納エリア106の依存元単語IDに設定する(ステップS4)。ポップしたことで依存先未決スタック108はブランクになる。この状態を図7(c)に示している。   Next, the phrase grouping dependency analysis unit 105 sets the value “1” popped from the dependence-destination pending stack 108 as the dependence source word ID in the dependence source word ID storage area 106 (step S4). By popping, the dependency-destination pending stack 108 becomes blank. This state is shown in FIG.

図5に戻り、文節まとめ上げ係り受け解析部105は依存元単語ID格納エリア106の依存元単語IDがNULLであるか否か判断するが(ステップS5)、この時点で依存元単語IDは「1」であるため、NULLではないと判断する(ステップS5のNo)。   Returning to FIG. 5, the phrase grouping dependency analysis unit 105 determines whether or not the dependency source word ID in the dependency source word ID storage area 106 is NULL (step S5). Since it is “1”, it is determined that it is not NULL (No in step S5).

次いで、文節まとめ上げ係り受け解析部105は、依存関係判定部109により、依存元単語と依存先候補単語の依存関係を解析する(ステップS6)。依存元単語「単語ID:1、単語:が、品詞:格助詞」と依存先候補単語「単語ID:2、単語:彼女、品詞:代名詞」につき、依存関係判定部109は文法定義テーブル110(図4)に基づいてタイプ「O」と判定する。   Next, the phrase grouping dependency analysis unit 105 causes the dependency relationship determination unit 109 to analyze the dependency relationship between the dependency source word and the dependency destination candidate word (step S6). For the dependency source word “word ID: 1, word: but part of speech: case particle” and the dependency destination candidate word “word ID: 2, word: girlfriend, part of speech: pronoun”, the dependency relationship determination unit 109 uses the grammar definition table 110 ( The type is determined as “O” based on FIG.

次いで、文節まとめ上げ係り受け解析部105は判定結果がタイプ「B」「D」のいずれかであるか否か判断するが(ステップS7)、ここではタイプ「O」であるため、タイプ「B」「D」のいずれかでないと判断する(ステップS7のNo)。   Next, the phrase grouping dependency analysis unit 105 determines whether the determination result is any of the types “B” and “D” (step S7). Here, since the type is “O”, the type “B” is determined. "D" is determined (No in step S7).

次いで、文節まとめ上げ係り受け解析部105は依存元単語ID格納エリア106の依存元単語IDがNULL以外であるか否か判断するが(ステップS11)、この時点で依存元単語IDは「1」であるため、NULL以外であると判断する(ステップS11のYes)。   Next, the phrase grouping dependency analysis unit 105 determines whether or not the dependency source word ID in the dependency source word ID storage area 106 is other than NULL (step S11). At this time, the dependency source word ID is “1”. Therefore, it is determined that it is other than NULL (Yes in step S11).

次いで、文節まとめ上げ係り受け解析部105は依存先未決スタック108に依存元単語ID格納エリア106の依存元単語ID「1」をプッシュし(ステップS12)、続いて依存先未決スタック108に依存先候補単語ID格納エリア107の依存先候補単語ID「2」をプッシュする(ステップS13)。この状態を図8(a)に示している。   Next, the phrase grouping dependency analysis unit 105 pushes the dependency source word ID “1” of the dependency source word ID storage area 106 to the dependency destination pending stack 108 (step S12), and then continues to the dependency destination pending stack 108. The dependence destination candidate word ID “2” in the candidate word ID storage area 107 is pushed (step S13). This state is shown in FIG.

図5に戻り、文節まとめ上げ係り受け解析部105は依存先候補単語ID格納エリア107の依存先候補単語IDをインクリメントし、「3」とする(ステップS14)。この状態を図8(b)に示している。   Returning to FIG. 5, the phrase grouping dependency analysis unit 105 increments the dependence destination candidate word ID in the dependence destination candidate word ID storage area 107 to “3” (step S14). This state is shown in FIG.

図5に戻り、文節まとめ上げ係り受け解析部105はその後も同様に処理を進めて行き、依存先候補単語ID格納エリア107の依存先候補単語IDが解析文格納部103の文末の単語IDより大きいと判断(ステップS3のYes)されて文節まとめ上げ係り受け解析処理を終了する時点の状態を図8(c)に示す。この時点では、解析文格納部103の文末の単語以外については「依存先」「タイプ」のフィールドが埋められている。   Returning to FIG. 5, the phrase grouping dependency analysis unit 105 proceeds in the same manner thereafter, and the dependence destination candidate word ID in the dependence destination candidate word ID storage area 107 is determined from the word ID at the end of the sentence in the analysis sentence storage unit 103. FIG. 8C shows a state at the time when it is determined that the value is larger (Yes in step S3) and the phrase grouping dependency analysis process is ended. At this time, fields other than the word at the end of the sentence in the analysis sentence storage unit 103 are filled in the “dependence destination” and “type” fields.

図9は解析文格納部103の値から文節先頭および文節区切りの認識の例を示す図であり、原則としてタイプが「D」の単語の後が文節区切りとなることを示している。タイプ「D」の単語の直後で区切った各文節について、その文節内(文節末尾)でタイプ「D」を持つ単語の依存先単語が属する文節が、その文節の係り先の文節となる。   FIG. 9 is a diagram showing an example of recognition of a phrase head and a phrase break from the value in the analysis sentence storage unit 103. As a general rule, the word “D” is followed by a phrase break. For each clause delimited immediately after a word of type “D”, the clause to which the dependency destination word of the word having type “D” belongs within that clause (end of the clause) becomes the related clause of the clause.

このとき、「健が」の文節の係り先は、この文節内(末尾)のタイプ「D」を持つ単語「が」の依存先単語で表される。この「が」の依存先単語は単語IDが「7」の「あげた」であり、この文節に係ることが分かる。同様に、「あの」の文節の係り先は、「あの」の依存先単語である「を」が存在する「本を」になることが分かる。   At this time, the relation destination of the phrase “kenga” is represented by the dependency destination word of the word “ga” having the type “D” in the phrase (end). The dependence destination word of “GA” is “raised” with the word ID “7”, and it can be seen that this is related to this phrase. Similarly, it can be seen that the relationship destination of the phrase “that” becomes “book” in which “that” is the dependency destination word of “that”.

なお、タイプ「D」の単語の依存先単語が文節の末尾となっていない場合も、その依存先単語が属している文節に係っていると解釈するようにしてもよい。   Note that even when the dependence destination word of the word of type “D” is not at the end of the clause, it may be interpreted that it is related to the clause to which the dependence destination word belongs.

このように、文節まとめ上げ係り受け解析処理が終了した時点の解析文格納部103の内容は、文節と文節間の係り受け関係を示すものとなっている。すなわち、文節「健/が」が文節「あげた」に係り、文節「彼女/に」が文節「あげた」に係り、文節「あの/本/を」が文節「あげた」に係ることを示している。以上説明したように、本実施形態によれば次のような利点がある。
(1)文節をまとめるための処理モジュールと、文節間の係り受けを解析する処理モジュールとを別途用意する必要がなく、プログラムの開発およびメンテナンスを容易にすることができる。
(2)文節にまとめ上げる処理と係り受け解析処理とで、文を何度もスキャン(読取)する必要がなく、処理を速めることができる。
As described above, the contents of the analysis sentence storage unit 103 at the time when the phrase grouping dependency analysis process ends indicate the dependency relation between the phrases. In other words, the phrase “Ken / ga” is related to the phrase “raised”, the phrase “she / ni” is related to the phrase “raised”, and the phrase “that / hon / ga” is related to the phrase “raised”. Show. As described above, the present embodiment has the following advantages.
(1) There is no need to separately prepare a processing module for grouping clauses and a processing module for analyzing dependency between clauses, and program development and maintenance can be facilitated.
(2) It is not necessary to scan (read) the sentence many times by the process of grouping it into clauses and the dependency analysis process, and the process can be speeded up.

以上、本発明の好適な実施の形態により本発明を説明した。ここでは特定の具体例を示して本発明を説明したが、特許請求の範囲に定義された本発明の広範な趣旨および範囲から逸脱することなく、これら具体例に様々な修正および変更を加えることができることは明らかである。すなわち、具体例の詳細および添付の図面により本発明が限定されるものと解釈してはならない。   The present invention has been described above by the preferred embodiments of the present invention. While the invention has been described with reference to specific embodiments, various modifications and changes may be made to the embodiments without departing from the broad spirit and scope of the invention as defined in the claims. Obviously you can. In other words, the present invention should not be construed as being limited by the details of the specific examples and the accompanying drawings.

本発明の一実施形態にかかる自然言語解析装置の構成例を示す図である。It is a figure which shows the structural example of the natural language analyzer concerning one Embodiment of this invention. SVMを用いた場合の依存関係判定部の構成例を示す図である。It is a figure which shows the structural example of the dependence relationship determination part at the time of using SVM. 解析文格納部の例を示す図である。It is a figure which shows the example of an analysis sentence storage part. 文法定義テーブルの例を示す図である。It is a figure which shows the example of a grammar definition table. 文節まとめ上げ係り受け解析部の処理例を示すフローチャートである。It is a flowchart which shows the example of a process of a phrase grouping dependency analysis part. 文節まとめ上げ係り受け解析部の具体的な処理例を示す図(その1)である。It is FIG. (The 1) which shows the specific example of a process of the phrase grouping dependency analysis part. 文節まとめ上げ係り受け解析部の具体的な処理例を示す図(その2)である。It is FIG. (2) which shows the specific example of a process of the phrase grouping dependency analysis part. 文節まとめ上げ係り受け解析部の具体的な処理例を示す図(その3)である。It is FIG. (The 3) which shows the specific process example of a phrase grouping dependency analysis part. 解析文格納部の値から文節先頭および文節区切りの認識の例を示す図である。It is a figure which shows the example of recognition of a phrase head and a phrase delimiter from the value of an analysis sentence storage part.

符号の説明Explanation of symbols

1 自然言語解析装置
101 解析対象文入力部
102 形態素解析部
103 解析文格納部
104 一文読み取り部
105 文節まとめ上げ係り受け解析部
106 依存元単語ID格納エリア
107 依存先候補単語ID格納エリア
108 依存先未決スタック
109 依存関係判定部
1091 教師データ入力部
1092 機械学習部
1093 文法ルール記憶部
1094 依存関係判定要求受付部
1095 依存関係判定実行部
110 文法定義テーブル
111 解析結果出力部
DESCRIPTION OF SYMBOLS 1 Natural language analyzer 101 Analysis object sentence input part 102 Morphological analysis part 103 Analytical sentence storage part 104 Single sentence reading part 105 Phrase grouping dependency analysis part 106 Dependent word ID storage area 107 Dependent candidate word ID storage area 108 Dependent Undecided stack 109 Dependency determination unit 1091 Teacher data input unit 1092 Machine learning unit 1093 Grammar rule storage unit 1094 Dependency determination request reception unit 1095 Dependency determination execution unit 110 Grammar definition table 111 Analysis result output unit

Claims (5)

文節に区切ることが可能で、文節間の係り受け関係が存在する自然言語文を解析する自然言語解析装置であって、
解析対象の文を形態素に分解する形態素解析手段と、
形態素列の各単語間の依存関係を決定してくことで、文節のまとめ上げと係り受け解析とを行う文節まとめ上げ係り受け解析手段と
を備え、
前記文節まとめ上げ係り受け解析手段は、
処理の開始時に、依存先未決スタックに初期値「0」をプッシュし、依存先候補単語IDを初期値「1」に設定し、
次いで、終了条件判断処理として、依存先候補単語IDが文末の単語IDより大きいか否か判断し、大きいと判断した場合は処理を終了し、
大きくないと判断した場合、依存先未決スタックからポップした値を依存元単語IDに設定し、
次いで、依存元単語ID判断処理として、依存元単語IDがNULLであるか否か判断し、
NULLではないと判断した場合、依存元単語と依存先候補単語の依存関係を解析して、依存元単語と依存先候補単語が同一文節を構成することを示すタイプB、依存元単語が末尾となる文節が、依存先候補単語が末尾となる文節に係ることを示すタイプD、上記以外の場合であることを示すタイプOのいずれであるかを判定し、
次いで、タイプ判断処理として、判定結果がタイプB、Dのいずれかであるか否か判断し、
タイプB、Dのいずれかであると判断した場合、依存元単語の依存先に依存先候補単語IDを設定し、依存元単語のタイプに判定結果を設定し、依存元単語IDを依存先未決スタックからポップした値で更新し、前記依存元単語ID判断処理に移行し、
前記依存元単語ID判断処理で依存元単語IDがNULLであると判断した場合、依存先未決スタックに依依存先候補単語IDをプッシュし、依存先候補単語IDをインクリメントし、前記終了条件判断処理に移行し、
前記タイプ判断処理で判定結果がタイプOである場合、依存先未決スタックに依存元単語IDをプッシュし、依存先未決スタックに依依存先候補単語IDをプッシュし、依存先候補単語IDをインクリメントし、前記終了条件判断処理に移行する
ことを特徴とする自然言語解析装置。
A natural language analysis device that analyzes a natural language sentence that can be divided into clauses and has a dependency relationship between clauses,
Morphological analysis means for decomposing the sentence to be analyzed into morphemes;
In Kukoto has determined the dependencies between each word morpheme string, and a clause Summary up dependency parsing means for performing a receiving dependency collectively raise clause analysis,
The sentence grouping dependency analysis means is:
At the start of processing, the initial value “0” is pushed onto the dependency destination pending stack, the dependency destination candidate word ID is set to the initial value “1”,
Next, as an end condition determination process, it is determined whether or not the dependency destination candidate word ID is larger than the word ID at the end of the sentence.
If it is determined that it is not large, the value popped from the dependency destination pending stack is set as the dependency source word ID,
Next, as the dependency source word ID determination process, it is determined whether the dependency source word ID is NULL,
When it is determined that it is not NULL, the dependency relationship between the dependence source word and the dependence destination candidate word is analyzed, and the dependence source word and the dependence destination candidate word form the same phrase. Determine whether the phrase is a type D indicating that the dependence destination candidate word is related to the last sentence, or a type O indicating a case other than the above,
Next, as a type determination process, it is determined whether the determination result is either type B or D,
If it is determined that the type is either B or D, the dependency destination candidate word ID is set as the dependency destination of the dependency source word, the determination result is set as the type of the dependency source word, and the dependency source word ID is determined as the dependency destination undecided. Update with the value popped from the stack, move to the dependence source word ID determination process,
When it is determined in the dependency source word ID determination process that the dependency source word ID is NULL, the dependency destination candidate word ID is pushed onto the dependency destination pending stack, the dependency destination candidate word ID is incremented, and the end condition determination processing To
When the determination result is type O in the type determination process, the dependency source word ID is pushed to the dependency destination pending stack, the dependency destination candidate word ID is pushed to the dependency destination pending stack, and the dependency destination candidate word ID is incremented. The natural language analysis apparatus is characterized in that the process proceeds to the end condition determination process .
請求項1に記載の自然言語解析装置において、
前記文節まとめ上げ係り受け解析手段における依存関係の判定は、依存元および依存先候補の単語の品詞、位置関係等の条件に応じた判定結果のタイプを対応付けた文法定義テーブルに基づいて行う
ことを特徴とする自然言語解析装置。
The natural language analysis apparatus according to claim 1,
Dependency determination in the phrase grouping dependency analysis means is performed based on a grammar definition table that associates types of determination results corresponding to conditions such as part of speech and positional relationship of words of dependency source and dependency destination candidates. Natural language analyzer characterized by
請求項1に記載の自然言語解析装置において、
前記文節まとめ上げ係り受け解析手段における依存関係の判定は、SVMにより機械学習された文法ルールに基づいて行う
ことを特徴とする自然言語解析装置。
The natural language analysis apparatus according to claim 1,
The natural language analysis apparatus according to claim 1, wherein the determination of dependency in the phrase grouping dependency analysis unit is performed based on a grammar rule machine-learned by SVM.
自然言語解析装置が実行する方法であって、
文節に区切ることが可能で、文節間の係り受け関係が存在する自然言語文を解析する自然言語解析方法であって、
解析対象の文を形態素に分解する形態素解析工程と、
形態素列の各単語間の依存関係を決定してくことで、文節のまとめ上げと係り受け解析とを行う文節まとめ上げ係り受け解析工程と
を備え、
前記文節まとめ上げ係り受け解析工程は、
処理の開始時に、依存先未決スタックに初期値「0」をプッシュし、依存先候補単語IDを初期値「1」に設定し、
次いで、終了条件判断処理として、依存先候補単語IDが文末の単語IDより大きいか否か判断し、大きいと判断した場合は処理を終了し、
大きくないと判断した場合、依存先未決スタックからポップした値を依存元単語IDに設定し、
次いで、依存元単語ID判断処理として、依存元単語IDがNULLであるか否か判断し、
NULLではないと判断した場合、依存元単語と依存先候補単語の依存関係を解析して、依存元単語と依存先候補単語が同一文節を構成することを示すタイプB、依存元単語が末尾となる文節が、依存先候補単語が末尾となる文節に係ることを示すタイプD、上記以外の場合であることを示すタイプOのいずれであるかを判定し、
次いで、タイプ判断処理として、判定結果がタイプB、Dのいずれかであるか否か判断し、
タイプB、Dのいずれかであると判断した場合、依存元単語の依存先に依存先候補単語IDを設定し、依存元単語のタイプに判定結果を設定し、依存元単語IDを依存先未決スタックからポップした値で更新し、前記依存元単語ID判断処理に移行し、
前記依存元単語ID判断処理で依存元単語IDがNULLであると判断した場合、依存先未決スタックに依依存先候補単語IDをプッシュし、依存先候補単語IDをインクリメントし、前記終了条件判断処理に移行し、
前記タイプ判断処理で判定結果がタイプOである場合、依存先未決スタックに依存元単語IDをプッシュし、依存先未決スタックに依依存先候補単語IDをプッシュし、依存先候補単語IDをインクリメントし、前記終了条件判断処理に移行する
ことを特徴とする自然言語解析方法。
A method performed by a natural language analyzer,
A natural language analysis method for analyzing a natural language sentence that can be divided into clauses and has a dependency relationship between clauses,
A morphological analysis process for decomposing the sentence to be analyzed into morphemes;
In Kukoto has determined the dependencies between each word morpheme string, and a clause Summary up dependency parsing step of performing a receiving dependency collectively raise clause analysis,
The sentence grouping dependency analysis process is as follows.
At the start of processing, the initial value “0” is pushed onto the dependency destination pending stack, the dependency destination candidate word ID is set to the initial value “1”,
Next, as an end condition determination process, it is determined whether or not the dependency destination candidate word ID is larger than the word ID at the end of the sentence.
If it is determined that it is not large, the value popped from the dependency destination pending stack is set as the dependency source word ID,
Next, as the dependency source word ID determination process, it is determined whether the dependency source word ID is NULL,
When it is determined that it is not NULL, the dependency relationship between the dependence source word and the dependence destination candidate word is analyzed, and the dependence source word and the dependence destination candidate word form the same phrase. Determine whether the phrase is a type D indicating that the dependence destination candidate word is related to the last sentence, or a type O indicating a case other than the above,
Next, as a type determination process, it is determined whether the determination result is either type B or D,
If it is determined that the type is either B or D, the dependency destination candidate word ID is set as the dependency destination of the dependency source word, the determination result is set as the type of the dependency source word, and the dependency source word ID is determined as the dependency destination undecided. Update with the value popped from the stack, move to the dependence source word ID determination process,
When it is determined in the dependency source word ID determination process that the dependency source word ID is NULL, the dependency destination candidate word ID is pushed onto the dependency destination pending stack, the dependency destination candidate word ID is incremented, and the end condition determination processing To
When the determination result is type O in the type determination process, the dependency source word ID is pushed to the dependency destination pending stack, the dependency destination candidate word ID is pushed to the dependency destination pending stack, and the dependency destination candidate word ID is incremented. The natural language analysis method is characterized in that the process proceeds to the end condition determination process .
文節に区切ることが可能で、文節間の係り受け関係が存在する自然言語文を解析する自然言語解析プログラムであって、
自然言語解析装置を構成するコンピュータを、
解析対象の文を形態素に分解する形態素解析手段、
形態素列の各単語間の依存関係を決定してくことで、文節のまとめ上げと係り受け解析とを行う文節まとめ上げ係り受け解析手段
として機能させ、
前記文節まとめ上げ係り受け解析手段は、
処理の開始時に、依存先未決スタックに初期値「0」をプッシュし、依存先候補単語IDを初期値「1」に設定し、
次いで、終了条件判断処理として、依存先候補単語IDが文末の単語IDより大きいか否か判断し、大きいと判断した場合は処理を終了し、
大きくないと判断した場合、依存先未決スタックからポップした値を依存元単語IDに設定し、
次いで、依存元単語ID判断処理として、依存元単語IDがNULLであるか否か判断し、
NULLではないと判断した場合、依存元単語と依存先候補単語の依存関係を解析して、依存元単語と依存先候補単語が同一文節を構成することを示すタイプB、依存元単語が末尾となる文節が、依存先候補単語が末尾となる文節に係ることを示すタイプD、上記以外の場合であることを示すタイプOのいずれであるかを判定し、
次いで、タイプ判断処理として、判定結果がタイプB、Dのいずれかであるか否か判断し、
タイプB、Dのいずれかであると判断した場合、依存元単語の依存先に依存先候補単語IDを設定し、依存元単語のタイプに判定結果を設定し、依存元単語IDを依存先未決スタックからポップした値で更新し、前記依存元単語ID判断処理に移行し、
前記依存元単語ID判断処理で依存元単語IDがNULLであると判断した場合、依存先未決スタックに依依存先候補単語IDをプッシュし、依存先候補単語IDをインクリメントし、前記終了条件判断処理に移行し、
前記タイプ判断処理で判定結果がタイプOである場合、依存先未決スタックに依存元単語IDをプッシュし、依存先未決スタックに依依存先候補単語IDをプッシュし、依存先候補単語IDをインクリメントし、前記終了条件判断処理に移行する
自然言語解析プログラム。
A natural language analysis program that analyzes a natural language sentence that can be divided into clauses and has a dependency relationship between clauses,
The computer that constitutes the natural language analyzer
Morphological analysis means for decomposing the sentence to be analyzed into morphemes,
In Kukoto has determined the dependencies between each word morpheme string, to function as a clause Summary up dependency parsing means for performing a receiving dependency collectively raise clause analysis,
The sentence grouping dependency analysis means is:
At the start of processing, the initial value “0” is pushed onto the dependency destination pending stack, the dependency destination candidate word ID is set to the initial value “1”,
Next, as an end condition determination process, it is determined whether or not the dependency destination candidate word ID is larger than the word ID at the end of the sentence.
If it is determined that it is not large, the value popped from the dependency destination pending stack is set as the dependency source word ID,
Next, as the dependency source word ID determination process, it is determined whether the dependency source word ID is NULL,
When it is determined that it is not NULL, the dependency relationship between the dependence source word and the dependence destination candidate word is analyzed, and the dependence source word and the dependence destination candidate word form the same phrase. Determine whether the phrase is a type D indicating that the dependence destination candidate word is related to the last sentence, or a type O indicating a case other than the above,
Next, as a type determination process, it is determined whether the determination result is either type B or D,
If it is determined that the type is either B or D, the dependency destination candidate word ID is set as the dependency destination of the dependency source word, the determination result is set as the type of the dependency source word, and the dependency source word ID is determined as the dependency destination undecided. Update with the value popped from the stack, move to the dependence source word ID determination process,
When it is determined in the dependency source word ID determination process that the dependency source word ID is NULL, the dependency destination candidate word ID is pushed onto the dependency destination pending stack, the dependency destination candidate word ID is incremented, and the end condition determination processing To
When the determination result is type O in the type determination process, the dependency source word ID is pushed to the dependency destination pending stack, the dependency destination candidate word ID is pushed to the dependency destination pending stack, and the dependency destination candidate word ID is incremented. Then, the program proceeds to the end condition determination process .
JP2008014133A 2008-01-24 2008-01-24 Natural language analysis apparatus, natural language analysis method, and natural language analysis program Active JP5295576B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008014133A JP5295576B2 (en) 2008-01-24 2008-01-24 Natural language analysis apparatus, natural language analysis method, and natural language analysis program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008014133A JP5295576B2 (en) 2008-01-24 2008-01-24 Natural language analysis apparatus, natural language analysis method, and natural language analysis program

Publications (2)

Publication Number Publication Date
JP2009176062A JP2009176062A (en) 2009-08-06
JP5295576B2 true JP5295576B2 (en) 2013-09-18

Family

ID=41031074

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008014133A Active JP5295576B2 (en) 2008-01-24 2008-01-24 Natural language analysis apparatus, natural language analysis method, and natural language analysis program

Country Status (1)

Country Link
JP (1) JP5295576B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5302922B2 (en) * 2010-03-19 2013-10-02 ヤフー株式会社 Natural language analysis apparatus, method and program
US9436676B1 (en) 2014-11-25 2016-09-06 Truthful Speaking, Inc. Written word refinement system and method

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02165378A (en) * 1988-12-20 1990-06-26 Csk Corp Machine translation system
JPH03137771A (en) * 1989-10-24 1991-06-12 Ricoh Co Ltd Syntax analyzer
JP3251032B2 (en) * 1991-06-20 2002-01-28 株式会社シーエスケイ Japanese analyzer
JPH05210697A (en) * 1991-07-03 1993-08-20 Csk Corp Japanese-language syntax analyzing system
JP3339006B2 (en) * 1992-08-20 2002-10-28 株式会社シーエスケイ Parallel Noun Phrase Processor in Machine Translation Equipment
JPH06131390A (en) * 1992-10-20 1994-05-13 Csk Corp Natural language analyzing device
JP3694771B2 (en) * 1995-03-10 2005-09-14 株式会社Csk Natural language parser
JP3377942B2 (en) * 1998-01-09 2003-02-17 シャープ株式会社 Electronic dictionary search device and computer-readable storage medium storing electronic dictionary search device control program

Also Published As

Publication number Publication date
JP2009176062A (en) 2009-08-06

Similar Documents

Publication Publication Date Title
US10909303B2 (en) Adapting tabular data for narration
US7636657B2 (en) Method and apparatus for automatic grammar generation from data entries
US8538743B2 (en) Disambiguating text that is to be converted to speech using configurable lexeme based rules
CN108614898A (en) Document method and device for analyzing
US9213690B2 (en) Method, system, and appartus for selecting an acronym expansion
JP2007265458A (en) Method and computer for generating a plurality of compression options
Graliński et al. PSI-toolkit: A natural language processing pipeline
US20140244676A1 (en) Discovering Title Information for Structured Data in a Document
Chungku et al. Building NLP resources for Dzongkha: a tagset and a tagged corpus
JP5295576B2 (en) Natural language analysis apparatus, natural language analysis method, and natural language analysis program
JP4361299B2 (en) Evaluation expression extraction apparatus, program, and storage medium
US8977538B2 (en) Constructing and analyzing a word graph
JP2010092169A (en) Information processing apparatus and program
JP2009128967A (en) Document retrieval apparatus
JP4007413B2 (en) Natural language processing system, natural language processing method, and computer program
JP5795302B2 (en) Morphological analyzer, method, and program
JP2632806B2 (en) Language analyzer
JP4033089B2 (en) Natural language processing system, natural language processing method, and computer program
US11314725B2 (en) Integrated review and revision of digital content
JP3767180B2 (en) Document structure analysis method and apparatus, and storage medium storing document structure analysis program
Ouersighni Robust rule-based approach in Arabic processing
CN114003733B (en) Data enhancement method and system applied to power text
US20240005098A1 (en) Method of using open-domain information for understanding context of temporal relation information
Tnaji et al. A light Arabic POS Tagger using a hybrid approach
JP5302922B2 (en) Natural language analysis apparatus, method and program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111216

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120117

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120314

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120925

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121126

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130528

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130612

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5295576

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350