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
JP7227705B2 - Natural language processing device, search device, natural language processing method, search method and program - Google Patents
[go: Go Back, main page]

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 PDF

Info

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
Application number
JP2018093299A
Other languages
Japanese (ja)
Other versions
JP2019200488A (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.)
Mitsubishi Heavy Industries Ltd
Original Assignee
Mitsubishi Heavy Industries Ltd
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 Mitsubishi Heavy Industries Ltd filed Critical Mitsubishi Heavy Industries Ltd
Priority to JP2018093299A priority Critical patent/JP7227705B2/en
Publication of JP2019200488A publication Critical patent/JP2019200488A/en
Application granted granted Critical
Publication of JP7227705B2 publication Critical patent/JP7227705B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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.

特開2003-263428号公報JP-A-2003-263428

ところで、複数の文書を検索対象として、指定した語や文を検索する場合、例えば、指定した語や文の文法機能分類を指定した方が、所望の検索結果を得やすい場合がある。すなわち、検索のキーワードとそのキーワードが例えば主語であることを指定したり、そのキーワードが例えば目的語であることを指定したりすることで、意図にそぐわない検索結果が含まれる割合を低下させ、検索結果の精度を高めることができる場合がある。しかしながら、構文解析では一般的に品詞分類が特定されるだけで、文法機能分類は特定されない。そのため、例えば、構文解析の結果に対して何らかの処理を加えることで文法機能分類を特定する必要がある。例えば、意味解析を行うことで文法機能分類を抽出しようとする場合、特許文献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 Patent Document 1 must be prepared. .

本発明は、上記事情を考慮してなされたものであり、構文解析の結果に対して簡単な処理を行うことで、所定の文法機能分類を構成素に対して特定することができる自然言語処理装置、検索装置、自然言語処理方法、検索方法およびプログラムを提供することを目的とする。 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.

実施形態に係る自然言語処理装置の構成例を示すシステム図である。1 is a system diagram showing a configuration example of a natural language processing device according to an embodiment; FIG. 実施形態に係る構文解析部の動作例を説明するための模式図である。FIG. 5 is a schematic diagram for explaining an operation example of the syntax analysis unit according to the embodiment; 実施形態に係る構文解析結果に含まれる構成素の一例を示す図である。It is a figure which shows an example of the constituent contained in the parsing result which concerns on embodiment. 実施形態に係る文法機能分類抽出部が抽出する文法機能分類一覧を示す図である。FIG. 4 is a diagram showing a list of grammatical function classifications extracted by a grammatical function classification extraction unit according to the embodiment; 実施形態に係る文法機能分類抽出部の第1動作例を示すフローチャートである。4 is a flow chart showing a first operation example of the grammatical function class extraction unit according to the embodiment; 実施形態に係る文法機能分類抽出部の第1動作例を説明するための説明図である。FIG. 10 is an explanatory diagram for explaining a first operation example of the grammatical function class extraction unit according to the embodiment; 実施形態に係る文法機能分類抽出部の第1動作例を説明するための模式図である。FIG. 5 is a schematic diagram for explaining a first operation example of the grammatical function class extraction unit according to the embodiment; 実施形態に係る文法機能分類抽出結果の構成例を示す図である。FIG. 10 is a diagram showing a configuration example of a grammatical function classification extraction result according to the embodiment; 実施形態に係る文法機能分類抽出部の第2動作例を示すフローチャートである。9 is a flow chart showing a second operation example of the grammatical function class extraction unit according to the embodiment; 実施形態に係る文法機能分類抽出部の第2動作例を説明するための模式図である。FIG. 11 is a schematic diagram for explaining a second operation example of the grammatical function class extraction unit according to the embodiment; 実施形態に係る文法機能分類抽出部の第2動作例を説明するための模式図である。FIG. 11 is a schematic diagram for explaining a second operation example of the grammatical function class extraction unit according to the embodiment; 実施形態に係る文法機能分類抽出部の第2動作例を説明するための模式図である。FIG. 11 is a schematic diagram for explaining a second operation example of the grammatical function class extraction unit according to the embodiment; 実施形態に係るコンピュータの構成を示す概略ブロック図である。1 is a schematic block diagram showing the configuration of a computer according to an embodiment; FIG.

以下、図面を参照して各実施形態について説明する。 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 language processing device 1 according to one embodiment.
The natural language processing device 1 shown in FIG. 1 is configured using one or more computers. Each of the one or more computers has a CPU (central processing unit), a main memory, an auxiliary memory, an input/output device, a communication device, etc., and the CPU executes a predetermined program stored in the auxiliary memory. Executes a predetermined process.
A natural language processing device 1 shown in FIG. The syntactic analysis unit 2, the grammatical function classification extraction unit 3, the storage unit 4, and the search unit 5 are configured by a combination of hardware and software provided in each computer that constitutes the natural language processing device 1. FIG. Further, the natural language processing device 1 may have a configuration including a grammatical function classification extraction unit 3 and a storage unit 4 configured using one or a plurality of computers (configuration not including the search unit 5 and the like), for example. However, a configuration including the syntax analysis unit 2 and the grammatical function classification extraction unit 3 (configuration not including the storage unit 4 and the search unit 5) may be used, or the syntax analysis unit 2, the grammatical function classification extraction unit 3, and the search unit 5 (not including the storage unit 4), or a device comprising the grammatical function classification extraction unit 3 and the search unit 5 alone. In addition, below, the case where the natural language processing apparatus 1 which concerns on this embodiment performs predetermined processing for English is demonstrated. Note that the grammatical function class extraction unit 3 is an example of an extraction unit.

