JP7227705B2 - Natural language processing device, search device, natural language processing method, search method and program - Google Patents
Natural language processing device, search device, natural language processing method, search method and program Download PDFInfo
- Publication number
- JP7227705B2 JP7227705B2 JP2018093299A JP2018093299A JP7227705B2 JP 7227705 B2 JP7227705 B2 JP 7227705B2 JP 2018093299 A JP2018093299 A JP 2018093299A JP 2018093299 A JP2018093299 A JP 2018093299A JP 7227705 B2 JP7227705 B2 JP 7227705B2
- Authority
- JP
- Japan
- Prior art keywords
- constituent
- sentence
- constituents
- type
- grammatical function
- 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
Links
- 238000000034 method Methods 0.000 title claims description 37
- 238000003058 natural language processing Methods 0.000 title claims description 34
- 239000000470 constituent Substances 0.000 claims description 608
- 230000006870 function Effects 0.000 claims description 237
- 238000000605 extraction Methods 0.000 claims description 112
- 238000004458 analytical method Methods 0.000 claims description 84
- 239000000284 extract Substances 0.000 claims description 35
- 230000000295 complement effect Effects 0.000 claims description 16
- 238000012545 processing Methods 0.000 claims description 12
- 150000001875 compounds Chemical class 0.000 claims description 10
- 238000010586 diagram Methods 0.000 description 20
- 235000021152 breakfast Nutrition 0.000 description 5
- 230000000877 morphologic effect Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 210000003205 muscle Anatomy 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Machine Translation (AREA)
Description
本発明は、自然言語処理装置、検索装置、自然言語処理方法、検索方法およびプログラムに関する。 The present invention relates to a natural language processing device, a search device, a natural language processing method, a search method and a program.
自然言語をコンピュータで処理する技術である自然言語処理では、例えば、処理対象の文に対して、形態素解析、構文解析、意味解析、文脈解析等の異なる種類の解析処理が連鎖的に実行される。ここで、形態素解析とは、例えば、英語のように単語間に空白がある言語と異なり、日本語のように単語間に明確な区切りがない言語において、文を単語に切り分ける処理である。構文解析とは、例えば、文を構成する各単語あるいは単語のまとまりの係り受け等の階層的位置関係を簡単な文法規則に基づいて特定する処理である。意味解析とは、例えば、構文解析において複数種類の位置関係の選択肢が並立する場合に単語の意味を利用して位置関係を選択する処理である。例えば、意味解析では、意味概念(意味属性の分類)間の相互関係を定義する概念辞書等が用いられる(例えば、特許文献1参照)。 In natural language processing, which is a technology for processing natural language by computer, for example, different types of analysis processes such as morphological analysis, syntactic analysis, semantic analysis, and contextual analysis are executed in a chain on the sentence to be processed. . Here, the morphological analysis is a process of dividing a sentence into words in a language such as Japanese that does not have clear divisions between words, unlike a language such as English that has spaces between words. Syntax analysis is, for example, a process of identifying hierarchical positional relationships, such as dependencies between words or groups of words that make up a sentence, based on simple grammatical rules. Semantic analysis is, for example, a process of selecting a positional relationship using the meaning of a word when multiple types of positional relationship options exist side by side in syntactic analysis. For example, in semantic analysis, a concept dictionary or the like that defines interrelationships between semantic concepts (classification of semantic attributes) is used (see, for example, Patent Document 1).
なお、構文解析では、一般に、「構成素」を単位とし、各構成素の「文法範疇(文法カテゴリーともいう)」が特定されるとともに、各構成素間の階層的位置関係(各構成素の親子・兄弟関係)が特定される。ここで、構成素とは、文を構成する単語(語)およびそのまとまりを意味する。また、文法範疇とは、例えば、語や句の種類を意味し、具体的には、構成素の文法的特徴による分類である。また、文法範疇は、品詞分類と文法機能の分類(以下、「文法機能分類」という)とを含むとする考え方がある。この場合、品詞分類は、「名詞」、「動詞」、「名詞句」、「動詞句」、「前置詞句」等の分類である。また、文法機能分類は、「主語」、「述語」、「目的語」および「補語」の分類である。構文解析においては、各構成素の文法範疇として品詞分類が特定される。また、階層的位置関係は、各構成素間のつながりを、階層的にかつ前後関係(順序関係)を示して表す。また、構文解析の結果は、文毎に、構文木(階層的な樹形図、句構造木)、入れ子の多重の括弧を用いた形式等で表すことができる。 In syntactic analysis, in general, a ``constituent'' is used as a unit, and a ``grammatical category (also called a grammatical category)'' of each constituent is specified. Parent-child/sibling relationship) is specified. Here, a constituent means a word (word) that constitutes a sentence and a collection thereof. Also, the grammatical category means, for example, the type of words and phrases, and more specifically, classification based on the grammatical characteristics of constituents. In addition, there is an idea that the grammatical category includes a part-of-speech classification and a classification of grammatical function (hereinafter referred to as "grammatical function classification"). In this case, the part-of-speech classification is classification such as "noun", "verb", "noun phrase", "verb phrase", and "prepositional phrase". Also, the grammatical function classification is a classification of "subject", "predicate", "object" and "complement". In syntactic analysis, a part-of-speech classification is specified as a grammatical category for each constituent. In addition, the hierarchical positional relationship expresses the connections between constituent elements in a hierarchical manner and by showing the anteroposterior relationship (order relationship). In addition, the result of parsing can be represented for each sentence in a syntax tree (hierarchical tree diagram, phrase structure tree), a form using multiple nested parentheses, or the like.
また、例えば形態素解析や構文解析のための解析ツール(プログラム)がインターネット上で複数公開されている。例えば、日本語形態解析ツールとしては、「JUMAN」、「茶筌(ChaSen)」、「MeCab(和布蕪)」等がある。日本語構文解析ツールとしては、「KNP」、「南瓜(CaboCha)」等がある。また、英文構文解析ツールとしては、Berkeley Parser、Stanford Parser等がある。 Also, for example, a plurality of analysis tools (programs) for morphological analysis and syntactic analysis are open to the public on the Internet. For example, Japanese morphological analysis tools include "JUMAN", "ChaSen", and "MeCab". Examples of Japanese parsing tools include "KNP" and "CaboCha". Examples of English parsing tools include Berkeley Parser and Stanford Parser.
ところで、複数の文書を検索対象として、指定した語や文を検索する場合、例えば、指定した語や文の文法機能分類を指定した方が、所望の検索結果を得やすい場合がある。すなわち、検索のキーワードとそのキーワードが例えば主語であることを指定したり、そのキーワードが例えば目的語であることを指定したりすることで、意図にそぐわない検索結果が含まれる割合を低下させ、検索結果の精度を高めることができる場合がある。しかしながら、構文解析では一般的に品詞分類が特定されるだけで、文法機能分類は特定されない。そのため、例えば、構文解析の結果に対して何らかの処理を加えることで文法機能分類を特定する必要がある。例えば、意味解析を行うことで文法機能分類を抽出しようとする場合、特許文献1に記載されているような辞書を用意することになり、この場合、システムの構成が複雑化するという課題がある。
By the way, when retrieving a specified word or sentence from a plurality of documents, it may be easier to obtain a desired retrieval result if, for example, the grammatical function classification of the specified word or sentence is specified. In other words, by specifying the search keyword and the keyword as the subject, or specifying the keyword as the object, the percentage of search results that do not match the intention is reduced, and the search results are improved. It may be possible to increase the accuracy of the results. However, syntactic analysis generally only specifies the part-of-speech classification and not the grammatical function classification. Therefore, for example, it is necessary to specify the grammatical function classification by applying some processing to the syntactic analysis result. For example, when attempting to extract grammatical function classifications by performing semantic analysis, a dictionary such as that described in
本発明は、上記事情を考慮してなされたものであり、構文解析の結果に対して簡単な処理を行うことで、所定の文法機能分類を構成素に対して特定することができる自然言語処理装置、検索装置、自然言語処理方法、検索方法およびプログラムを提供することを目的とする。 SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances. An object is to provide a device, a search device, a natural language processing method, a search method, and a program.
本発明の一態様によれば、自然言語処理装置は、文の構成単位である一以上の単語のまとまりからなる構成素の文法的な機能の分類を示す文法機能分類を特定する自然言語処理装置であって、入力文を文単位で構文解析し、複数の前記構成素と、前記各構成素の種類である構成素種類とを、前記各構成素間の階層的位置関係で表す構文解析結果を生成する構文解析部と、前記構文解析結果における前記各構成素の前記構成素種類と前記階層的位置関係とに基づき、複数の前記構成素から、所定の文法機能分類に属する前記構成素を抽出する抽出部を備える。 According to one aspect of the present invention, a natural language processing device identifies a grammatical function classification indicating a grammatical function classification of a constituent composed of a group of one or more words, which is a constituent unit of a sentence. and syntactically analyzing an input sentence on a sentence-by-sentence basis, and expressing a plurality of said constituents and a constituent type which is a type of each of said constituents by a hierarchical positional relationship between said constituents. and the constituent element belonging to a predetermined grammatical function classification from the plurality of constituent elements based on the constituent type and the hierarchical positional relationship of each constituent element in the syntactic analysis result. An extractor for extracting is provided.
また、本発明の一態様によれば、前記抽出部は、前記構文解析結果を基に、所定の前記構成素種類である第1の前記構成素から辿った所定の前記構成素種類である第2の前記構成素を特定し、第2の前記構成素と所定の位置関係を有する第3の前記構成素を、前記文法機能分類の1つに属する前記構成素として抽出する。 Further, according to one aspect of the present invention, the extracting unit extracts the predetermined constituent type, which is the first constituent type traced from the first constituent type, which is the predetermined constituent type, based on the syntactic analysis result. Two said constituents are specified, and a third said constituent having a predetermined positional relationship with the second said constituent is extracted as said constituent belonging to one of said grammatical function classifications.
また、本発明の一態様によれば、前記抽出部は、前記構成素種類が「文」である第1の前記構成素から前記構成素種類が「動詞句」である第2の前記構成素を下層に向けて辿り、辿られた前記構成素種類が「動詞句」である第2の前記構成素の下層にある前記構成素種類が「動詞」である第3の前記構成素を、前記文法機能分類の1つである「述語」に属する前記構成素として抽出する。 Further, according to the aspect of the present invention, the extracting unit extracts from the first constituent whose constituent type is "sentence" to the second constituent whose constituent type is "verb phrase". is traced downward, and the third constituent whose constituent type is "verb" in the lower layer of the second constituent whose constituent type is "verb phrase" is added to the It is extracted as the constituent element belonging to "predicate" which is one of the grammatical function classifications.
また、本発明の一態様によれば、前記抽出部は、前記文法機能分類が「述語」であるとして抽出した前記構成素を上層に向けて辿り、最も上層に存在する「動詞句」の前記構成素種類を有する前記構成素を特定し、特定された「動詞句」の前記構成素と同層にある前記構成素種類が「名詞句」である前記構成素を、前記文法機能分類の1つである「主語」に属する前記構成素として抽出する。 Further, according to one aspect of the present invention, the extracting unit traces upward the constituent elements extracted as having the grammatical function classification of "predicate", identifying the constituent having a constituent type, and classifying the constituent having the constituent type of "noun phrase" in the same layer as the constituent of the identified "verb phrase" into one of the grammatical function classifications; It is extracted as the constituent element belonging to the "subject" which is one.
また、本発明の一態様によれば、前記抽出部は、前記文法機能分類が「述語」であるとして抽出した前記構成素に接続された前記構成素種類が「動詞句」である前記構成素を下層に向けて辿り、最も下層に存在する「名詞句」の前記構成素種類を有する前記構成素を、前記文法機能分類の1つである「目的語または補語」に属する前記構成素として抽出する。 Further, according to the aspect of the present invention, the extracting unit extracts the constituent whose kind of constituent is "verb phrase" and which is connected to the extracted constituent whose grammatical function classification is "predicate". is traced downward, and the constituent element having the constituent type of "noun phrase" existing in the lowest layer is extracted as the constituent element belonging to "object or complement" which is one of the grammatical function classifications. do.
また、本発明の一態様によれば、前記抽出部は、前記各構成素の前記構成素種類と前記各構成素間の前記階層的位置関係が、所定のパターンに適合する場合に、前記複数の構成素から、前記所定の文法機能分類に属する前記構成素を抽出する。 Further, according to the aspect of the present invention, the extraction unit extracts the plurality of from the constituents, the constituents belonging to the predetermined grammatical function classification are extracted.
第1の前記構成素の1つ上層の第2の前記構成素の前記構成素種類が「動詞句」であり、第2の前記構成素の同層の前方に存在し、第2の前記構成素と同一の構成素に上層で接続される第3の前記構成素の前記構成素種類が「助動詞」であり、第1の前記構成素の3つ上層の第4の前記構成素の前記構成素種類が「文」であり、かつ、第1の前記構成素の4つ上層に前記構成素が存在しない、との前記パターンに適合する場合、前記抽出部は、第1の前記構成素を、前記文法機能分類の1つである「述語」に属する前記構成素として抽出する。 The constituent element type of the second constituent element that is one layer above the first constituent element is "verb phrase", and it exists before the second constituent element in the same layer, and the second constituent element the constituent element type of the third constituent element connected in an upper layer to the same constituent element as the element is "auxiliary verb", and the constituent element of the fourth constituent element three layers above the first constituent element If the element type is "sentence" and the element does not exist in the four layers above the first element, the extraction unit extracts the first element. , are extracted as the constituents belonging to the "predicate" which is one of the grammatical function classifications.
また、本発明の一態様によれば、前記入力文に助動詞を含まない場合において、第1の前記構成素の1つ上層の第2の前記構成素の前記構成素種類が「動詞句」であり、第1の前記構成素の2つ上層の第3の前記構成素の前記構成素種類が「文」であり、かつ、第1の前記構成素の3つ上層の構成素が存在しない、との前記パターンに適合する場合、前記抽出部は、第1の前記構成素を、前記文法機能分類の1つである「述語」に属する前記構成素として抽出する。 Further, according to one aspect of the present invention, when the input sentence does not include an auxiliary verb, the constituent type of the second constituent that is one layer above the first constituent is "verb phrase". is, and the constituent type of the third constituent element that is two layers above the first constituent element is "sentence", and there is no constituent element that is three layers above the first constituent element; , the extraction unit extracts the first constituent as the constituent belonging to "predicate", which is one of the grammatical function classifications.
また、本発明の一態様によれば、前記入力文が重文である場合において、第1の前記構成素の1つ上層の第2の前記構成素の前記構成素種類が「動詞句」であり、第1の前記構成素の3つ上層の第3の前記構成素の前記構成素種類が「文」であり、第2の前記構成素の同層の前方に存在し、第2の前記構成素と同一の構成素に上層で接続される前記構成素の前記構成素種類が「助動詞」であり、かつ、第1の前記構成素の4つ上層の前記構成素の前記構成素種類が「文」である、との前記パターンに適合する場合、前記抽出部は、第1の前記構成素を、前記文法機能分類の1つである「述語」に属する前記構成素として抽出する。 Further, according to one aspect of the present invention, when the input sentence is a compound sentence, the constituent type of the second constituent that is one layer above the first constituent is a "verb phrase." , the constituent element type of the third constituent element that is three layers above the first constituent element is "sentence", and it exists in front of the second constituent element in the same layer, and the second constituent element The constituent type of the constituent connected to the same constituent as the element in the upper layer is "auxiliary verb", and the constituent type of the constituent that is four layers above the first constituent is " is a sentence", the extraction unit extracts the first constituent as a constituent belonging to "predicate", which is one of the grammatical function classifications.
また、本発明の一態様によれば、検索装置は、文の構成単位である一以上の単語のまとまりからなる構成素の文法的な機能の分類を示す文法機能分類を用いて検索する検索装置であって、入力文を文単位で構文解析し、複数の前記構成素と、前記各構成素の種類である構成素種類とを、前記各構成素間の階層的位置関係で表す構文解析結果を生成する構文解析部と、前記構文解析結果における前記各構成素の前記構成素種類と前記階層的位置関係とに基づき、複数の前記構成素から、所定の文法機能分類に属する前記構成素を抽出する抽出部と、前記抽出部による文法機能分類の抽出結果を、検索対象として、指定された前記文法機能分類とキーワードとに対応する前記構成素を含む前記文を検索する検索処理部と、を備える。 In addition, according to one aspect of the present invention, the search device performs a search using a grammatical function classification that indicates the grammatical function classification of a constituent consisting of a group of one or more words, which is a constituent unit of a sentence. and syntactically analyzing an input sentence on a sentence-by-sentence basis, and expressing a plurality of said constituents and a constituent type which is a type of each of said constituents by a hierarchical positional relationship between said constituents. and the constituent element belonging to a predetermined grammatical function classification from the plurality of constituent elements based on the constituent type and the hierarchical positional relationship of each constituent element in the syntactic analysis result. an extraction unit for extracting; a search processing unit for retrieving the result of grammatical function classification extracted by the extracting unit as a search target for the sentence containing the constituent element corresponding to the specified grammatical function classification and keyword; Prepare.
また、本発明の一態様によれば、自然言語処理方法は、文の構成単位である一以上の単語のまとまりからなる構成素の文法的な機能の分類を示す文法機能分類を特定する自然言語処理方法であって、入力文を文単位で構文解析し、複数の前記構成素と、前記各構成素の種類である構成素種類とを、前記各構成素間の階層的位置関係で表す構文解析結果を生成するステップと、前記構文解析結果における前記各構成素の前記構成素種類と前記階層的位置関係とに基づき、複数の前記構成素から、所定の文法機能分類に属する前記構成素を抽出するステップと、を有する。 Further, according to one aspect of the present invention, the natural language processing method specifies a grammatical function classification indicating a grammatical function classification of a constituent consisting of a group of one or more words, which is a constituent unit of a sentence. A processing method, wherein an input sentence is syntactically analyzed on a sentence-by-sentence basis, and a plurality of said constituents and a constituent type, which is the type of each constituent, are represented by a hierarchical positional relationship between said constituents. generating an analysis result; and selecting the constituents belonging to a predetermined grammatical function classification from the plurality of constituents based on the constituent type and the hierarchical positional relationship of each constituent in the syntactic analysis result. and extracting.
また、本発明の一態様によれば、検索方法は、文の構成単位である一以上の単語のまとまりからなる構成素の文法的な機能の分類を示す文法機能分類を用いて検索する検索方法であって、入力文を文単位で構文解析し、複数の前記構成素と、前記各構成素の種類である構成素種類とを、前記各構成素間の階層的位置関係で表す構文解析結果を生成するステップと、前記構文解析結果における前記各構成素の前記構成素種類と前記階層的位置関係とに基づき、複数の前記構成素から、所定の文法機能分類に属する前記構成素を抽出するステップと、前記抽出部による文法機能分類の抽出結果を、検索対象として、指定された前記文法機能分類とキーワードとに対応する前記構成素を含む前記文を検索するステップと、を有する。 Further, according to one aspect of the present invention, the search method searches using a grammatical function classification that indicates the classification of the grammatical function of a constituent consisting of a group of one or more words, which is a constituent unit of a sentence. and syntactically analyzing an input sentence on a sentence-by-sentence basis, and expressing a plurality of said constituents and a constituent type which is a type of each of said constituents by a hierarchical positional relationship between said constituents. and extracting the constituents belonging to a predetermined grammatical function classification from the plurality of constituents based on the constituent type and the hierarchical positional relationship of each constituent in the syntactic analysis result. and searching the sentence containing the construct corresponding to the specified grammatical function classification and keyword, using the grammatical function classification extracted by the extracting unit as a search target.
また、本発明の一態様によれば、プログラムは、文の構成単位である一以上の単語のまとまりからなる構成素の文法的な機能の分類を示す文法機能分類を特定する自然言語処理方法をコンピュータに実行させるプログラムであって、入力文を文単位で構文解析し、複数の前記構成素と、前記各構成素の種類である構成素種類とを、前記各構成素間の階層的位置関係で表す構文解析結果を生成するステップと、前記構文解析結果における前記各構成素の前記構成素種類と前記階層的位置関係とに基づき、複数の前記構成素から、所定の文法機能分類に属する前記構成素を抽出するステップと、を実行させる。 Further, according to one aspect of the present invention, the program uses a natural language processing method for specifying a grammatical function classification indicating a grammatical function classification of a constituent consisting of a group of one or more words, which is a constituent unit of a sentence. A program to be executed by a computer, parsing an input sentence on a sentence-by-sentence basis, determining a plurality of said constituents and a constituent type which is a type of each of said constituents, and determining a hierarchical positional relationship between said constituents. a step of generating a syntactic analysis result represented by and based on the constituent type and the hierarchical positional relationship of each constituent in the syntactic analysis result, from the plurality of constituents belonging to a predetermined grammatical function classification and extracting constituents.
上述の各実施形態によれば、構文解析の結果に対して簡単な処理を行うことで、構成素に対して所定の文法機能分類を特定することができる。 According to each of the embodiments described above, it is possible to specify a predetermined grammatical function classification for a constituent by performing a simple process on the syntactic analysis result.
以下、図面を参照して各実施形態について説明する。 Hereinafter, each embodiment will be described with reference to the drawings.
<実施形態>
図1は、一実施形態に係る自然言語処理装置1の構成例を示すシステム図である。
図1に示す自然言語処理装置1は、1または複数のコンピュータを用いて構成されている。1または複数のコンピュータは、それぞれCPU(中央処理装置)、主記憶装置、補助記憶装置、入出力装置、通信装置等を備え、補助記憶装置に記憶されている所定のプログラムをCPUが実行することで所定の処理を実行する。
図1に示す自然言語処理装置1は、構文解析部2と、文法機能分類抽出部3と、記憶部4と、検索部5を備える。構文解析部2と、文法機能分類抽出部3と、記憶部4と、検索部5は、自然言語処理装置1を構成する各コンピュータが備えるハードウェアとソフトウェアの組み合わせによって構成される。また、自然言語処理装置1は、例えば、1または複数のコンピュータを用いて構成された文法機能分類抽出部3と記憶部4を備える構成(検索部5等を含まない構成)であってもよいし、構文解析部2と文法機能分類抽出部3を備える構成(記憶部4と検索部5を含まない構成)であってもよいし、構文解析部2と文法機能分類抽出部3と検索部5を備える構成(記憶部4を含まない構成)であってもよいし、文法機能分類抽出部3や検索部5単体からなる装置であってもよい。なお、以下では、本実施形態に係る自然言語処理装置1が英語を対象として所定の処理する場合について説明する。なお、文法機能分類抽出部3は、抽出部の一例である。
<Embodiment>
FIG. 1 is a system diagram showing a configuration example of a natural
The natural
A natural
記憶部4は、互いに対応づけられた文書41と構文解析結果42と文法機能分類抽出結果43を複数組記憶する。文書41は、検索部5が検索対象とする文書を表す情報である。文書41は、例えば、自然言語処理装置1の外部から通信回線あるいは記憶媒体を介して入力され記憶部4に記憶される。構文解析結果42は、文書41が含む各文に対する構文解析部2による構文解析結果を表す情報である。文法機能分類抽出結果43は、構文解析結果42が含む構文解析結果に対する文法機能分類抽出部3による文法機能分類抽出結果を表す情報である。
The
構文解析部2は、既存の構文解析手法を用いて、形式的な文法に基づき記憶部4が記憶する文書41が含む自然言語文を、文単位で構文解析し、解析した結果を構文解析結果42として記憶部4に記憶する。すなわち、構文解析部2は、入力文を文単位で構文解析し、複数の構成素と、各構成素の種類である構成素種類とを、各構成素間の階層的位置関係で表す構文解析結果を生成する。図2に構文解析結果42の一例を示す。
The
図2は、図1に示す構文解析部2の動作例を説明するための模式図である。
図2において、構文解析部2は、記憶部4が記憶する文書41が含む1つの文410を入力する。そして、構文解析部2は、1つの文410を構文解析した結果である1文の構文解析結果として構文木420を出力する。構文木420は、構文解析結果42の一部を構成する。なお、この場合、文410は「This tree is illustrating the constituency relation.」である。
FIG. 2 is a schematic diagram for explaining an operation example of the
In FIG. 2, the
構文木420は、文410を構成する各構成素「This」、「tree」、「is」、「illustrating」、「the」、「constituency」、「relation」に対応する節点4202~4208と、節点4202~4208を階層的にまとめた複数の構成素に対応する節点4209~4213を複数の枝4201で接続することで構成されている。また、節点4202には、最上位の階層の節点であることを示す「ROOT」と記されたタグ4200が付けられている。各節点4201~4213は、それぞれが対応する構成素の種類(構成素種類)を示す記号で示されている。図3に構成素の記号の例を示す。
The
図3は、複数種類の構成素について、各種類の構成素の記号と内容と構成素のレベルの対応関係の例を示す図である。
例えば、記号「S」の構成素の内容は「文」であり構成素のレベルは「節」である。また、例えば、記号「SBAR」の構成素の内容は「従属節」であり構成素のレベルは「節」である。また、例えば、記号「NP」の構成素の内容は「名詞句」であり構成素のレベルは「句」である。また、例えば、記号「VP」の構成素の内容は「動詞句」であり構成素のレベルは「句」である。また、例えば、記号「PP」の構成素の内容は「前置詞句」であり構成素のレベルは「句」である。また、例えば、記号「NN」の構成素の内容は「名詞」であり構成素のレベルは「語」である。また、例えば、記号「VB」の構成素の内容は「動詞」であり構成素のレベルは「語」である。
FIG. 3 is a diagram showing an example of the correspondence between symbols, contents, and constituent levels of each kind of constituents, for a plurality of kinds of constituents.
For example, the constituent content of the symbol "S" is "sentence" and the constituent level is "clause". Further, for example, the constituent content of the symbol "SBAR" is "subordinate clause" and the constituent level is "clause". Further, for example, the constituent content of the symbol "NP" is "noun phrase" and the constituent level is "phrase". Also, for example, the constituent content of the symbol "VP" is "verb phrase" and the constituent level is "phrase". Also, for example, the constituent content of the symbol "PP" is "prepositional phrase" and the constituent level is "phrase". Further, for example, the content of the constituent of the symbol "NN" is "noun" and the level of the constituent is "word". Further, for example, the constituent content of the symbol "VB" is "verb" and the constituent level is "word".
図2に示す構文木420では、例えば、節点4206は構成素「the」に対応する「限定詞(DT)」の構成素に対応し、節点4207は構成素「constituency」に対応する「名詞(NN)」の構成素に対応し、節点4208は構成素「relation」に対応する「名詞(NN)」の構成素に対応する。また、節点4209は「名詞句(NP)」の構成素に対応する。この節点4209は節点4206~4208から1層分上位の階層に位置し、節点4206~4208は互いに同じ層に位置する。この場合、節点4209(親)と、節点4206~4208(子)は親子関係にあり、節点4206~4208は互いに兄弟関係を有する。また、上位の階層に位置する構成素は、下位の階層に位置する1または複数の枝4201を介して接続された1または複数の構成素を含んでいる。また、各節点4202~4213の図上の左右の位置関係は、対応する各構成素の前後の位置関係を示している。例えば、「語」のレベルの構成素に対応する各節点4202~4208は、層に関わらず、左右の位置関係が、文中の前後の位置関係(順序関係)を示す。また、「句」または「節」のレベルの構成素に対応する各節点4209~4213は、層毎に、左右の位置関係が、文中の前後の位置関係(順序関係)を示す。
In the parse
なお、構文解析部2は、構文解析した結果を例えば入れ子の多重の括弧を用いた形式で出力してもよい。図2に示す例では、構文解析結果は、例えば「(ROOT (S (NP (DT This) (NN tree))(VP (VBZ is)(VP (VBG illustrating)(NP (DT the) (NN constituency) (NN relation))))))」と表すことができる。
Note that the
一方、図1に示す文法機能分類抽出部3は、記憶部4に記憶されている構文解析結果42を参照し、文単位で構文解析結果42における各構成素の構成素種類と各構成素間の階層的位置関係に基づき、複数の構成素から、所定の文法機能分類に属する構成素を抽出する。そして、文法機能分類抽出部3は、解析した結果を文法機能分類抽出結果43として記憶部4に記憶する。本実施形態において、文法機能分類は、「主語」、「述語」、「目的語」または「補語」の分類と、主語、述語、目的語または補語に分類された各構成素に対して所定の位置関係を有する構成素が属する分類(「冒頭にある従属節」、「述語よりも後ろにある名詞句」、・・など)とを含むものとする(詳しくは図4参照)。
On the other hand, the grammatical function
図4は、図1に示す文法機能分類抽出部3が抽出する文法機能分類一覧を示す図である。
図4は、各文法機能分類の記号と内容と当該分類の構成素の条件の対応関係とを示している。記号「F_SBAR1」の分類の内容は「冒頭にある従属節」であり、構成素の条件は「主語、述語、目的語または補語を含む節または句の前」に位置することである。記号「F_PP1」の分類の内容は「冒頭にある前置詞句」であり、構成素の条件は「主語、述語、目的語または補語を含む節または句の前」に位置することである。記号「F_S」の分類の内容は「主語」であり、構成素の条件は「従属節に含まれない節または句内」に位置することである。記号「F_V」の分類の内容は「述語(述語動詞)」であり、構成素の条件は「従属節に含まれない節または句内」に位置することである。記号「F_OC」の分類の内容は「目的語または補語」であり、構成素の条件は「従属節に含まれない節または句内」に位置することである。記号「F_NP」の分類の内容は「述語よりも後ろにある名詞句」であり、構成素の条件は「従属節に含まれない節または句内」に位置することである。記号「F_ADJP」の分類の内容は「述語よりも後ろにある形容詞句」であり、構成素の条件は「従属節に含まれない節または句内」に位置することである。記号「F_to」の分類の内容は「述語よりも後ろにあるTo不定詞」であり、構成素の条件は「従属節に含まれない節または句内」に位置することである。記号「F_PP2」の分類の内容は「述語よりも後ろにある前置詞句」であり、構成素の条件は「主語、述語、目的語または補語を含む節または句の後」に位置することである。そして、記号「F_SBAR2」の分類の内容は「述語よりも後ろにある従属節」であり、構成素の条件は「主語、述語、目的語または補語を含む節または句の後」に位置することである。
FIG. 4 is a diagram showing a grammatical function classification list extracted by the grammatical function
FIG. 4 shows the correspondence between the symbols and contents of each grammatical function classification and the conditions of the constituents of the classification. The classification content of the symbol "F_SBAR1" is "initial subordinate clause", and the constituent condition is to be located "before a clause or phrase containing a subject, predicate, object or complement". The content of the classification of the symbol "F_PP1" is "prepositional phrase at the beginning", and the constituent condition is to be located "before a clause or phrase containing a subject, predicate, object or complement". The content of the classification of the symbol "F_S" is "subject", and the condition of the constituent is to be located "in a clause or phrase not contained in a subordinate clause". The content of the classification of the symbol "F_V" is "predicate (predicate verb)", and the condition of the constituent is to be located "in a clause or phrase not included in a subordinate clause". The content of the classification of the symbol "F_OC" is "object or complement" and the condition of the constituent is to be located "within a clause or phrase not contained in a subordinate clause". The content of the classification of the symbol "F_NP" is "a noun phrase that follows the predicate", and the condition of the constituent is that it is located "in a clause or phrase that is not included in a subordinate clause". The content of the classification of the symbol "F_ADJP" is "an adjective phrase following the predicate", and the condition of the constituent is to be located "in a clause or phrase not included in a subordinate clause". The content of the classification of the symbol "F_to" is "a To-infinitive that follows the predicate", and the condition of the constituent is that it is located "in a clause or phrase not included in a subordinate clause". The content of the classification of the symbol "F_PP2" is "a prepositional phrase after the predicate", and the constituent condition is "after a clause or phrase containing a subject, predicate, object or complement". . The content of the classification of the symbol "F_SBAR2" is "the subordinate clause following the predicate", and the constituent condition is positioned "after the clause or phrase containing the subject, predicate, object or complement". is.
文法機能分類抽出部3は、図4に示した文法機能分類に属する構成素を抽出する際に、例えば、単文、複文または重文の文の種類によって、主語、述語、または、目的語もしくは補語に対応する構成素を次のように抽出する。すなわち、抽出対象の文が単文である場合、当該文は1つの節のみを含み、主語と述語の組は1組しか含まれないため、文法機能分類抽出部3は、その文が含む主語、述語、または、目的語もしくは補語を、「F_S」、「F_V」または「F_OC」の分類として特定する。また、抽出対象の文が複文である場合、当該文は主節と従属節を含み、主語と述語の組が複数組含まれるが、文法機能分類抽出部3は、主節が含む主語、述語、または、目的語もしくは補語を、「F_S」、「F_V」または「F_OC」の分類にして特定する。また、抽出対象の文が重文である場合、当該文は等位接続された複数の文を含むので、文法機能分類抽出部3は、各文が単文である場合にはその単文が含む主語、述語、または、目的語もしくは補語を「F_S」、「F_V」または「F_OC」の分類として特定し、各文が複文である場合にはその複文の主節が含む主語、述語、または、目的語もしくは補語を「F_S」、「F_V」または「F_OC」の分類として特定する。
When extracting constituents belonging to the grammatical function classification shown in FIG. Extract the corresponding constituents as follows. That is, when the sentence to be extracted is a simple sentence, the sentence includes only one clause and only one pair of subject and predicate. Identify predicates, or objects or complements, as "F_S", "F_V" or "F_OC" categories. If the sentence to be extracted is a complex sentence, the sentence includes a main clause and a subordinate clause, and a plurality of sets of subjects and predicates. , or to identify objects or complements in the "F_S", "F_V" or "F_OC" categories. If the sentence to be extracted is a compound sentence, the sentence includes a plurality of coordinately connected sentences. Therefore, if each sentence is a simple sentence, the grammatical function
なお、述語動詞とは、例えば英語において述語のうち特にその核となる動詞を意味する。述語動詞は、主語の動きや状態を表現する動詞であり、一般に主語の直後に置かれる。 In addition, the predicate verb means, for example, a verb that is the core of a predicate in English, for example. A predicate verb is a verb that expresses the action or state of the subject, and is generally placed immediately after the subject.
次に、図5から図8を参照して、図1に示す文法機能分類抽出部3の第1動作例について説明する。図5は、図1に示す文法機能分類抽出部3の第1動作例を示すフローチャートである。図6は、図1に示す文法機能分類抽出部3の第1動作例を説明するための説明図である。図7は、図1に示す文法機能分類抽出部3の第1動作例を説明するための模式図であり、処理対象とする構文解析結果の例を、入力文が「When she woke up, I was having breakfast.」である構文木422として示す。なお、図7では、構成素の階層を層番号0~5として示している。層番号0が最上位の階層(最上層ともいう)であり、層番号5が最下位の階層(最下層ともいう)である。そして、図8は、図1に示す文法機能分類抽出結果43の構成例を示す図である。
Next, a first operation example of the grammatical function
第1動作例において、文法機能分類抽出部3は、起動されると、まず、抽出対象の文書があるか否かを判定する(ステップS10)。抽出対象の文書がある場合、すなわち、記憶部4に記憶された複数の文書41のうち、文法機能分類抽出部3が抽出処理を実施していない文書41がある場合(ステップS10で「Yes」の場合)、文法機能分類抽出部3は、抽出対象の文書41を選択する(ステップS11)。一方、抽出対象の文書がない場合(ステップS10で「NO」の場合)、文法機能分類抽出部3は、処理を終了する。
In the first operation example, when activated, the grammatical function
ステップS11で抽出対象の文書41を選択すると、次に、文法機能分類抽出部3は、選択した文書41から未処理の文を選択する(ステップS12)。次に、文法機能分類抽出部3は、選択した文書41に対応する構文解析結果42に含まれる選択した文の構文解析結果を参照する(ステップS13)。
After selecting the
次に、文法機能分類抽出部3は、選択した文に含まれる述語を特定する(ステップS14)。ステップS14において、文法機能分類抽出部3は、図6に「(S14)動詞(述語動詞)の特定」として示すように、「構文木を最上層(層番号としては最も小さい)「S」(文)から「VP」(動詞句)を辿っていき、「VP」(動詞句)の左下の動詞、つまり動詞句の前方の動詞が、述語動詞であると特定する。図7に示す構文木422の例では、文法機能分類抽出部3は、まず、「S」の節点4221から「VP」の節点4222、続いて「VP」の節点4223と辿る。次に、文法機能分類抽出部3は、「VP」の節点4222の左下の「VBD」(動詞)の節点4224に対応する語「was」と「VP」の節点4223の左下の「VBG」(動詞)の節点4225に対応する語「having」を述語動詞として特定する。
Next, the grammatical function
次に、文法機能分類抽出部3は、選択した文に含まれる主語を特定する(ステップS15)。ステップS15において、文法機能分類抽出部3は、図6に「(S15)主語の特定」として示すように、ステップS14で辿ったなかで『最上層(層番号としては最も小さい)の「述語動詞が含まれるVP」と同じ層にある「NP」(名詞句)が主語』であると特定する。図7に示す構文木422の例では、文法機能分類抽出部3は、「VP」の節点4222と同じ層にある「NP」の節点4226の下位に接続された「PRP」(人称代名詞)の節点4227に対応する語「I」を主語として特定する。
Next, the grammatical function
次に、文法機能分類抽出部3は、選択した文に含まれる目的語または補語を特定する(ステップS16)。ステップS16において、文法機能分類抽出部3は、図6に「(S16)目的語/補語の特定」として示すように、ステップS14で辿ったなかで『最下層(層番号としては最も大きい)の「述語動詞が含まれるVP」の左下の動詞と同じ層にある「NP」が目的語/補語』であると特定する。図7に示す構文木422の例では、文法機能分類抽出部3は、「VP」の節点4223の左下の「VBG」の節点4225と同じ層にある「NP」の節点4226の下位に接続された「NN」(名詞)の節点4228に対応する語「breakfast」を目的語または補語として特定する。
Next, the grammatical function
次に、文法機能分類抽出部3は、主語、述語、目的語または補語を含む節または句の前後の文法機能分類を特定する(ステップS17)。ステップS17において、文法機能分類抽出部3は、記号「F_SBAR1」(冒頭にある従属節)の分類、記号「F_PP1」(冒頭にある前置詞句)の分類、記号「F_PP2」(述語よりも後ろにある前置詞句)の分類、または記号「F_SBAR2」(述語よりも後ろにある従属節)の分類に対応する構成素を特定する。
Next, the grammatical function
本実施形態において、記号「F_SBAR1」(冒頭にある従属節)の分類に対応する構成素は、主語、述語、目的語または補語を含む節または句より前に位置する構成素種類「SBAR」(従属節)の構成素である。記号「F_PP1」(冒頭にある前置詞句)の分類に対応する構成素は、主語、述語、目的語または補語を含む節または句より前に位置する構成素種類「PP」(前置詞句)の構成素である。記号「F_PP2」(述語よりも後ろにある前置詞句)の分類に対応する構成素は、主語、述語、目的語または補語を含む節または句より後ろ位置する構成素種類「PP」(前置詞句)の構成素である。記号「F_SBAR2」(述語よりも後ろにある従属節)の分類に対応する構成素は、主語、述語、目的語または補語を含む節または句より後に位置する構成素種類「SBAR」(従属節)の構成素である。 In this embodiment, the constituent corresponding to the classification of the symbol "F_SBAR1" (the subordinate clause at the beginning) is the constituent kind "SBAR" ( subordinate clause). Constituents corresponding to the classification of the symbol "F_PP1" (prepositional phrases at the beginning) are constituents of the constituent type "PP" (prepositional phrases) that precede clauses or phrases containing subjects, predicates, objects or complements. It is raw. Constituents corresponding to the classification of the symbol "F_PP2" (prepositional phrases after predicate) are of the constituent type "PP" (prepositional phrases) after clauses or phrases containing subjects, predicates, objects or complements. is a constituent of Constructs corresponding to the classification of symbol "F_SBAR2" (subordinate clauses after predicate) are of the constituent kind "SBAR" (subordinate clauses) located after clauses or phrases containing subjects, predicates, objects or complements. is a constituent of
図7に示す構文木422の例では、ステップS17において文法機能分類抽出部3は、主語を含む「NP」の節点4226より前にある「SBAR」の節点4229に対応する構成素に対応する語「When」、「she」、「woke」、および「up」を、記号「F_SBAR1」(冒頭にある従属節)の分類に対応する構成素として特定する。
In the example of the
次に、文法機能分類抽出部3は、ステップS14~S17での特定結果を、文法機能分類抽出結果43として記憶部4に保存する(ステップS18)。図8は、文法機能分類抽出結果43の部分の構成例として部分430を示す。図8に示す部分430は、図7で例として用いた文「When she woke up, I was having breakfast.」を含む1つの文書41に対する文法機能分類抽出結果43である。この場合、部分430は、文書41の識別情報(「文書識別情報A」)と文「When she woke up, I was having breakfast.」の識別情報(「文識別情報B」)に対応づけて特定された文法機能分類の記号と構成素に対応する語を示す情報を含んでいる。なお、「文書識別情報A」は、例えば文書41のファイル名、URI(Uniform Resource Identifier)等である。「文識別情報B」は、文書41中で文「When she woke up, I was having breakfast.」を特定するための情報であり、例えば、ページ、行、文字数等を用いて表す文の位置情報とすることができる。例えば、図1に示す検索部5は、文書識別情報と文識別情報を指定することで、文書41とその文書41中の特定の文を参照することができる。
Next, the grammatical function
次に、文法機能分類抽出部3は、選択した文書31内に未処理の文があるか否かを判断する(ステップS19)。未処理の文がある場合(ステップS19で「YES」の場合)、文法機能分類抽出部3は、ステップS12以降の処理を再度実行する。一方、未処理の文がない場合(ステップS19で「NO」の場合)、文法機能分類抽出部3は、ステップS10以降の処理を再度実行する。
Next, the grammatical function
以上のように、第1動作例では、文法機能分類抽出部3が、構文解析結果を基に、所定の構成素種類である構成素(第1の構成素とする)から辿った所定の構成素種類である構成素(第2の構成素とする)を特定し、第2の構成素と所定の位置関係を有する構成素(第3の構成素とする)を、文法機能分類の1つに属する構成素として抽出する。よって、概念辞書等を使用することなく、構文解析の結果に対して簡単な処理を行うことで、所定の文法機能分類を構成素に対して特定することができる。
As described above, in the first operation example, the grammatical function
また、第1動作例において文法機能分類抽出部3は、構成素種類が「文」である構成素(上記第1の構成素に該当)から構成素種類が「動詞句」である構成素(上記第2の構成素に該当)を下層に向けて辿り、辿られた構成素種類が「動詞句」である構成素(上記第2の構成素に該当)の下層にある構成素種類が「動詞」である構成素(上記第3の構成素に該当)を、文法機能分類の1つである「述語」に属する構成素として抽出する。すなわち、第1動作例によれば、構文解析の結果に対して簡単な処理を行うことで、「述語」の文法機能分類を構成素に対して特定することができる。
In the first operation example, the grammatical function
また、第1動作例において文法機能分類抽出部3は、上記文法機能分類が「述語」であるとして抽出した構成素を上層に向けて辿り、最も上層に存在する「動詞句」の構成素種類を有する構成素を特定し、特定された「動詞句」の構成素と同層にある構成素種類が「名詞句」である構成素を、文法機能分類の1つである「主語」に属する構成素として抽出する。すなわち、第1動作例によれば、構文解析の結果に対して簡単な処理を行うことで、「主語」の文法機能分類を構成素に対して特定することができる。
Further, in the first operation example, the grammatical function
また、第1動作例において文法機能分類抽出部3は、上記文法機能分類が「述語」であるとして抽出した構成素に接続された構成素種類が「動詞句」である構成素を下層に向けて辿り、最も下層に存在する「名詞句」の構成素種類を有する構成素を、文法機能分類の1つである「目的語または補語」に属する構成素として抽出する。すなわち、第1動作例によれば、構文解析の結果に対して簡単な処理を行うことで、「目的語または補語」の文法機能分類を構成素に対して特定することができる。
Further, in the first operation example, the grammatical function
次に、図9から図12を参照して、図1に示す文法機能分類抽出部3の第2動作例について説明する。図9は、図1に示す文法機能分類抽出部3の第2動作例を示すフローチャートである。図10は、図1に示す文法機能分類抽出部3の第2動作例を説明するための模式図である。
図10(a)は、文法機能分類抽出部3が使用するパターンの一例を示し、図10(b)は処理対象とする構文解析結果の例を入力文が、「The Student should read an interesting book.」である構文木423として示す。
ここで、この入力文は助動詞「should」を含む。
図11(a)は、文法機能分類抽出部3が使用する他のパターンの例を示し、図11(b)は処理対象とする構文解析結果の例を入力文が、「Members are loved by a big dog that eats sugar toasts and have a good amount of muscle.」である構文木424として示す。ここで、この入力文は助動詞を含まない。
図12(a)は文法機能分類抽出部3が使用する他のパターンの例を示し、図12(b)は処理対象とする構文解析結果の例を入力文が「In library the student should read good work books and the Librarian should ensure that all the book is vandal resistant.」である構文木425として示す。ここで、この入力文は重文であり、各文が助動詞「should」を含む。
なお、第2動作例においても第1動作例と同様、文法機能分類抽出部3によって、図4に示す文法機能分類が抽出される。
Next, a second operation example of the grammatical function
FIG. 10(a) shows an example of a pattern used by the grammatical function
Here, this input sentence contains the auxiliary verb "should".
FIG. 11(a) shows an example of another pattern used by the grammatical function
FIG. 12(a) shows an example of another pattern used by the grammatical function
In the second operation example, the grammatical function
第2動作例において、文法機能分類抽出部3は、起動されると、まず、抽出対象の文書があるか否かを判定する(ステップS20)。抽出対象の文書がある場合、すなわち、記憶部4に記憶された複数の文書41のうち、文法機能分類抽出部3が抽出処理を実施していない文書41がある場合(ステップS20で「Yes」の場合)、文法機能分類抽出部3は、抽出対象の文書41を選択する(ステップS21)。一方、抽出対象の文書がない場合(ステップS20で「NO」の場合)、文法機能分類抽出部3は、処理を終了する。
In the second operation example, when activated, the grammatical function
ステップS21で抽出対象の文書41を選択すると、次に、文法機能分類抽出部3は、選択した文書41から未処理の文を選択する(ステップS22)。次に、文法機能分類抽出部3は、選択した文書41に対応する構文解析結果42に含まれる選択した文の構文解析結果を参照する(ステップS23)。
After selecting the
次に、文法機能分類抽出部3は、選択した文の種類に対応する1または複数のパターンを選択する(ステップS24)。ここで、文の種類に対応するパターンとは、所定の文の種類毎かつ文法機能分類毎に予め設定した構文解析結果(構文木)の形態である。文の種類とは、例えば、当該文が重文であるとか、重文ではない文であるとか、当該文が助動詞を含む文であるとかといった文の分類である。また、パターンとは、複数の節点(構成素)間の接続形態に対応するものであり、文法機能分類毎に設定される。各パターンは、文の種類毎に、例えば、ある節点がある文法機能分類に属する場合には当該節点に対して他の節点がどうような構成素種類であってどのような接続関係にあるのかということを示して定義することができる。なお、各パターンは、例えば複数の例文を対象にして試行錯誤的に作成することができる。
Next, the grammatical function
図10(a)は、文が構成素「MD」(助動詞)を含む種類である場合に、文法機能分類「F_V」(述語)を特定するためのパターンを示す。この場合、パターンはルール1からルール4を含む。ルール1からルール4のすべてが満たされる場合に文法機能分類抽出部3は当該節点の文法機能分類が「F_V」(述語)であると特定する。ルール1は「1つ目の親がVP(動詞句)」、ルール2は「1つ目の親の左兄弟がMD」、ルール3は「3つ目の親がS(文)」、ルール4は「4つ目の親がいない」である。
FIG. 10(a) shows a pattern for identifying the grammatical function class "F_V" (predicate) when the sentence is of a type containing the constituent "MD" (auxiliary verb). In this case, the pattern includes
図10(b)に示す助動詞を含む文の構文解析結果である構文木423では、構成素種類が「動詞(VB)」の節点4231に着目した場合、節点4231の1つ目の親の節点4232の構成素種類が「VP」であり、ルール1が満たされる。また、1つ目の親の節点4232の左兄弟の節点4233の構成素種類が「MD」であり、ルール2が満たされる。節点4231の2つ目の親の節点4234の親(3つ目の親)の節点4235の構成素種類が「S(文)」であり、ルール3が満たされる。そして、3つ目の親の節点4235は「ROOT」であるから、ルール4が満たされる。よって、図10(b)に示す構文木423に基づき、文法機能分類抽出部3は、節点4231に対応する語「provide」が文法機能分類「F_V」(述語)であると特定することができる。
In the parse
また、図11(a)は、文が「MD」(助動詞)の構成素を含まない種類である場合に、文法機能分類「F_V」(述語)を特定するためのパターンを示す。この場合、パターンはルール1からルール3を含む。ルール1からルール3のすべてが満たされる場合に文法機能分類抽出部3は当該節点の文法機能分類が「F_V」(述語)であると特定する。ルール1は「1つ目の親がVP(動詞句)」、ルール2は「2つ目の親がS(文)」、ルール3は「3つ目の親がいない」である。
Also, FIG. 11(a) shows a pattern for identifying the grammatical function class "F_V" (predicate) when the sentence is of a type that does not contain the constituent "MD" (auxiliary verb). In this case, the pattern includes
図11(b)に示す助動詞を含まない文の構文解析結果である構文木424では、構成素種類が「動詞(VBP)」の節点4241に着目した場合、節点4241の1つ目の親の節点4242の構成素種類が「VP」であり、ルール1が満たされる。また、節点4241の2つ目の親の節点4243の構成素種類が「S(文)」であり、ルール2が満たされる。そして、2つ目の親の節点4243は「ROOT」であるから、ルール3が満たされる。よって、図11(b)に示す構文木424に基づき、文法機能分類抽出部3は、節点4241に対応する語「are」が文法機能分類「F_V」(述語)であると特定することができる。
In the parse
また、図12(a)は、文の種類が重文であり、各文が助動詞を含む場合に、文法機能分類「F_V」(述語)を特定するためのパターンを示す。この場合、パターンはルール1からルール4を含む。ルール1からルール4のすべてが満たされる場合に文法機能分類抽出部3は当該節点の文法機能分類が「F_V」(述語)であると特定する。ルール1は「1つ目の親がVP(動詞句)」、ルール2は「3つ目の親がS(文)」、ルール3は「1つ目の親の左兄弟がMD(助動詞)」、ルール4は「4つ目の親がS(文)」である。
Also, FIG. 12(a) shows a pattern for identifying the grammatical function class "F_V" (predicate) when the sentence type is a compound sentence and each sentence includes an auxiliary verb. In this case, the pattern includes
図12(b)に示す各文が助動詞を含む重文であるの構文解析結果である構文木425では、構成素種類が「動詞(VB)」の節点4251に着目した場合、節点4251の1つ目の親の節点4252の構成素種類が「VP」であり、ルール1が満たされる。また、節点4251の3つ目の親の節点4253の構成素種類が「S(文)」であり、ルール2が満たされる。また、1つ目の親の節点4252の左兄弟の節点4254の構成素種類が「MD」であり、ルール3が満たされる。そして、節点4251の4つ目の親の節点4255の構成素種類が「S(文)」であり、ルール4が満たされる。よって、図12(b)に示す構文木425に基づき、文法機能分類抽出部3は、節点4251に対応する語「enable」が文法機能分類「F_V」(述語)であると特定することができる。
In the parse tree 425, which is the result of parsing that each sentence shown in FIG. The constituent kind of
また、構文木425では、構成素種類が「動詞(VB)」の節点4256に着目した場合、節点4256の1つ目の親の節点4257の構成素種類が「VP」であり、ルール1が満たされる。また、節点4256の3つ目の親の節点4258の構成素種類が「S(文)」であり、ルール2が満たされる。また、1つ目の親の節点4257の左兄弟の節点4259の構成素種類が「MD」であり、ルール3が満たされる。そして、節点4256の4つ目の親の節点4255の構成素種類が「S(文)」であり、ルール4が満たされる。よって、図12(b)に示す構文木425に基づき、文法機能分類抽出部3は、節点4256に対応する語「enable」が文法機能分類「F_V」(述語)であると特定することができる。
In addition, in the syntax tree 425, when attention is focused on the
さて、ステップS24で選択した文の種類に対応するパターンを選択した後、文法機能分類抽出部3は、ステップS23で参照した構文解析結果がステップS24で選択した各パターンに適合する場合に、図10から図12を参照して説明したようにして所定の文法機能分類に属する各構成素を特定する(ステップS25)。
Now, after selecting a pattern corresponding to the type of sentence selected in step S24, the grammatical function
次に、文法機能分類抽出部3は、ステップS25での特定結果を、第1動作例と同様にして文法機能分類抽出結果43として記憶部4に保存する(ステップS26)。
Next, the grammatical function
次に、文法機能分類抽出部3は、選択した文書41内に未処理の文があるか否かを判断する(ステップS27)。未処理の文がある場合(ステップS27で「YES」の場合)、文法機能分類抽出部3は、ステップS22以降の処理を再度実行する。一方、未処理の文がない場合(ステップS27で「NO」の場合)、文法機能分類抽出部3は、ステップS20以降の処理を再度実行する。
Next, the grammatical function
以上のように第2動作例では、文法機能分類抽出部3が、各構成素の構成素種類と各構成素間の階層的位置関係が、所定のパターンに適合する場合に、複数の構成素から、所定の文法機能分類に属する構成素を抽出する。よって、概念辞書等を使用することなく、構文解析の結果に対して簡単な処理を行うことで、所定の文法機能分類を構成素に対して特定することができる。
As described above, in the second operation example, the grammatical function
また、第2動作例において文法機能分類抽出部3は、ある構成素(第1の構成素とする)の1つ上層の構成素(第2の構成素とする)の構成素種類が「動詞句」であり、第2の構成素の同層の前方に存在し、第2の構成素と同一の構成素に上層で接続される構成素(第3の構成素とする)の構成素種類が「助動詞」であり、第1の構成素の3つ上層の構成素(第4の構成素とする)の構成素種類が「文」であり、かつ、第1の構成素の4つ上層に構成素が存在しないということを所定のパターンとして、各構成素の構成素種類と各構成素間の階層的位置関係が当該パターンに適合する場合に、第1の構成素を、文法機能分類の1つである「述語」に属する構成素として抽出する。すなわち、第2動作例によれば、構文解析の結果に対して簡単な処理を行うことで、入力文が助動詞を含む場合に「述語」の文法機能分類を構成素に対して特定することができる。
Further, in the second operation example, the grammatical function
また、第2動作例において文法機能分類抽出部3は、入力文に助動詞を含まない場合において、ある構成素(第1の構成素とする)の1つ上層の構成素(第2の構成素とする)の構成素種類が「動詞句」であり、第1の構成素の2つ上層の構成素(第3の構成素とする)の構成素種類が「文」であり、かつ、第1の構成素の3つ上層の構成素が存在しないということを所定のパターンとして、各構成素の構成素種類と各構成素間の階層的位置関係が当該パターンに適合するときに、第1の構成素を、文法機能分類の1つである「述語」に属する構成素として抽出する。すなわち、第2動作例によれば、構文解析の結果に対して簡単な処理を行うことで、入力文が助動詞を含む場合に「述語」の文法機能分類を構成素に対して特定することができる。
Further, in the second operation example, the grammatical function
また、第2動作例において文法機能分類抽出部3は、入力文が重文である場合において、ある構成素(第1の構成素とする)の1つ上層の構成素(第2の構成素とする)の構成素種類が「動詞句」であり、第1の構成素の3つ上層の構成素(第3の構成素とする)の構成素種類が「文」であり、第2の構成素の同層の前方に存在し、第2の構成素と同じく他の構成素(第4の構成素とする)に上層で接続される構成素(第5の構成素とする)の構成素種類が「助動詞」であり、かつ、第1の構成素の4つ上層の構成素の構成素種類が「文」であるということを所定のパターンとして、各構成素の構成素種類と各構成素間の階層的位置関係とが当該パターンに適合するときに、第1の構成素を、文法機能分類の1つである「述語」に属する構成素として抽出する。すなわち、第2動作例によれば、構文解析の結果に対して簡単な処理を行うことで、入力文が助動詞を含む場合に「述語」の文法機能分類を構成素に対して特定することができる。
Further, in the second operation example, when the input sentence is a compound sentence, the grammatical function
一方、図1に示す検索部5(検索装置)は、検索処理部51を備える。検索処理部51は、文法機能分類抽出結果43を検索対象として、指定された文法機能分類52とキーワード53に対応する構成素を含む文を検索し、検索結果54を出力する。検索部5は、例えば、指定されたキーワード53と一致する指定された文法機能分類52として抽出された1または複数の語を含む文を抽出し、検索結果54として出力する。すなわち、検索処理部51は、文法機能分類抽出部3が、文の構成単位である複数の構成素と各構成素の種類である構成素種類と各構成素間の階層的位置関係で入力文を表す構文解析結果42を参照し、構文解析結果42における各構成素の構成素種類と各構成素間の階層的位置関係に基づき、複数の構成素から、所定の文法機能分類に属する構成素を抽出した結果である文法機能分類抽出結果43を、検索対象として、指定された文法機能分類52とキーワード53に対応する構成素を含む文を検索する。
On the other hand, the search unit 5 (search device) shown in FIG. 1 includes a
検索部5によれば、文法機能分類を考慮することで、考慮しない単純なキーワード検索よりも精度高く意図する文を抽出することができる。
According to the
なお、検索部5が入力する文法機能分類52とキーワード53はそれぞれ1つであってもよいし、複数であってもよい。複数の場合には例えば論理和や論理積、否定等を用いて組み合わせることができる。例えば、検索部5は、指定した第1の文法機能分類52で第1のキーワード53に一致する1または複数の語を含み、かつ、指定した第2の文法機能分類52で第2のキーワード53に一致する1または複数の語を含まない文を検索することができる。
The
以上のように、本実施形態によれば、構文解析の結果に対して簡単な処理を行うことで、構成素に対して所定の文法機能分類を特定することができる。また、本実施形態によれば、文法機能分類を考慮することで、考慮しない単純なキーワード検索よりも精度高く意図する文を抽出することができる。 As described above, according to the present embodiment, it is possible to specify a predetermined grammatical function classification for a constituent by performing a simple process on the syntactic analysis result. Further, according to the present embodiment, by considering the grammatical function classification, it is possible to extract the intended sentence with higher accuracy than a simple keyword search that does not consider the grammatical function classification.
なお、本実施形態の自然言語処理装置1は、日本語等の英語以外の自然言語を処理対象とすることができる。その場合、自然言語処理装置1は、形態素解析を行う構成を備えていてもよい。また、文書41の内容に限定はないが、例えば、製品設計や開発の分野で用いる場合には、客先提案依頼書、指示書、仕様書、国内法令、外国法令、国際規格を記載した文書を処理対象の文書41とすることができる。この場合に、機器名、部品名、材料名やそれらの属性をキーワードとして用いる場合に、主語、目的語等の文法機能分類を用いることでより詳細な検索が可能となり、検索精度を向上させることが期待される。また、例えば測定条件等は冒頭部分に書かれていることが多く、例えば冒頭部分に書かれたキーワードに一致する語を除外するといった検索を行うことが有効である場合がある。また、文法機能分類抽出部3は、上述した第1動作例と第2動作例を組み合わせて文法機能分類を抽出(特定)してもよい。
Note that the natural
図13は、上述の実施形態に係るコンピュータの構成を示す概略ブロック図である。
コンピュータ9は、CPU91、主記憶装置92、補助記憶装置93、インタフェース94を備える。
上述の自然言語処理装置1は、コンピュータ9を備える。そして、上述した各処理部の動作は、プログラムの形式で補助記憶装置93に記憶されている。CPU91は、プログラムを補助記憶装置93から読み出して主記憶装置92に展開し、当該プログラムに従って上記処理を実行する。例えば、上述した構文解析部2、文法機能分類抽出部3、および、検索部5(検索処理部51)は、CPU91であってよい。
また、CPU91は、プログラムに従って、上述した記憶部4に対応する記憶領域を主記憶装置92または補助記憶装置93に確保してもよい。
なお、自然言語処理装置1、構文解析装部2、文法機能分類抽出部3、検索部5、文法機能分類抽出結果43等を構成するプログラムやデータは、その一部または全部をコンピュータ読取可能な記録媒体あるいは通信回線を介して頒布することができる。また、自然言語処理装置1を複数のコンピュータで構成する場合、複数のコンピュータは、ネットワークを介して分散して配置されていてもよい。
FIG. 13 is a schematic block diagram showing the configuration of the computer according to the above embodiment.
The
The natural
Further, the
Some or all of the programs and data constituting the natural
以上、この発明の実施形態を、図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。 Although the embodiments of the present invention have been described in detail above with reference to the drawings, the specific configuration is not limited to these embodiments, and designs and the like are included within the scope of the gist of the present invention.
1 自然言語処理装置
2 構文解析部
3 文法機能分類抽出部(抽出部)
4 記憶部
5 検索部
51 検索処理部
1 Natural
4
Claims (12)
入力文を文単位で構文解析し、複数の前記構成素と、前記各構成素の種類である構成素種類とを、前記各構成素間の階層的位置関係で表す構文解析結果を生成する構文解析部と、
前記構文解析結果における前記各構成素の前記構成素種類と前記階層的位置関係とに基づき、複数の前記構成素から、所定の文法機能分類に属する前記構成素を抽出する抽出部を備え、
前記所定の文法機能分類は、少なくとも構成素種類が「従属節」または「前置詞句」である構成素について、当該構成素が文の冒頭にあるか、または、文の述語よりも後ろにあるか、までを判別可能な区分を有し、
前記抽出部は、前記各構成素の前記構成素種類と前記各構成素間の前記階層的位置関係が、所定のパターンに適合する場合に、前記複数の構成素から、前記所定の文法機能分類に属する前記構成素を抽出し、
第1の前記構成素の1つ上層の第2の前記構成素の前記構成素種類が「動詞句」であり、
第2の前記構成素の同層の前方に存在し、第2の前記構成素と同一の構成素に上層で接続される第3の前記構成素の前記構成素種類が「助動詞」であり、
第1の前記構成素の3つ上層の第4の前記構成素の前記構成素種類が「文」であり、かつ、
第1の前記構成素の4つ上層に前記構成素が存在しない、
との前記パターンに適合する場合、
前記抽出部は、第1の前記構成素を、前記文法機能分類の1つである「述語」に属する前記構成素として抽出する、
自然言語処理装置。 A natural language processing device that identifies a grammatical function classification indicating a grammatical function classification of a constituent consisting of a group of one or more words that is a constituent unit of a sentence,
A syntax for syntactically analyzing an input sentence on a sentence-by-sentence basis and generating a parsing result representing a plurality of said constituents and a constituent type which is a type of each said constituent by a hierarchical positional relationship between said constituents. an analysis unit;
an extraction unit that extracts the constituents belonging to a predetermined grammatical function classification from the plurality of constituents based on the constituent type and the hierarchical positional relationship of each constituent in the syntactic analysis result,
The predetermined grammatical function classification determines whether at least a constituent whose constituent type is "subordinate clause" or "prepositional phrase" is at the beginning of the sentence or after the predicate of the sentence. , has a distinguishable division ,
The extraction unit extracts the predetermined grammatical function classification from the plurality of constituents when the constituent type of each constituent and the hierarchical positional relationship between the constituents conforms to a predetermined pattern. extracting said constituents belonging to
the constituent type of the second constituent that is one layer above the first constituent is a "verb phrase";
the constituent type of the third constituent that exists in front of the second constituent in the same layer and is connected to the same constituent as the second constituent in the upper layer is an "auxiliary verb";
The constituent type of the fourth constituent element that is three layers above the first constituent element is "sentence", and
there is no said constituent in four layers above the first said constituent,
If it fits the pattern with
The extracting unit extracts the first constituent element as the constituent element belonging to "predicate", which is one of the grammatical function classifications.
Natural language processor.
前記構文解析結果を基に、所定の前記構成素種類である第1の前記構成素から辿った所定の前記構成素種類である第2の前記構成素を特定し、
第2の前記構成素と所定の位置関係を有する第3の前記構成素を、前記文法機能分類の1つに属する前記構成素として抽出する
請求項1に記載の自然言語処理装置。 The extractor is
Based on the syntactic analysis result, identifying the second constituent that is the predetermined constituent type traced from the first constituent that is the predetermined constituent type,
2. The natural language processing device according to claim 1, wherein a third constituent having a predetermined positional relationship with the second constituent is extracted as the constituent belonging to one of the grammatical function classifications.
前記構成素種類が「文」である第1の前記構成素から前記構成素種類が「動詞句」である第2の前記構成素を下層に向けて辿り、
辿られた前記構成素種類が「動詞句」である第2の前記構成素の下層にある前記構成素種類が「動詞」である第3の前記構成素を、前記文法機能分類の1つである「述語」に属する前記構成素として抽出する
請求項2に記載の自然言語処理装置。 The extractor is
Tracing downward from the first constituent whose constituent type is "sentence" to the second constituent whose constituent type is "verb phrase";
The third constituent element whose constituent type is "verb", which is under the second constituent element whose constituent type is "verb phrase", is selected according to one of the grammatical function classifications. 3. The natural language processing device according to claim 2, wherein the constituent element belonging to a certain "predicate" is extracted.
前記文法機能分類が「述語」であるとして抽出した前記構成素を上層に向けて辿り、最も上層に存在する「動詞句」の前記構成素種類を有する前記構成素を特定し、
特定された「動詞句」の前記構成素と同層にある前記構成素種類が「名詞句」である前記構成素を、前記文法機能分類の1つである「主語」に属する前記構成素として抽出する
請求項3に記載の自然言語処理装置。 The extractor is
tracing upward the constituent elements extracted as having the grammatical function classification of "predicate", and identifying the constituent element having the constituent type of "verb phrase" existing in the highest layer;
The constituent element whose constituent type is "noun phrase" and which is in the same layer as the constituent element of the specified "verb phrase" is regarded as the constituent element belonging to "subject" which is one of the grammatical function classifications. The natural language processing device according to claim 3, which extracts.
最も下層に存在する「名詞句」の前記構成素種類を有する前記構成素を、前記文法機能分類の1つである「目的語または補語」に属する前記構成素として抽出する
請求項3または4に記載の自然言語処理装置。 the extracting unit traces downward the constituents of which the constituent type is "verb phrase" connected to the constituents extracted as having the grammatical function classification of "predicate";
5. The constituent element of claim 3 or 4, wherein the constituent element having the constituent type of "noun phrase" existing in the lowest layer is extracted as the constituent element belonging to "object or complement" which is one of the grammatical function classifications. The natural language processing device described.
入力文を文単位で構文解析し、複数の前記構成素と、前記各構成素の種類である構成素種類とを、前記各構成素間の階層的位置関係で表す構文解析結果を生成する構文解析部と、
前記構文解析結果における前記各構成素の前記構成素種類と前記階層的位置関係とに基づき、複数の前記構成素から、所定の文法機能分類に属する前記構成素を抽出する抽出部と、
前記抽出部による文法機能分類の抽出結果を、検索対象として、指定された前記文法機能分類とキーワードとに対応する前記構成素を含む前記文を検索する検索処理部と、
を備え、
前記所定の文法機能分類は、少なくとも構成素種類が「従属節」または「前置詞句」である構成素について、当該構成素が文の冒頭にあるか、または、文の述語よりも後ろにあるか、までを判別可能な区分を有し、
前記抽出部は、前記各構成素の前記構成素種類と前記各構成素間の前記階層的位置関係が、所定のパターンに適合する場合に、前記複数の構成素から、前記所定の文法機能分類に属する前記構成素を抽出し、
第1の前記構成素の1つ上層の第2の前記構成素の前記構成素種類が「動詞句」であり、
第2の前記構成素の同層の前方に存在し、第2の前記構成素と同一の構成素に上層で接続される第3の前記構成素の前記構成素種類が「助動詞」であり、
第1の前記構成素の3つ上層の第4の前記構成素の前記構成素種類が「文」であり、かつ、
第1の前記構成素の4つ上層に前記構成素が存在しない、
との前記パターンに適合する場合、
前記抽出部は、第1の前記構成素を、前記文法機能分類の1つである「述語」に属する前記構成素として抽出する、
検索装置。 A search device for searching using a grammatical function classification that indicates the grammatical function classification of a constituent consisting of a group of one or more words, which is a constituent unit of a sentence,
A syntax for syntactically analyzing an input sentence on a sentence-by-sentence basis and generating a parsing result representing a plurality of said constituents and a constituent type which is a type of each said constituent by a hierarchical positional relationship between said constituents. an analysis unit;
an extraction unit for extracting the constituents belonging to a predetermined grammatical function classification from the plurality of constituents based on the constituent type and the hierarchical positional relationship of each constituent in the syntactic analysis result;
a search processing unit for searching, as a search target, the sentence containing the constituent element corresponding to the specified grammatical function classification and keyword, from the results of the grammatical function classification extracted by the extracting unit;
with
The predetermined grammatical function classification determines whether at least a constituent whose constituent type is "subordinate clause" or "prepositional phrase" is at the beginning of the sentence or after the predicate of the sentence. , has a distinguishable division ,
The extraction unit extracts the predetermined grammatical function classification from the plurality of constituents when the constituent type of each constituent and the hierarchical positional relationship between the constituents conforms to a predetermined pattern. extracting said constituents belonging to
the constituent type of the second constituent that is one layer above the first constituent is a "verb phrase";
the constituent type of the third constituent that exists in front of the second constituent in the same layer and is connected to the same constituent as the second constituent in the upper layer is an "auxiliary verb";
The constituent type of the fourth constituent element that is three layers above the first constituent element is "sentence", and
there is no said constituent in four layers above the first said constituent,
If it fits the pattern with
The extracting unit extracts the first constituent element as the constituent element belonging to "predicate", which is one of the grammatical function classifications.
search device.
入力文を文単位で構文解析し、複数の前記構成素と、前記各構成素の種類である構成素種類とを、前記各構成素間の階層的位置関係で表す構文解析結果を生成するステップと、
前記構文解析結果における前記各構成素の前記構成素種類と前記階層的位置関係とに基づき、複数の前記構成素から、所定の文法機能分類に属する前記構成素を抽出するステップと、
を有し、
前記所定の文法機能分類は、少なくとも構成素種類が「従属節」または「前置詞句」である構成素について、当該構成素が文の冒頭にあるか、または、文の述語よりも後ろにあるか、までを判別可能な区分を有し、
前記抽出するステップでは、前記各構成素の前記構成素種類と前記各構成素間の前記階層的位置関係が、所定のパターンに適合する場合に、前記複数の構成素から、前記所定の文法機能分類に属する前記構成素を抽出し、
第1の前記構成素の1つ上層の第2の前記構成素の前記構成素種類が「動詞句」であり、
第2の前記構成素の同層の前方に存在し、第2の前記構成素と同一の構成素に上層で接続される第3の前記構成素の前記構成素種類が「助動詞」であり、
第1の前記構成素の3つ上層の第4の前記構成素の前記構成素種類が「文」であり、かつ、
第1の前記構成素の4つ上層に前記構成素が存在しない、
との前記パターンに適合する場合、
前記抽出するステップでは、第1の前記構成素を、前記文法機能分類の1つである「述語」に属する前記構成素として抽出する、
自然言語処理方法。 A natural language processing method for identifying a grammatical function classification indicating a grammatical function classification of a constituent consisting of a group of one or more words that is a constituent unit of a sentence,
parsing an input sentence sentence by sentence, and generating a syntactic analysis result representing a plurality of said constituents and a constituent kind which is a kind of each said constituent by a hierarchical positional relationship between said constituents; and,
a step of extracting the constituents belonging to a predetermined grammatical function classification from the plurality of constituents based on the constituent type and the hierarchical positional relationship of each constituent in the syntactic analysis result;
has
The predetermined grammatical function classification determines whether at least a constituent whose constituent type is "subordinate clause" or "prepositional phrase" is at the beginning of the sentence or after the predicate of the sentence. , has a distinguishable division ,
In the extracting step, the predetermined grammatical function is extracted from the plurality of constituents when the constituent type of each constituent and the hierarchical positional relationship between the constituents conform to a predetermined pattern. extracting the constituents belonging to the classification;
the constituent type of the second constituent that is one layer above the first constituent is a "verb phrase";
the constituent type of the third constituent that exists in front of the second constituent in the same layer and is connected to the same constituent as the second constituent in the upper layer is an "auxiliary verb";
The constituent type of the fourth constituent element that is three layers above the first constituent element is "sentence", and
there is no said constituent in four layers above the first said constituent,
If it fits the pattern with
In the extracting step, the first constituent element is extracted as the constituent element belonging to "predicate", which is one of the grammatical function classifications.
Natural language processing method.
入力文を文単位で構文解析し、複数の前記構成素と、前記各構成素の種類である構成素種類とを、前記各構成素間の階層的位置関係で表す構文解析結果を生成するステップと、
前記構文解析結果における前記各構成素の前記構成素種類と前記階層的位置関係とに基づき、複数の前記構成素から、所定の文法機能分類に属する前記構成素を抽出するステップと、
前記抽出するステップによる文法機能分類の抽出結果を、検索対象として、指定された前記文法機能分類とキーワードとに対応する前記構成素を含む前記文を検索するステップと、
を有し、
前記所定の文法機能分類は、少なくとも構成素種類が「従属節」または「前置詞句」である構成素について、当該構成素が文の冒頭にあるか、または、文の述語よりも後ろにあるか、までを判別可能な区分を有し、
前記抽出するステップでは、前記各構成素の前記構成素種類と前記各構成素間の前記階層的位置関係が、所定のパターンに適合する場合に、前記複数の構成素から、前記所定の文法機能分類に属する前記構成素を抽出し、
第1の前記構成素の1つ上層の第2の前記構成素の前記構成素種類が「動詞句」であり、
第2の前記構成素の同層の前方に存在し、第2の前記構成素と同一の構成素に上層で接続される第3の前記構成素の前記構成素種類が「助動詞」であり、
第1の前記構成素の3つ上層の第4の前記構成素の前記構成素種類が「文」であり、かつ、
第1の前記構成素の4つ上層に前記構成素が存在しない、
との前記パターンに適合する場合、
前記抽出するステップでは、第1の前記構成素を、前記文法機能分類の1つである「述語」に属する前記構成素として抽出する、
検索方法。 A retrieval method for retrieving using a grammatical function classification indicating the grammatical function classification of a constituent consisting of a group of one or more words that is a constituent unit of a sentence,
parsing an input sentence sentence by sentence, and generating a syntactic analysis result representing a plurality of said constituents and a constituent kind which is a kind of each said constituent by a hierarchical positional relationship between said constituents; and,
a step of extracting the constituents belonging to a predetermined grammatical function classification from the plurality of constituents based on the constituent type and the hierarchical positional relationship of each constituent in the syntactic analysis result;
a step of searching, as a search target, the sentence containing the constituent element corresponding to the specified grammatical function classification and keyword;
has
The predetermined grammatical function classification determines whether at least a constituent whose constituent type is "subordinate clause" or "prepositional phrase" is at the beginning of the sentence or after the predicate of the sentence. , has a distinguishable division ,
In the extracting step, the predetermined grammatical function is extracted from the plurality of constituents when the constituent type of each constituent and the hierarchical positional relationship between the constituents conform to a predetermined pattern. extracting the constituents belonging to the classification;
the constituent type of the second constituent that is one layer above the first constituent is a "verb phrase";
the constituent type of the third constituent that exists in front of the second constituent in the same layer and is connected to the same constituent as the second constituent in the upper layer is an "auxiliary verb";
The constituent type of the fourth constituent element that is three layers above the first constituent element is "sentence", and
there is no said constituent in four layers above the first said constituent,
If it fits the pattern with
In the extracting step, the first constituent element is extracted as the constituent element belonging to "predicate", which is one of the grammatical function classifications.
retrieval method.
入力文を文単位で構文解析し、複数の前記構成素と、前記各構成素の種類である構成素種類とを、前記各構成素間の階層的位置関係で表す構文解析結果を生成するステップと、
前記構文解析結果における前記各構成素の前記構成素種類と前記階層的位置関係とに基づき、複数の前記構成素から、所定の文法機能分類に属する前記構成素を抽出するステップと、
を実行させるプログラムであって、
前記所定の文法機能分類は、少なくとも構成素種類が「従属節」または「前置詞句」である構成素について、当該構成素が文の冒頭にあるか、または、文の述語よりも後ろにあるか、までを判別可能な区分を有し、
前記抽出するステップでは、前記各構成素の前記構成素種類と前記各構成素間の前記階層的位置関係が、所定のパターンに適合する場合に、前記複数の構成素から、前記所定の文法機能分類に属する前記構成素を抽出し、
第1の前記構成素の1つ上層の第2の前記構成素の前記構成素種類が「動詞句」であり、
第2の前記構成素の同層の前方に存在し、第2の前記構成素と同一の構成素に上層で接続される第3の前記構成素の前記構成素種類が「助動詞」であり、
第1の前記構成素の3つ上層の第4の前記構成素の前記構成素種類が「文」であり、かつ、
第1の前記構成素の4つ上層に前記構成素が存在しない、
との前記パターンに適合する場合、
前記抽出するステップでは、第1の前記構成素を、前記文法機能分類の1つである「述語」に属する前記構成素として抽出する、
プログラム。 A program for causing a computer to execute a natural language processing method for identifying a grammatical function classification indicating a grammatical function classification of a constituent consisting of a group of one or more words that is a constituent unit of a sentence,
parsing an input sentence sentence by sentence, and generating a syntactic analysis result representing a plurality of said constituents and a constituent kind which is a kind of each said constituent by a hierarchical positional relationship between said constituents; and,
a step of extracting the constituents belonging to a predetermined grammatical function classification from the plurality of constituents based on the constituent type and the hierarchical positional relationship of each constituent in the syntactic analysis result;
A program that executes
The predetermined grammatical function classification determines whether at least a constituent whose constituent type is "subordinate clause" or "prepositional phrase" is at the beginning of the sentence or after the predicate of the sentence. , has a distinguishable division ,
In the extracting step, the predetermined grammatical function is extracted from the plurality of constituents when the constituent type of each constituent and the hierarchical positional relationship between the constituents conform to a predetermined pattern. extracting the constituents belonging to the classification;
the constituent type of the second constituent that is one layer above the first constituent is a "verb phrase";
the constituent type of the third constituent that exists in front of the second constituent in the same layer and is connected to the same constituent as the second constituent in the upper layer is an "auxiliary verb";
The constituent type of the fourth constituent element that is three layers above the first constituent element is "sentence", and
there is no said constituent in four layers above the first said constituent,
If it fits the pattern with
In the extracting step, the first constituent element is extracted as the constituent element belonging to "predicate", which is one of the grammatical function classifications.
program.
入力文を文単位で構文解析し、複数の前記構成素と、前記各構成素の種類である構成素種類とを、前記各構成素間の階層的位置関係で表す構文解析結果を生成する構文解析部と、
前記構文解析結果における前記各構成素の前記構成素種類と前記階層的位置関係とに基づき、複数の前記構成素から、所定の文法機能分類に属する前記構成素を抽出する抽出部を備え、
前記抽出部は、前記各構成素の前記構成素種類と前記各構成素間の前記階層的位置関係が、所定のパターンに適合する場合に、前記複数の構成素から、前記所定の文法機能分類に属する前記構成素を抽出し、
第1の前記構成素の1つ上層の第2の前記構成素の前記構成素種類が「動詞句」であり、
第2の前記構成素の同層の前方に存在し、第2の前記構成素と同一の構成素に上層で接続される第3の前記構成素の前記構成素種類が「助動詞」であり、
第1の前記構成素の3つ上層の第4の前記構成素の前記構成素種類が「文」であり、かつ、
第1の前記構成素の4つ上層に前記構成素が存在しない、
との前記パターンに適合する場合、
前記抽出部は、第1の前記構成素を、前記文法機能分類の1つである「述語」に属する前記構成素として抽出する、
自然言語処理装置。 A natural language processing device that identifies a grammatical function classification indicating a grammatical function classification of a constituent consisting of a group of one or more words that is a constituent unit of a sentence,
A syntax for syntactically analyzing an input sentence on a sentence-by-sentence basis and generating a parsing result representing a plurality of said constituents and a constituent type which is a type of each said constituent by a hierarchical positional relationship between said constituents. an analysis unit;
an extraction unit that extracts the constituents belonging to a predetermined grammatical function classification from the plurality of constituents based on the constituent type and the hierarchical positional relationship of each constituent in the syntactic analysis result,
The extraction unit extracts the predetermined grammatical function classification from the plurality of constituents when the constituent type of each constituent and the hierarchical positional relationship between the constituents conforms to a predetermined pattern. extracting said constituents belonging to
the constituent type of the second constituent that is one layer above the first constituent is a "verb phrase";
the constituent type of the third constituent that exists in front of the second constituent in the same layer and is connected to the same constituent as the second constituent in the upper layer is an "auxiliary verb";
The constituent type of the fourth constituent element that is three layers above the first constituent element is "sentence", and
there is no said constituent in four layers above the first said constituent,
If it fits the pattern with
The extracting unit extracts the first constituent element as the constituent element belonging to "predicate", which is one of the grammatical function classifications.
Natural language processor.
入力文を文単位で構文解析し、複数の前記構成素と、前記各構成素の種類である構成素種類とを、前記各構成素間の階層的位置関係で表す構文解析結果を生成する構文解析部と、
前記構文解析結果における前記各構成素の前記構成素種類と前記階層的位置関係とに基づき、複数の前記構成素から、所定の文法機能分類に属する前記構成素を抽出する抽出部を備え、
前記抽出部は、前記各構成素の前記構成素種類と前記各構成素間の前記階層的位置関係が、所定のパターンに適合する場合に、前記複数の構成素から、前記所定の文法機能分類に属する前記構成素を抽出し、
前記入力文に助動詞を含まない場合において、
第1の前記構成素の1つ上層の第2の前記構成素の前記構成素種類が「動詞句」であり、
第1の前記構成素の2つ上層の第3の前記構成素の前記構成素種類が「文」であり、かつ、
第1の前記構成素の3つ上層の構成素が存在しない、
との前記パターンに適合する場合、
前記抽出部は、第1の前記構成素を、前記文法機能分類の1つである「述語」に属する前記構成素として抽出する、
自然言語処理装置。 A natural language processing device that identifies a grammatical function classification indicating a grammatical function classification of a constituent consisting of a group of one or more words that is a constituent unit of a sentence,
A syntax for syntactically analyzing an input sentence on a sentence-by-sentence basis and generating a parsing result representing a plurality of said constituents and a constituent type which is a type of each said constituent by a hierarchical positional relationship between said constituents. an analysis unit;
an extraction unit that extracts the constituents belonging to a predetermined grammatical function classification from the plurality of constituents based on the constituent type and the hierarchical positional relationship of each constituent in the syntactic analysis result,
The extraction unit extracts the predetermined grammatical function classification from the plurality of constituents when the constituent type of each constituent and the hierarchical positional relationship between the constituents conforms to a predetermined pattern. extracting said constituents belonging to
When the input sentence does not contain an auxiliary verb,
the constituent type of the second constituent that is one layer above the first constituent is a "verb phrase";
The constituent type of the third constituent that is two layers above the first constituent is "sentence", and
There are no constituents three layers above the first said constituent,
If it fits the pattern with
The extracting unit extracts the first constituent element as the constituent element belonging to "predicate", which is one of the grammatical function classifications.
Natural language processor.
入力文を文単位で構文解析し、複数の前記構成素と、前記各構成素の種類である構成素種類とを、前記各構成素間の階層的位置関係で表す構文解析結果を生成する構文解析部と、
前記構文解析結果における前記各構成素の前記構成素種類と前記階層的位置関係とに基づき、複数の前記構成素から、所定の文法機能分類に属する前記構成素を抽出する抽出部を備え、
前記抽出部は、前記各構成素の前記構成素種類と前記各構成素間の前記階層的位置関係が、所定のパターンに適合する場合に、前記複数の構成素から、前記所定の文法機能分類に属する前記構成素を抽出し、
前記入力文が重文である場合において、
第1の前記構成素の1つ上層の第2の前記構成素の前記構成素種類が「動詞句」であり、
第1の前記構成素の3つ上層の第3の前記構成素の前記構成素種類が「文」であり、
第2の前記構成素の同層の前方に存在し、第2の前記構成素と同一の構成素に上層で接続される前記構成素の前記構成素種類が「助動詞」であり、かつ、
第1の前記構成素の4つ上層の前記構成素の前記構成素種類が「文」である、
との前記パターンに適合する場合、
前記抽出部は、第1の前記構成素を、前記文法機能分類の1つである「述語」に属する前記構成素として抽出する、
自然言語処理装置。 A natural language processing device that identifies a grammatical function classification indicating a grammatical function classification of a constituent consisting of a group of one or more words that is a constituent unit of a sentence,
A syntax for syntactically analyzing an input sentence on a sentence-by-sentence basis and generating a parsing result representing a plurality of said constituents and a constituent type which is a type of each said constituent by a hierarchical positional relationship between said constituents. an analysis unit;
an extraction unit that extracts the constituents belonging to a predetermined grammatical function classification from the plurality of constituents based on the constituent type and the hierarchical positional relationship of each constituent in the syntactic analysis result,
The extraction unit extracts the predetermined grammatical function classification from the plurality of constituents when the constituent type of each constituent and the hierarchical positional relationship between the constituents conforms to a predetermined pattern. extracting said constituents belonging to
When the input sentence is a compound sentence,
the constituent type of the second constituent that is one layer above the first constituent is a "verb phrase";
the constituent type of the third constituent that is three layers above the first constituent is "sentence";
The constituent type of the constituent that exists in front of the second constituent in the same layer and is connected to the constituent that is the same as the second constituent in the upper layer is an "auxiliary verb", and
The constituent element type of the constituent element four layers above the first constituent element is "sentence",
If it fits the pattern with
The extracting unit extracts the first constituent element as the constituent element belonging to "predicate", which is one of the grammatical function classifications.
Natural language processor.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018093299A JP7227705B2 (en) | 2018-05-14 | 2018-05-14 | Natural language processing device, search device, natural language processing method, search method and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018093299A JP7227705B2 (en) | 2018-05-14 | 2018-05-14 | Natural language processing device, search device, natural language processing method, search method and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2019200488A JP2019200488A (en) | 2019-11-21 |
| JP7227705B2 true JP7227705B2 (en) | 2023-02-22 |
Family
ID=68612093
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2018093299A Active JP7227705B2 (en) | 2018-05-14 | 2018-05-14 | Natural language processing device, search device, natural language processing method, search method and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7227705B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114118086B (en) * | 2020-08-26 | 2025-06-17 | 复旦大学 | A method for extracting association sets based on element description templates for airborne domain |
| KR102543866B1 (en) * | 2021-07-23 | 2023-06-20 | 한국전력공사 | Method for generating library for word embedding |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000148755A (en) | 1998-09-02 | 2000-05-30 | Nippon Telegr & Teleph Corp <Ntt> | Semantic analysis method and apparatus, and recording medium storing semantic analysis program |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH05151261A (en) * | 1991-11-28 | 1993-06-18 | Hitachi Ltd | Tense polish supporting system |
| JPH0635959A (en) * | 1992-07-20 | 1994-02-10 | Csk Corp | Syntax analysis system and syntax analysis control system |
-
2018
- 2018-05-14 JP JP2018093299A patent/JP7227705B2/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000148755A (en) | 1998-09-02 | 2000-05-30 | Nippon Telegr & Teleph Corp <Ntt> | Semantic analysis method and apparatus, and recording medium storing semantic analysis program |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2019200488A (en) | 2019-11-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Martinez-Rodriguez et al. | Information extraction meets the semantic web: a survey | |
| Shahade et al. | Multi-lingual opinion mining for social media discourses: an approach using deep learning based hybrid fine-tuned smith algorithm with adam optimizer | |
| US9588960B2 (en) | Automatic extraction of named entities from texts | |
| Yang et al. | Extract conceptual graphs from plain texts in patent claims | |
| US9846692B2 (en) | Method and system for machine-based extraction and interpretation of textual information | |
| US9053090B2 (en) | Translating texts between languages | |
| US10042880B1 (en) | Automated identification of start-of-reading location for ebooks | |
| US20190392035A1 (en) | Information object extraction using combination of classifiers analyzing local and non-local features | |
| JP7281905B2 (en) | Document evaluation device, document evaluation method and program | |
| Jabbar et al. | A survey on Urdu and Urdu like language stemmers and stemming techniques | |
| US20230205779A1 (en) | System and method for generating a scientific report by extracting relevant content from search results | |
| JP6409071B2 (en) | Sentence sorting method and calculator | |
| Kostić et al. | Monolingual, multilingual and cross-lingual code comment classification | |
| Yeasmin et al. | Study of abstractive text summarization techniques | |
| Al-Zoghby et al. | Semantic relations extraction and ontology learning from Arabic texts—a survey | |
| Wax | Automated grammar engineering for verbal morphology | |
| Galvez et al. | Term conflation methods in information retrieval: Non‐linguistic and linguistic approaches | |
| Siklósi | Using embedding models for lexical categorization in morphologically rich languages | |
| JP7227705B2 (en) | Natural language processing device, search device, natural language processing method, search method and program | |
| JP2001331515A (en) | Word thesaurus structuring method and computer software program product for making computer system structure word thesaurus | |
| Vysotska et al. | LINGUISTIC ANALYSIS AND MODELING SEMANTICS OF TEXTUAL CONTENT FOR DIGEST FORMATION | |
| Pham et al. | A hybrid approach for biomedical event extraction | |
| Sankaravelayuthan et al. | A Comprehensive Study of Shallow Parsing and Machine Translation in Malaylam | |
| JP6476638B2 (en) | Specific term candidate extraction device, specific term candidate extraction method, and specific term candidate extraction program | |
| CN121145861B (en) | A method, apparatus, computer device, and medium for segmenting long documents. |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20210212 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220215 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220218 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220407 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220823 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20221013 |
|
| 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: 20230131 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230210 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7227705 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |