JP2006277674A - Sentence division computer program - Google Patents

Sentence division computer program Download PDF

Info

Publication number
JP2006277674A
JP2006277674A JP2005100017A JP2005100017A JP2006277674A JP 2006277674 A JP2006277674 A JP 2006277674A JP 2005100017 A JP2005100017 A JP 2005100017A JP 2005100017 A JP2005100017 A JP 2005100017A JP 2006277674 A JP2006277674 A JP 2006277674A
Authority
JP
Japan
Prior art keywords
sentence
analogy
database
program
division
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2005100017A
Other languages
Japanese (ja)
Inventor
Lepage Yves
イヴ・ルパージュ
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.)
ATR Advanced Telecommunications Research Institute International
Original Assignee
ATR Advanced Telecommunications Research Institute International
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 ATR Advanced Telecommunications Research Institute International filed Critical ATR Advanced Telecommunications Research Institute International
Priority to JP2005100017A priority Critical patent/JP2006277674A/en
Publication of JP2006277674A publication Critical patent/JP2006277674A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a computer program for making a computer accurately and quickly divide various sentences without having to perform pre-processing or editing data. <P>SOLUTION: This sentence division program 86 is used with a database 88 including three or more pairs constituted of a sentence and divided character strings obtained by dividing the sentence. The sentence division program 86 is provided with a division program section 90 for, when given a sentence to be processed, selecting arbitrary two sentences from the database 88, and for generating an analogical sentence from the two sentences and the sentence to be processed, and for, when any analogical sentence exists in the database 88, reading divided character strings making a pair with the analogical sentence and the two sentences in the database 88, and for generating an analogical divided character strings by using the read three divided character strings. This sentence division program 86 is also provided with an input/output program section 92 for giving an input sentence 82 to the division program section 90, and for outputting the analogical divided character strings generated by the division program section 90 from the input sentence 82 as an output sentence 84. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

この発明は、自然言語処理に関し、特に、単語等を単位とする所定単位に文字列を分割する技術に関する。   The present invention relates to natural language processing, and more particularly to a technique for dividing a character string into predetermined units each including a word or the like.

自然言語の文章をコンピュータで処理するためには、まず、処理対象の文章を単語又は形態素等の単位に分割し、個々の要素がどのようなものであるかを同定する処理が必要となる。例えば、単語と単語との境界を記号「|」で表した場合、日本語の文「来週出発したいと思っています。」を単語単位で分割すると、「来週|出発|したい|と|思って|います|。」となる。特に、日本語、中国語、タイ語等の言語の文は、英語等の言語のように単語ごとに分かち書きされることなく一続きに表記されるため、文を単語等の単位に分割する処理は必須の処理といえる。   In order to process a natural language sentence with a computer, first, it is necessary to divide the sentence to be processed into units such as words or morphemes and to identify what individual elements are. For example, if the boundary between words is represented by the symbol “|”, the Japanese sentence “I want to leave next week” is divided into words, then “Next week | "There is." Especially, sentences in languages such as Japanese, Chinese, Thai, etc. are written in a single line without being divided into words as in languages such as English, so the process of dividing the sentence into units such as words Is an essential process.

文を単語単位に分割するための手法として、大別して次の2種類の手法が知られている。すなわち、一つは辞書を用いる技術であり、もう一つは統計的な手法である。   As methods for dividing a sentence into words, the following two types of methods are known. That is, one is a technique using a dictionary and the other is a statistical technique.

辞書を用いる手法で分割を行なう場合、一般的にはまず有限状態オートマトンとして構成された辞書を用意する。そして、文頭から順に文中の文字と辞書中の文字とを照合し、先行する単語を構成する最後の文字と、その次の単語を構成する最初の文字との境界を決定する。この処理を文末に向かって順次行ない、単語と単語との境界を決定する。   When division is performed by a method using a dictionary, generally a dictionary configured as a finite state automaton is first prepared. Then, the characters in the sentence and the characters in the dictionary are collated in order from the beginning of the sentence, and the boundary between the last character constituting the preceding word and the first character constituting the next word is determined. This process is sequentially performed toward the end of the sentence to determine the boundary between words.

統計的な手法で分割を行なう場合、まず、事前に用意した学習データを処理して確率モデルを推論するための統計情報を得る、いわゆる学習段階の処理を行なう。確率モデルには様々なものが存在するが、通常、N−グラム頻度に依存するモデルを用いる。確率モデルは、例えばGood−Turingの評価法等を用いて平滑化され評価される。このような学習の結果、状態遷移という形態の情報が得られる。この状態遷移を使えば、処理中の文字又は処理予定の文字についての知識が与えられるので、処理中の文字が単語の最後の文字であるか否か、すなわちその位置に空白を置くべきか否かを決定することができる。学習段階の処理は、学習データが適切に処理され、確率モデルより知識が得られるまで実行される。その後に、学習で得られた知識を用いて単語と単語との境界を決定する。   When the division is performed by a statistical method, first, a so-called learning stage process is performed in which learning data prepared in advance is processed to obtain statistical information for inferring a probability model. There are various probabilistic models, but a model that depends on the N-gram frequency is usually used. The probability model is smoothed and evaluated using, for example, the Good-Turing evaluation method. As a result of such learning, information in the form of state transition is obtained. This state transition gives knowledge about the character being processed or to be processed, so whether or not the character being processed is the last character of a word, i.e. whether a blank should be placed at that position. Can be determined. The process in the learning stage is executed until the learning data is appropriately processed and knowledge is obtained from the probability model. After that, the boundary between words is determined using the knowledge obtained by learning.

特許第3172511号公報Japanese Patent No. 3172511

辞書を用いる手法では、処理は非決定性を有する。すなわち、同じ文が異なる分割の仕方で分割されることがある。また、この手法で分割を行なうには、処理対象の言語の文法的知識等に基づき予め大規模かつ適切な辞書を編集しておく必要がある。   In the method using a dictionary, the processing is nondeterministic. That is, the same sentence may be divided in different ways. Further, in order to perform division by this method, it is necessary to edit a large-scale and appropriate dictionary in advance based on grammatical knowledge of the language to be processed.

統計的な手法に基づく技術では、用意したデータを前処理しておかなければならない。すなわち、処理に先立ち、膨大な量の学習データを用いて学習を行なう必要がある。また、確率モデルにN−グラムモデルを用いた場合、分割の処理対象となる文脈は所定の長さに固定されてしまい、長い文脈での処理に適さない。   In the technique based on the statistical method, the prepared data must be preprocessed. That is, it is necessary to perform learning using a huge amount of learning data prior to processing. Further, when the N-gram model is used as the probability model, the context to be processed for division is fixed to a predetermined length, which is not suitable for processing in a long context.

それゆえに、本発明の目的は、膨大な量の前処理やデータの編集を必要とせず、コンピュータに、様々な文を正確かつ迅速に分割させるコンピュータプログラムを提供することである。   Therefore, an object of the present invention is to provide a computer program that allows a computer to divide various sentences accurately and quickly without requiring an enormous amount of preprocessing and data editing.

