Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6482084B2 - Grammar rule filter model learning device, grammar rule filter device, syntax analysis device, and program - Google Patents
[go: Go Back, main page]

JP6482084B2 - Grammar rule filter model learning device, grammar rule filter device, syntax analysis device, and program - Google Patents

Grammar rule filter model learning device, grammar rule filter device, syntax analysis device, and program Download PDF

Info

Publication number
JP6482084B2
JP6482084B2 JP2016029211A JP2016029211A JP6482084B2 JP 6482084 B2 JP6482084 B2 JP 6482084B2 JP 2016029211 A JP2016029211 A JP 2016029211A JP 2016029211 A JP2016029211 A JP 2016029211A JP 6482084 B2 JP6482084 B2 JP 6482084B2
Authority
JP
Japan
Prior art keywords
grammar
rule
syntax tree
sentence
label
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
JP2016029211A
Other languages
Japanese (ja)
Other versions
JP2017146855A (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.)
Tokyo Institute of Technology NUC
NTT Inc
NTT Inc USA
Original Assignee
Nippon Telegraph and Telephone Corp
Tokyo Institute of Technology NUC
NTT Inc USA
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 Nippon Telegraph and Telephone Corp, Tokyo Institute of Technology NUC, NTT Inc USA filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2016029211A priority Critical patent/JP6482084B2/en
Publication of JP2017146855A publication Critical patent/JP2017146855A/en
Application granted granted Critical
Publication of JP6482084B2 publication Critical patent/JP6482084B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Machine Translation (AREA)

Description

本発明は、文の構文解析を行うための文法規則フィルターモデル学習装置、文法規則フィルター装置、構文解析装置、及びプログラムに関するものである。   The present invention relates to a grammatical rule filter model learning device, a grammatical rule filter device, a syntax analysis device, and a program for performing sentence syntax analysis.

従来より、モデル学習装置、及び、解析装置から構成される統計的構文解析装置が知られている(非特許文献1)。モデル学習装置は、文と構文木とのペアの集合から文法規則集合、及び、モデルの重みベクトルを出力する。解析装置は、モデル学習装置で出力した文法規則集合、及び、重みベクトルを受け取り、解析したい文に対して、最も高いスコアを持つ構文木を出力する。   Conventionally, a statistical syntax analysis apparatus including a model learning apparatus and an analysis apparatus is known (Non-Patent Document 1). The model learning device outputs a grammar rule set and a model weight vector from a set of sentence-syntax tree pairs. The analysis device receives the grammar rule set and the weight vector output from the model learning device, and outputs a syntax tree having the highest score for the sentence to be analyzed.

Jenny Rose Finkel, Alex Kleeman, and Christopher D Manning. Efficient, feature-based, conditional random field parsing. In ACL, volume 46, pages 959-967, 2008.Jenny Rose Finkel, Alex Kleeman, and Christopher D Manning.Efficient, feature-based, conditional random field parsing.In ACL, volume 46, pages 959-967, 2008.

しかし、上述した従来の統計的構文解析装置では、文法規則の組み合わせにより膨大な数の解候補が考えられるため、全ての解候補をスコア付けすることは大きな計算時間を要する。   However, in the above-described conventional statistical syntax analysis apparatus, a large number of solution candidates can be considered by combining grammatical rules, so scoring all solution candidates requires a long calculation time.

本発明では、上記問題点を解決するために成されたものであり、文の構文解析を高速に行うために文法規則を減らすことができる文法規則フィルターモデル学習装置、文法規則フィルター装置、構文解析装置、及びプログラムを提供することを目的とする。   In the present invention, a grammar rule filter model learning device, a grammar rule filter device, a syntax analysis, which can reduce the grammar rules in order to perform sentence syntax analysis at high speed, is made to solve the above problems. An object is to provide an apparatus and a program.

上記目的を達成するために、本発明に係る文法規則フィルターモデル学習装置は、文xと前記文xの構文解析結果を表す構文木yとのペアの集合からなる学習データに基づいて、前記学習データの構文木yの各々について、単語を表すラベル及び品詞を表すラベルとは異なるラベルの各々を、仮想的なラベルに変換して、簡単化された構文木y ̄を生成する構文木簡単化部と、前記学習データの構文木yの各々について簡単化された構文木y ̄から文法規則r ̄の集合R ̄を抽出すると共に、前記仮想的なラベルを用いて変換された文法規則r ̄を、前記仮想的なラベルを用いた変換前の文法規則rに変換するための変換関数を生成する簡単化文法規則集合抽出部と、前記学習データの前記ペアの各々について、前記ペアの文xと前記簡単化された構文木y ̄とから抽出される特徴量のベクトルf ̄(x,y ̄)と、前記特徴量のベクトルf ̄(x,y ̄)に対応する重みベクトルw ̄とに基づいてスコアを計算し、前記スコアに応じて前記重みベクトルw ̄を更新する簡単化構文木用重みベクトル更新部と、を含んで構成されている。   To achieve the above object, the grammatical rule filter model learning device according to the present invention is based on learning data consisting of a set of pairs of a sentence x and a syntax tree y representing a syntax analysis result of the sentence x. For each of the data syntax trees y, a syntax tree simplification that generates a simplified syntax tree y ̄ by converting each label different from a label representing a word and a label representing a part of speech into a virtual label. And a set R ̄ of grammatical rules r ̄ extracted from the simplified syntax tree y ̄ for each of the learning data syntax trees y and the grammar rules r 変 換 converted using the virtual labels For each of the pair of learning data, a simplified grammar rule set extraction unit for generating a conversion function for converting the grammar rule to a pre-conversion grammar rule r using the virtual label And simplification Score based on the feature vector f ̄ (x, y ̄) extracted from the syntax tree y ̄ and the weight vector w ̄ corresponding to the feature vector f ̄ (x, y ,). And a simplified syntax tree weight vector update unit that updates the weight vector w ̄ according to the score.

本発明に係る文法規則フィルター装置は、文の構文解析結果を表す構文木yに含まれる、単語を表すラベル及び品詞を表すラベルとは異なるラベルの各々を仮想的なラベルに変換して簡単化された構文木y ̄から抽出された文法規則r ̄の集合R ̄と、文x及び前記簡単化された構文木y ̄から抽出される特徴量のベクトルf ̄(x,y ̄)に対応する予め学習された重みベクトルw ̄と、入力文xとに基づいて、基準スコアを計算するスコア計算部と、前記文法規則r ̄の集合R ̄に含まれる前記文法規則r ̄の各々について、前記重みベクトルw ̄、前記入力文x、及び前記入力文xの構文解析結果を表す、前記文法規則r ̄を含み、かつ、前記簡単化された構文木y ̄に基づいて計算されるスコアと、前記基準スコアとに応じて、前記文法規則r ̄を、前記仮想的なラベルを用いた変換前の文法規則rに変換して、前記仮想的なラベルを用いていない文法規則rの集合R´に追加する文法規則追加部とを含んで構成されている。   The grammatical rule filter device according to the present invention is simplified by converting each of a label representing a word and a label different from a label representing a part of speech included in a syntax tree y representing a sentence parsing result into a virtual label. Corresponding to a set R ̄ of grammatical rules r ̄ extracted from the parsed syntax tree y ̄, and a feature vector fx (x, y 特 徴) extracted from the sentence x and the simplified syntax tree y ̄. For each of the grammar rule r 予 め included in the set R ̄ of the grammar rule r ̄, a score calculation unit that calculates a reference score based on the previously learned weight vector w ̄ and the input sentence x A score that includes the grammar rule r ̄ that represents the weight vector w 規則, the input sentence x, and the parsing result of the input sentence x, and that is calculated based on the simplified syntax tree y ̄; , Depending on the reference score, A grammar rule adding unit that converts the legal rule r ̄ to a grammar rule r before conversion using the virtual label and adds the grammar rule r to the set R ′ of grammar rules r not using the virtual label; It is configured to include.

本発明に係る構文解析装置は、上記の文法規則フィルター装置によって得られた前記文法規則rの集合R´と、文xと前記文xの構文解析結果を表す構文木yから抽出される特徴量ベクトルf(x,y)に対応する予め学習された重みベクトルwと、前記入力文xとに基づいて、前記文法規則rの集合R´に含まれる文法規則rを用いて前記入力文xの構文解析結果を表す構文木yと前記入力文xとから抽出される特徴量のベクトルf(x,y)と、前記重みベクトルwとに基づいて計算されるスコアが最大となる、前記入力文xの構文解析結果を表す構文木y^を探索する解析部を含んで構成されている。   The syntax analysis device according to the present invention is a feature quantity extracted from the set R ′ of the grammar rules r obtained by the grammar rule filter device, the sentence x, and the syntax tree y representing the result of the syntax analysis of the sentence x. Based on the previously learned weight vector w corresponding to the vector f (x, y) and the input sentence x, the grammar rule r included in the set R ′ of the grammar rules r is used to determine the input sentence x. The input sentence having a maximum score calculated based on the feature vector f (x, y) extracted from the syntax tree y representing the parsing result and the input sentence x, and the weight vector w It includes an analysis unit that searches for a syntax tree y that represents the result of parsing x.

また、本発明のプログラムは、コンピュータを、上記の文法規則フィルターモデル学習装置、文法規則フィルター装置、又は構文解析装置を構成する各部として機能させるためのプログラムである。   The program of the present invention is a program for causing a computer to function as each unit constituting the grammar rule filter model learning device, the grammar rule filter device, or the syntax analysis device.

以上説明したように、本発明の文法規則フィルターモデル学習装置及びプログラムによれば、学習データの構文木yの各々について、簡単化された構文木y ̄を生成して、文法規則r ̄の集合R ̄を抽出し、学習データのペアの各々について、前記ペアの特徴量のベクトルf ̄(x,y ̄)と、重みベクトルw ̄とに基づいてスコアを計算し、前記スコアに応じて前記重みベクトルw ̄を更新することにより、文の構文解析を高速に行うために文法規則を減らすことができる文法規則フィルターを学習することができる。   As described above, according to the grammatical rule filter model learning apparatus and program of the present invention, a simplified syntax tree y ̄ is generated for each of the syntax trees y of learning data, and a set of grammar rules r ̄ is set. R ̄ is extracted, and for each pair of learning data, a score is calculated based on the feature vector f 特 徴 (x, y ̄) of the pair and a weight vector w ̄, and the score is calculated according to the score. By updating the weight vector w ̄, it is possible to learn a grammar rule filter that can reduce grammar rules in order to perform sentence parsing at high speed.

本発明の文法規則フィルター装置及びプログラムによれば、簡単化された構文木y ̄から抽出された文法規則r ̄の集合R ̄と、特徴量のベクトルf ̄(x,y ̄)に対応する予め学習された重みベクトルw ̄と、入力文xとに基づいて、基準スコアを計算し、前記文法規則r ̄の各々について、前記入力文xの構文解析結果を表す、前記文法規則r ̄を含む構文木y ̄に基づいて計算されるスコアと、前記基準スコアとに応じて、前記文法規則r ̄を、変換前の文法規則rに変換して、文法規則rの集合R´に追加することにより、文の構文解析を高速に行うために文法規則を減らすことができる。   According to the grammatical rule filter device and program of the present invention, it corresponds to a set R ̄ of grammatical rules r ̄ extracted from a simplified syntax tree y ̄ and a vector f 量 (x, y ̄) of feature quantities. A reference score is calculated based on the weight vector w ベ ク ト ル learned in advance and the input sentence x, and the grammar rule r ̄ representing the parsing result of the input sentence x is calculated for each of the grammar rules r ̄. The grammar rule r 構 文 is converted into the grammar rule r before conversion according to the score calculated based on the parsed tree y ̄ and the reference score, and added to the set R ′ of grammar rules r. As a result, grammar rules can be reduced in order to perform sentence parsing at high speed.

本発明の構文解析装置及びプログラムによれば、文の構文解析を高速に行うことができる。   According to the syntax analysis apparatus and program of the present invention, sentence syntax analysis can be performed at high speed.

入力となる文の一例を示す図である。It is a figure which shows an example of the sentence used as input. 構文木の一例を示す図である。It is a figure which shows an example of a syntax tree. 本発明の実施形態に係る構文解析装置の機能的構成を示すブロック図である。It is a block diagram which shows the functional structure of the syntax analysis apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る構文解析装置の学習部の構成を示すブロック図である。It is a block diagram which shows the structure of the learning part of the syntax analyzer which concerns on embodiment of this invention. 文法規則の集合の一例を示す図である。It is a figure which shows an example of the set of grammar rules. 本発明の実施形態に係る構文解析装置の規則フィルターモデル学習部の構成を示すブロック図である。It is a block diagram which shows the structure of the rule filter model learning part of the syntax analysis apparatus which concerns on embodiment of this invention. 簡単化された構文木の一例を示す図である。It is a figure which shows an example of the simplified syntax tree. 簡単化された構文木から抽出された文法規則の集合の一例を示す図である。It is a figure which shows an example of the set of the grammar rules extracted from the simplified syntax tree. 本発明の実施形態に係る構文解析装置の規則フィルター部の構成を示すブロック図である。It is a block diagram which shows the structure of the rule filter part of the syntax analyzer which concerns on embodiment of this invention. 本発明の実施形態に係る構文解析装置における規則フィルターモデル学習処理ルーチンのフローチャート図である。It is a flowchart figure of the rule filter model learning process routine in the syntax analysis apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る構文解析装置における構文解析処理ルーチンのフローチャート図である。It is a flowchart figure of the syntax analysis process routine in the syntax analysis apparatus which concerns on embodiment of this invention.

以下、図面を参照して本発明の実施形態を詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

<本実施の形態の概要>
まず、本発明の実施の形態の概要について説明する。本実施の形態は、自然言語処理などの分野で使用される統計的構文解析装置に関するものである。構文解析装置とは入力として単語列を受け取り、その単語列の構文構造を表す木構造を出力する装置である。入力となる単語列(インデックス付き)とは図1に示すような文のことをいう。これに対する構文木とは図2のようなものをいう。構文木は、単語ラベル、単語ラベルのすぐ上にのみ現れる品詞ラベル(NN、V、DTなど)、及び句ラベル(S、VP、NPなど)を使って階層的に構成される。
<Outline of the present embodiment>
First, an outline of an embodiment of the present invention will be described. The present embodiment relates to a statistical syntax analysis apparatus used in fields such as natural language processing. The syntax analysis device is a device that receives a word string as an input and outputs a tree structure representing the syntax structure of the word string. An input word string (with an index) means a sentence as shown in FIG. The syntax tree for this is as shown in FIG. The syntax tree is hierarchically constructed using a word label, a part-of-speech label (NN, V, DT, etc.) that appears only immediately above the word label, and a phrase label (S, VP, NP, etc.).

統計的構文解析装置は、文とその正解構文木のペアから成る集合(学習データ)を使って、文法規則集合、及び文と構文木のペアをスコア付けする統計モデルを予め構築する。ここでいう文法規則とは、   The statistical parsing apparatus uses a set (learning data) of a sentence and its correct syntax tree pair to build a grammar rule set and a statistical model for scoring the sentence and syntax tree pair in advance. The grammar rules here are:

NN→I NN → I

のように1つの単語を子供、1つの品詞ラベルを親とする規則、及び、 A rule with one word as a child, one part of speech label as a parent, and

S→NP VP
VP→V NP
S → NP VP
VP → V NP

のように1つ以上の品詞または句ラベルを子供とし、1つの句ラベルを親とするような規 Such that one or more parts of speech or phrase labels are children and one phrase label is the parent.