記憶部4は、互いに対応づけられた文書41と構文解析結果42と文法機能分類抽出結果43を複数組記憶する。文書41は、検索部5が検索対象とする文書を表す情報である。文書41は、例えば、自然言語処理装置1の外部から通信回線あるいは記憶媒体を介して入力され記憶部4に記憶される。構文解析結果42は、文書41が含む各文に対する構文解析部2による構文解析結果を表す情報である。文法機能分類抽出結果43は、構文解析結果42が含む構文解析結果に対する文法機能分類抽出部3による文法機能分類抽出結果を表す情報である。 The storage unit 4 stores a plurality of sets of documents 41, syntax analysis results 42, and grammatical function classification extraction results 43 that are associated with each other. The document 41 is information representing a document to be searched by the search unit 5 . For example, the document 41 is input from outside the natural language processing apparatus 1 via a communication line or a storage medium and stored in the storage unit 4 . The parsing result 42 is information representing the parsing result of the parsing unit 2 for each sentence included in the document 41 . The grammatical function classification extraction result 43 is information representing the grammatical function classification extraction result by the grammatical function classification extraction unit 3 for the syntactic analysis result included in the syntactic analysis result 42 .

構文解析部2は、既存の構文解析手法を用いて、形式的な文法に基づき記憶部4が記憶する文書41が含む自然言語文を、文単位で構文解析し、解析した結果を構文解析結果42として記憶部4に記憶する。すなわち、構文解析部2は、入力文を文単位で構文解析し、複数の構成素と、各構成素の種類である構成素種類とを、各構成素間の階層的位置関係で表す構文解析結果を生成する。図2に構文解析結果42の一例を示す。 The syntactic analysis unit 2 uses an existing syntactic analysis method to parse the natural language sentences included in the document 41 stored in the storage unit 4 based on the formal grammar for each sentence. 42 is stored in the storage unit 4 . That is, the syntactic analysis unit 2 performs syntactic analysis of an input sentence on a sentence-by-sentence basis, and expresses a plurality of constituents and a constituent type, which is the type of each constituent, by a hierarchical positional relationship between the constituents. produce results. An example of the syntax analysis result 42 is shown in FIG.

図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 parser 2 shown in FIG.
In FIG. 2, the parser 2 inputs one sentence 410 included in the document 41 stored in the memory 4 . Then, the parsing unit 2 outputs a parse tree 420 as a result of parsing one sentence 410 . A parse tree 420 forms part of the parse result 42 . Note that in this case, the sentence 410 is "This tree is illustrating the constitution relation."

構文木420は、文410を構成する各構成素「This」、「tree」、「is」、「illustrating」、「the」、「constituency」、「relation」に対応する節点4202~4208と、節点4202~4208を階層的にまとめた複数の構成素に対応する節点4209~4213を複数の枝4201で接続することで構成されている。また、節点4202には、最上位の階層の節点であることを示す「ROOT」と記されたタグ4200が付けられている。各節点4201~4213は、それぞれが対応する構成素の種類(構成素種類)を示す記号で示されている。図3に構成素の記号の例を示す。 The syntax tree 420 includes nodes 4202 to 4208 corresponding to the constituents "This", "tree", "is", "illustrating", "the", "constituency", and "relation" that make up the sentence 410, and a node It is constructed by connecting nodes 4209 to 4213 corresponding to a plurality of constituent elements hierarchically grouping 4202 to 4208 with a plurality of branches 4201 . Also, node 4202 is tagged with "ROOT" 4200 indicating that it is the node of the highest hierarchy. Each of the nodes 4201 to 4213 is indicated by a symbol indicating the type of constituent (constituent type) to which it corresponds. FIG. 3 shows examples of constituent symbols.

図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 tree 420 shown in FIG. 2, for example, the node 4206 corresponds to the constituent of the "determinant (DT)" corresponding to the constituent "the", and the node 4207 corresponds to the constituent "noun (DT)" corresponding to the constituent "consistency". NN)”, and node 4208 corresponds to the constituent of “noun (NN)” corresponding to the constituent “relation”. Also, node 4209 corresponds to a constituent of "noun phrase (NP)". This node 4209 is located one layer higher than the nodes 4206 to 4208, and the nodes 4206 to 4208 are located in the same layer. In this case, a node 4209 (parent) and nodes 4206 to 4208 (children) are in a parent-child relationship, and the nodes 4206 to 4208 are siblings to each other. In addition, constituents positioned in a higher hierarchy include one or more constituents connected via one or more branches 4201 positioned in a lower hierarchy. In addition, the left and right positional relationship of each node 4202 to 4213 in the figure indicates the front and rear positional relationship of each corresponding constituent element. For example, each of the nodes 4202 to 4208 corresponding to the "word" level constituents shows the positional relationship (order relationship) between the left and right sides of the sentence regardless of the layer. In addition, for each node 4209 to 4213 corresponding to the constituent elements of the level of "phrase" or "clause", the positional relationship between the left and right indicates the positional relationship (order relationship) before and after the sentence for each layer.

なお、構文解析部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 syntax analysis unit 2 may output the result of syntax analysis in a format using nested multiple parentheses, for example. In the example shown in FIG. 2, the parsing result is, for example, "(ROOT (S (NP (DT This) (NN tree)) (VP (VBZ is) (VP (VBG illustration) (NP (DT the) (NN consistency ) (NN relation))))))”.

一方、図1に示す文法機能分類抽出部3は、記憶部4に記憶されている構文解析結果42を参照し、文単位で構文解析結果42における各構成素の構成素種類と各構成素間の階層的位置関係に基づき、複数の構成素から、所定の文法機能分類に属する構成素を抽出する。そして、文法機能分類抽出部3は、解析した結果を文法機能分類抽出結果43として記憶部4に記憶する。本実施形態において、文法機能分類は、「主語」、「述語」、「目的語」または「補語」の分類と、主語、述語、目的語または補語に分類された各構成素に対して所定の位置関係を有する構成素が属する分類(「冒頭にある従属節」、「述語よりも後ろにある名詞句」、・・など)とを含むものとする(詳しくは図4参照)。 On the other hand, the grammatical function classification extraction unit 3 shown in FIG. Constituents belonging to a predetermined grammatical function classification are extracted from a plurality of constituents based on the hierarchical positional relationship of . Then, the grammatical function class extraction unit 3 stores the analysis result in the storage unit 4 as the grammatical function class extraction result 43 . In this embodiment, the grammatical function classification includes the classification of "subject", "predicate", "object" or "complement", and a predetermined Classifications to which constituents having a positional relationship belong ("initial subordinate clause", "noun phrase following predicate", etc.) are included (see FIG. 4 for details).

図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 classification extraction unit 3 shown in FIG.
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 classification extraction unit 3 Identify the predicate or object or complement as being classified as "F_S", "F_V" or "F_OC", and if each sentence is a compound sentence, the subject, predicate or object contained in the main clause of that compound sentence Or identify the complement as being classified as "F_S", "F_V" or "F_OC".

なお、述語動詞とは、例えば英語において述語のうち特にその核となる動詞を意味する。述語動詞は、主語の動きや状態を表現する動詞であり、一般に主語の直後に置かれる。 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 class extraction unit 3 shown in FIG. 1 will be described with reference to FIGS. 5 to 8. FIG. FIG. 5 is a flow chart showing a first operation example of the grammatical function class extraction unit 3 shown in FIG. FIG. 6 is an explanatory diagram for explaining a first operation example of the grammatical function class extraction unit 3 shown in FIG. FIG. 7 is a schematic diagram for explaining a first operation example of the grammatical function classification extraction unit 3 shown in FIG. was having breakfast." as a syntax tree 422. In FIG. 7, the layers of constituent elements are shown as layer numbers 0-5. Layer number 0 is the highest layer (also referred to as the highest layer), and layer number 5 is the lowest layer (also referred to as the lowest layer). FIG. 8 is a diagram showing a configuration example of the grammatical function classification extraction result 43 shown in FIG.

第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 classification extraction unit 3 first determines whether or not there is a document to be extracted (step S10). If there is a document to be extracted, that is, if there is a document 41 that has not been extracted by the grammatical function classification extraction unit 3 among the plurality of documents 41 stored in the storage unit 4 ("Yes" in step S10). case), the grammatical function classification extraction unit 3 selects the document 41 to be extracted (step S11). On the other hand, if there is no document to be extracted ("NO" in step S10), the grammatical function class extraction unit 3 terminates the process.

ステップS11で抽出対象の文書41を選択すると、次に、文法機能分類抽出部3は、選択した文書41から未処理の文を選択する(ステップS12)。次に、文法機能分類抽出部3は、選択した文書41に対応する構文解析結果42に含まれる選択した文の構文解析結果を参照する(ステップS13)。 After selecting the document 41 to be extracted in step S11, the grammatical function classification extraction unit 3 next selects an unprocessed sentence from the selected document 41 (step S12). Next, the grammatical function classification extraction unit 3 refers to the syntactic analysis result of the selected sentence included in the syntactic analysis result 42 corresponding to the selected document 41 (step S13).

次に、文法機能分類抽出部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 classification extraction unit 3 identifies predicates included in the selected sentence (step S14). In step S14, the grammatical function classification extracting unit 3 selects the uppermost layer (the smallest layer number) "S" (the lowest layer number) of the syntax tree, as shown in FIG. "VP" (verb phrase) is traced from the sentence), and the verb to the lower left of "VP" (verb phrase), that is, the verb preceding the verb phrase is specified as the predicate verb. In the example of the syntax tree 422 shown in FIG. 7, the grammatical function classification extraction unit 3 first traces from the "S" node 4221 to the "VP" node 4222 and then to the "VP" node 4223 . Next, the grammatical function classification extraction unit 3 extracts the word "was" corresponding to the "VBD" (verb) node 4224 at the lower left of the node 4222 of "VP" and "VBG" (the lower left of the node 4223 of "VP"). verb) is identified as the predicate verb.