本発明の第1の局面に係る文分割コンピュータプログラムは、文と、その文を所定単位で分割した分割文字列とからなる対を3個以上含む、コンピュータ読取可能なデータベースとともに用いられるコンピュータプログラムである。この文分割コンピュータプログラムは、処理対象の文が与えられると、データベースを用いて処理対象の文に対する分割文字列を生成するための文分割プログラム部分と、外部から与えられる入力文を文分割プログラム部分に与え、入力文に対して文分割プログラム部分が出力する分割文字列を、入力文に対する分割文字列として出力するための入出力プログラム部分とを含む。文分割プログラム部分は、処理対象の文が与えられると、データベースから任意の二つの文を選択し、当該二つの文と処理対象の文とから所定の第1の類推式を生成し、第1の類推式を解いて類推文を生成するための第1の類推プログラム部分と、類推文がデータベースに存在するか否かを判定するための判定プログラム部分と、判定プログラム部分により類推文がデータベースに存在すると判定されたことに応答して、データベース中で類推文と対になっている分割文字列、及びデータベース中で二つの文とそれぞれ対になっている二つの分割文字列を、データベースから読出すための読出プログラム部分と、読出プログラム部分により読出された3つの分割文字列を用いて、第1の類推式と所定の関係を有する第2の類推式を生成し、第2の類推式を解いて類推分割文字列を生成して文分割プログラム部分の戻り値として出力するための第2の類推プログラム部分とを含む。   The sentence division computer program according to the first aspect of the present invention is a computer program that is used together with a computer-readable database that includes three or more pairs of a sentence and a divided character string obtained by dividing the sentence by a predetermined unit. is there. When a sentence to be processed is given, the sentence dividing computer program uses a database to generate a divided character string part for generating a divided character string for the sentence to be processed, and an input sentence given from the outside as a sentence dividing program part. And an input / output program part for outputting a divided character string output by the sentence dividing program part for the input sentence as a divided character string for the input sentence. When a sentence to be processed is given, the sentence division program part selects arbitrary two sentences from the database, generates a predetermined first analogy from the two sentences and the sentence to be processed, A first analogy program part for generating an analogy sentence by solving the analogy formula, a determination program part for determining whether the analogy sentence exists in the database, and an analogy sentence in the database by the determination program part In response to being determined to exist, it reads from the database the split character string that is paired with the analogy sentence in the database and the two split character strings that are paired with two sentences in the database. A second analogical equation having a predetermined relationship with the first analogical equation is generated using the read program portion for the output and the three divided character strings read by the read program portion; And generating an analogy divided character string by solving the analogy equation and a second analogy program part for outputting as the return value of the sentence divided program parts.

好ましくは、第1の類推プログラム部分は、処理対象の文が与えられると、データベース中の文の順序対(A,B)を全て選択するためのプログラム部分と、選択された順序対の各々に対し、処理対象の文Dとの間で第1の類推式「A:B::x:D」を生成し、第1の類推式を解いて解x=Cを生成することを試み、生成された解Cを全て出力するための類推式解決プログラム部分とを含む。   Preferably, when a sentence to be processed is given, the first analogizing program part includes a program part for selecting all order pairs (A, B) of sentences in the database, and each of the selected order pairs. On the other hand, the first analogical expression “A: B :: x: D” is generated with the sentence D to be processed, and the first analogical expression is solved to generate a solution x = C. And an analog reasoning solution program part for outputting all the solutions C.

より好ましくは、データベース中の文A、B、及びCは、データベース中ではそれぞれ分割文字列A’、B’、及びC’と対になっており、第2の類推プログラム部分は、読出プログラム部分により読出された3つの分割文字列A’、B’、及びC’を用いて、第1の類推式における順序と一致する順序でこれらを配置した第2の類推式「A’:B’::C’:y」を生成し、この第2の類推式を解いて類推分割文字列y=D’を生成して文分割プログラム部分の戻り値として出力するためのプログラム部分を含む。   More preferably, sentences A, B, and C in the database are paired with divided character strings A ′, B ′, and C ′, respectively, in the database, and the second analogy program part is the read program part. Using the three divided character strings A ′, B ′, and C ′ read out by the second analogy formula “A ′: B ′: : C ′: y ”is generated, a program part for solving the second analogy formula and generating an analogy split character string y = D ′ and outputting it as a return value of the sentence split program part is included.

文分割プログラム部分は、判定プログラム部分により類推文がデータベースに存在していないと判定されたことに応答して、類推文を処理対象の文として文分割プログラム部分を再帰的に呼出すための再帰呼出プログラム部分と、類推文と、再帰呼出プログラム部分により呼出された文分割プログラム部分により出力される分割文字列とを対にして、データベースに追加するためのプログラム部分とをさらに含んでもよい。   The sentence split program part is a recursive call for recursively calling the sentence split program part using the analogy sentence as a processing target sentence in response to the judgment program part determining that the analog reason sentence does not exist in the database. The program part may further include a program part for adding to the database a pair of the program part, the analogy sentence, and the split character string output by the sentence split program part called by the recursive call program part.

本発明の第2の局面に係る記録媒体は、本発明の第1の局面に係るいずれかの文分割コンピュータプログラムを記録した、コンピュータ読取可能な記録媒体である。   A recording medium according to a second aspect of the present invention is a computer-readable recording medium on which any sentence division computer program according to the first aspect of the present invention is recorded.

[概要]
以下、図面を参照しつつ、本発明の一実施の形態について説明する。なお、本明細書では、単語単位で区切られることなく表記される言語の例として日本語を挙げるが、以下の説明からも明らかなように、本発明は、言語、文字、文法構造等に関係なく適用可能である。また、この実施の形態を説明するにあたり、図面及び明細書において、日本語における単語間の境界を記号「|」で表す。また、英語における単語間の境界は、通例どおり空白で表す。
[Overview]
Hereinafter, an embodiment of the present invention will be described with reference to the drawings. In this specification, Japanese is given as an example of a language written without being divided in units of words. As is clear from the following description, the present invention relates to a language, a character, a grammatical structure, and the like. It is applicable. In describing this embodiment, the boundary between words in Japanese is represented by the symbol “|” in the drawings and specification. Moreover, the boundary between words in English is represented by a blank as usual.

この実施の形態の文分割システムは、文字列により構成された文と、文中の単語同士の境界にそれぞれ境界を表す境界記号を挿入した記号列(以下、この記号列を「分割文字列」と呼ぶ。)との対からなる多数の用例を用いて、記号列類推によって単語単位の分割を行なう。記号列類推については、特許文献1を参照されたい。   The sentence division system according to this embodiment includes a sentence composed of a character string and a symbol string in which boundary symbols representing the boundaries are inserted at the boundaries between words in the sentence (hereinafter, this symbol string is referred to as a “divided character string”). The word unit is divided by symbol string analogy using a number of examples consisting of pairs. Refer to Patent Document 1 for symbol string analogy.

特許文献1では、所定の順序で与えられた3つの記号列から別の記号列を類推生成する手法が開示されている。この手法では、まず、与えられた3つの記号列を構成する二つの記号列の間に成立する類推関係を特定する。続いて、3つの記号列を構成する残りの一つの記号列との間にその類推関係と同様の関係が成立する、別の記号列を生成する。二つの記号列の間に成立する類推関係と同様の類推関係が、残りの一つの記号列と生成される記号列との間に成立する。ここでは、記号列A、記号列B、及び記号列Cから、類推関係により記号列Dが生成されることを「A:B::C:D」と表すものとする。   Japanese Patent Application Laid-Open No. 2004-151561 discloses a method of generating another symbol string by analogy from three symbol strings given in a predetermined order. In this method, first, an analogy relation established between two symbol strings constituting three given symbol strings is specified. Subsequently, another symbol string is generated in which the same relationship as the analogy relationship is established with the remaining one symbol string constituting the three symbol strings. An analogy relationship similar to the analogy relationship established between two symbol strings is established between the remaining one symbol string and the generated symbol string. Here, the generation of the symbol string D from the symbol string A, the symbol string B, and the symbol string C by analogy is expressed as “A: B :: C: D”.

この実施の形態では、まず分割の対象となる文字列を文Dとした場合に、A:B::C:Dが成立する文A、B、及びCを探索する。文A、B、及びCが探索されると、用例を用いて文A、B、及びCに対応する分割文字列A’、分割文字列B’、及び分割文字列C’を準備する。分割文字列A’、B’、及びC’もまた記号列であり、記号列類推に用いることができる。そこで、分割文字列A’、B’、及びC’から、A’:B’::C’:D’が成立する記号列D’を記号列類推により生成する。   In this embodiment, first, when a character string to be divided is a sentence D, sentences A, B, and C that satisfy A: B :: C: D are searched. When the sentences A, B, and C are searched, a divided character string A ′, a divided character string B ′, and a divided character string C ′ corresponding to the sentences A, B, and C are prepared using an example. The divided character strings A ′, B ′, and C ′ are also symbol strings and can be used for symbol string analogy. Therefore, a symbol string D ′ that satisfies A ′: B ′ :: C ′: D ′ is generated from the divided character strings A ′, B ′, and C ′ by symbol string analogy.

分割文字列A’、B’、及びC’は分割文字列であるため、記号列D’も同様に分割文字列となる。また、分割文字列A’、B’、及びC’はそれぞれ文A、B、及びCに対応するものであるため、記号列D’も同様に文Dに対応するものとなる。したがって、記号列D’は、文Dに対応する分割文字列となる。   Since the divided character strings A ′, B ′, and C ′ are divided character strings, the symbol string D ′ is similarly divided character strings. Since the divided character strings A ′, B ′, and C ′ correspond to the sentences A, B, and C, respectively, the symbol string D ′ also corresponds to the sentence D. Therefore, the symbol string D ′ is a divided character string corresponding to the sentence D.

この実施の形態の文分割システムはさらに、文A、B、及びCの探索の過程で生成される文を対象とした再帰的な処理により、用例の補充を行なう。   The sentence division system of this embodiment further replenishes the example by recursive processing for sentences generated in the process of searching for sentences A, B, and C.

[構成]
この実施の形態の文分割システムは、コンピュータハードウェアと、そのコンピュータハードウェアにより実行されるプログラムと、コンピュータハードウェアに格納されるデータとにより実現される。図1はこのコンピュータシステム30の外観を示し、図2はコンピュータシステム30の内部構成を示す。
[Constitution]
The sentence division system of this embodiment is realized by computer hardware, a program executed by the computer hardware, and data stored in the computer hardware. FIG. 1 shows the external appearance of the computer system 30, and FIG. 2 shows the internal configuration of the computer system 30.

図1を参照して、このコンピュータシステム30は、CD−ROM(コンパクトディスク読出専用メモリ)ドライブ50及びFD(フレキシブルディスク)ドライブ52を有するコンピュータ40と、モニタ42と、キーボード46と、マウス48とを含む。   Referring to FIG. 1, a computer system 30 includes a computer 40 having a CD-ROM (Compact Disc Read Only Memory) drive 50 and an FD (Flexible Disc) drive 52, a monitor 42, a keyboard 46, and a mouse 48. including.

図2を参照して、コンピュータ40は、FDドライブ52及びCD−ROMドライブ50に加えて、ハードディスク54と、CPU(中央処理装置)56と、CPU56、ハードディスク54、FDドライブ52、及びCD−ROMドライブ50に接続されたバス66と、バス66に接続され、ブートアッププログラム等を記憶する読出専用メモリ(ROM)58と、バス66に接続され、プログラム命令、システムプログラム、及び作業データ等を記憶するランダムアクセスメモリ(RAM)60とを含む。コンピュータシステム30はさらに、プリンタ44を含んでいる。   2, in addition to the FD drive 52 and the CD-ROM drive 50, the computer 40 includes a hard disk 54, a CPU (central processing unit) 56, a CPU 56, a hard disk 54, an FD drive 52, and a CD-ROM. A bus 66 connected to the drive 50, a read-only memory (ROM) 58 connected to the bus 66 for storing a boot-up program and the like, and a bus 66 for storing a program command, a system program, work data, and the like. Random access memory (RAM) 60. The computer system 30 further includes a printer 44.

ここでは示さないが、コンピュータ40はさらにローカルエリアネットワーク(LAN)への接続を提供するネットワークアダプタボードを含んでもよい。   Although not shown here, the computer 40 may further include a network adapter board that provides a connection to a local area network (LAN).

コンピュータシステム30にこの実施の形態の文分割システムとしての動作を行なわせるためのコンピュータプログラムは、CD−ROMドライブ50又はFDドライブ52に挿入されるCD−ROM62又はFD64に記憶され、さらにハードディスク54に転送される。又は、プログラムは図示しないネットワークを通じてコンピュータ40に送信されハードディスク54に記憶されてもよい。プログラムは実行の際にRAM60にロードされる。CD−ROM62から、FD64から、又はネットワークを介して、直接にRAM60にプログラムをロードしてもよい。   A computer program for causing the computer system 30 to operate as the sentence division system of this embodiment is stored in the CD-ROM 62 or FD 64 inserted into the CD-ROM drive 50 or FD drive 52 and further stored in the hard disk 54. Transferred. Alternatively, the program may be transmitted to the computer 40 through a network (not shown) and stored in the hard disk 54. The program is loaded into the RAM 60 when executed. The program may be loaded directly into the RAM 60 from the CD-ROM 62, from the FD 64, or via a network.

このプログラムは、コンピュータ40にこの実施の形態の文分割システムとして動作を行なわせる複数の命令を含む。この動作を行なわせるのに必要な基本的機能のいくつかはコンピュータ40上で動作するオペレーティングシステム(OS)又はサードパーティのプログラム、若しくはコンピュータ40にインストールされる各種ツールキットのモジュールにより提供される。したがって、このプログラムはこの実施の形態の文分割システムを実現するのに必要な機能全てを必ずしも含まなくてよい。このプログラムは、命令のうち、所望の結果が得られるように制御されたやり方で適切な機能又は「ツール」を呼出すことにより、上記した文分割システムとしての動作を実行する命令のみを含んでいればよい。コンピュータシステム30の動作は周知であるので、ここでは繰返さない。   This program includes a plurality of instructions that cause the computer 40 to operate as the sentence division system of this embodiment. Some of the basic functions required to perform this operation are provided by operating system (OS) or third party programs running on the computer 40 or modules of various toolkits installed on the computer 40. Therefore, this program does not necessarily include all functions necessary for realizing the sentence division system of this embodiment. This program may include only instructions that execute the above-described operation as a sentence splitting system by calling an appropriate function or “tool” in a controlled manner so as to obtain a desired result. That's fine. The operation of computer system 30 is well known and will not be repeated here.

図3に、この実施の形態の文分割システムの機能的構成をブロック図形式で示す。図3を参照して、この実施の形態の文分割システム80は、文字列で構成された入力文82を受け、単語間の境界を表す記号を入力文82中に挿入した分割文字列を生成し、出力文84として出力するための単語分割装置86と、単語分割装置86の処理に用いるデータとして、文とその文に対応する分割文字列とからなる対を多数記憶するためのデータベース88とを含む。   FIG. 3 shows a functional configuration of the sentence division system of this embodiment in a block diagram form. Referring to FIG. 3, the sentence division system 80 of this embodiment receives an input sentence 82 composed of character strings, and generates a divided character string in which a symbol representing a boundary between words is inserted into the input sentence 82. A word dividing device 86 for outputting as an output sentence 84, and a database 88 for storing a large number of pairs of sentences and divided character strings corresponding to the sentence as data used for processing of the word dividing device 86; including.

図4にデータベース88に記憶されたデータの構造を示す。図4を参照して、データベース88は、文字列により構成された文を多数含む第1ファイル100と、第1ファイルに含まれる文にそれぞれ対応する多数の分割文字列からなる第2ファイル102とを含む。図4に示す第1ファイル100は、リスト形式のデータであり、多数のエントリを含む。第1ファイル100の各エントリは、そのエントリの識別番号と分割されていない文とを含む。第2ファイル102もまた第1ファイル100と同様のリスト形式のデータであり、多数のエントリを含む。各エントリは、そのエントリの識別番号と分割文字列とを含む。第1ファイル100と第2ファイル102とにおける同一の識別番号のエントリには、それぞれ文とその文に対応する分割文字列とが格納される。   FIG. 4 shows the structure of data stored in the database 88. Referring to FIG. 4, a database 88 includes a first file 100 that includes a large number of sentences composed of character strings, and a second file 102 that includes a large number of divided character strings respectively corresponding to sentences included in the first file. including. The first file 100 shown in FIG. 4 is data in a list format and includes a large number of entries. Each entry of the first file 100 includes an identification number of the entry and an undivided sentence. The second file 102 is also data in a list format similar to the first file 100, and includes a large number of entries. Each entry includes an identification number of the entry and a divided character string. Each entry having the same identification number in the first file 100 and the second file 102 stores a sentence and a divided character string corresponding to the sentence.