則をいう。そして、構文解析装置に文が入力されると、文法規則集合、及び、統計モデルを使って、最も高いスコアを持つ構文木を構築して出力する。出力された構文木は機械翻訳などの自然言語処理分野における応用タスクで利用される。 Say the law. When a sentence is input to the syntax analysis apparatus, a syntax tree having the highest score is constructed and output using a grammar rule set and a statistical model. The output syntax tree is used in application tasks in the field of natural language processing such as machine translation.

本実施の形態の構文解析装置は、文法規則フィルターモデル学習部、及び、文法規則フィルター部を備えて構成される。この装置は、従来技術の統計的構文解析装置に、文法規則フィルターモデル学習部、及び、文法規則フィルター部を結合した装置である。   The syntax analysis apparatus according to the present embodiment includes a grammar rule filter model learning unit and a grammar rule filter unit. This device is a device in which a grammatical rule filter model learning unit and a grammatical rule filter unit are coupled to a conventional statistical syntax analysis device.

規則フィルターモデル学習部は、文と構文木ペアの集合と、従来技術のモデル学習装置から出力された文法規則集合を受け取り、新たな文法規則集合、新たな文法規則を入力の文法規則集合の要素に変換する変換関数、重みベクトル、及び、超パラメータを出力する。   The rule filter model learning unit receives a set of sentence and syntax tree pairs and a grammar rule set output from a conventional model learning device, and inputs a new grammar rule set and a new grammar rule as elements of the grammar rule set. A conversion function, a weight vector, and a super parameter to be converted into are output.

規則フィルター部は、規則フィルターモデル学習装置の出力である新たな文法規則集合、変換関数、重みベクトル、超パラメータを受け取り、入力文に対して、フィルターされた文法規則集合を出力する。   The rule filter unit receives a new grammar rule set, a conversion function, a weight vector, and a super parameter that are output from the rule filter model learning device, and outputs a filtered grammar rule set for the input sentence.

<本発明の実施の形態に係る構文解析装置の構成>
次に、本発明の実施の形態に係る構文解析装置の構成について説明する。図3に示すように、本実施の形態に係る構文解析装置100は、CPUと、RAMと、後述する規則フィルターモデル学習処理ルーチン、及び構文解析処理ルーチンを実行するためのプログラムや各種データを記憶したROMと、を含むコンピュータで構成することが出来る。この構文解析装置100は、機能的には図3に示すように入力部10と、演算部20と、出力部90とを含んで構成されている。
<Configuration of syntax analysis apparatus according to embodiment of the present invention>
Next, the configuration of the syntax analysis apparatus according to the embodiment of the present invention will be described. As shown in FIG. 3, the syntax analysis apparatus 100 according to the present embodiment stores a CPU, a RAM, a rule filter model learning process routine, which will be described later, and a program for executing the syntax analysis process routine and various data. And a computer including a ROM. Functionally, the syntax analysis apparatus 100 includes an input unit 10, a calculation unit 20, and an output unit 90 as shown in FIG.

入力部10は、学習データとして、文と構文木のペアの集合   The input unit 10 uses a set of sentence and syntax tree pairs as learning data.

を受け付ける。ただし、(x,y)は、文xとその正解構文木yとのペアである。 Accept. However, (x, y) is a pair of sentence x and its correct syntax tree y.

また、入力部10は、構文解析の対象となる入力文xを受け付ける。   Further, the input unit 10 receives an input sentence x that is a target of syntax analysis.

演算部20は、学習部22と、文法規則記憶部24と、規則フィルターモデル学習部26と、簡易文法規則記憶部28と、規則フィルター部30と、解析部32を含んで構成されている。   The arithmetic unit 20 includes a learning unit 22, a grammar rule storage unit 24, a rule filter model learning unit 26, a simple grammar rule storage unit 28, a rule filter unit 30, and an analysis unit 32.

学習部22は、学習データに基づいて、チャート型構文解析を行うための文法規則の集合と、文xと文法規則rから抽出できる特徴量のベクトルに対応する重みベクトルとを学習する。   Based on the learning data, the learning unit 22 learns a set of grammar rules for performing chart-type syntax analysis and a weight vector corresponding to a vector of feature amounts that can be extracted from the sentence x and the grammar rule r.

ここで、チャート型構文解析について説明する。   Here, chart type syntax analysis will be described.

文xに対して、文法規則集合Rを用いて文xの構文木を構築する方法はチャート型構文解析と呼ばれる。統計的構文解析は、   A method of constructing a syntax tree of the sentence x using the grammar rule set R for the sentence x is called chart type parsing. Statistical parsing is


(1)

(1)

で定式化され、チャート型構文解析はこれを遂行する。ここで The chart type parsing accomplishes this. here

は文xに対して文法規則集合Rから構築できる構文木の候補集合、rは構文木yを構築するために使われた文法規則、f(x,r)は文xと規則rから抽出できる特徴量のベクトルを返す関数、wは各特徴量を重み付けする重みからなる重みベクトルを表す。また、f(x、y)は、構文木yに含まれる各規則rと文xとから抽出できる特徴量のベクトルf(x、r)の総和である。ただし、rは通常の文法規則ではなく、 Is a candidate set of syntax trees that can be constructed from the grammar rule set R for the sentence x, r is the grammar rule used to construct the syntax tree y, and f (x, r) can be extracted from the sentence x and the rule r A function that returns a vector of feature amounts, w represents a weight vector composed of weights for weighting each feature amount. Further, f (x, y) is the sum of feature quantity vectors f (x, r) that can be extracted from each rule r and sentence x included in the syntax tree y. However, r is not a normal grammar rule,

のように構文木上で規則がカバーするxの部分単語列のインデックスが付与された規則になっている(上の例の規則は図2のa telescope をカバーする位置で使用されていることを示す)。以下、構文木yの構築に使われた文法規則rはこのような部分単語列のインデックスが付与されているとする。 As shown in Fig. 2, the index of the partial word string of x covered by the rule is given on the syntax tree (the rule in the above example is used at the position covering a telescope in Fig. 2). Show). In the following, it is assumed that the grammatical rule r used to construct the syntax tree y is given such an index of partial word strings.

学習部22は、図4に示すように、文法規則集合抽出部220と、重みベクトル更新部222とを備えている。   As shown in FIG. 4, the learning unit 22 includes a grammar rule set extraction unit 220 and a weight vector update unit 222.

文法規則集合抽出部220は、学習データPの構文木yの各々から文法規則rの集合Rを抽出し、文法規則記憶部24に格納する。   The grammar rule set extraction unit 220 extracts a set R of grammar rules r from each of the syntax trees y of the learning data P and stores them in the grammar rule storage unit 24.

具体的には、学習データPに含まれる全ての構文木yi (1≦I≦|P|) から文法規則rを抽出する。抽出された文法規則rの集合をRと書く。例えば、図2で示した2つの構文木からは、図5に示す文法規則の集合が抽出される。 Specifically, the grammar rule r is extracted from all the syntax trees y i (1 ≦ I ≦ | P |) included in the learning data P. A set of extracted grammar rules r is written as R. For example, a set of grammar rules shown in FIG. 5 is extracted from the two syntax trees shown in FIG.

重みベクトル更新部222は、学習データPのペア(xi,yi)の各々について、当該ペアの文xiと前記構文木yiとから抽出される特徴量のベクトルf(xi,yi)と、重みベクトルwとに基づいてスコアを計算し、スコアに応じて重みベクトルwを更新する。 For each pair (x i , y i ) of the learning data P, the weight vector update unit 222 features vector f (x i , y) extracted from the sentence x i of the pair and the syntax tree y i. i ) and a weight vector w are used to calculate a score, and the weight vector w is updated according to the score.

具体的には、まず、重みベクトルwの値を全て0にする。   Specifically, first, all the values of the weight vector w are set to zero.

そして、各ペア(xi,yi)∈Pに対して、以下の(2)式に従って、文xiの構文木^yiを求める。 Then, for each pair (x i , y i ) εP, the syntax tree ^ y i of the sentence x i is obtained according to the following equation (2).