次に、文法機能分類抽出部3は、選択した文に含まれる主語を特定する(ステップS15)。ステップS15において、文法機能分類抽出部3は、図6に「(S15)主語の特定」として示すように、ステップS14で辿ったなかで『最上層(層番号としては最も小さい)の「述語動詞が含まれるVP」と同じ層にある「NP」(名詞句)が主語』であると特定する。図7に示す構文木422の例では、文法機能分類抽出部3は、「VP」の節点4222と同じ層にある「NP」の節点4226の下位に接続された「PRP」(人称代名詞)の節点4227に対応する語「I」を主語として特定する。 Next, the grammatical function class extraction unit 3 identifies the subject included in the selected sentence (step S15). In step S15, the grammatical function classification extraction unit 3, as shown in FIG. Identify the 'NP' (noun phrase) in the same layer as the contained VP' as the subject'. In the example of the syntax tree 422 shown in FIG. 7, the grammatical function classification extraction unit 3 extracts the ``PRP'' (personal pronoun) connected below the ``NP'' node 4226 in the same layer as the ``VP'' node 4222. Identify the word "I" corresponding to node 4227 as the subject.

次に、文法機能分類抽出部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 classification extraction unit 3 identifies objects or complements included in the selected sentence (step S16). In step S16, the grammatical function classification extraction unit 3 selects the "lowest layer (largest layer number)" 'NP' in the same layer as the lower left verb of 'VP' containing the predicate verb is identified as the object/complement'. In the example of the syntax tree 422 shown in FIG. 7, the grammatical function classification extraction unit 3 is connected below the node 4226 of "NP" in the same layer as the node 4225 of "VBG" on the lower left of the node 4223 of "VP". Identify the word "breakfast" corresponding to node 4228 of "NN" (noun) as an object or complement.

次に、文法機能分類抽出部3は、主語、述語、目的語または補語を含む節または句の前後の文法機能分類を特定する(ステップS17)。ステップS17において、文法機能分類抽出部3は、記号「F_SBAR1」(冒頭にある従属節)の分類、記号「F_PP1」(冒頭にある前置詞句)の分類、記号「F_PP2」(述語よりも後ろにある前置詞句)の分類、または記号「F_SBAR2」(述語よりも後ろにある従属節)の分類に対応する構成素を特定する。 Next, the grammatical function classification extraction unit 3 identifies grammatical function classifications before and after the clause or phrase containing the subject, predicate, object or complement (step S17). In step S17, the grammatical function classification extraction unit 3 classifies the symbol "F_SBAR1" (the subordinate clause at the beginning), the symbol "F_PP1" (the prepositional phrase at the beginning), the symbol "F_PP2" (after the predicate). Identify the constituent corresponding to the classification of a certain prepositional phrase) or the classification of the symbol "F_SBAR2" (the subordinate clause following the predicate).

本実施形態において、記号「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 syntax tree 422 shown in FIG. 7, in step S17, the grammatical function classification extraction unit 3 extracts the word corresponding to the constituent corresponding to the node 4229 of "SBAR" that precedes the node 4226 of "NP" that includes the subject. Identify "When", "she", "woke", and "up" as constituents corresponding to the classification of the symbol "F_SBAR1" (the subordinate clause at the beginning).

次に、文法機能分類抽出部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 class extraction unit 3 saves the identification results in steps S14 to S17 in the storage unit 4 as the grammatical function class extraction result 43 (step S18). FIG. 8 shows a portion 430 as a configuration example of the grammatical function classification extraction result 43 . A portion 430 shown in FIG. 8 is the grammatical function classification extraction result 43 for one document 41 including the sentence "When she woke up, I was having breakfast." used as an example in FIG. In this case, the portion 430 is identified by associating the identification information of the document 41 (“document identification information A”) with the identification information of the sentence “When she woke up, I was having breakfast” (“sentence identification information B”). It contains information indicating the words corresponding to the symbols and constituents of the grammatical functional taxonomy. The "document identification information A" is, for example, the file name of the document 41, URI (Uniform Resource Identifier), and the like. "Sentence identification information B" is information for identifying the sentence "When she woke up, I was having breakfast." can be For example, the retrieval unit 5 shown in FIG. 1 can refer to the document 41 and a specific sentence in the document 41 by designating the document identification information and the sentence identification information.

次に、文法機能分類抽出部3は、選択した文書31内に未処理の文があるか否かを判断する(ステップS19)。未処理の文がある場合(ステップS19で「YES」の場合)、文法機能分類抽出部3は、ステップS12以降の処理を再度実行する。一方、未処理の文がない場合(ステップS19で「NO」の場合)、文法機能分類抽出部3は、ステップS10以降の処理を再度実行する。 Next, the grammatical function classification extraction unit 3 determines whether or not there is an unprocessed sentence in the selected document 31 (step S19). If there is an unprocessed sentence ("YES" in step S19), the grammatical function class extraction unit 3 executes the processes after step S12 again. On the other hand, if there is no unprocessed sentence ("NO" in step S19), the grammatical function classification extraction unit 3 executes the processes after step S10 again.

以上のように、第1動作例では、文法機能分類抽出部3が、構文解析結果を基に、所定の構成素種類である構成素(第1の構成素とする)から辿った所定の構成素種類である構成素(第2の構成素とする)を特定し、第2の構成素と所定の位置関係を有する構成素(第3の構成素とする)を、文法機能分類の1つに属する構成素として抽出する。よって、概念辞書等を使用することなく、構文解析の結果に対して簡単な処理を行うことで、所定の文法機能分類を構成素に対して特定することができる。 As described above, in the first operation example, the grammatical function classification extracting unit 3 extracts a predetermined structure traced from a constituent of a predetermined constituent type (referred to as a first constituent) based on the syntactic analysis result. A constituent that is a class of primes (referred to as a second constituent) is specified, and a constituent that has a predetermined positional relationship with the second constituent (referred to as a third constituent) is classified as one of the grammatical function classifications. are extracted as constituents belonging to . Therefore, a predetermined grammatical function classification can be specified for a constituent by performing a simple process on the syntactic analysis result without using a concept dictionary or the like.