再び図3を参照して、単語分割装置86は、文を引数として呼出されると、引数とデータベース88内の用例とを用いて、引数に対応する分割文字列を生成して戻り値として返すとともに、データベース88に用例を補充する処理を実行するための分割プログラム90と、分割プログラム90による処理で生成される分割文字列とその処理に対応する引数とを対にして一時保持するためのメモリ94と、入力文82が入力されたことに応答して、入力文82を引数として分割プログラム90を呼出し、その結果分割プログラム90から返される分割文字列を出力文84として出力するための入出力部92とを含む。   Referring to FIG. 3 again, when the word segmentation device 86 is called with a sentence as an argument, it uses the argument and the example in the database 88 to generate a segmented character string corresponding to the argument and return it as a return value. In addition, a memory for temporarily holding a split program 90 for executing a process for supplementing the example in the database 88, a split character string generated by the process by the split program 90, and an argument corresponding to the process 94, in response to the input sentence 82 being input, the division program 90 is called with the input sentence 82 as an argument, and as a result, the input / output for outputting the division character string returned from the division program 90 as the output sentence 84 Part 92.

図5に、分割プログラム90のフローチャートを示す。図5を参照して、分割プログラム90は、文を引数Dとして呼出される。分割プログラム90が開始されると、ステップ120Aとステップ120Bとで囲まれた、ステップ122、ステップ124、及びステップ126の処理を、第1ファイル内の、順序を含めて考えられる互いに異なる全ての文のペア(順序対)(A,B)について処理が完了するまで繰返す。   FIG. 5 shows a flowchart of the division program 90. Referring to FIG. 5, the division program 90 is called with a sentence as an argument D. When the dividing program 90 is started, the processing of Step 122, Step 124, and Step 126, which is surrounded by Step 120A and Step 120B, is performed on all the different sentences in the first file that can be considered including the order. Repeat until the processing is completed for the pair (ordered pair) (A, B).

ステップ122では、特許文献1に記載の手法で、処理対象の文のペアを構成する2文A及びBと引数Dとからなる3文をもとに記号列類推を行なう。すなわち、類推関係A:B::x:Dの成立する文x=C(以下、この文を「第1類推文」と呼ぶ。)の生成を試みる。ステップ124では、ステップ122において第1類推文Cが生成されたか否かを判定する。生成されたならばステップ126に進む。さもなければ、ステップ120Bに進む。   In step 122, symbol string analogy is performed based on three sentences consisting of two sentences A and B and an argument D constituting a sentence pair to be processed by the method described in Patent Document 1. That is, it tries to generate a sentence x = C in which the analogy relation A: B :: x: D is established (hereinafter, this sentence is referred to as a “first analogy sentence”). In step 124, it is determined whether or not the first kind inference C is generated in step 122. If generated, go to step 126. Otherwise, go to step 120B.

ステップ126では、ステップ122で生成された第1類推文Cを用いた処理を実行する。すなわち、データベース88(図4参照)内での第1類推文Cの検索と、第1類推文、文のペア(A,B)、及びデータベース88の第2ファイル102を用いて、引数Dに対応する分割文字列となる第2類推文D’を生成する処理とを行なう。ステップ126の処理が終了すると、ステップ120Bに進む。ステップ126での処理については、図6を用いて後述する。   In step 126, a process using the first analogy sentence C generated in step 122 is executed. That is, the search for the first kind inference C in the database 88 (see FIG. 4), the first kind inference, the sentence pair (A, B), and the second file 102 of the database 88 are used as the argument D. A process for generating a second class inference D ′ to be a corresponding divided character string is performed. When the process of step 126 ends, the process proceeds to step 120B. The processing in step 126 will be described later with reference to FIG.

全ての文のペアについてステップ120Aとステップ120Bとで囲まれた一連の処理が完了すると、ステップ128に進む。ステップ128では戻り値を設定する。すなわち一連の処理により引数Dに対応する分割文字列D’が生成され、引数Dと分割文字列D’との対がメモリ94(図3参照)に格納されていたならば、正常終了を表す値(例えば「0」)とメモリ94上における文と分割文字列との対の格納位置を表すアドレスとを、戻り値として設定する。引数Dに対応する分割文字列D’が生成されていなければ、エラーを表す所定の値(例えば「1」)を戻り値として設定する。そして、分割プログラム90を終了する。   When a series of processes surrounded by step 120A and step 120B is completed for all sentence pairs, the process proceeds to step 128. In step 128, a return value is set. That is, if a divided character string D ′ corresponding to the argument D is generated by a series of processes and a pair of the argument D and the divided character string D ′ is stored in the memory 94 (see FIG. 3), it indicates a normal end. A value (for example, “0”) and an address indicating a storage position of a pair of a sentence and a divided character string on the memory 94 are set as a return value. If the divided character string D ′ corresponding to the argument D is not generated, a predetermined value (for example, “1”) indicating an error is set as a return value. Then, the division program 90 is terminated.

図6に、ステップ126(図5参照)において実行される処理のフローチャートを示す。図6を参照して、ステップ126の処理が開始されると、図5に示すステップ122において生成される全ての第1類推文Cに対し、ステップ140Aとステップ140Bとで囲まれたステップ142〜ステップ158の処理を実行する。   FIG. 6 shows a flowchart of processing executed in step 126 (see FIG. 5). Referring to FIG. 6, when the process of step 126 is started, steps 142 to 142 surrounded by steps 140 </ b> A and 140 </ b> B are performed for all first type inference C generated in step 122 shown in FIG. 5. The process of step 158 is executed.

ステップ142では、第1ファイル100(図4参照)内で、第1類推文Cと一致する文を検索する。ステップ144では、ステップ142での検索の結果について判定を行なう。すなわち、検索により第1ファイル100から一致する文が得られたならば、ステップ146に進む。さもなければステップ154に進む。   In step 142, the first file 100 (see FIG. 4) is searched for a sentence that matches the first analogy sentence C. In step 144, the result of the search in step 142 is determined. That is, if a matching sentence is obtained from the first file 100 by the search, the process proceeds to step 146. Otherwise, go to step 154.

ステップ146では、処理対象の文のペア(A,B)及び処理対象の第1類推文Cからなる3文と、第1ファイル100(図4参照)と、第2ファイル102(図4参照)とを照合して、この3文に対応する3つの分割文字列A’、B’、及びC’を第2ファイル102から読出す。ステップ148では、ステップ146で読出した3つの分割文字列A’、B’、及びC’をもとにステップ122(図5参照)と同様の記号列類推を行なう。すなわち、類推式A’:B’::C’:yの成立する第2類推文y=D’の生成を試みる。ここで生成される第2類推文D’が、引数Dに対応する分割文字列となる。ステップ150では、ステップ148において第2類推文D’が生成されたか否かを判定する。生成されたならばステップ152に進む。さもなければステップ140Bに進む。ステップ152では、引数Dと第2類推文D’との対をメモリ94(図3参照)に格納し、ステップ140Bに進む。   In step 146, three sentences including a pair of sentences to be processed (A, B) and a first analogy sentence C to be processed, a first file 100 (see FIG. 4), and a second file 102 (see FIG. 4). And the three divided character strings A ′, B ′, and C ′ corresponding to the three sentences are read from the second file 102. In step 148, symbol string analogy similar to that in step 122 (see FIG. 5) is performed based on the three divided character strings A ′, B ′, and C ′ read in step 146. That is, the generation of the second analogy sentence y = D ′ in which the analogy formula A ′: B ′ :: C ′: y is established is attempted. The second type inference D ′ generated here is a divided character string corresponding to the argument D. In step 150, it is determined whether or not the second kind inference D 'has been generated in step 148. If generated, the process proceeds to step 152. Otherwise, go to step 140B. In step 152, the pair of the argument D and the second analogy inference D ′ is stored in the memory 94 (see FIG. 3), and the process proceeds to step 140B.