(2)

(2)

上記(2)式により構文木^yiを求めた結果、^yi≠yiのとき、文xi、構文木yi、及び上記(2)式で得られた構文木^yiを用いて、以下の(3)式に従って、重みベクトルwを更新する。 (2) As a result of seeking syntax tree ^ y i by equation ^ when y i ≠ y i, sentence x i, syntax tree y i, and the syntax tree ^ y i obtained in the above (2) The weight vector w is updated according to the following equation (3).


(3)

(3)

上記の手続きを有限回繰り返し、重みベクトル更新部222は、最終的に得られた重みベクトルwを、文法規則記憶部24に格納する。   The above procedure is repeated a finite number of times, and the weight vector update unit 222 stores the finally obtained weight vector w in the grammar rule storage unit 24.

規則フィルターモデル学習部26は、学習データPと、文法規則記憶部24に格納された文法規則rの集合Rとに基づいて、新たな文法規則の集合R ̄、新たな文法規則を入力の文法規則集合の要素に変換する変換関数、重みベクトルw ̄、及び超パラメータγを学習する。   Based on the learning data P and the set R of grammar rules r stored in the grammar rule storage unit 24, the rule filter model learning unit 26 inputs a new grammar rule set R ̄ and a new grammar rule. A conversion function, weight vector w ̄, and superparameter γ to be converted into elements of the rule set are learned.

規則フィルターモデル学習部26は、図6に示すように、構文木簡単化部260と、簡単化文法規則集合抽出部262と、簡単化構文木用重みベクトル更新部264とを備えている。   As shown in FIG. 6, the rule filter model learning unit 26 includes a syntax tree simplification unit 260, a simplified grammar rule set extraction unit 262, and a simplified syntax tree weight vector update unit 264.

構文木簡単化部260は、学習データPに基づいて、学習データPの構文木yiの各々について、単語を表すラベル及び品詞を表すラベルとは異なるラベルの各々を、仮想的なラベルXに変換して、簡単化された構文木yi ̄を生成する。 Based on the learning data P, the syntax tree simplification unit 260 converts each of the syntax tree y i of the learning data P into a virtual label X with a label different from a label representing a word and a label representing a part of speech. Transform to produce a simplified syntax tree y i  ̄.

具体的には、構文木yiに対して、単語と品詞を除く全てのラベルをXという仮想的なラベルへと変換する。この変換を構文木の簡単化と呼ぶ。図2の左図の構文木を簡単化した例を図7に示す。全ての(xi,yi)∈Pにおける構文木yiに対して、簡単化を行った結果をyi ̄とし、 Specifically, for the syntax tree y i , all labels except words and parts of speech are converted into virtual labels called X. This conversion is called syntax tree simplification. FIG. 7 shows a simplified example of the syntax tree in the left diagram of FIG. All of (x i, y i) for the syntax tree y i in ∈P, the results of the simplified and y i ¯,

とする。 And

簡単化文法規則集合抽出部262は、学習データPの構文木yiの各々について簡単化された構文木yi ̄から、文法規則r ̄の集合R ̄を抽出すると共に、文法規則記憶部24に記憶された文法規則rの集合Rを用いて、仮想的なラベルXを用いて変換された文法規則r ̄を、仮想的なラベルXを用いた変換前の文法規則rに変換するための変換関数convを生成し、文法規則r ̄の集合R ̄と変換関数convとを簡易文法規則記憶部28に格納する。 The simplified grammar rule set extraction unit 262 extracts a set R ̄ of grammar rules r ̄ from the simplified syntax tree y iに つ い for each of the syntax trees y i of the learning data P, and the grammar rule storage unit 24. Is used to convert the grammar rule r ̄ converted using the virtual label X into the grammar rule r before conversion using the virtual label X, using the set R of grammar rules r stored in FIG. A conversion function conv is generated, and a set R ̄ of grammar rules r ̄ and a conversion function conv are stored in the simple grammar rule storage unit 28.

具体的には、学習データPに含まれる全ての簡単化された構文木yi ̄ (1≦I≦|P|) から文法規則r ̄を抽出する。図7の簡単化された構文木から抽出される文法規則r ̄を、図8に示す。 Specifically, the grammatical rule r  ̄ is extracted from all the simplified syntax trees y i  ̄ (1 ≦ I ≦ | P |) included in the learning data P. FIG. 8 shows the grammar rule r ̄ extracted from the simplified syntax tree of FIG.

抽出した文法規則r ̄の集合はR ̄とする。また、このように簡単化された構文木y ̄から抽出した文法規則r ̄は、   The set of extracted grammar rules r ̄ is R ̄. Also, the grammar rule r ̄ extracted from the simplified syntax tree y ̄ is

のように、学習部22で抽出した文法規則rの集合Rの要素rと対応関係を持つ。関数conv は、仮想的なラベルXを用いて簡単化された文法規則r ̄を引数にとり、それに対応する文法規則rの集合R中の文法規則rの集合を返す関数として生成される。 As described above, there is a correspondence relationship with the element r of the set R of the grammar rules r extracted by the learning unit 22. The function conv is generated as a function that takes a simplified grammar rule r ̄ using a virtual label X as an argument and returns a set of grammar rules r in the corresponding set R of grammar rules r.

簡単化構文木用重みベクトル更新部264は、学習データPのペア(xi,yi)の各々について、当該ペア(xi,yi)の文xiと構文木簡単化部260で簡単化された構文木yi ̄とから抽出される特徴量のベクトルf ̄(x,yi ̄)と、特徴量のベクトルf ̄(x,y ̄)に対応する重みベクトルw ̄とに基づいてスコアを計算し、スコアに応じて重みベクトルw ̄を更新する。 For each pair (x i , y i ) of the learning data P, the simplified syntax tree weight vector update unit 264 is simplified by the sentence x i of the pair (x i , y i ) and the syntax tree simplification unit 260. Based on a feature vector f ̄ (x, y i  ̄) extracted from the generalized syntax tree y i 、 and a weight vector w ̄ corresponding to the feature vector f ̄ (x, y ̄). The score is calculated, and the weight vector w ベ ク ト ル is updated according to the score.

具体的には、   In particular,

及び、文法規則r ̄の集合R ̄を使って、枝狩りモデルの学習を行う。まず、重みベクトルw ̄の全ての値を0にし、超パラメータγを0から1の任意の値とする。 The branch hunting model is learned using the set R ̄ of grammatical rules r ̄. First, all values of the weight vector w are set to 0, and the super parameter γ is set to an arbitrary value from 0 to 1.

そして、各ペア(xi,yi ̄)∈Pに対して、以下の(4)式に従って、スコアtxi(γ)を計算する。 Then, for each pair (x i , y i  ̄) εP, a score tx i (γ) is calculated according to the following equation (4).


(4)
ただし、

(4)
However,

ここで、f ̄(xi,r ̄)は、文xiと簡単化された規則r ̄から抽出できる特徴量のベクトルを返す関数とする。 Here, f ̄ (x i , r ̄) is a function that returns a vector of feature values that can be extracted from the sentence x i and the simplified rule r ̄.

上記(4)式を計算した結果、スコアtxi(γ)と、重みベクトルw ̄及び特徴量のベクトルf ̄(xi,y ̄)から計算されるスコアw ̄・f ̄(xi,y ̄)とを比較して、 As a result of calculating the above equation (4), as a result of the score tx i (γ), the weight vector w ̄ and the feature vector f 量 (x i , y ̄), the score w ̄ · f ̄ (x i , y ̄)

のとき、文xi、構文木yi ̄、上記(4)式で得られた構文木yi*を用いて、以下の(5)式に従って、重みベクトルw ̄を更新する。 At this time, the weight vector w ̄ is updated according to the following equation (5) using the sentence x i , the syntax tree y i  ̄, and the syntax tree y i* obtained by the above equation (4).


(5)

(5)

ここで、   here,