また、第1動作例において文法機能分類抽出部3は、構成素種類が「文」である構成素(上記第1の構成素に該当)から構成素種類が「動詞句」である構成素(上記第2の構成素に該当)を下層に向けて辿り、辿られた構成素種類が「動詞句」である構成素(上記第2の構成素に該当)の下層にある構成素種類が「動詞」である構成素(上記第3の構成素に該当)を、文法機能分類の1つである「述語」に属する構成素として抽出する。すなわち、第1動作例によれば、構文解析の結果に対して簡単な処理を行うことで、「述語」の文法機能分類を構成素に対して特定することができる。 In the first operation example, the grammatical function classification extraction unit 3 extracts constituents (corresponding to the first constituent) whose constituent type is "sentence" from constituents whose constituent type is "verb phrase". (corresponding to the second constituent) is traced downward, and the Constituents that are "verbs" (corresponding to the third constituent) are extracted as constituents that belong to "predicate", which is one of the grammatical function classifications. That is, according to the first operation example, the grammatical function classification of the "predicate" can be specified for the constituent by performing a simple process on the syntactic analysis result.

また、第1動作例において文法機能分類抽出部3は、上記文法機能分類が「述語」であるとして抽出した構成素を上層に向けて辿り、最も上層に存在する「動詞句」の構成素種類を有する構成素を特定し、特定された「動詞句」の構成素と同層にある構成素種類が「名詞句」である構成素を、文法機能分類の1つである「主語」に属する構成素として抽出する。すなわち、第1動作例によれば、構文解析の結果に対して簡単な処理を行うことで、「主語」の文法機能分類を構成素に対して特定することができる。 Further, in the first operation example, the grammatical function class extraction unit 3 traces upward the constituents extracted as having the grammatical function class of "predicate", and finds the constituent type of "verb phrase" existing in the highest layer. , and the constituents whose constituent type is "noun phrase" in the same layer as the constituent of the identified "verb phrase" belong to "subject", which is one of the grammatical functional classifications Extract as constituents. That is, according to the first operation example, the grammatical function classification of the "subject" can be specified for the constituent by performing a simple process on the syntactic analysis result.

また、第1動作例において文法機能分類抽出部3は、上記文法機能分類が「述語」であるとして抽出した構成素に接続された構成素種類が「動詞句」である構成素を下層に向けて辿り、最も下層に存在する「名詞句」の構成素種類を有する構成素を、文法機能分類の1つである「目的語または補語」に属する構成素として抽出する。すなわち、第1動作例によれば、構文解析の結果に対して簡単な処理を行うことで、「目的語または補語」の文法機能分類を構成素に対して特定することができる。 Further, in the first operation example, the grammatical function class extraction unit 3 directs constituents of which the class of constituents is "verb phrase" connected to the constituents extracted as having the grammatical function class of "predicate" to the lower layer. Then, the constituent element having the constituent type of "noun phrase" existing in the lowest layer is extracted as a constituent element belonging to "object or complement" which is one of the grammatical function classifications. That is, according to the first operation example, the grammatical function classification of "object or complement" can be specified for constituents by performing a simple process on the syntactic analysis result.

次に、図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 class extraction unit 3 shown in FIG. 1 will be described with reference to FIGS. 9 to 12. FIG. FIG. 9 is a flow chart showing a second operation example of the grammatical function class extraction unit 3 shown in FIG. FIG. 10 is a schematic diagram for explaining a second operation example of the grammatical function class extraction unit 3 shown in FIG.
FIG. 10(a) shows an example of a pattern used by the grammatical function classification extraction unit 3, and FIG. 10(b) shows an example of the result of syntactic analysis to be processed when the input sentence is "The Student should read an interesting book .” is shown as a syntax tree 423 .
Here, this input sentence contains the auxiliary verb "should".
FIG. 11(a) shows an example of another pattern used by the grammatical function classification extraction unit 3, and FIG. 11(b) shows an example of the parsing result to be processed when the input sentence is "Members are loved by a "big dog that eats sugar toasts and have a good amount of muscle." Here, this input sentence does not contain an auxiliary verb.
FIG. 12(a) shows an example of another pattern used by the grammatical function classification extraction unit 3, and FIG. 12(b) shows an example of the syntactic analysis result to be processed when the input sentence is "In the library the student should read good.""Workbooks and the Librarian should ensure that all the books are vandal resistant." Here, the input sentences are compound sentences, each sentence containing the auxiliary verb "should".
In the second operation example, the grammatical function classification extraction unit 3 extracts the grammatical function classifications shown in FIG. 4 as in the first operation example.

第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 classification extraction unit 3 first determines whether or not there is a document to be extracted (step S20). If there is a document to be extracted, that is, if there is a document 41 that has not been extracted by the grammatical function class extraction unit 3 among the plurality of documents 41 stored in the storage unit 4 ("Yes" in step S20). case), the grammatical function classification extraction unit 3 selects the document 41 to be extracted (step S21). On the other hand, if there is no document to be extracted ("NO" in step S20), the grammatical function class extraction unit 3 terminates the process.