ステップ144からステップ154へ処理が進むと、ステップ154において、第1類推文を引数として、分割プログラム90の再帰呼出を行なう。この再帰呼出により、第1類推文Cに対応する分割文字列C’が生成され、戻り値として、正常終了を表す値(0)と第1類推文Cに対応する分割文字列C’との対のメモリ94上でのアドレスとが返される。又は、第1類推文Cに対応する分割文字列C’が生成されず、戻り値としてエラーを表す値(1)が返される。戻り値が返されるとステップ156に進む。ステップ156では、ステップ154での戻り値の判定を行なう。戻り値がエラーを表す値(1)であれば、ステップ140Bに進む。さもなければステップ158に進む。ステップ158では、その時点でメモリ94に格納されている全ての文と分割文字列との対をデータベース88(図4参照)に補充する。すなわち第1類推文を第1ファイル100(図4参照)に格納し、第1類推文に対する分割文字列を第2ファイルに格納する。補充が完了するとステップ140Bに進む。   When the process proceeds from step 144 to step 154, in step 154, the division program 90 is recursively called with the first type inference as an argument. By this recursive call, a divided character string C ′ corresponding to the first class reasoning C is generated, and as a return value, a value (0) indicating normal termination and the divided character string C ′ corresponding to the first class reasoning C are used. The address on the pair of memories 94 is returned. Alternatively, the divided character string C ′ corresponding to the first kind inference C is not generated, and a value (1) representing an error is returned as a return value. If a return value is returned, the process proceeds to step 156. In step 156, the return value in step 154 is determined. If the return value is a value (1) indicating an error, the process proceeds to step 140B. Otherwise, go to step 158. In step 158, the database 88 (see FIG. 4) is replenished with pairs of all sentences and divided character strings stored in the memory 94 at that time. That is, the first type reasoning is stored in the first file 100 (see FIG. 4), and the divided character string for the first type reasoning is stored in the second file. When the replenishment is completed, the process proceeds to step 140B.

以上の一連の処理が全ての第1類推文について完了すると、図5に示すステップ126の処理が完了する。処理は、上記の通り図5のステップ120Bに進む。   When the above series of processing is completed for all the first kind inferences, the processing of step 126 shown in FIG. 5 is completed. The process proceeds to step 120B in FIG. 5 as described above.

[動作]
この実施の形態の文分割システム80は、以下のように動作する。
[Operation]
The sentence division system 80 of this embodiment operates as follows.

−第1類推文の生成と検索−
まず、文分割システム80が第1類推文を生成しデータベース88内で第1類推文を検索する動作について説明する。図7に、第1類推文を生成しデータベース88内で第1類推文を検索する動作を概略的に示す。図7を参照して、単語分割装置86(図3参照)に「もっと淡いいろはありますか。」という入力文82が与えられたものとする。入出力部92(図3参照)は、この入力文82を引数D200として、分割プログラム90を呼出す。
-Generation and retrieval of first kind reasoning-
First, an operation in which the sentence division system 80 generates a first type inference and searches for the first type inference in the database 88 will be described. FIG. 7 schematically shows an operation of generating a first type inference and searching for the first type inference in the database 88. Referring to FIG. 7, it is assumed that an input sentence 82 “Is there anything more light?” Is given to word segmentation device 86 (see FIG. 3). The input / output unit 92 (see FIG. 3) calls the division program 90 using the input sentence 82 as an argument D200.

分割プログラム90が呼出されると、図5に示すステップ120Aにおいて、データベース88(図3及び図4参照)の第1ファイル100(図4参照)から、任意の二つの文A及びBを選び、文A及びBからなる文のペア202を形成する。ここでは、図4に示す第1ファイル100から、文Aとして識別番号2の「もっと濃いいろはありますか。」が選ばれ、文Bとして識別番号4の「もっと淡い色はありますか。」という文が選ばれたものとする。   When the dividing program 90 is called, in step 120A shown in FIG. 5, two arbitrary sentences A and B are selected from the first file 100 (see FIG. 4) of the database 88 (see FIGS. 3 and 4). A sentence pair 202 consisting of sentences A and B is formed. Here, from the first file 100 shown in FIG. 4, “Are there more dark colors?” With identification number 2 is selected as sentence A, and the sentence “Is there a lighter color” with identification number 4 as sentence B? Is chosen.

文のペア202を選択すると、続くステップ122において、引数D200と文のペア202を構成する文A及びBとからなる3文の組204を形成する。そして記号列類推によって、この3文からA:B::C:Dの成立する第1類推文C206の生成を試みる。例えば、図7に示す3文の組204においては、文Bは、文A中の「濃」という文字を「淡」という文字に、「いろ」という文字列を「色」という文字に、それぞれ置換した文である。文Bにおけるこれら2箇所の文字列を除く部分の文字列は、文Aにおける当該部分の文字列に共通する。引数Dは、「淡」という文字と「いろ」という文字列とを含み、この2箇所の文字列を除く部分の文字列は、文A及び文Bにおける当該箇所の文字列に共通する。特許文献1に記載の手法では、文A、文B、及び文Dに共通する部分と、文Dにおける文字「淡」と置換の関係にある文字「濃」と、文Dにおける文字「いろ」と置換の関係にある文字「色」とから、新たな文が生成される。生成される文は、「もっと濃い色はありますか。」という文である。この実施の形態では、この文が第1類推文C206となる。   When the sentence pair 202 is selected, in a subsequent step 122, a three-sentence group 204 composed of an argument D200 and sentences A and B constituting the sentence pair 202 is formed. Then, by symbol string analogy, an attempt is made to generate a first analogy C206 in which A: B :: C: D is established from these three sentences. For example, in the three-sentence group 204 shown in FIG. 7, the sentence B includes the character “dark” in the sentence A as “light” and the character string “color” as “color”. This is the replaced sentence. The character string of the part excluding these two character strings in the sentence B is common to the character string of the part in the sentence A. The argument D includes a character “light” and a character string “Iro”, and the character string of the portion excluding these two character strings is common to the character strings of the corresponding portions in the sentence A and the sentence B. In the method described in Patent Document 1, a part common to sentence A, sentence B, and sentence D, a character “dark” that has a replacement relationship with the character “light” in sentence D, and a character “Iro” in sentence D A new sentence is generated from the character “color” in the relationship of replacement. The generated sentence is a sentence "Is there a darker color?" In this embodiment, this sentence is the first kind inference C206.

なお、特許文献1に記載の手法では、3文の組204において類推的な類似関係が成立せず、第1類推文Cが生成できない場合がある。この場合、第1ファイル100(図4参照)から文を選びなおして新たに文のペア202を形成する。また、特許文献1に記載の手法では、第1類推文が複数生成される場合がある。この場合、生成された第1類推文の各々について、以下に説明する処理を行なう。   In the method described in Patent Document 1, there is a case in which an analogy relationship is not established in the set of three sentences 204, and the first class sentence C cannot be generated. In this case, a sentence is newly selected from the first file 100 (see FIG. 4), and a new sentence pair 202 is formed. In the method described in Patent Document 1, a plurality of first type inferences may be generated. In this case, the process described below is performed for each of the generated first kind inferences.

第1類推文C206が生成されると、ステップ126が開始される。ステップ126が開始されると、第1類推文C206と一致する文をデータベース88(図4参照)の第1ファイル100内で検索する。図4に示すデータベース88においては、第1ファイル100の識別番号3の文が第1類推文206と一致する。   When the first analog reasoning C206 is generated, step 126 is started. When step 126 is started, a sentence that matches the first analogy sentence C206 is searched in the first file 100 of the database 88 (see FIG. 4). In the database 88 shown in FIG. 4, the sentence with the identification number 3 in the first file 100 matches the first analogy sentence 206.