であり、規則r ̄を含む構文木 And a syntax tree containing the rule r ̄

の中でスコアが最大のものを探索している。 Searching for the one with the highest score.

上記の手続きを有限回繰り返し、簡単化構文木用重みベクトル更新部264は、学習された重みベクトルw ̄を、簡易文法規則記憶部28に格納する。また、任意の値が設定された超パラメータγが、簡易文法規則記憶部28に格納される。   The above procedure is repeated a finite number of times, and the simplified syntax tree weight vector updating unit 264 stores the learned weight vector w ̄ in the simplified grammar rule storage unit 28. Further, the super parameter γ set with an arbitrary value is stored in the simple grammar rule storage unit 28.

規則フィルター部30は、入力部10で受け付けた入力文x、簡易文法規則記憶部28に記憶されている文法規則r ̄の集合R ̄、変換関数conv、重みベクトルw ̄、及び超パラメータγを入力として、入力文xに対して、フィルターされた文法規則rの集合R´を求める。   The rule filter unit 30 receives the input sentence x received by the input unit 10, the set R 集合 of grammar rules r ̄ stored in the simple grammar rule storage unit 28, the conversion function conv, the weight vector w ̄, and the super parameter γ. As an input, a set R ′ of filtered grammar rules r is obtained for the input sentence x.

規則フィルター部30は、図9に示すように、スコア計算部300と、文法規則追加部302とを備えている。   As shown in FIG. 9, the rule filter unit 30 includes a score calculation unit 300 and a grammar rule addition unit 302.

スコア計算部300は、入力文xと、文法規則r ̄の集合R ̄と、重みベクトルw ̄と、超パラメータγとに基づいて、以下の(6)式に従って、入力文xに対する基準スコアtx(γ)を計算する。 Based on the input sentence x, the set R と of grammatical rules r ̄, the weight vector w ̄, and the hyperparameter γ, the score calculation unit 300 performs the reference score t for the input sentence x according to the following equation (6). Calculate x (γ).


(6)

(6)

文法規則追加部302は、文法規則r ̄の集合R ̄に含まれる文法規則r ̄の各々について、重みベクトルw ̄、入力文x、及び入力文xの構文解析結果を表す、当該文法規則r ̄を含む構文木y ̄に基づいて計算されるビタビスコアと、基準スコアtx(γ)とに応じて、当該文法規則r ̄を、仮想的なラベルXを用いた変換前の文法規則rに変換して、仮想的なラベルXを用いていない文法規則rの集合R´に追加する。 The grammar rule adding unit 302 represents, for each grammar rule r ̄ included in the set R ̄ of grammar rules r ̄, the grammar rule r representing the weight vector w ̄, the input sentence x, and the parsing result of the input sentence x. According to the Viterbi score calculated based on the syntax tree y 木 including  ̄ and the reference score t x (γ), the grammar rule r ̄ is converted into a grammar rule r before conversion using the virtual label X. And is added to a set R ′ of grammar rules r not using the virtual label X.

具体的には、まず、集合R´を空集合で初期化する。   Specifically, first, the set R ′ is initialized with an empty set.

そして、文法規則r ̄∈R ̄の各々に対して、   And for each grammar rule r 規則 ∈R ̄,

となるとき、 When

とする。ここでr ̄は、入力文xのインデックス付きの規則であり、変換関数convの返り値である集合に含まれる文法規則にもこのインデックスが継承されるとする。 And Here, r ̄ is an indexed rule of the input sentence x, and this index is inherited by the grammar rule included in the set that is the return value of the conversion function conv.

そして、文法規則追加部302は、文法規則rの集合R´を、解析部32へ出力する。   Then, the grammar rule adding unit 302 outputs the set R ′ of grammar rules r to the analyzing unit 32.

解析部32は、入力文x、文法規則rの集合R´、及び文法規則記憶部24に記憶された重みベクトルwを入力として、上記(1)式に従って、文法規則rの集合R´に含まれる文法規則rを用いて入力文xの構文解析結果を表す構文木yと入力文xとから抽出される特徴量のベクトルf(x,y)と、重みベクトルwとに基づいて計算されるスコアが最大となる、入力文xの構文解析結果を表す構文木y^を探索し、出力部90により出力する。   The analysis unit 32 receives the input sentence x, the set R ′ of the grammar rules r, and the weight vector w stored in the grammar rule storage unit 24, and includes them in the set R ′ of the grammar rules r according to the above equation (1). Is calculated on the basis of a feature vector f (x, y) extracted from the syntax tree y representing the result of parsing the input sentence x, the input sentence x, and the weight vector w. A syntax tree y representing the syntax analysis result of the input sentence x having the maximum score is searched and output by the output unit 90.

<本発明の実施形態に係る構文解析装置の作用>
次に、本発明の実施形態に係る構文解析装置100の作用について説明する。構文解析装置100は、入力部10によって、文と構文木のペア(xi,yi)の集合である学習データPを受け付けると、構文解析装置100によって、図10に示す規則フィルターモデル学習処理ルーチンが実行される。
<Operation of the syntax analysis apparatus according to the embodiment of the present invention>
Next, the operation of the syntax analysis apparatus 100 according to the embodiment of the present invention will be described. When the syntax analysis apparatus 100 receives learning data P that is a set of sentence and syntax tree pairs (x i , y i ) through the input unit 10, the syntax analysis apparatus 100 performs rule filter model learning processing illustrated in FIG. 10. The routine is executed.

まず、ステップS100において、学習データPを読み込む。ステップS102では、学習データPに含まれる構文木yの各々から文法規則rの集合Rを抽出し、文法規則記憶部24に格納する。   First, in step S100, the learning data P is read. In step S 102, a set R of grammar rules r is extracted from each of the syntax trees y included in the learning data P and stored in the grammar rule storage unit 24.

そして、ステップS104において、重みベクトルwを初期化する。ステップS106では、上記ステップS102で抽出された文法規則rの集合R、及び初期化され又は更新された重みベクトルwに基づいて、学習データPに含まれるペア(xi,yi)の各々に対して、上記(2)式に従って、構文解析を行って、文xiの構文木^yiを求め、^yi≠yiのとき、文xi、構文木yi、及び上記(2)式で得られた構文木^yiを用いて、上記(3)式に従って、重みベクトルwを更新する。 In step S104, the weight vector w is initialized. In step S106, each pair (x i , y i ) included in the learning data P is determined based on the set R of grammar rules r extracted in step S102 and the weight vector w initialized or updated. in contrast, in accordance with the above equation (2), carried out the syntax analysis, determine the syntax tree ^ y i of the sentence x i, ^ y i ≠ when y i, sentence x i, syntax tree y i, and the (2 The weight vector w is updated in accordance with the above equation (3) using the syntax tree ^ y i obtained by the equation).

ステップS108では、上記ステップS106の処理を、所定回数繰り返し実行したか否かを判定する。上記ステップS106の処理を、所定回数繰り返し実行していない場合には、上記ステップS106へ戻る。一方、上記ステップS106の処理を、所定回数繰り返し実行した場合には、ステップS110へ移動する。   In step S108, it is determined whether or not the process of step S106 has been repeatedly performed a predetermined number of times. If the process of step S106 has not been repeated a predetermined number of times, the process returns to step S106. On the other hand, when the process of step S106 is repeatedly executed a predetermined number of times, the process moves to step S110.

ステップS110では、学習データPに基づいて、学習データPの構文木yiの各々について、単語を表すラベル及び品詞を表すラベルとは異なるラベルの各々を、仮想的なラベルXに変換して、簡単化された構文木yi ̄を生成する。 In step S110, based on the learning data P, for each of the syntax trees y i of the learning data P, each of a label different from a label representing a word and a label representing a part of speech is converted into a virtual label X, Generate a simplified syntax tree y i  ̄.

次のステップS112では、上記ステップS110で構文木yiの各々について簡単化された構文木yi ̄から文法規則r ̄の集合R ̄を抽出すると共に、文法規則記憶部24に記憶された文法規則の集合Rを用いて、仮想的なラベルXを用いて変換された文法規則r ̄を、仮想的なラベルXを用いた変換前の文法規則rに変換するための変換関数convを生成し、文法規則r ̄の集合R ̄と変換関数convとを簡易文法規則記憶部28に格納する。 In the next step S112, a set R ̄ of grammar rules r ̄ is extracted from the syntax tree y i簡 単 simplified for each of the syntax trees y i in step S110, and the grammar stored in the grammar rule storage unit 24 is extracted. Using the rule set R, a conversion function conv for converting the grammar rule r ̄ converted using the virtual label X into the grammar rule r before conversion using the virtual label X is generated. The set R 集合 of grammar rules r ̄ and the conversion function conv are stored in the simple grammar rule storage unit 28.

ステップS114では、重みベクトルw ̄を初期化する。次のステップS116では、学習データPのペア(xi,yi)の各々について、当該ペア(xi,yi)の文xiと簡単化された構文木yi ̄とから抽出される特徴量のベクトルf ̄(x,yi ̄)と、初期化され又は更新された重みベクトルw ̄とに基づいて、上記(4)式に従って、スコアtxi(γ)を計算し、スコアtxi(γ)が、重みベクトルw ̄及び特徴量のベクトルf ̄(xi,y ̄)から計算されるスコアw ̄・f ̄(xi,y ̄)より大きい場合、文xi、構文木yi ̄、及び上記(4)式で得られた構文木yi*を用いて、上記(5)式に従って、重みベクトルw ̄を更新する。 In step S114, the weight vector w ̄ is initialized. In the next step S116, each pair (x i , y i ) of the learning data P is extracted from the sentence x i of the pair (x i , y i ) and the simplified syntax tree y i  ̄. Based on the feature vector fγ (x, y i  ̄) and the initialized or updated weight vector w ̄, the score tx i (γ) is calculated according to the above equation (4), and the score tx If i (γ) is larger than the score w ̄ · f ̄ (x i , y ̄) calculated from the weight vector w ̄ and the feature vector f ̄ (x i , y ̄), the sentence x i , syntax Using the tree y i  ̄ and the syntax tree y i* obtained in the above equation (4), the weight vector w 更新 is updated according to the above equation (5).

ステップS118では、上記ステップS116の処理を、所定回数繰り返し実行したか否かを判定する。上記ステップS116の処理を、所定回数繰り返し実行していない場合には、上記ステップS116へ戻る。一方、上記ステップS116の処理を、所定回数繰り返し実行した場合には、規則フィルターモデル学習処理ルーチンを終了し、学習された重みベクトルw ̄が、簡易文法規則記憶部28に格納される。   In step S118, it is determined whether the process of step S116 has been repeatedly performed a predetermined number of times. If the process of step S116 has not been repeated a predetermined number of times, the process returns to step S116. On the other hand, when the process of step S116 is repeatedly performed a predetermined number of times, the rule filter model learning process routine is terminated, and the learned weight vector w ̄ is stored in the simple grammar rule storage unit 28.

構文解析装置100は、入力部10によって、入力文xを受け付けると、構文解析装置100によって、図11に示す構文解析処理ルーチンが実行される。   When the syntax analysis apparatus 100 receives the input sentence x by the input unit 10, the syntax analysis apparatus 100 executes a syntax analysis processing routine shown in FIG.

ステップS120で、入力文xを読み込み、ステップS122では、入力文xと、簡易文法規則記憶部28に記憶されている文法規則r ̄の集合R ̄と、重みベクトルw ̄と、超パラメータγとに基づいて、上記(6)式に従って、入力文xに対する基準スコアtx(γ)を計算する。 In step S120, the input sentence x is read. In step S122, the input sentence x, the set R ̄ of grammar rules r ̄ stored in the simple grammar rule storage unit 28, the weight vector w ̄, the super parameter γ, Based on the above, the reference score t x (γ) for the input sentence x is calculated according to the above equation (6).

そして、ステップS124において、文法規則r ̄の集合R ̄に含まれる文法規則r ̄の各々について、重みベクトルw ̄、入力文x、及び当該文法規則r ̄を含む構文木y ̄に基づいて計算されるビタビスコアが、基準スコアtx(γ)以上となる場合、変換関数convにより、当該文法規則r ̄を、仮想的なラベルXを用いた変換前の文法規則rの集合に変換して、仮想的なラベルXを用いていない文法規則rの集合R´に追加する。 In step S124, each grammar rule r 規則 included in the set R ̄ of grammar rules r ̄ is calculated based on the weight vector w ̄, the input sentence x, and the syntax tree y ̄ including the grammar rule r ̄. When the Viterbi score to be obtained is equal to or higher than the reference score t x (γ), the conversion function conv converts the grammar rule r 集合 into a set of grammar rules r before conversion using the virtual label X. , The virtual label X is not added to the set R ′ of grammar rules r.

次のステップS126では、入力文x、文法規則rの集合R´、及び文法規則記憶部24に記憶された重みベクトルwを入力として、上記(1)式に従って、文法規則rの集合R´に含まれる文法規則rを用いて入力文xの構文解析結果を表す構文木yから抽出される特徴量のベクトルf(x,y)と、重みベクトルwとに基づいて計算されるスコアが最大となる、入力文xの構文木y^を探索する。そして、ステップS128において、上記ステップS126で得られた構文木y^を、構文解析結果として出力部90により出力し、構文解析処理ルーチンを終了する。   In the next step S126, the input sentence x, the set R ′ of the grammar rules r, and the weight vector w stored in the grammar rule storage unit 24 are input to the set R ′ of grammar rules r according to the above equation (1). The score calculated based on the vector f (x, y) of the feature quantity extracted from the syntax tree y representing the parsing result of the input sentence x using the included grammar rule r and the weight vector w is maximum. The syntax tree y ^ of the input sentence x is searched. In step S128, the syntax tree ^ obtained in step S126 is output as a syntax analysis result by the output unit 90, and the syntax analysis processing routine is terminated.

以上説明したように、本発明の実施の形態に係る構文解析装置によれば、学習データPの構文木yの各々について、簡単化された構文木y ̄を生成して、文法規則r ̄の集合R ̄を抽出し、学習データPのペア(x、y)の各々について、当該ペアに対する特徴量のベクトルf ̄(x,y ̄)と、重みベクトルw ̄とに基づいてスコアを計算し、スコアに応じて重みベクトルw ̄を更新することにより、文の構文解析を高速に行うために文法規則を減らすことができる文法規則フィルターモデルを学習することができる。   As described above, according to the syntax analysis apparatus according to the embodiment of the present invention, a simplified syntax tree y ̄ is generated for each syntax tree y of the learning data P, and the grammar rule r ̄ is generated. A set R ̄ is extracted, and a score for each pair (x, y) of the learning data P is calculated based on a feature vector f ̄ (x, y ̄) and a weight vector w ̄ for the pair. By updating the weight vector w ̄ according to the score, it is possible to learn a grammar rule filter model that can reduce grammar rules in order to perform sentence syntax analysis at high speed.

また、簡単化された構文木y ̄から抽出された文法規則r ̄の集合R ̄と、学習された重みベクトルw ̄と、入力文xとに基づいて、基準スコアを計算し、文法規則r ̄の各々について、入力文xの構文解析結果を表す、当該文法規則r ̄を含む構文木y ̄に基づいて計算されるスコアと、基準スコアとに応じて、文法規則r ̄を、変換前の文法規則rに変換して、文法規則rの集合R´に追加することにより、文の構文解析を高速に行うために文法規則を減らすことができ、入力文の構文解析を高速に行うことができる。   Further, based on the set R 計算 of grammar rules r ̄ extracted from the simplified syntax tree y ̄, the learned weight vector w ̄, and the input sentence x, a reference score is calculated, and the grammar rule r For each  ̄, the grammar rule r ̄ is converted according to the score calculated based on the parse tree y ̄ including the grammar rule r ̄ that represents the parsing result of the input sentence x and the reference score. Grammatical rules r are converted into grammar rules r and added to the set R ′ of grammatical rules r, so that the grammar rules can be reduced in order to parse the sentence at high speed, and the input sentence can be parsed at high speed. Can do.