ステップS21で抽出対象の文書41を選択すると、次に、文法機能分類抽出部3は、選択した文書41から未処理の文を選択する(ステップS22)。次に、文法機能分類抽出部3は、選択した文書41に対応する構文解析結果42に含まれる選択した文の構文解析結果を参照する(ステップS23)。 After selecting the document 41 to be extracted in step S21, the grammatical function classification extraction unit 3 next selects an unprocessed sentence from the selected document 41 (step S22). Next, the grammatical function classification extraction unit 3 refers to the syntactic analysis result of the selected sentence included in the syntactic analysis result 42 corresponding to the selected document 41 (step S23).

次に、文法機能分類抽出部3は、選択した文の種類に対応する1または複数のパターンを選択する(ステップS24)。ここで、文の種類に対応するパターンとは、所定の文の種類毎かつ文法機能分類毎に予め設定した構文解析結果(構文木)の形態である。文の種類とは、例えば、当該文が重文であるとか、重文ではない文であるとか、当該文が助動詞を含む文であるとかといった文の分類である。また、パターンとは、複数の節点(構成素)間の接続形態に対応するものであり、文法機能分類毎に設定される。各パターンは、文の種類毎に、例えば、ある節点がある文法機能分類に属する場合には当該節点に対して他の節点がどうような構成素種類であってどのような接続関係にあるのかということを示して定義することができる。なお、各パターンは、例えば複数の例文を対象にして試行錯誤的に作成することができる。 Next, the grammatical function class extraction unit 3 selects one or more patterns corresponding to the selected sentence type (step S24). Here, the pattern corresponding to the type of sentence is the form of the syntactic analysis result (syntax tree) set in advance for each predetermined sentence type and for each grammatical function classification. The sentence type is, for example, a sentence classification such as whether the sentence is a compound sentence, a non-compound sentence, or a sentence containing an auxiliary verb. A pattern corresponds to a form of connection between a plurality of nodes (constituents), and is set for each grammatical function classification. For each pattern, for each type of sentence, for example, if a certain node belongs to a certain grammatical function class, what kind of constituent type and what kind of connection relationship other nodes have with respect to that node? It can be defined by showing that Each pattern can be created by trial and error, for example, for a plurality of example sentences.

図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 rules 1 through 4. When all of rules 1 to 4 are satisfied, the grammatical function class extraction unit 3 specifies that the grammatical function class of the node is "F_V" (predicate). Rule 1 is "first parent is VP (verb phrase)", rule 2 is "first parent's left brother is MD", rule 3 is "third parent is S (sentence)", rule 4 is "missing a fourth parent".

図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 tree 423, which is the result of syntactic analysis of a sentence containing auxiliary verbs shown in FIG. The constituent kind of 4232 is "VP" and rule 1 is satisfied. Also, the constituent type of the left sibling node 4233 of the first parent node 4232 is "MD", and rule 2 is satisfied. The constituent type of node 4235, which is the parent (third parent) of node 4234, which is the second parent of node 4231, is "S (sentence)", and rule 3 is satisfied. And since the third parent node 4235 is "ROOT", rule 4 is satisfied. Therefore, based on the syntax tree 423 shown in FIG. 10B, the grammatical function classification extraction unit 3 can identify that the word "provide" corresponding to the node 4231 is the grammatical function classification "F_V" (predicate). .

また、図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 rules 1 through 3. When all of rules 1 to 3 are satisfied, the grammatical function class extraction unit 3 specifies that the grammatical function class of the node is "F_V" (predicate). Rule 1 is "first parent is VP (verb phrase)", rule 2 is "second parent is S (sentence)", and rule 3 is "no third parent".

図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 tree 424, which is the result of syntactic analysis of a sentence that does not include auxiliary verbs, shown in FIG. The constituent kind of node 4242 is "VP" and rule 1 is satisfied. Also, the constituent type of node 4243, which is the second parent of node 4241, is "S (sentence)", and rule 2 is satisfied. And since the second parent node 4243 is "ROOT", rule 3 is satisfied. Therefore, based on the syntax tree 424 shown in FIG. 11B, the grammatical function class extraction unit 3 can identify that the word "are" corresponding to the node 4241 is the grammatical function class "F_V" (predicate). .

また、図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 rules 1 through 4. When all of rules 1 to 4 are satisfied, the grammatical function class extraction unit 3 specifies that the grammatical function class of the node is "F_V" (predicate). Rule 1 is "The first parent is VP (verb phrase)", Rule 2 is "The third parent is S (sentence)", Rule 3 is "The left brother of the first parent is MD (auxiliary verb)" ', and rule 4 is 'the fourth parent is S (sentence)'.

図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 eye parent node 4252 is "VP" and rule 1 is satisfied. Also, the constituent type of node 4253, which is the third parent of node 4251, is "S (sentence)", and rule 2 is satisfied. Also, the constituent kind of the left sibling node 4254 of the first parent node 4252 is "MD", and rule 3 is satisfied. The constituent type of node 4255, which is the fourth parent of node 4251, is "S (sentence)", and rule 4 is satisfied. Therefore, based on the syntax tree 425 shown in FIG. 12(b), the grammatical function class extraction unit 3 can identify that the word "enable" corresponding to the node 4251 is the grammatical function class "F_V" (predicate). .