第1類推文206と一致する文が第1ファイル100内に存在した場合、文のペア202(図7参照)を構成する文A及びB、並びに第1類推文C206は、いずれもデータベース88(図4参照)の第1ファイル100内に存在することになる。そこで、文A、文B、及び第1類推文C206の3文からなる3文の組220を探索の結果とする。   When a sentence that matches the first kind inference 206 exists in the first file 100, the sentences A and B and the first kind inference C206 that constitute the sentence pair 202 (see FIG. 7) are all in the database 88 ( It exists in the first file 100 of FIG. Therefore, a set of three sentences 220 consisting of three sentences of sentence A, sentence B, and first kind inference C206 is taken as a search result.

第1類推文と一致する文が第1ファイル100(図4参照)内になかった場合、第1類推文C206に対応する分割文字列もまた、データベース88には存在しない。この場合、第1類推文C206を引数として分割プログラム90を再帰的に呼出し、データベース88への用例の補充を行なう。この動作については後述する。   If there is no sentence in the first file 100 (see FIG. 4) that matches the first kind inference, the divided character string corresponding to the first kind inference C206 also does not exist in the database 88. In this case, the division program 90 is recursively called with the first kind inference C206 as an argument, and the database 88 is supplemented with examples. This operation will be described later.

−第2類推文の生成−
図8に、探索された3文の組220と用例とを用いて、第2類推文を生成する動作を概略的に示す。図8を参照して、探索された3文の組220を構成する文A、文B、及び第1類推文C206(図7参照)と、引数D200との間には、上記のとおり類推関係A:B::C:Dが成立する。すなわち、3文の組220から引数D200を類推できる。また3文の組220を構成する文A、文B、及び第1類推文Cの各々は、第1ファイル100(図4参照)内に存在する。すなわち、これらの文に対応する分割文字列を、第2ファイル102(図4参照)からそれぞれ得ることができる。ステップ146(図6参照)においてはさらに、第2ファイル102から、3文の組220を構成する文A、B、及びCに対応する分割文字列A’、B’、及びC’を読出し、分割文字列A’、B’、及びC’の3つからなる分割文字列の組224を形成する。本例においては、図4に示すデータベース88の第2ファイル102から、識別番号2、4、及び3の文を読出し、分割文字列の組224を形成する。
-Generation of second analogy-
FIG. 8 schematically shows an operation of generating a second analog reasoning using the searched three sentence set 220 and an example. Referring to FIG. 8, between the sentence A, sentence B, and first class reasoning sentence C206 (see FIG. 7) constituting the searched three sentence group 220, and the argument D200, the reasoning relation is as described above. A: B :: C: D is established. That is, the argument D200 can be inferred from the set of three sentences 220. Each of the sentence A, the sentence B, and the first analogy sentence C constituting the three sentence set 220 exists in the first file 100 (see FIG. 4). That is, the divided character strings corresponding to these sentences can be obtained from the second file 102 (see FIG. 4). In step 146 (see FIG. 6), further, the divided character strings A ′, B ′, and C ′ corresponding to the sentences A, B, and C constituting the set of three sentences 220 are read from the second file 102, A divided character string set 224 including three divided character strings A ′, B ′, and C ′ is formed. In this example, the sentences of the identification numbers 2, 4, and 3 are read from the second file 102 of the database 88 shown in FIG.

分割文字列の組224が形成されると、ステップ148において、分割文字列の組224から、記号列類推により第2類推文D’226を生成する。例えば図8に示す分割文字列の組224からは、「もっと|淡い|いろ|は|あります|か|。」という分割文字列が生成される。分割文字列A’、B’、及びC’は、文A、B、及びCに対応する。したがって、第2類推文D’226は引数D200に対応する分割文字列となる。第2類推文D’226の生成に成功すると、引数D200と第2類推文D’226との対228をメモリ94(図3参照)に格納する。第2類推文D’226の類推生成に失敗した場合、メモリ94には何も格納せずに、第1類推文C206に対する一連の処理を完了する。   When the divided character string set 224 is formed, in step 148, a second class inference D'226 is generated from the divided character string set 224 by symbol string analogy. For example, from the divided character string set 224 shown in FIG. 8, a divided character string “more | pale | The divided character strings A ′, B ′, and C ′ correspond to the sentences A, B, and C, respectively. Therefore, the second kind inference D'226 is a divided character string corresponding to the argument D200. When the generation of the second class inference D ′ 226 is successful, the pair 228 of the argument D 200 and the second class inference D ′ 226 is stored in the memory 94 (see FIG. 3). If the analog generation of the second analogy inference D ′ 226 fails, nothing is stored in the memory 94 and the series of processes for the first analogistic inference C 206 is completed.

図5に示すステップ122の処理で生成された全ての第1類推文について以上の処理が完了すると、図5に示すステップ120Aにおいて、第1ファイル100(図4参照)から文を選びなおして新たに文のペアを形成し、新たな文のペアに対する処理を開始する。   When the above processing is completed for all the first kind inferences generated in step 122 shown in FIG. 5, in step 120A shown in FIG. 5, a sentence is selected again from the first file 100 (see FIG. 4) and a new one is newly created. A pair of sentences is formed, and processing for a new pair of sentences is started.

全ての文のペアについて以上の処理が完了すると、分割プログラム90の戻り値の設定を行なう。すなわち、メモリ94(図3参照)に文と分割文字列との対228が格納されていれば、正常終了を表す値(0)とメモリ94上で文と分割文字列との対228の格納位置を表すアドレスとを分割プログラム90(図3)の戻り値に設定する。メモリ94に文と分割文字列との対が格納されていれなければ、エラーを表す値(1)を戻り値に設定する。   When the above processing is completed for all sentence pairs, the return value of the division program 90 is set. That is, if the sentence 228 and the divided character string pair 228 are stored in the memory 94 (see FIG. 3), the value (0) indicating normal termination and the sentence 94 and the divided character string pair 228 stored in the memory 94 are stored. The address indicating the position is set as the return value of the division program 90 (FIG. 3). If a pair of a sentence and a divided character string is not stored in the memory 94, a value (1) indicating an error is set as a return value.

図3を参照して、入出力部92に、正常終了を表す値(0)とメモリ94上で文と分割文字列との対228の格納位置を表すアドレスとが戻り値として与えられると、入出力部92(図3参照)は、戻り値に基づきメモリに格納された文と分割文字列との対228を読出し、文と分割文字列との対228を構成する分割文字列226を出力文84として出力する。   Referring to FIG. 3, when a value (0) indicating normal termination and an address indicating the storage position of a pair 228 of a sentence and a divided character string are given as return values to the input / output unit 92, The input / output unit 92 (see FIG. 3) reads a pair 228 of the sentence and the divided character string stored in the memory based on the return value, and outputs a divided character string 226 constituting the pair 228 of the sentence and the divided character string. Output as sentence 84.

−用例の補充−
以下、第1類推文C206と一致する文が第1ファイル100(図4参照)内になかった場合の動作について説明する。第1類推文と一致する文が第1ファイル100(図4参照)内になかった場合、第1類推文C206とその分割文字列との対は、データベース88には格納されていないことになる。
-Supplementation of examples-
Hereinafter, an operation in a case where a sentence that matches the first analogy sentence C206 is not in the first file 100 (see FIG. 4) will be described. If there is no sentence in the first file 100 (see FIG. 4) that matches the first kind inference, the pair of the first kind inference C206 and its divided character string is not stored in the database 88. .

このような第1類推文C206に対応する分割文字列が得られるならば、第1類推文C206及びその分割文字列をデータベース88の第1ファイル100及び第2ファイル102にそれぞれ追加することにより、データベース88を充実させることができる。そこで、ステップ154(図6参照)において、第1類推文C206を新たな引数として分割プログラム90の再帰呼出を行ない、第1類推文に対応する分割文字列の生成を試みる。再帰呼出によって、新たな引数に対する第2類推文すなわち新たな引数の分割文字列が生成されれば、戻り値により、その分割文字列が得られ、分割文字列が生成されなければ、エラーを表す値(1)が返される。生成された分割文字列に対応する文は、データベース88(図4参照)の第1ファイル100に格納され、生成された分割文字列は、第2ファイル102に格納される。   If such a divided character string corresponding to the first type inference C206 is obtained, the first type inference C206 and the divided character string are added to the first file 100 and the second file 102 of the database 88, respectively. The database 88 can be enriched. Therefore, in step 154 (see FIG. 6), a recursive call of the division program 90 is performed using the first kind inference C206 as a new argument, and an attempt is made to generate a divided character string corresponding to the first kind inference. If a second kind of reasoning for a new argument is generated by recursive call, that is, a new divided character string of the argument is generated, the divided character string is obtained by a return value. If no divided character string is generated, an error is indicated. The value (1) is returned. The sentence corresponding to the generated divided character string is stored in the first file 100 of the database 88 (see FIG. 4), and the generated divided character string is stored in the second file 102.

[実験]
−日本語の単語分割実験−
この実施の形態の手法を用いて、日本語の文を単語単位に分割する実験を行なった。実験に際し、15373文のコーパスを用意した。図9に、用意した文の一例を示す。図9を参照して、第1ファイル250は、分割されていない文を列挙したものである。第2ファイル252は、第1ファイル250に列挙された各文を分割した場合に得られる分割文字列の正解を列挙したものである。第2ファイル252においては、文中の単語間に記号「|」を挿入してある。なお、用意した15373文において、1文を構成する単語の数は、平均7.60、標準偏差3.34であった。
[Experiment]
-Japanese word segmentation experiment-
Using the method of this embodiment, an experiment was conducted to divide a Japanese sentence into words. During the experiment, a corpus of 15373 sentences was prepared. FIG. 9 shows an example of the prepared sentence. Referring to FIG. 9, the first file 250 lists sentences that are not divided. The second file 252 lists correct answers of the divided character strings obtained when the sentences listed in the first file 250 are divided. In the second file 252, a symbol “|” is inserted between words in the sentence. In the 15373 sentences prepared, the average number of words constituting one sentence was 7.60 and the standard deviation was 3.34.

この実験では、第1ファイル250に列挙された各文を入力文82(図3参照)として用いた。この入力に対し、出力文84が得られた場合には、出力文を第2ファイル252と照合した。   In this experiment, each sentence listed in the first file 250 was used as the input sentence 82 (see FIG. 3). When an output sentence 84 is obtained for this input, the output sentence is collated with the second file 252.

用意した15373文について、この実施の形態の手法で分割を行なった結果、そのうち15370文について出力文84を得ることができた。得られた出力文84を正解と照合した結果、いずれも正しく分割されていることが判明した。   As a result of dividing the prepared 15373 sentences by the method of this embodiment, an output sentence 84 could be obtained for 15370 sentences. As a result of collating the obtained output sentence 84 with the correct answer, it was found that both were correctly divided.

−英語の単語分割実験−
また、この実施の形態の手法を用いて、英語の文を単語単位に分割する実験を行なった。実験に際し、52848文のコーパスを用意した。図10に、用意した文の一例を示す。図10を参照して、英語の文は単語ごとに分かち書きされるため、用意した文が分割における正解となる。用意した文を列挙したものが第2ファイル262である。第1ファイル260は、この実験における入力文82となる文字列であり、第2ファイル262に列挙された各文から、空白文字を除去した文字列を列挙したものである。なお、用意した52848文において、1文を構成する単語の数は、平均5.69、標準偏差2.12、最大23であった。
-English word segmentation experiment-
In addition, using the method of this embodiment, an experiment was performed to divide an English sentence into words. During the experiment, a 52848 sentence corpus was prepared. FIG. 10 shows an example of the prepared sentence. Referring to FIG. 10, since the English sentence is divided for each word, the prepared sentence becomes the correct answer in the division. A list of prepared sentences is the second file 262. The first file 260 is a character string that becomes the input sentence 82 in this experiment, and is a list of character strings from which blank characters are removed from the sentences listed in the second file 262. In the prepared 52848 sentences, the number of words constituting one sentence was 5.69 on average, standard deviation 2.12 and 23 at maximum.

この実験では、第1ファイル260に列挙された文字列を入力文に用いた。言い換えれば、この実験で行なわれた分割処理は、入力文中に空白文字を挿入しなおす処理である。この処理により出力文84が得られた場合には、得られた出力文84を第2ファイル262と照合した。   In this experiment, the character strings listed in the first file 260 were used as input sentences. In other words, the division process performed in this experiment is a process of reinserting a blank character in the input sentence. When the output sentence 84 is obtained by this processing, the obtained output sentence 84 is collated with the second file 262.

用意した52848文について、この実施の形態の手法で単語単位の分割を行なった結果、そのうち50897文について出力文84を得ることができた。得られた出力文と正解とを照合した結果、50897文の出力文84のうち、不正解のものはわずかに4文であった。   As a result of dividing the prepared 52848 sentences in units of words by the method of this embodiment, an output sentence 84 could be obtained for 50897 sentences. As a result of collating the obtained output sentence and the correct answer, out of 50897 output sentences 84, only four sentences were incorrect.

以上のように、この実施の形態における文分割の手法は、言語、文字、文法規則等に関係なく、分割されていない任意の文字列とその分割文字列との対からなる用例を用意するだけで、文の分割を行なうことができる。また、用例をデータベースに自動的に補充しながら分割を行なうため、事前に多量のデータを用意したり、学習段階の処理を行なったりしなくても、分割を行なうことができる。   As described above, the sentence division method in this embodiment is merely to prepare an example consisting of a pair of an arbitrary character string that is not divided and the divided character string, regardless of language, characters, grammatical rules, and the like. The sentence can be divided. Further, since the database is divided while automatically replenishing the database, it is possible to perform the division without preparing a large amount of data in advance or performing the learning stage process.

また、N−グラムモデルを用いた統計的手法のように、処理対象の文脈のサイズが固定されることはなく、入力文を文単位の長い文脈で処理することが可能になる。   Further, unlike the statistical method using the N-gram model, the size of the context to be processed is not fixed, and the input sentence can be processed in a long context of a sentence unit.

なお、上記の実施の形態では、図4に示すような用例のみを用いて分割を行なったが、本発明はこのような実施の形態には限定されない。例えば、辞書を用いた分割手法を併用することも可能である。   In the above embodiment, the division is performed using only the example as shown in FIG. 4, but the present invention is not limited to such an embodiment. For example, a division method using a dictionary can be used in combination.

今回開示された実施の形態は単に例示であって、本発明が上記した実施の形態のみに制限されるわけではない。本発明の範囲は、発明の詳細な説明の記載を参酌した上で、特許請求の範囲の各請求項によって示され、そこに記載された文言と均等の意味及び範囲内でのすべての変更を含む。   The embodiment disclosed herein is merely an example, and the present invention is not limited to the above-described embodiment. The scope of the present invention is indicated by each claim in the claims after taking into account the description of the detailed description of the invention, and all modifications within the meaning and scope equivalent to the wording described therein are intended. Including.

本発明の一実施の形態に係る文分割システムを実現するためのコンピュータシステムの外観を示す図である。It is a figure which shows the external appearance of the computer system for implement | achieving the sentence division | segmentation system which concerns on one embodiment of this invention. 図1に示すコンピュータシステムのブロック図である。It is a block diagram of the computer system shown in FIG. 本発明の一実施の形態の文分割システム80の機能的構成を示すブロック図である。It is a block diagram which shows the functional structure of the sentence division | segmentation system 80 of one embodiment of this invention. データベース88の構成を示す図である。It is a figure which shows the structure of the database 88. FIG. 図3に示す分割プログラム90のフローチャートである。It is a flowchart of the division | segmentation program 90 shown in FIG. 図5のステップ126において実行される、第1類推文の検索、第2類推文の生成、及び用例を補充する処理のフローチャートである。It is a flowchart of the process performed in step 126 of FIG. 5 of the search of a 1st kind reason sentence, the production | generation of a 2nd kind reason sentence, and an example. 第1類推文を生成しデータベース88内で第1類推文を検索する動作を概略的に示す図である。It is a figure which shows schematically the operation | movement which produces | generates a 1st kind inference and searches a 1st kind inference in the database 88. FIG. 探索された3つの文字列から出力文84を生成する動作を概略的に示す図である。It is a figure which shows roughly the operation | movement which produces | generates the output sentence 84 from the searched three character strings. 本発明の一実施の形態について行なった実験に使用した、日本語の文の概要を示す図である。It is a figure which shows the outline | summary of the Japanese sentence used for the experiment conducted about one embodiment of this invention. 本発明の一実施の形態について行なった実験に使用した、英語の文の概要を示す図である。It is a figure which shows the outline | summary of the sentence of English used for the experiment conducted about one embodiment of this invention.

符号の説明Explanation of symbols

80 文分割システム
82 入力文
84 出力文
86 単語分割装置
88 データベース
90 分割プログラム
92 入出力部
100 第1ファイル
102 第2ファイル
80 sentence division system 82 input sentence 84 output sentence 86 word division device 88 database 90 division program 92 input / output unit 100 first file 102 second file

Claims (3)

文と、当該文を所定単位で分割した分割文字列とからなる対を3個以上含む、コンピュータ読取可能なデータベースとともに用いられる文分割コンピュータプログラムであって、
処理対象の文が与えられると、前記データベースを用いて前記処理対象の文に対する分割文字列を生成するための文分割プログラム部分と、
外部から与えられる入力文を前記文分割プログラム部分に与え、当該入力文に対して前記文分割プログラム部分が出力する分割文字列を、前記入力文に対する分割文字列として出力するための入出力プログラム部分とを含み、
前記文分割プログラム部分は、
前記処理対象の文が与えられると、前記データベースから任意の二つの文を選択し、当該二つの文と前記処理対象の文とから所定の第1の類推式を生成し、当該第1の類推式を解いて類推文を生成するための第1の類推プログラム部分と、
前記類推文が前記データベースに存在するか否かを判定するための判定プログラム部分と、
前記判定プログラム部分により前記類推文が前記データベースに存在すると判定されたことに応答して、前記データベース中で前記類推文と対になっている分割文字列と、前記データベース中で前記二つの文とそれぞれ対になっている二つの分割文字列とを前記データベースから読出すための読出プログラム部分と、
前記読出プログラム部分により読出された3つの分割文字列を用いて、前記第1の類推式と所定の関係を有する第2の類推式を生成し、当該第2の類推式を解いて類推分割文字列を生成して前記文分割プログラム部分の戻り値として出力するための第2の類推プログラム部分とを含む、文分割コンピュータプログラム。
A sentence division computer program used with a computer-readable database, including three or more pairs of sentences and divided character strings obtained by dividing the sentence by a predetermined unit,
When a sentence to be processed is given, a sentence division program part for generating a divided character string for the sentence to be processed using the database;
Input / output program part for giving an input sentence given from the outside to the sentence division program part and outputting a divided character string output by the sentence division program part for the input sentence as a divided character string for the input sentence Including
The sentence division program part is:
When the processing target sentence is given, arbitrary two sentences are selected from the database, a predetermined first analogy is generated from the two sentences and the processing target sentence, and the first analogy is generated. A first analogy program part for solving the formula and generating an analogy,
A determination program part for determining whether or not the analogy sentence exists in the database;
In response to determining that the analogy is present in the database by the determination program part, a divided character string paired with the analogy in the database, and the two sentences in the database A read program portion for reading from the database two divided character strings each paired;
Using the three divided character strings read out by the read program part, a second analogical expression having a predetermined relationship with the first analogical expression is generated, and the second analogical expression is solved to generate an analogy divided character A sentence division computer program including a second analogy program part for generating a sequence and outputting it as a return value of the sentence division program part.
前記第1の類推プログラム部分は、
前記処理対象の文が与えられると、前記データベース中の文の順序対(A,B)を全て選択するためのプログラム部分と、
選択された前記順序対の各々に対し、前記処理対象の文Dとの間で第1の類推式「A:B::x:D」を生成し、当該第1の類推式を解いて解x=Cを生成することを試み、生成された解Cを全て出力するための類推式解決プログラム部分とを含む、請求項1に記載の文分割コンピュータプログラム。
The first analogy program part is:
Given the sentence to be processed, a program portion for selecting all the ordered pairs (A, B) of sentences in the database;
For each of the selected ordered pairs, a first analogical expression “A: B :: x: D” is generated with the sentence D to be processed, and the first analogical expression is solved to solve The sentence division computer program according to claim 1, further comprising: an analogy solution program part for trying to generate x = C and outputting all the generated solutions C.
前記文分割プログラム部分は、
前記判定プログラム部分により前記類推文が前記データベースに存在していないと判定されたことに応答して、当該類推文を処理対象の文として前記文分割プログラム部分を再帰的に呼出すための再帰呼出プログラム部分と、
前記類推文と、前記再帰呼出プログラム部分により呼出された前記文分割プログラム部分により出力される分割文字列とを対にして、前記データベースに追加するためのプログラム部分とをさらに含む、請求項1又は請求項2に記載の文分割コンピュータプログラム。
The sentence division program part is:
A recursive call program for recursively calling the sentence division program portion using the analogy sentence as a processing target sentence in response to the determination program portion determining that the analogy sentence does not exist in the database Part,
The program part for adding the said analogy sentence and the division | segmentation character string output by the said sentence division | segmentation program part called by the said recursive calling program part as a pair to the said database is further included. The sentence division computer program according to claim 2.
JP2005100017A 2005-03-30 2005-03-30 Sentence division computer program Pending JP2006277674A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005100017A JP2006277674A (en) 2005-03-30 2005-03-30 Sentence division computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005100017A JP2006277674A (en) 2005-03-30 2005-03-30 Sentence division computer program

Publications (1)

Publication Number Publication Date
JP2006277674A true JP2006277674A (en) 2006-10-12

Family

ID=37212327

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005100017A Pending JP2006277674A (en) 2005-03-30 2005-03-30 Sentence division computer program

Country Status (1)

Country Link
JP (1) JP2006277674A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871537A (en) * 2019-01-31 2019-06-11 沈阳雅译网络技术有限公司 A kind of high-precision Thai subordinate sentence method
CN111460789A (en) * 2020-05-15 2020-07-28 湖南工商大学 L STM sentence segmentation method, system and medium based on character embedding

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871537A (en) * 2019-01-31 2019-06-11 沈阳雅译网络技术有限公司 A kind of high-precision Thai subordinate sentence method
CN109871537B (en) * 2019-01-31 2022-12-27 沈阳雅译网络技术有限公司 High-precision Thai sentence segmentation method
CN111460789A (en) * 2020-05-15 2020-07-28 湖南工商大学 L STM sentence segmentation method, system and medium based on character embedding
CN111460789B (en) * 2020-05-15 2023-07-07 湖南工商大学 LSTM clause method, system and medium based on character embedding

Similar Documents

Publication Publication Date Title
JP5377889B2 (en) Language processing apparatus and program
US20120262461A1 (en) System and Method for the Normalization of Text
US5895446A (en) Pattern-based translation method and system
JP5071373B2 (en) Language processing apparatus, language processing method, and language processing program
US6684201B1 (en) Linguistic disambiguation system and method using string-based pattern training to learn to resolve ambiguity sites
EP0370778A2 (en) Method for manipulating digital text data
US20140350913A1 (en) Translation device and method
US20060149543A1 (en) Construction of an automaton compiling grapheme/phoneme transcription rules for a phoneticizer
JP2007172657A (en) Method and system for identifying and analyzing commonly confused word with natural language parser
JP3781561B2 (en) Natural language analysis device, system and recording medium
US20220414332A1 (en) Method and system for automatically generating blank-space inference questions for foreign language sentence
WO2020170906A1 (en) Generation device, learning device, generation method, and program
CN114239589A (en) Robustness evaluation method and device of semantic understanding model and computer equipment
Rasin et al. Approaching explanatory adequacy in phonology using Minimum Description Length
JP5317061B2 (en) A simultaneous classifier in multiple languages for the presence or absence of a semantic relationship between words and a computer program therefor.
JP2006277674A (en) Sentence division computer program
JP4405542B2 (en) Apparatus, method and program for clustering phoneme models
JP7253951B2 (en) natural language data processor and program
US7617089B2 (en) Method and apparatus for compiling two-level morphology rules
Mahlow et al. Linguistic support for revising and editing
KR101472029B1 (en) Natural language-based syntax analysis method using index element and system thereof
CN110955748B (en) Semantic processing method, electronic device and non-transitory computer readable recording medium
US20220004708A1 (en) Methods and apparatus to improve disambiguation and interpretation in automated text analysis using structured language space and transducers applied on automatons
US20220261536A1 (en) Utterance sentence extension apparatus, utterance sentence generator apparatus, utterance sentence extension method, and program
Kerber et al. kNarrator: A Model For Authors To Simplify Authoring Process Using Natural Language Processing To Portuguese