また、規則フィルターにより構文解析に使われる、詳細な句ラベルを持つ文法規則を減らすことができるため、従来の統計的構文解析装置よりも高速に解析を行うことができる。構文解析速度が向上することによって、機械翻訳や文書要約などの応用システムを高速化することが可能になる。   In addition, since the rule filter can reduce the number of grammatical rules having detailed phrase labels used for syntax analysis, the analysis can be performed faster than the conventional statistical syntax analysis apparatus. By improving the parsing speed, it becomes possible to speed up application systems such as machine translation and document summarization.

なお、本発明は、上述した実施形態に限定されるものではなく、この発明の要旨を逸脱しない範囲内で様々な変形や応用が可能である。   Note that the present invention is not limited to the above-described embodiment, and various modifications and applications are possible without departing from the gist of the present invention.

例えば、上記の実施の形態では、文法規則フィルターモデル学習装置と構文解析装置とを、1つの構文解析装置で実現する場合を例に説明したが、これに限定されるものではなく、文法規則フィルターモデル学習装置と構文解析装置とを別々に設けてもよい。この場合には、文法規則フィルターモデル学習装置が、学習部22及び規則フィルターモデル学習部26を備えればよい。また、構文解析装置が、規則フィルター部30及び解析部32を備えればよい。   For example, in the above embodiment, the case where the grammar rule filter model learning device and the syntax analysis device are realized by one syntax analysis device has been described as an example. However, the present invention is not limited to this. The model learning device and the syntax analysis device may be provided separately. In this case, the grammatical rule filter model learning device may include the learning unit 22 and the rule filter model learning unit 26. Further, the syntax analysis apparatus may include the rule filter unit 30 and the analysis unit 32.

また、本願明細書中において、プログラムが予めインストールされている実施形態として説明したが、当該プログラムを、コンピュータ読み取り可能な記録媒体に格納して提供することも可能であるし、ネットワークを介して提供することも可能である。   Further, in the present specification, the embodiment has been described in which the program is installed in advance. However, the program can be provided by being stored in a computer-readable recording medium or provided via a network. It is also possible to do.

10 入力部
20 演算部
22 学習部
24 文法規則記憶部
26 規則フィルターモデル学習部
28 簡易文法規則記憶部
30 規則フィルター部
32 解析部
90 出力部
100 構文解析装置
220 文法規則集合抽出部
222 重みベクトル更新部
260 構文木簡単化部
262 簡単化文法規則集合抽出部
264 重みベクトル更新部
300 スコア計算部
302 文法規則追加部
DESCRIPTION OF SYMBOLS 10 Input part 20 Operation part 22 Learning part 24 Grammar rule memory | storage part 26 Rule filter model learning part 28 Simple grammar rule memory | storage part 30 Rule filter part 32 Analysis part 90 Output part 100 Syntax analyzer 220 Grammar rule set extraction part 222 Weight vector update Unit 260 Syntax tree simplification unit 262 Simplified grammar rule set extraction unit 264 Weight vector update unit 300 Score calculation unit 302 Grammar rule addition unit

Claims (8)

文xと前記文xの構文解析結果を表す構文木yとのペアの集合からなる学習データの構文木yの各々から文法規則rの集合Rを抽出する文法規則集合抽出部と、
前記学習データに基づいて、前記学習データの構文木yの各々について、単語を表すラベル及び品詞を表すラベルとは異なるラベルの各々を、仮想的なラベルに変換して、簡単化された構文木y ̄を生成する構文木簡単化部と、
前記学習データの構文木yの各々について簡単化された構文木y ̄から文法規則r ̄の集合R ̄を抽出すると共に、前記仮想的なラベルを用いた変換前の文法規則rと、前記文法規則集合抽出部によって抽出された前記文法規則rの集合Rに含まれる、前記仮想的なラベルを用いて変換された文法規則r ̄との対応関係を求め、前記対応関係に基づいて、前記仮想的なラベルを用いて変換された文法規則r ̄を、前記仮想的なラベルを用いた変換前の文法規則rに変換するための変換関数を生成する簡単化文法規則集合抽出部と、
前記学習データの前記ペアの各々について、前記ペアの文xと前記簡単化された構文木y ̄とから抽出される特徴量のベクトルf ̄(x,y ̄)と、前記特徴量のベクトルf ̄(x,y ̄)に対応する重みベクトルw ̄とに基づいてスコアを計算し、前記スコアに応じて前記重みベクトルw ̄を更新する簡単化構文木用重みベクトル更新部と、
を含む文法規則フィルターモデル学習装置。
A grammar rule set extraction unit that extracts a set R of grammar rules r from each of the syntax trees y of learning data, which is a set of pairs of a sentence x and a syntax tree y representing a parsing result of the sentence x;
On the basis of the learning data, for each of the parse tree y of the training data, each of the different labels is a label representing the label and part of speech represent words, by converting the virtual label, simplified syntax tree a syntax tree simplification unit for generating y ̄,
A set R ̄ of grammatical rules r ̄ is extracted from a simplified syntax tree y に つ い て for each of the learning data syntax trees y, the grammar rules r before conversion using the virtual labels, and the grammar A correspondence relationship with the grammar rule r ̄ converted using the virtual label included in the set R of the grammar rules r extracted by the rule set extraction unit is obtained, and the virtual relationship is determined based on the correspondence relationship. A simplified grammar rule set extraction unit that generates a conversion function for converting a grammar rule r ̄ converted using a typical label into a grammar rule r before conversion using the virtual label;
For each of the pairs of learning data, a feature quantity vector f ̄ (x, y ̄) extracted from the pair sentence x and the simplified syntax tree y ̄, and the feature quantity vector f A weight vector update unit for a simplified syntax tree that calculates a score based on a weight vector w に corresponding to  ̄ (x, y ̄), and updates the weight vector w ̄ according to the score;
Grammar rule filter model learning device including
記学習データの前記ペアの各々について、前記ペアの文xと前記構文木yとから抽出される特徴量のベクトルf(x,y)と、前記特徴量のベクトルf(x,y)に対応する重みベクトルwとに基づいてスコアを計算し、前記スコアに応じて前記重みベクトルwを更新する学習部を更に含む請求項1記載の文法規則フィルターモデル学習装置。 For each of the pair of front Symbol learning data, sentence x and the syntax tree y extracted from to be the feature quantity of the vector f (x, y) of the pair and the feature amount vector f (x, y) to The grammatical rule filter model learning device according to claim 1, further comprising a learning unit that calculates a score based on a corresponding weight vector w and updates the weight vector w according to the score. 前記簡単化構文木用重みベクトル更新部は、前記学習データの前記ペアの各々について前記スコアを計算し、前記スコアに応じて前記重みベクトルw ̄を更新することを、予め定められた繰り返し回数だけ繰り返す請求項1又は2記載の文法規則フィルターモデル学習装置。   The simplified syntax tree weight vector updating unit calculates the score for each of the pairs of the learning data, and updates the weight vector w ̄ according to the score by a predetermined number of repetitions. The grammatical rule filter model learning device according to claim 1, wherein the grammar rule filter model learning device is repeated. 文の構文解析結果を表す構文木yに含まれる、単語を表すラベル及び品詞を表すラベルとは異なるラベルの各々を仮想的なラベルに変換して簡単化された構文木y ̄から抽出された文法規則r ̄の集合R ̄と、文x及び前記簡単化された構文木y ̄から抽出される特徴量のベクトルf ̄(x,y ̄)に対応する予め学習された重みベクトルw ̄と、入力文xとに基づいて、基準スコアを計算するスコア計算部と、
前記文法規則r ̄の集合R ̄に含まれる前記文法規則r ̄の各々について、前記重みベクトルw ̄、前記入力文x、及び前記入力文xの構文解析結果を表す、前記文法規則r ̄を含み、かつ、前記簡単化された構文木y ̄に基づいて計算されるスコアと、前記基準スコアとに応じて、前記仮想的なラベルを用いた変換前の文法規則rと、前記仮想的なラベルを用いて変換された文法規則r ̄との対応関係に基づいて予め生成された、前記仮想的なラベルを用いて変換された文法規則r ̄を、前記仮想的なラベルを用いた変換前の文法規則rに変換するための変換関数を用いて、前記文法規則r ̄を、前記仮想的なラベルを用いた変換前の文法規則rに変換して、前記仮想的なラベルを用いていない文法規則rの集合R´に追加する文法規則追加部と
を含む文法規則フィルター装置。
Each of the label representing the word and the label different from the label representing the part of speech included in the syntax tree y representing the sentence parsing result is extracted from the simplified syntax tree y ̄ by converting each label into a virtual label. A set R ̄ of grammatical rules r ̄, a pre-learned weight vector w ̄ corresponding to a feature vector f ̄ (x, y ̄) extracted from the sentence x and the simplified syntax tree y ̄ A score calculation unit for calculating a reference score based on the input sentence x,
For each of the grammar rules r ̄ included in the set R ̄ of the grammar rules r ̄, the grammar rule r ̄ representing the weight vector w ̄, the input sentence x, and the parsing result of the input sentence x is And a grammar rule r before conversion using the virtual label according to the score calculated based on the simplified syntax tree y ̄ and the reference score, and the virtual Based on the correspondence with the grammatical rule r ̄ converted using the label, the grammatical rule r ̄ converted using the virtual label, which has been generated in advance, is converted before the conversion using the virtual label. The grammar rule r ̄ is converted to the grammar rule r before conversion using the virtual label by using a conversion function for converting to the grammar rule r, and the virtual label is not used. Additional grammar rules added to the set R ′ of grammar rules r Grammar rules filter device including a part.
請求項4記載の文法規則フィルター装置と、
前記文法規則フィルター装置によって得られた前記文法規則rの集合R´と、文xと前記文xの構文解析結果を表す構文木yから抽出される特徴量ベクトルf(x,y)に対応する予め学習された重みベクトルwと、前記入力文xとに基づいて、前記文法規則rの集合R´に含まれる文法規則rを用いて前記入力文xの構文解析結果を表す構文木yと前記入力文xとから抽出される特徴量のベクトルf(x,y)と、前記重みベクトルwとに基づいて計算されるスコアが最大となる、前記入力文xの構文解析結果を表す構文木y^を探索する解析部
を含む構文解析装置。
A grammatical rule filter device according to claim 4 ,
Corresponds to the set R ′ of the grammar rules r obtained by the grammar rule filter device and the feature quantity vector f (x, y) extracted from the sentence x and the syntax tree y representing the result of parsing the sentence x. Based on a weight vector w learned in advance and the input sentence x, a syntax tree y representing a parsing result of the input sentence x using a grammar rule r included in the set R ′ of the grammar rules r, and A syntax tree y representing the result of parsing of the input sentence x having the maximum score calculated based on the feature vector f (x, y) extracted from the input sentence x and the weight vector w. A parser that includes an analysis unit that searches for ^.
コンピュータを、請求項1〜3の何れか1項記載の文法規則フィルターモデル学習装置の各部として機能させるためのプログラム。 Computer program to function as each section of the grammar rule filter model learning equipment according to any one of claims 1-3. コンピュータを請求項4記載の文法規則フィルター装置の各部として機能させるためのプログラム。 A program for a computer to function as each unit of the grammatical rules filter equipment according to claim 4, wherein. コンピュータを、請求項5記載の構文解析装置の各部として機能させるためのプログラム。
A program for a computer to function as each unit of the syntax analysis apparatus Motomeko 5 wherein.
JP2016029211A 2016-02-18 2016-02-18 Grammar rule filter model learning device, grammar rule filter device, syntax analysis device, and program Active JP6482084B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016029211A JP6482084B2 (en) 2016-02-18 2016-02-18 Grammar rule filter model learning device, grammar rule filter device, syntax analysis device, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016029211A JP6482084B2 (en) 2016-02-18 2016-02-18 Grammar rule filter model learning device, grammar rule filter device, syntax analysis device, and program