また、構文木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 node 4256 whose constituent type is "verb (VB)", the constituent type of the first parent node 4257 of the node 4256 is "VP", and rule 1 is It is filled. Also, the constituent type of node 4258, which is the third parent of node 4256, is "S (sentence)", and rule 2 is satisfied. Also, the constituent type of the left sibling node 4259 of the first parent node 4257 is "MD", and rule 3 is satisfied. The constituent type of node 4255, which is the fourth parent of node 4256, is "S (sentence)", and rule 4 is satisfied. Therefore, based on the syntax tree 425 shown in FIG. 12(b), the grammatical function classification extraction unit 3 can identify that the word "enable" corresponding to the node 4256 is the grammatical function classification "F_V" (predicate). .

さて、ステップ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 classification extraction unit 3 selects the Each constituent belonging to a predetermined grammatical function classification is specified as described with reference to FIGS. 10 to 12 (step S25).

次に、文法機能分類抽出部3は、ステップS25での特定結果を、第1動作例と同様にして文法機能分類抽出結果43として記憶部4に保存する(ステップS26)。 Next, the grammatical function class extraction unit 3 stores the result of identification in step S25 in the storage unit 4 as the grammatical function class extraction result 43 in the same manner as in the first operation example (step S26).

次に、文法機能分類抽出部3は、選択した文書41内に未処理の文があるか否かを判断する(ステップS27)。未処理の文がある場合(ステップS27で「YES」の場合)、文法機能分類抽出部3は、ステップS22以降の処理を再度実行する。一方、未処理の文がない場合(ステップS27で「NO」の場合)、文法機能分類抽出部3は、ステップS20以降の処理を再度実行する。 Next, the grammatical function classification extraction unit 3 determines whether or not there is an unprocessed sentence in the selected document 41 (step S27). If there is an unprocessed sentence ("YES" in step S27), the grammatical function class extraction unit 3 executes the processes after step S22 again. On the other hand, if there is no unprocessed sentence ("NO" in step S27), the grammatical function class extraction unit 3 executes the processes after step S20 again.

以上のように第2動作例では、文法機能分類抽出部3が、各構成素の構成素種類と各構成素間の階層的位置関係が、所定のパターンに適合する場合に、複数の構成素から、所定の文法機能分類に属する構成素を抽出する。よって、概念辞書等を使用することなく、構文解析の結果に対して簡単な処理を行うことで、所定の文法機能分類を構成素に対して特定することができる。 As described above, in the second operation example, the grammatical function classification extraction unit 3 selects a plurality of constituents when the constituent type of each constituent and the hierarchical positional relationship between the constituents conform to a predetermined pattern. , to extract constituents belonging to a predetermined grammatical function classification. Therefore, a predetermined grammatical function classification can be specified for a constituent by performing a simple process on the syntactic analysis result without using a concept dictionary or the like.

また、第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 classification extraction unit 3 determines that the constituent type of a constituent (assumed to be a second constituent) that is one layer above a certain constituent (assumed to be a first constituent) is "verb The constituent type of a constituent (referred to as the third constituent) that is "phrase" and exists in front of the second constituent in the same layer and is connected in the upper layer to the same constituent as the second constituent is an "auxiliary verb", the constituent type of a constituent element three layers above the first constituent element (assumed to be the fourth constituent element) is "sentence", and four constituent elements above the first constituent element With a predetermined pattern that a constituent does not exist in the grammatical function classification is extracted as a constituent belonging to "predicate" which is one of That is, according to the second operation example, by performing a simple process on the syntactic analysis result, it is possible to specify the grammatical functional classification of the "predicate" for the constituent when the input sentence includes an auxiliary verb. can.

また、第2動作例において文法機能分類抽出部3は、入力文に助動詞を含まない場合において、ある構成素(第1の構成素とする)の1つ上層の構成素(第2の構成素とする)の構成素種類が「動詞句」であり、第1の構成素の2つ上層の構成素(第3の構成素とする)の構成素種類が「文」であり、かつ、第1の構成素の3つ上層の構成素が存在しないということを所定のパターンとして、各構成素の構成素種類と各構成素間の階層的位置関係が当該パターンに適合するときに、第1の構成素を、文法機能分類の1つである「述語」に属する構成素として抽出する。すなわち、第2動作例によれば、構文解析の結果に対して簡単な処理を行うことで、入力文が助動詞を含む場合に「述語」の文法機能分類を構成素に対して特定することができる。 Further, in the second operation example, the grammatical function classification extraction unit 3 extracts a constituent (a second constituent) that is one layer higher than a certain constituent (assumed to be the first constituent) when the input sentence does not contain an auxiliary verb. The constituent type of the first constituent is "verb phrase", and the constituent type of the constituent two levels above the first constituent (which is assumed to be the third constituent) is "sentence", and With a predetermined pattern that there is no constituent element three layers above the constituent element of 1, when the constituent type of each constituent element and the hierarchical positional relationship between the constituent elements conform to the pattern, the first is extracted as a constituent belonging to "predicate" which is one of the grammatical function classifications. That is, according to the second operation example, by performing a simple process on the syntactic analysis result, it is possible to specify the grammatical functional classification of the "predicate" for the constituent when the input sentence includes an auxiliary verb. can.