Publications (2)

Publication Number Publication Date
JP2017146855A JP2017146855A (en) 2017-08-24
JP6482084B2 true JP6482084B2 (en) 2019-03-13

Family

ID=59683116

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016029211A Active JP6482084B2 (en) 2016-02-18 2016-02-18 Grammar rule filter model learning device, grammar rule filter device, syntax analysis device, and program

Country Status (1)

Country Link
JP (1) JP6482084B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6830602B2 (en) * 2017-11-13 2021-02-17 日本電信電話株式会社 Phrase structure learning device, phrase structure analysis device, method, and program

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004271764A (en) * 2003-03-06 2004-09-30 Nagoya Industrial Science Research Inst Finite state transducer generator, program, recording medium, generation method, and gradual syntax analysis system
JP4084816B2 (en) * 2005-09-16 2008-04-30 日本電信電話株式会社 Dependent structure information processing apparatus, program thereof, and recording medium
JP6042264B2 (en) * 2013-05-15 2016-12-14 日本電信電話株式会社 Grammar rule learning device, method, and program
JP2015170044A (en) * 2014-03-05 2015-09-28 日本電信電話株式会社 Dependency structure analysis method, apparatus, and program

Also Published As

Publication number Publication date
JP2017146855A (en) 2017-08-24

Similar Documents

Publication Publication Date Title
JP7108675B2 (en) Semantic matching method, device, electronic device, storage medium and computer program
CN108363790B (en) Method, device, equipment and storage medium for evaluating comments
CN110162749B (en) Information extraction method, device, computer equipment, and computer-readable storage medium
CN111444320A (en) Text retrieval method and device, computer equipment and storage medium
JP6498095B2 (en) Word embedding learning device, text evaluation device, method, and program
JP6291443B2 (en) Connection relationship estimation apparatus, method, and program
US12118314B2 (en) Parameter learning apparatus, parameter learning method, and computer readable recording medium
CN111291565A (en) Method and device for named entity recognition
JPWO2019167296A1 (en) Equipment, methods and programs for natural language processing
JP5809381B1 (en) Natural language processing system, natural language processing method, and natural language processing program
Chepurova et al. Better together: Enhancing generative knowledge graph completion with language models and neighborhood information
CN117744632B (en) Method, device, equipment and medium for constructing vulnerability information keyword extraction model
CN111651985A (en) Method and device for Chinese word segmentation
US20240143638A1 (en) Information processing apparatus, information processing method, and information processing computer program product
JP6145059B2 (en) Model learning device, morphological analysis device, and method
WO2019163752A1 (en) Morpheme analysis learning device, morpheme analysis device, method, and program
JP2017010249A (en) Parameter learning device, sentence similarity calculation device, method, and program
KR101417757B1 (en) Hypergraph language model learning and application apparatus, learning and application method thereof, and hypergraph language model update apparatus and update method therefor
US20220215182A1 (en) Information processing apparatus, information learning apparatus, information processing method, information learning method and program
KR102042991B1 (en) Apparatus for tokenizing based on korean affix and method thereof
JP6482084B2 (en) Grammar rule filter model learning device, grammar rule filter device, syntax analysis device, and program
JP2016197289A (en) Parameter learning device, similarity calculation device and method, and program
WO2020040255A1 (en) Word coding device, analysis device, language model learning device, method, and program
CN119128574B (en) Radar text processing method and related device
Mathew et al. Paraphrase identification of Malayalam sentences-an experience

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171117

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20171117

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180921

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181009

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181129

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190207

R150 Certificate of patent or registration of utility model

Ref document number: 6482084

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250