また、第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 classification extraction unit 3 extracts a constituent element that is one layer higher than a constituent element (referred to as a first constituent element) The constituent type of the first constituent is "verb phrase", the constituent type of the constituent three levels above the first constituent (which is called the third constituent) is "sentence", and the second constituent is A constituent element of a constituent element (fifth constituent element) that exists in front of the same layer of the element and is connected in the upper layer to another constituent element (fourth constituent element) like the second constituent element The type is "auxiliary verb", and the constituent type of the constituent four layers above the first constituent is "sentence" is used as a predetermined pattern, the constituent type of each constituent and each constituent When the hierarchical positional relationship between the elements matches the pattern, the first constituent is extracted as a constituent belonging to "predicate" which is one of the grammatical function classifications. That is, according to the second operation example, by performing a simple process on the syntactic analysis result, it is possible to specify the grammatical functional classification of the "predicate" for the constituent when the input sentence includes an auxiliary verb. can.

一方、図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 search processing unit 51 . The search processing unit 51 searches the grammatical function classification extraction result 43 as a search target for sentences containing constituents corresponding to the designated grammatical function classification 52 and keyword 53 , and outputs a search result 54 . The search unit 5 extracts, for example, a sentence including one or more words extracted as the specified grammatical function classification 52 that matches the specified keyword 53 and outputs it as a search result 54 . That is, the search processing unit 51 extracts an input sentence based on a plurality of constituents that are constituent units of the sentence, constituent types that are the types of each constituent, and hierarchical positional relationships between the constituents. with reference to the syntactic analysis result 42 representing, based on the constituent type of each constituent in the syntactic analysis result 42 and the hierarchical positional relationship between each constituent, a constituent belonging to a predetermined grammatical function classification is selected from a plurality of constituents The grammatical function class extraction result 43, which is the result of extracting

検索部5によれば、文法機能分類を考慮することで、考慮しない単純なキーワード検索よりも精度高く意図する文を抽出することができる。 According to the search unit 5, by considering the grammatical function classification, it is possible to extract the intended sentence with higher precision than a simple keyword search that does not consider the grammatical function classification.

なお、検索部5が入力する文法機能分類52とキーワード53はそれぞれ1つであってもよいし、複数であってもよい。複数の場合には例えば論理和や論理積、否定等を用いて組み合わせることができる。例えば、検索部5は、指定した第1の文法機能分類52で第1のキーワード53に一致する1または複数の語を含み、かつ、指定した第2の文法機能分類52で第2のキーワード53に一致する1または複数の語を含まない文を検索することができる。 The grammatical function classification 52 and the keyword 53 input by the search unit 5 may be one each, or may be plural. In the case of a plurality of numbers, they can be combined using, for example, a logical sum, logical product, negation, or the like. For example, the search unit 5 includes one or more words that match the first keyword 53 in the first designated grammatical function classification 52 and the second keyword 53 in the second designated grammatical function classification 52 . can be searched for sentences that do not contain one or more words matching .

以上のように、本実施形態によれば、構文解析の結果に対して簡単な処理を行うことで、構成素に対して所定の文法機能分類を特定することができる。また、本実施形態によれば、文法機能分類を考慮することで、考慮しない単純なキーワード検索よりも精度高く意図する文を抽出することができる。 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 language processing device 1 of the present embodiment can process natural languages other than English, such as Japanese. In that case, the natural language processing device 1 may be configured to perform morphological analysis. The content of the document 41 is not limited. can be the document 41 to be processed. In this case, when equipment names, parts names, material names, and their attributes are used as keywords, more detailed searches can be performed by using grammatical function classifications such as subjects and objects, and search accuracy can be improved. There is expected. For example, measurement conditions are often written at the beginning, and it may be effective to perform a search to exclude words that match the keyword written at the beginning, for example. Further, the grammatical function class extraction unit 3 may extract (specify) a grammatical function class by combining the above-described first operation example and second operation example.

図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 computer 9 includes a CPU 91 , a main storage device 92 , an auxiliary storage device 93 and an interface 94 .
The natural language processing device 1 described above comprises a computer 9 . The operation of each processing unit described above is stored in the auxiliary storage device 93 in the form of a program. The CPU 91 reads out the program from the auxiliary storage device 93, develops it in the main storage device 92, and executes the above process according to the program. For example, the CPU 91 may be the syntactic analysis unit 2, the grammatical function classification extraction unit 3, and the search unit 5 (search processing unit 51) described above.
Further, the CPU 91 may secure a storage area corresponding to the above-described storage section 4 in the main storage device 92 or the auxiliary storage device 93 according to the program.
Some or all of the programs and data constituting the natural language processing device 1, the parser 2, the grammatical function class extraction unit 3, the search unit 5, the grammatical function class extraction result 43, etc. are computer readable. It can be distributed via recording media or communication lines. Moreover, when the natural language processing device 1 is composed of a plurality of computers, the plurality of computers may be arranged in a distributed manner via a network.

以上、この発明の実施形態を、図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。 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 language processing device 2 Syntax analysis unit 3 Grammar function classification extraction unit (extraction unit)
4 storage unit 5 search unit 51 search processing unit

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.
JP2018093299A 2018-05-14 2018-05-14 Natural language processing device, search device, natural language processing method, search method and program Active JP7227705B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (1)

* Cited by examiner, † Cited by third party
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