JPH11250057A - Morpheme analyzer - Google Patents
Morpheme analyzerInfo
- Publication number
- JPH11250057A JPH11250057A JP10052272A JP5227298A JPH11250057A JP H11250057 A JPH11250057 A JP H11250057A JP 10052272 A JP10052272 A JP 10052272A JP 5227298 A JP5227298 A JP 5227298A JP H11250057 A JPH11250057 A JP H11250057A
- Authority
- JP
- Japan
- Prior art keywords
- character string
- partial character
- analysis
- morphological
- unknown word
- 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
Links
Landscapes
- Machine Translation (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は形態素解析装置に関
し、特に、確率的手法を利用することによって、辞書を
用いることなく電子化された自然言語テキストを形態素
解析する装置に適用し得るものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a morphological analyzer, and more particularly, to a morphological analyzer that utilizes a stochastic technique to analyze digitized natural language text without using a dictionary. .
【0002】[0002]
【従来の技術】ワードプロセッサによるテキスト作成機
会の増大や、インターネット対応機器の普及により、大
量の電子化された自然言語テキストが容易に入手可能と
なってきた。文字認識システム、機械翻訳システム、情
報検索システム、情報抽出システム等の大量の自然言語
テキストを扱う自然言語処理を応用した各種アプリケー
ションシステムにとって、形態素解析処理は、各種アプ
リケーションが目的とする専門処理(検索、構成、比
較、分類、要約等)を実施する前に共通して実施され、
単語や句等の文中の意味単位、すなわち、形態素を確定
する極めて重要な処理である。2. Description of the Related Art A large number of computerized natural language texts have been easily available due to an increase in opportunities for text creation by word processors and the spread of Internet-compatible devices. For various application systems that apply natural language processing that handles a large amount of natural language text, such as character recognition systems, machine translation systems, information retrieval systems, information extraction systems, etc., morphological analysis processing is specialized processing (search , Composition, comparison, classification, summaries, etc.)
This is a very important process for determining a semantic unit in a sentence such as a word or a phrase, that is, a morpheme.
【0003】この形態素解析を誤ると、後段での構文解
析処理や意味解析処理等において、その誤りを修復する
ことが困難である。たとえその修復が可能であったとし
て、その処理は複雑化し、従って、大量のテキストを期
待された時間内に処理することができなくなってしま
う。[0003] If this morphological analysis is erroneous, it is difficult to repair the error in the syntax analysis processing, semantic analysis processing, and the like in the subsequent stage. Even if it could be repaired, the process would be complicated and, therefore, would not be able to process large amounts of text in the expected time.
【0004】形態素解析処理においては、英語などの単
語区切り記号として空白を使用するという正書法が備わ
っている言語テキストと比べると、単語区切りがない日
本語等の言語は品詞の推定とともに、単語分割が高精度
でかつ高速で行えるかどうかが大きな課題となってい
る。また、形態素解析装置においては、形態素解析対象
文(自然語テキスト)に未知語が含まれていても精度良
く形態素解析できることが大きな課題となっている。In a morphological analysis process, a language such as Japanese without word delimiter is not only part-of-speech estimated but also has word segmentation compared to a language text such as English which has an orthography that uses a space as a word delimiter. A major issue is whether it can be performed with high accuracy and at high speed. Further, in the morphological analysis device, it is a big problem that the morphological analysis can be performed with high accuracy even if the morphological analysis target sentence (natural language text) includes an unknown word.
【0005】文献1『特開平8−315078号公報』
文献1に開示された手法では、文字列の連鎖確率を用い
た単語モデルを導入することによって未知語に対処して
いる。しかし、この手法は、単語内での連鎖確率しか使
用しておらず、その単語が前後の文脈によってどれくら
い可能性があるかについては、品詞の連鎖確率により間
接的にしか表現されていない。すなわち、文脈全体の連
鎖確率又は未知の文字列の範囲を越えた長さの文字列に
おける連鎖確率を使用しなければ、正しく未知の文字列
を確定したり、区切ることができない。また、この従来
手法では、あくまでも単語べースの手法であるため、形
態素解析装置が、未知語文字列があると仮定した場合に
は、文中の全ての位置で、任意の長さの単語候補の組み
合わせを考慮しなければならず、従って、計算量の増大
を引き起こしてしまう。[0005] Reference 1 "Japanese Patent Laid-Open No. Hei 8-315078"
In the method disclosed in Document 1, unknown words are dealt with by introducing a word model using a chain probability of a character string. However, this method uses only the chain probability within a word, and only indirectly expresses the possibility of the word depending on the context before and after by the chain probability of the part of speech. That is, unless the chain probability of the entire context or the chain probability of a character string having a length exceeding the range of the unknown character string is used, the unknown character string cannot be correctly determined or separated. In addition, since this conventional method is a word-based method, if the morphological analysis device assumes that there is an unknown word character string, word positions of an arbitrary length are assumed at all positions in the sentence. Must be taken into account, thus causing an increase in computational complexity.
【0006】文献2『山本幹雄、増山正和著、「品詞・
区切り情報を含む拡張文字の連鎖確率を用いた日本語形
態素解析」、言語処理学会第3回年次大会発表論文集、
1997年3月』文献2に開示された手法は、単語では
なく、所定文字数N(Nは例えば3)の文字列(以下で
は、場合によってはN−gramデータと呼ぶ)をべー
スにした確率モデルを用いて日本語形態素解析を行うも
のであり、文献1の課題を解決できるものである。Reference 2 "Mikio Yamamoto, Masakazu Masuyama,"
Japanese morphological analysis using chain probability of extended characters including delimiter information ”, Proceedings of the 3rd Annual Meeting of the Linguistic Processing Society,
The method disclosed in "March 1997" Literature 2 is based on a character string having a predetermined number of characters N (N is, for example, 3) (hereinafter, sometimes referred to as N-gram data) instead of a word. The Japanese morphological analysis is performed using a probabilistic model, and can solve the problem of Reference 1.
【0007】[0007]
【発明が解決しようとする課題】しかしながら、文献2
に記載の形態素解析方法においても、以下のような課題
を有するものであった。Problems to be Solved by the Invention However, Document 2
The morphological analysis method described in (1) also has the following problems.
【0008】N文字以上の未知語を含んでいる入力文に
対してもできるだけ形態素解析しようとすると、(N−
1)−gramデータや(N−2)−gramデータ等
の文字数が少ない確率モデルを用意しておき、N−gr
amデータを適用しては形態素解析結果を得られない部
分には、(N−1)−gramデータや(N−2)−g
ramデータを適用して形態素の区切りを定める。この
場合、N−gramデータだけでなく、(N−1)−g
ramデータや(N−2)−gramデータ等の文字数
が少ない確率モデルも予め作成して記憶しておくので、
必要とする記憶容量が膨大となる。If an attempt is made to perform a morphological analysis on an input sentence containing an unknown word of N characters or more as much as possible, (N-
1) Probability models with a small number of characters such as -gram data and (N-2) -gram data are prepared, and N-gr
(N-1) -gram data and (N-2) -g
Apply ram data to determine morpheme breaks. In this case, not only the N-gram data but also (N-1) -g
Probability models with a small number of characters, such as ram data and (N-2) -gram data, are also created and stored in advance.
The required storage capacity becomes enormous.
【0009】これを避けようとすると、N−gramデ
ータの確率モデルだけを用意しておき、N−gramデ
ータを適用しては形態素解析結果を得られない未知語部
分に適用できるような(N−1)−gramデータや
(N−2)−gramデータを、N−gramデータの
確率モデルからその時点で作成して、形態素解析に使用
することが考えられる。しかしながら、N−gramデ
ータの確率モデルから、(N−1)−gramデータや
(N−2)−gramデータを作成するには、多くの演
算処理が必要となって多大な時間がかかってしまう。In order to avoid this, only a probabilistic model of N-gram data is prepared, and the N-gram data can be applied to an unknown word part from which a morphological analysis result cannot be obtained by applying N-gram data. It is conceivable that -1) -gram data or (N-2) -gram data is created at that time from a probability model of N-gram data and used for morphological analysis. However, generating (N-1) -gram data or (N-2) -gram data from a probability model of N-gram data requires a lot of arithmetic processing and takes a lot of time. .
【0010】また、明らかに未知語と分かっている部分
に対しても、複数の形態素解析結果候補の順序付けのた
めに、接続関係を評価する値(文全体の連鎖確率)を算
出するための計算を実行するので、計算時間に無駄があ
るということができる。Also, a calculation for calculating a value for evaluating a connection relationship (a chain probability of the entire sentence) for ordering a plurality of morphological analysis result candidates even for a part which is clearly known as an unknown word. Is executed, it can be said that the calculation time is wasted.
【0011】そのため、ある程度長い未知語部分を含む
入力文に対しても、短時間で実用に供することができる
形態素解析結果が得られる形態素解析装置が求められて
いる。Therefore, there is a need for a morphological analyzer capable of obtaining a morphological analysis result that can be put to practical use in a short time even for an input sentence including an unknown word part to some extent.
【0012】[0012]
【課題を解決するための手段】かかる課題を解決するた
め、本発明は、拡張文字情報を格納した拡張文字テーブ
ルを備え、形態素解析装置本体がこの拡張文字テーブル
の格納情報を利用して、入力された解析対象文に対する
形態素解析を行う形態素解析装置において、(1)入力
された解析対象文中において、解析対象とする1又は複
数の部分文字列を決定する解析対象部分文字列決定手段
と、(2)決定された各部分文字列に対して、上記形態
素解析装置本体に形態素解析を実行させる解析制御手段
と、(3)上記形態素解析装置本体によって得られた、
解析対象の各部分文字列についての解析結果を少なくと
も含む結果情報を出力する結果出力手段とを有すること
を特徴とする。In order to solve this problem, the present invention comprises an extended character table storing extended character information, and the morphological analyzer main unit uses the extended character table to input data. A morphological analysis device that performs a morphological analysis on the analyzed sentence to be analyzed; (1) analysis target partial character string determination means for determining one or a plurality of partial character strings to be analyzed in the input analysis target sentence; 2) analysis control means for causing the morphological analysis apparatus main body to perform morphological analysis on each of the determined partial character strings; and (3) the morphological analysis apparatus main body.
A result output unit that outputs result information including at least an analysis result of each partial character string to be analyzed.
【0013】[0013]
【発明の実施の形態】(A)第1の実施形態 以下、本発明による形態素解析装置の第1の実施形態を
図面を参照しながら詳述する。DESCRIPTION OF THE PREFERRED EMBODIMENTS (A) First Embodiment Hereinafter, a first embodiment of a morphological analyzer according to the present invention will be described in detail with reference to the drawings.
【0014】図1は、第1の実施形態の形態素解析装置
の構成を示す機能ブロック図である。すなわち、第1の
実施形態の形態素解析装置は、実際上、入出力装置や処
理装置や記憶装置(や通信装置)等を有するワークステ
ーションやパソコン等の情報処理装置上に実現されるも
のであるが、機能的には、図1に示す構成を有するもの
である。FIG. 1 is a functional block diagram showing the configuration of the morphological analyzer according to the first embodiment. That is, the morphological analysis device of the first embodiment is actually realized on an information processing device such as a workstation or a personal computer having an input / output device, a processing device, a storage device (or a communication device), and the like. However, functionally, it has the configuration shown in FIG.
【0015】図1において、この第1の実施形態の形態
素解析装置は、入出力装置1、未知語処理装置2、形態
素解析装置本体3、拡張文字テーブル4、入力中間ファ
イル5及び出力中間ファイル6を備える。In FIG. 1, a morphological analyzer according to the first embodiment includes an input / output device 1, an unknown word processor 2, a morphological analyzer main body 3, an extended character table 4, an input intermediate file 5, and an output intermediate file 6. Is provided.
【0016】ここで、未知語処理装置2は、未知語判定
部21、未知語範囲推定部22、入力文分割部23及び
出力結果結合部24を有する。また、形態素解析装置本
体3は、拡張文字列生成部31、連鎖確率計算部32及
び最適経路探索部33を有する。Here, the unknown word processing device 2 includes an unknown word determining unit 21, an unknown word range estimating unit 22, an input sentence dividing unit 23, and an output result combining unit 24. Further, the morphological analyzer main body 3 includes an extended character string generation unit 31, a chain probability calculation unit 32, and an optimum route search unit 33.
【0017】入出力装置1は、図示していないが、当然
に、入力部と出力部とからなる。入力部は、自然言語テ
キスト(入力文)を当該形態素解析装置へ入力させるた
めのキーボード、マウス、OCR(光学式文字認識装
置)、音声認識装置等の任意の手段で構成しても良い
し、ネットワーク等の通信媒体を経て外部からの通信信
号を受信する手段として構成しても良い。出力部は、通
常の情報処理装置の場合と同様に、当該形態素解析装置
で得られた形態素解析結果を、外部の種々の表示手段や
通信手段等へ出力するものである。Although not shown, the input / output device 1 naturally includes an input unit and an output unit. The input unit may be configured by any means such as a keyboard, a mouse, an OCR (optical character recognition device), and a speech recognition device for inputting a natural language text (input sentence) to the morphological analyzer. It may be configured as means for receiving a communication signal from the outside via a communication medium such as a network. The output unit outputs the morphological analysis result obtained by the morphological analyzer to various external display units and communication units, as in the case of a normal information processing device.
【0018】未知語処理装置2は、入力文が未知語を含
むものであるか否かを確認するものである。そして、未
知語処理装置2は、未知語を含むものである場合には、
未知語範囲に基づいて、入力文を未知語部分を含まない
複数の部分(以下、解析対象部分と呼ぶ)に分割し、各
解析対象部分について形態素解析装置本体3に形態素解
析を実行させ、各解析対象部分について得られた複数の
形態素解析結果と未知語範囲とを合成して、入出力装置
1に出力情報として与えるものである。一方、未知語処
理装置2は、入力文が未知語を含まない場合には、入力
文そのものについて形態素解析装置本体3に形態素解析
を実行させ、得られた形態素解析結果を入出力装置1に
出力情報として与えるものである。The unknown word processing device 2 checks whether or not an input sentence includes an unknown word. When the unknown word processing device 2 includes an unknown word,
Based on the unknown word range, the input sentence is divided into a plurality of portions (hereinafter, referred to as analysis target portions) that do not include the unknown word portion, and the morphological analysis device main body 3 executes morphological analysis for each analysis target portion. A plurality of morphological analysis results obtained for the analysis target portion and the unknown word range are combined and given to the input / output device 1 as output information. On the other hand, if the input sentence does not include an unknown word, the unknown word processing device 2 causes the morphological analysis device main body 3 to perform a morphological analysis on the input sentence itself, and outputs the obtained morphological analysis result to the input / output device 1. It is given as information.
【0019】未知語処理装置2において、未知語判定部
21は、拡張文字テーブル4の格納内容を参照しなが
ら、入力文が未知語を含むものであるか否かを判定する
ものである。また、未知語判定部21は、入力文が未知
語を含まない場合には、入力文そのものについて形態素
解析装置本体3に形態素解析を実行させ、得られた形態
素解析結果を入出力装置1に出力情報として与えるもの
である。In the unknown word processing device 2, the unknown word determination unit 21 determines whether or not the input sentence includes an unknown word while referring to the storage contents of the extended character table 4. When the input sentence does not include an unknown word, the unknown word determination unit 21 causes the morphological analysis device main body 3 to perform morphological analysis on the input sentence itself, and outputs the obtained morphological analysis result to the input / output device 1. It is given as information.
【0020】未知語範囲推定部22は、入力文が未知語
を含むものである場合に、拡張文字テーブル4の格納内
容を参照しながら、未知語範囲を推定するものである。The unknown word range estimating section 22 estimates the unknown word range while referring to the contents stored in the extended character table 4 when the input sentence includes an unknown word.
【0021】入力文分割部23は、入力文を未知語部分
(推定未知語範囲)を含まない複数の解析対象部分に分
割し、その分割された解析対象部分を入力中間ファイル
5に格納させると共に、分割された解析対象部分につい
て形態素解析装置本体3に形態素解析を実行させるもの
である。The input sentence dividing unit 23 divides the input sentence into a plurality of analysis target parts that do not include an unknown word part (estimated unknown word range), stores the divided analysis target parts in the input intermediate file 5, and The morphological analyzer main body 3 executes morphological analysis on the divided analysis target portion.
【0022】出力結果結合部24は、各解析対象部分に
ついて得られた複数の形態素解析結果と未知語範囲と
を、出力中間ファイル6に格納させる動作を通じて結合
し、結合によって得られた情報を、最終的な形態素解析
結果情報(出力情報)として入出力装置1に与えるもの
である。The output result combining unit 24 combines a plurality of morphological analysis results obtained for each part to be analyzed and the unknown word range through an operation of storing the unknown word range in the output intermediate file 6, and outputs the information obtained by the combining. This is given to the input / output device 1 as final morphological analysis result information (output information).
【0023】なお、図1では、未知語処理装置2の内部
構成を明確に機能分けして示しているが、各機能部は、
実際上、明確に区分できないように形成されることが多
い(後述する図2参照)。In FIG. 1, the internal configuration of the unknown word processing device 2 is clearly divided into functions.
In practice, it is often formed so that it cannot be clearly distinguished (see FIG. 2 described later).
【0024】入力中間ファイル5は、上述したように、
入力文を分割した解析対象部分(入力文の入力途中段
階)を蓄えるものである。The input intermediate file 5 is, as described above,
It stores an analysis target portion (an input sentence input stage) obtained by dividing the input sentence.
【0025】また、出力中間ファイル6は、上述したよ
うに、各解析対象部分についての形態素解析結果や未知
語範囲(出力結果の途中段階)を蓄えるものである。As described above, the output intermediate file 6 stores the morphological analysis result and the unknown word range (in the middle of the output result) for each analysis target portion.
【0026】拡張文字テーブル4は、文字数Nの拡張文
字列(N−gramデータ)とその連鎖確率(部分連鎖
確率)を格納するものであり、訓練テキスト(コーパ
ス)により予め学習されて作成されているもの(記憶装
置)である。ここで、拡張文字eiとは、文字ciと、
その文字ciの直後が形態素の区切りになっているか否
かを示す区切り情報(及びその文字ciが属する形態素
の品詞情報等)でなる拡張情報diとが対になっている
ものを言う。なお、以下の説明は、拡張情報diとして
区切り情報だけを有するものとして行う。The extended character table 4 stores an extended character string (N-gram data) having the number of characters N and its chain probability (partial chain probability). The extended character table 4 is learned and prepared in advance by a training text (corpus). (Storage device). Here, the extended character ei is a character ci,
This is a pair of extended information di consisting of delimiter information (and part of speech information of the morpheme to which the character ci belongs) indicating whether or not the character ci is a morpheme delimiter. Note that the following description is made assuming that only the delimiter information is included as the extended information di.
【0027】形態素解析装置本体3は、文字をベースと
した確率モデルを利用した従来のものと同様なものであ
る。なお、形態素解析装置本体3は、形態素解析対象と
して、入力文が与えられるだけでなく、場合によって
は、入力文を分割した解析対象部分が与えられる点が、
従来とは異なっているが、その詳細構成は、従来装置と
なんら異なる所はない。The morphological analyzer main body 3 is similar to the conventional one using a probability model based on characters. It should be noted that the morphological analysis apparatus main body 3 is not only provided with an input sentence as a morphological analysis target, but also in some cases provided with an analysis target portion obtained by dividing the input sentence.
Although it is different from the conventional device, the detailed configuration is not different from the conventional device.
【0028】形態素解析装置本体3における拡張文字列
生成部31は、入力文又は解析対象部分の各文字に対応
した拡張文字を生成し、当該拡張文字の全ての組み合わ
せ(各組み合わせを拡張文字列の経路と呼ぶ)を、連鎖
確率計算部32が内蔵するスコアテーブルに格納させる
ものである。The extended character string generation unit 31 in the morphological analyzer main body 3 generates extended characters corresponding to each character of the input sentence or the part to be analyzed, and generates all combinations of the extended characters (each combination is referred to as an extended character string). (Referred to as a route) in a score table incorporated in the chain probability calculation unit 32.
【0029】連鎖確率計算部32は、拡張文字テーブル
4に格納されている部分連鎖確率に基づき、内蔵するス
コアテーブルに格納されている拡張文字列の経路に対す
る連鎖確率を計算するものである。拡張文字列の経路に
対する連鎖確率は、例えば、その経路を構成する全ての
N−gramデータの部分連鎖確率の積で与えられる。The chain probability calculating section 32 calculates the chain probability for the path of the expanded character string stored in the built-in score table based on the partial chain probability stored in the extended character table 4. The chain probability for the path of the extended character string is given, for example, as the product of the partial chain probabilities of all the N-gram data constituting the path.
【0030】最適経路探索部33は、連鎖確率計算部3
2により計算された連鎖確率の中から、最適な条件(例
えば最大値の連鎖確率を与えるなど)を満たす拡張文字
列の経路を、最適拡張文字列として選択し、必要なら
ば、拡張情報部分の表現を変換して形態素解析を求めた
未知語処理装置2に形態素解析結果として返送するもの
である。例えば、形態素区切りでないことを示す区切り
情報は削除し、形態素区切りであることを示す区切り情
報は「/」に置き換えたりして拡張情報部分の表現を変
換する。The optimal route search unit 33 includes the chain probability calculation unit 3
From the chain probabilities calculated in step 2, a path of an extended character string that satisfies an optimal condition (for example, a maximum value of the chain probability) is selected as an optimal extended character string. The expression is converted and returned as a morphological analysis result to the unknown word processing device 2 which has obtained a morphological analysis. For example, the delimiter information indicating that it is not a morpheme delimiter is deleted, and the delimiter information indicating that it is a morpheme delimiter is replaced with “/” to convert the expression of the extended information part.
【0031】上述のように、形態素解析装置本体3は、
従来のものと同様であるので、その動作説明は省略し、
以下では、この第1の実施形態の特徴を構成している未
知語処理装置2の動作を、図2のフローチャートを参照
しながら説明する。なお、以下の説明においては、Nが
3として行う。すなわち、3−gramデータが適用さ
れているとして行う。As described above, the morphological analyzer main body 3
Since it is the same as the conventional one, the description of its operation is omitted,
In the following, the operation of the unknown word processing device 2 constituting the feature of the first embodiment will be described with reference to the flowchart of FIG. In the following description, N is assumed to be 3. That is, it is performed assuming that 3-gram data is applied.
【0032】まず、入出力装置1から、拡張文字テーブ
ル4の格納内容との照合をまだ行っていない、入力文字
列の最も先頭側の3文字(N文字)を取り出す(ステッ
プ100)。そして、取り出した3文字の並びが拡張文
字テーブル4に存在するかどうかチェックする(ステッ
プ101)。なお、拡張文字テーブル4には、拡張情報
を伴った拡張文字列が格納されているが、この判断は、
拡張情報を除いた文字列に対して行う。First, the first three characters (N characters) of the input character string that have not yet been checked against the contents stored in the extended character table 4 are extracted from the input / output device 1 (step 100). Then, it is checked whether or not the arrangement of the extracted three characters exists in the extended character table 4 (step 101). The extended character table 4 stores an extended character string with extended information.
Performed for character strings excluding extended information.
【0033】拡張文字テーブル4に取り出した3文字の
並びが存在する場合には、その3文字中の1文字目を入
力中間ファイル5に格納した後、3文字の位置を1文字
分だけ進める処理を行って上述したステップ100に戻
る(ステップ107)。If there is an arrangement of the extracted three characters in the extended character table 4, the first character of the three characters is stored in the input intermediate file 5, and then the position of the three characters is advanced by one character. And returns to step 100 (step 107).
【0034】これに対して、拡張文字テーブル4に取り
出した3文字の並びが存在しない場合には、3文字目を
未知語列の先頭と認識し、未知語でない1文字目と2文
字目を、入力中間ファイル5に格納する(ステップ10
2)。そして、入力中間ファイル5に格納されている文
字列を形態素解析装置本体3に与えて、その文字列に対
する形態素解析を実行させる(ステップ103)。この
とき、形態素解析装置本体3から、例えば、その文字列
における形態素区切り位置に区切り記号(/)が付加さ
れた文字列(形態素解析結果)が出力され、この形態素
解析結果を、出力中間ファイル6の今までの格納内容に
続けて格納させると共に、入力中間ファイル5を空にす
る(ステップ104)。On the other hand, when there is no arrangement of the extracted three characters in the extended character table 4, the third character is recognized as the head of the unknown word string, and the first and second characters that are not unknown words are recognized. Is stored in the input intermediate file 5 (step 10).
2). Then, the character string stored in the input intermediate file 5 is given to the morphological analysis device main body 3 to execute morphological analysis on the character string (step 103). At this time, the morphological analysis device main body 3 outputs, for example, a character string (morphological analysis result) in which a delimiter (/) is added to the morphological delimiter position in the character string, and outputs the morphological analysis result to the output intermediate file 6. Are stored following the contents stored so far, and the input intermediate file 5 is emptied (step 104).
【0035】その後、上述したステップ102で未知語
先頭と認識された文字から始まる文字列に対して、3文
字ずつ、ステップ100、101及び107でなる処理
ループと同様な処理により未知語判定を行い、未知語が
連続する間はその処理を繰り返し、未知語でない3文字
が現れるまでの回数だけ未知語の文字が連続していたと
推測する(ステップ105)。すなわち、未知語範囲を
推定する。Thereafter, for the character string starting from the character recognized as the head of the unknown word in step 102, the unknown word is determined for each three characters by the same processing as the processing loop of steps 100, 101 and 107. While the unknown word continues, the process is repeated, and it is assumed that the characters of the unknown word have continued for the number of times until three non-unknown words appear (step 105). That is, the unknown word range is estimated.
【0036】そして、未知語と推定された文字列の後に
区切り記号(/)を付加して、出力中間ファイル6の今
までの格納内容に続けて格納させると共に、入力中間フ
ァイル5を空にして上述したステップ100に戻る(ス
テップ106)。Then, a delimiter (/) is added after the character string estimated to be an unknown word so that the input intermediate file 5 is emptied while the output intermediate file 6 is stored following the contents stored so far. The process returns to step 100 (step 106).
【0037】入力文字列の最後まで読み込んだ後にステ
ップ100に移行してきたときには、もう読み込めない
という結果が得られる。このときには、その時点で入力
中間ファイル5に格納されている文字列を、形態素解析
装置本体3に与えて、その文字列に対する形態素解析を
実行させる(ステップ108)。そして、形態素解析装
置本体3から返送されてきた、その文字列における形態
素区切り位置に区切り記号(/)が付加された文字列
(形態素解析結果)を、出力中間ファイル6の今までの
格納内容に続けて格納させると共に、入力中間ファイル
5を空にする(ステップ109)。When the process proceeds to step 100 after the input character string has been read to the end, a result is obtained that the character string cannot be read anymore. At this time, the character string stored in the input intermediate file 5 at that time is given to the morphological analyzer main body 3 to execute morphological analysis on the character string (step 108). Then, the character string (morphological analysis result) added with a delimiter (/) at the morphological delimiter position in the character string returned from the morphological analysis device main body 3 is stored in the output intermediate file 6 so far. Then, the input intermediate file 5 is emptied (step 109).
【0038】最後に、出力中間ファイル6の格納内容を
入出力装置1に出力して、今回の入力文に対する一連の
処理を終了する(ステップ110)。Finally, the contents stored in the output intermediate file 6 are output to the input / output device 1, and a series of processes for the current input sentence is completed (step 110).
【0039】以下、第1の実施形態の形態素解析装置の
処理を、図3及び図4を参照しながら具体例を用いて説
明する。Hereinafter, the processing of the morphological analyzer according to the first embodiment will be described using a specific example with reference to FIGS. 3 and 4.
【0040】ここで、図3は、入力文「これはカンキリ
です。」に対する処理やデータの流れを示す説明図であ
り、図4は、拡張文字テーブル4の格納例の説明図であ
る。なお、図4は、3文字(N文字)の文字列だけを示
し、拡張情報及び連鎖確率の図示を省略している。ま
た、図4において、「O」は拡張文字テーブル4にその
文字列が存在することを表し、「×」は拡張文字テーブ
ル4にその文字列が存在しないを表しており、このよう
な「O」や「×」が拡張文字テーブル4に情報として格
納されているわけではない。FIG. 3 is an explanatory diagram showing the processing and the flow of data for the input sentence "This is Kankiri." FIG. 4 is an explanatory diagram of a storage example of the extended character table 4. FIG. 4 shows only a character string of three characters (N characters), and illustration of the extended information and the chain probability is omitted. In FIG. 4, “O” indicates that the character string exists in the extended character table 4, and “×” indicates that the character string does not exist in the extended character table 4. "And" x "are not stored in the extended character table 4 as information.
【0041】入力文「これはカンキリです。」に対し
て、「これは」、「れはカ」、「はカン」、…というよ
うな3文字ずつの文字列を順次作成して、拡張文字テー
ブル4の格納内容との照合を行う。In response to the input sentence "This is Kankiri.", A character string of three characters such as "this is", "reha ka", "ha kang", ... The collation with the contents stored in Table 4 is performed.
【0042】文字列「これは」、「れはカ」又は「はカ
ン」を照合した際には、拡張文字テーブル4に存在する
ことが確認されたので、入力中間ファイル5に、その先
頭文字「こ」、「れ」又は「は」が順次追加格納され
る。When the character strings "this", "rehaka" or "hakan" are collated, it is confirmed that they exist in the extended character table 4. “Ko”, “re” or “ha” is additionally stored sequentially.
【0043】文字列「カンキ」が拡張文字テーブル4と
の照合対象となったときには、この文字列「カンキ」が
拡張文字テーブル4に存在しないので、その前の2文字
「カン」が入力中間ファイル5に追加格納され、また、
文字「キ」が未知語の先頭文字として認識される。そし
て、入力中間ファイル5の格納内容「これはカン」が形
態素解析装置本体3に与えられて形態素解析され、得ら
れた解析結果「これ/は/カン/」が出力中間ファイル
6に格納される共に、入力中間ファイル5の内容が空に
される。When the character string "kanki" is to be collated with the extended character table 4, since the character string "kanki" does not exist in the extended character table 4, the preceding two characters "kan" are stored in the input intermediate file. 5 and also stored in
The character "" is recognized as the first character of the unknown word. Then, the stored content of the input intermediate file 5 “this is can” is given to the morphological analyzer main body 3 and subjected to morphological analysis, and the obtained analysis result “this / ha / can /” is stored in the output intermediate file 6. In both cases, the contents of the input intermediate file 5 are emptied.
【0044】文字「キ」から始まる未知語を構成する文
字列の推定は、「キリで」、「リです」、…というよう
な文字「キ」以降の3文字ずつの文字列を順次作成し、
拡張文字テーブル4の格納内容との照合により行う。す
なわち、拡張文字テーブル4に存在する文字列が見つか
るまでの3文字の先頭文字は、未知語を構成する文字と
して捉える。このような照合時においても、入力中間フ
ァイル5が利用される。In order to estimate a character string that forms an unknown word starting with the character “K”, character strings of three characters after the character “K” such as “Kiride”, “Ri”,. ,
The comparison is performed with the contents stored in the extended character table 4. That is, the first three characters until a character string existing in the extended character table 4 is found are regarded as characters constituting an unknown word. The input intermediate file 5 is also used at the time of such collation.
【0045】この例の場合、文字列「です。」が拡張文
字テーブル4に存在するので、それまでの照合文字列
「キリで」及び「リです」の先頭文字をつなげた「キ
リ」が未知語文字列と推測される。そして、未知語文字
列「キリ」に区切り記号(/)を追加した文字列「キリ
/」が未知語部分についての形態素解析結果をとして、
出力中間ファイル6に追加格納され、その後、入力中間
ファイル5の内容が空にされる。In this example, since the character string "is." Exists in the extended character table 4, the character string "Kiri" which connects the first characters of the collation character strings "Kiride" and "Kirida" up to that point is unknown. Guessed as a word string. Then, the character string “Kiri /” obtained by adding a delimiter (/) to the unknown word character string “Kiri” is used as a morphological analysis result for the unknown word part,
It is additionally stored in the output intermediate file 6, and then the contents of the input intermediate file 5 are emptied.
【0046】入力文字列の最終文字「。」の読込みが終
了したときには、入力中間ファイル5には文字列「で
す。」が格納されている。この格納内容「です。」が形
態素解析装置本体3に与えられて形態素解析され、得ら
れた解析結果「です/。/」が出力中間ファイル6に追
加格納される共に、入力中間ファイル5の内容が空にさ
れる。When the reading of the last character "." Of the input character string is completed, the character string "is." Is stored in the input intermediate file 5. The stored content “is.” Is given to the morphological analyzer main body 3 and subjected to morphological analysis, and the obtained analysis result “is /./” is additionally stored in the output intermediate file 6 and the contents of the input intermediate file 5 Is emptied.
【0047】最後に、出力中間ファイル6の格納内容
「これ/は/カン/キリ/です/。/」が、形態素解析
結果として出力される、第1の実施形態の形態素解析装
置によれば、入力文を構成するN文字の文字列が拡張文
字テーブルに存在するか否かに基づいて、未知語部分を
推測決定し、未知語部分以外のしかも未知語部分で分割
された入力文の各部分文字列毎に形態素解析を行い、得
られた形態素解析結果及び未知語部分を結合して最終的
な形態素解析結果を得るようにしたので、形態素解析の
ために予め用意して格納しておく情報量を従来とほぼ同
程度のままで、ある程度長い未知語部分を含む入力文に
対しても、短時間で実用に供することができる形態素解
析結果を得ることができるようになる。Finally, according to the morphological analyzer of the first embodiment, the stored contents of the output intermediate file 6 “this / ha / can / kiri / is /./” are output as the morphological analysis results. An unknown word portion is guessed and determined based on whether or not the character string of N characters constituting the input sentence exists in the extended character table, and each portion of the input sentence other than the unknown word portion and divided by the unknown word portion is determined. Morphological analysis is performed for each character string, and the obtained morphological analysis result and the unknown word part are combined to obtain the final morphological analysis result, so information prepared and stored in advance for morphological analysis It is possible to obtain a morphological analysis result that can be put to practical use in a short time even for an input sentence including an unknown word part with a certain length while keeping the amount substantially the same as in the related art.
【0048】すなわち、(N−1)−gramデータや
(N−2)−gramデータ等の、基本的なN−gra
mデータより文字数が少ない確率モデルを用意しておく
必要がなく、記憶容量の増大を抑えることができる。ま
た、未知語を発見しても、N−gramデータの確率モ
デルから、(N−1)−gramデータや(N−2)−
gramデータを作成する必要がなく、未知語を含んで
いても、形態素解析結果を迅速に得ることができる。さ
らに、未知語部分に対する部分連鎖確率の推測や、未知
語部分に対する総合的な連鎖確率計算等を行う必要がな
く、この点からも、形態素解析結果を迅速に得ることが
できる。That is, basic N-gram data such as (N-1) -gram data and (N-2) -gram data.
There is no need to prepare a probability model having fewer characters than m data, and an increase in storage capacity can be suppressed. Also, even if an unknown word is found, (N-1) -gram data or (N-2)-
There is no need to create gram data, and even if an unknown word is included, a morphological analysis result can be obtained quickly. Further, there is no need to estimate the partial chain probability for the unknown word portion, or to perform comprehensive chain probability calculation for the unknown word portion, and the morphological analysis result can be quickly obtained from this point.
【0049】(B)第2の実施形態 次に、本発明による形態素解析装置の第2の実施形態を
図面を参照しながら詳述する。(B) Second Embodiment Next, a second embodiment of the morphological analyzer according to the present invention will be described in detail with reference to the drawings.
【0050】図5は、第2の実施形態の形態素解析装置
の構成を示す機能ブロック図であり、上述した図1との
同一、対応部分には同一符号を付して示している。FIG. 5 is a functional block diagram showing the configuration of the morphological analyzer according to the second embodiment, in which the same or corresponding parts as those in FIG. 1 are denoted by the same reference numerals.
【0051】図5において、この第2の実施形態の形態
素解析装置は、入出力装置1、部分文字列処理装置7、
形態素解析装置本体3、拡張文字テーブル4、部分文字
列格納ファイル8及び部分文字列解析結果格納ファイル
9を備える。In FIG. 5, the morphological analyzer according to the second embodiment includes an input / output device 1, a partial character string processing device 7,
It includes a morphological analysis device main body 3, an extended character table 4, a partial character string storage file 8, and a partial character string analysis result storage file 9.
【0052】ここで、部分文字列処理装置7は、部分文
字列指定部71、部分文字列生成部72及び部分文字列
解析部73を有する。Here, the partial character string processing device 7 has a partial character string designation unit 71, a partial character string generation unit 72, and a partial character string analysis unit 73.
【0053】なお、入出力装置1、形態素解析装置本体
3及び拡張文字テーブル4は、第1の実施形態のものと
同様であるので、その機能説明は省略する。The input / output device 1, the morphological analyzer main body 3, and the extended character table 4 are the same as those in the first embodiment, so that the description of their functions will be omitted.
【0054】部分文字列処理装置7は、入力文全体に対
して形態素解析を実行するか、又は、入力文の部分文字
列に対して形態素解析を実行するかを取り込むものであ
る。そして、部分文字列処理装置7は、前者の場合に
は、入力文の全体を形態素解析装置本体3に与えて形態
素解析させ、返送されてきた形態素解析結果を入出力装
置1に出力するものである。一方、部分文字列処理装置
7は、後者の場合には、部分文字列の指定を取り込み、
入力文から指定された部分文字列を抽出して部分文字列
格納ファイル8に入力文における位置情報と共に格納
し、また、抽出した部分文字列を形態素解析装置本体3
に与えて形態素解析させ、返送されてきた形態素解析結
果を部分文字列解析結果格納ファイル9に格納させるも
のである。さらに、部分文字列処理装置7は、部分文字
列解析結果格納ファイル9に格納された解析結果と、解
析に供していない入力文の他の部分文字列とを結合して
入出力装置1に出力するものである。部分文字列処理装
置7における機能分担は、以下の通りである。The partial character string processing device 7 captures whether to execute morphological analysis on the entire input sentence or to execute morphological analysis on the partial character string of the input sentence. Then, in the former case, the partial character string processing device 7 supplies the entire input sentence to the morphological analysis device main body 3 to perform morphological analysis, and outputs the returned morphological analysis result to the input / output device 1. is there. On the other hand, in the latter case, the partial character string processing device 7 takes in the specification of the partial character string,
A specified partial character string is extracted from the input sentence and stored in the partial character string storage file 8 together with the position information in the input sentence.
, The morphological analysis is returned, and the returned morphological analysis result is stored in the partial character string analysis result storage file 9. Further, the partial character string processing device 7 combines the analysis result stored in the partial character string analysis result storage file 9 with another partial character string of the input sentence that is not subjected to analysis and outputs the result to the input / output device 1. Is what you do. The function allocation in the partial character string processing device 7 is as follows.
【0055】部分文字列指定部71は、入力文全体に対
して形態素解析を実行するか、又は、入力文の部分文字
列に対して形態素解析を実行するかを入出力装置1から
取り込み、前者の場合には、入力文の全体を形態素解析
装置本体3に与えて形態素解析させ、返送されてきた形
態素解析結果を入出力装置1に出力し、後者の場合に
は、部分文字列の指定を取り込むものである。The partial character string designating section 71 reads from the input / output device 1 whether to perform morphological analysis on the entire input sentence or morphological analysis on the partial character string of the input sentence. In the case of, the entire input sentence is given to the morphological analysis device main body 3 to perform morphological analysis, and the returned morphological analysis result is output to the input / output device 1. In the latter case, the designation of a partial character string is performed. It is something to take in.
【0056】部分文字列生成部72は、入力文から指定
された部分文字列を抽出して部分文字列格納ファイル8
に入力文における位置情報と共に格納させるものであ
る。また、部分文字列生成部72は、解析が求められて
いない部分の文字列も、そのことを明らかにして部分文
字列格納ファイル8に格納させるものである。The partial character string generation unit 72 extracts the specified partial character string from the input sentence and
Is stored together with the position information in the input sentence. In addition, the partial character string generation unit 72 clarifies the fact and stores the character string of the part for which analysis is not required in the partial character string storage file 8.
【0057】部分文字列解析部73は、入力文から抽出
された部分文字列を形態素解析装置本体3に与えて形態
素解析させ、返送されてきた形態素解析結果を部分文字
列解析結果格納ファイル9に格納させると共に、その形
態素解析結果を、解析が求められていない入力文の他の
部分文字列と結合して入出力装置1に出力するものであ
る。The partial character string analysis unit 73 gives the partial character string extracted from the input sentence to the morphological analysis device main body 3 to perform morphological analysis, and returns the returned morphological analysis result to the partial character string analysis result storage file 9. In addition to storing the result, the morphological analysis result is combined with another partial character string of the input sentence whose analysis is not required and output to the input / output device 1.
【0058】部分文字列格納ファイル8は、上述のよう
に、形態素解析が求められた部分文字列や、解析が求め
られて射ないそれ以外の部分文字列の情報を格納するも
のである。As described above, the partial character string storage file 8 stores information on partial character strings for which morphological analysis has been obtained and for other partial character strings for which analysis is required and which is not obtained.
【0059】部分文字列解析結果格納ファイル9は、上
述のように、部分文字列に対する形態素解析結果を格納
するものである。The partial character string analysis result storage file 9 stores the morphological analysis result for the partial character string as described above.
【0060】この第2の実施形態においても、形態素解
析装置本体3は従来のものと同様であるので、その動作
説明は省略し、以下では、この第2の実施形態の特徴を
構成している部分文字列処理装置7の動作を、図6のフ
ローチャートを参照しながら説明する。In the second embodiment as well, the morphological analyzer main body 3 is the same as the conventional one, so that the description of its operation is omitted, and the features of the second embodiment will be described below. The operation of the partial character string processing device 7 will be described with reference to the flowchart of FIG.
【0061】なお、入力文が入力され、その後、全体に
対して形態素解析を実行するのではなく、入力文の部分
文字列に対して形態素解析を実行するという動作モード
が入出力装置1を介して指定されたときに、図6に示す
処理を開始する。An operation mode in which an input sentence is input and then a morphological analysis is performed on a partial character string of the input sentence instead of performing a morphological analysis on the entire input sentence is performed via the input / output device 1. When designated by the user, the processing shown in FIG. 6 is started.
【0062】そしてまず最初に、入出力装置1を介し
て、画面に表示されている入力文から形態素解析を行な
いたい部分文字列をユーザに指定させ、その指定情報を
取り込む(ステップ200)。この指定方法は、ワープ
ロ等における下線や網掛け等の特殊修飾を付与する文字
列部分を指定させる方法等、既存の方法を適用できる。
また、1個の入力文に対して、2カ所以上の部分文字列
を解析対象として指定させるようにしても良い。さら
に、指定された部分文字列の長さ(文字数)を、予め設
定されている最小長さと比較して、最小長さより短い指
定された部分文字列は、その指定を拒否するようにす
る。最小長さとしては、例えば、N文字を設定する。こ
れは、拡張文字テーブル4に格納されている拡張文字列
が、N−gramデータであるためである。Then, first, the user designates a partial character string to be subjected to morphological analysis from the input sentence displayed on the screen via the input / output device 1, and fetches the designation information (step 200). As this designation method, an existing method such as a method of designating a character string portion to which a special modification such as underlining or shading in a word processor or the like is designated can be applied.
Alternatively, two or more partial character strings may be designated as an analysis target for one input sentence. Further, the length (the number of characters) of the specified partial character string is compared with a preset minimum length, and a specified partial character string shorter than the minimum length is rejected. For example, N characters are set as the minimum length. This is because the extended character string stored in the extended character table 4 is N-gram data.
【0063】次に、指定された解析対象の部分文字列を
入力文から抽出する(ステップ201)。言い換える
と、解析対象の部分文字列と、その他の非解析対象の部
分文字列とを分離する。その後、抽出した解析対象の部
分文字列と、その他の非解析対象の部分文字列とを区別
して、しかも、その位置関係を明確にして部分文字列格
納ファイル8に格納させる(ステップ202)。Next, a specified partial character string to be analyzed is extracted from the input sentence (step 201). In other words, the partial character string to be analyzed is separated from the other partial character strings to be analyzed. Thereafter, the extracted partial character string to be analyzed is distinguished from the other partial character strings to be analyzed, and the positional relationship is clarified and stored in the partial character string storage file 8 (step 202).
【0064】そして、部分文字列格納ファイル8に格納
されている解析対象の部分文字列を形態素解析装置本体
3に与えて形態素解析させ、返送されてきた形態素解析
結果を部分文字列解析結果格納ファイル9に格納させる
(ステップ203)。解析対象の部分文字列として、複
数個が指定されている場合には、形態素解析装置本体3
への解析対象部分文字列の送付、返送されてきた形態素
解析結果の受信、部分文字列解析結果格納ファイル9へ
の格納を、その指定数だけ繰り返す。Then, the partial character string to be analyzed stored in the partial character string storage file 8 is given to the morphological analyzer main body 3 for morphological analysis, and the returned morphological analysis result is stored in the partial character string analysis result storage file. 9 (step 203). If a plurality of partial character strings to be analyzed are specified, the morphological analyzer main unit 3
Sending the analysis target partial character string, receiving the returned morphological analysis result, and storing it in the partial character string analysis result storage file 9 are repeated by the specified number.
【0065】最後に、部分文字列解析結果格納ファイル
9に格納されている解析対象の部分文字列についての解
析結果と、部分文字列格納ファイル8に格納されている
非解析対象の部分文字列とを結合して入出力装置1に出
力して画面表示させる(ステップ204)。Finally, the analysis result of the partial character string to be analyzed stored in the partial character string analysis result storage file 9 and the non-analysis partial character string stored in the partial character string storage file 8 Are combined and output to the input / output device 1 to be displayed on the screen (step 204).
【0066】次に、具体例によって、第2の実施形態の
形態素解析装置の処理を説明する。ここでは、拡張文字
テーブル4に図7に示すような内容が格納されていると
する。なお、図7では、連鎖確率の図示を省略してい
る。また、図7では、拡張情報のうち区切りの有無情報
について、「有」だけを区切り記号(/)で示してい
る。すなわち、図7は、説明のために簡便に表記してい
るだけであり、実際的な格納方法とは異なっている。Next, the processing of the morphological analyzer according to the second embodiment will be described with a specific example. Here, it is assumed that the contents as shown in FIG. In FIG. 7, illustration of the chain probability is omitted. Further, in FIG. 7, in the extended information, only “Yes” is indicated by a delimiter (/) in the presence / absence information of a delimiter. That is, FIG. 7 is simply shown for convenience of description, and is different from a practical storage method.
【0067】今、「私はりんごとみかんが好きです。」
という入力文が入力され、この入力文全体に対して形態
素解析を実行するのではなく、この入力文の部分文字列
に対して形態素解析を実行するという動作モードが入出
力装置1を介して指定されたとする。Now, "I like apples and tangerines."
Is specified via the input / output device 1 to execute a morphological analysis on a partial character string of the input sentence instead of performing a morphological analysis on the entire input sentence. Suppose it was done.
【0068】このときは、解析対象の部分文字列の指定
に進む。図8は、入力文「私はりんごとみかんが好きで
す。」の中の一部分である「んごとみか」が指定された
画面を示している。この例は、下線付与部分が解析対象
の部分文字列であることを表しており、実行キーの操作
によって、その指定が確定する指定方法の例である。こ
のようにして指定された場合には、解析対象の部分文字
列「んごとみか」と、それ以外の非解析対象の部分文字
列「私はり」及び「んが好きです。」とが区別されて部
分文字列格納ファイル8に格納される。At this time, the process proceeds to the specification of the partial character string to be analyzed. FIG. 8 shows a screen on which "Nango Mika" which is a part of the input sentence "I like apples and oranges" is specified. This example shows that the underlined portion is a partial character string to be analyzed, and is an example of a specification method in which the specification is confirmed by operating the execution key. When specified in this way, the partial character string "Nango Mika" to be analyzed is distinguished from the other non-analyzed partial character strings "I hate" and "I like n". And stored in the partial character string storage file 8.
【0069】また、解析対象の部分文字列「んごとみ
か」が形態素解析装置本体3に与えられて形態素解析さ
れる。この場合、拡張文字テーブル4の格納内容が図7
に示すようなものであるので、部分文字列「んごとみ
か」の解析結果として「んご/と/みか」が得られ、こ
の解析結果「んご/と/みか」が部分文字列解析結果格
納ファイル9に格納される。Further, the partial character string "Nango Mika" to be analyzed is given to the morphological analyzer main body 3 and subjected to morphological analysis. In this case, the contents stored in the extended character table 4 are as shown in FIG.
The result of the analysis of the partial character string “Nango / Mika” is “nggo / to / mika”, and the analysis result “nggo / to / mika” is the partial character string analysis result. It is stored in the storage file 9.
【0070】最後に、部分文字列解析結果格納ファイル
9に格納されている解析結果「んご/と/みか」と、部
分文字列格納ファイル8に格納されている非解析対象の
部分文字列「私はり」及び「んが好きです。」とが結合
されて入出力装置1に出力されて画面表示される。図9
が、このときの表示画面を示している。図9において、
下線が解析処理に供した部分であることを示している。Finally, the analysis result "ngo / to / mika" stored in the partial character string analysis result storage file 9 and the non-analysis target partial character string "stored in the partial character string storage file 8""Ilike" and "I like n" are combined, output to the input / output device 1, and displayed on the screen. FIG.
Shows the display screen at this time. In FIG.
The underline indicates the part subjected to the analysis processing.
【0071】以上のように、第2の実施形態の形態素解
析装置によれば、入力文の全体に対してだけでなく、入
力文の部分文字列に対しても、形態素解析を実行させる
ことができるので、ユーザの使い勝手を高めることがで
きる。As described above, according to the morphological analyzer of the second embodiment, morphological analysis can be executed not only for the entire input sentence but also for a partial character string of the input sentence. Since it is possible, the usability of the user can be improved.
【0072】例えば、ユーザは、装置が未知語と捉える
かどうか不明な部分を指定して形態素解析させ、装置が
未知語と捉えるか否かを確認することができる。また、
ユーザは、例えば、装置が未知語と捉えると思われる部
分を除いた部分文字列を指定して形態素解析させ、未知
語部分と推測される以外での解析結果を得ることができ
る。課題の項でも、説明したように、未知語を含む入力
文に対する処理速度は遅く、また、記憶容量の増大化の
可能性があるが、この第2の実施形態の部分文字列の解
析機能を使うことにより、形態素解析のために予め用意
して格納しておく情報量を従来とほぼ同程度のままで、
ある程度長い未知語部分を含む入力文に対しても、短時
間で実用に供することができる形態素解析結果が得られ
ることを期待できる。For example, the user can specify a part unknown as to whether or not the device regards an unknown word, perform morphological analysis, and confirm whether the device regards the unknown word. Also,
For example, the user can perform a morphological analysis by designating a partial character string excluding a portion that is considered to be an unknown word by the device, and obtain an analysis result other than that assumed to be an unknown word portion. As described above, as described above, the processing speed for input sentences including unknown words is slow, and the storage capacity may be increased. By using it, the amount of information prepared and stored in advance for morphological analysis remains almost the same as before,
It can be expected that a morphological analysis result that can be put to practical use in a short time can be obtained even for an input sentence including an unknown word part to some extent.
【0073】因みに、単語辞書を利用した従来の形態素
解析装置において、入力文の一部分を指定した解析機能
を有するものはない。これは、部分指定が単語間を明確
に切り分けた位置での指定でなければ、形態素解析を実
行できないためである。例えば、単語の途中から始まる
部分文字列や、単語の途中で終っている部分文字列を正
しく解析することができない。上述した具体例での部分
文字列「んごとみか」を解析することはできない。Incidentally, none of the conventional morphological analyzers using a word dictionary has an analysis function for designating a part of an input sentence. This is because morphological analysis cannot be performed unless the partial designation is a designation at a position where words are clearly separated. For example, a partial character string starting in the middle of a word or a partial character string ending in the middle of a word cannot be correctly analyzed. It is not possible to analyze the partial character string “Nango Mika” in the above specific example.
【0074】これに対して、文字ベースの確率モデルを
利用した第2の実施形態の形態素解析装置であれば、文
字をベースとし、単語を意識していないので、開始位置
又は終了位置が単語の途中の部分文字列に対しても、正
しく解析することが可能となっている。On the other hand, in the morphological analyzer according to the second embodiment using the character-based probability model, the start position or the end position is based on the character and is not aware of the word. Even partial character strings in the middle can be correctly analyzed.
【0075】(C)他の実施形態 第1の実施形態においては、未知語として処理した場合
の解析結果の出力において、未知語として処理した部分
を明確化させていないが、未知語として処理した部分を
他の部分と区別(例えば、色分けや下線付与)して出力
(提示)させるようにしても良い。(C) Other Embodiments In the first embodiment, in the output of the analysis result when processed as an unknown word, the part processed as an unknown word is not clarified, but is processed as an unknown word. A part may be distinguished (for example, color-coded or underlined) from other parts and output (presented).
【0076】また、第2の実施形態においては、まず入
力文を入力させ、その後、ユーザとのインターラクティ
ブなやりとりにより、解析対象の部分文字列を指定させ
るものを示したが、他の指定方法を適用するようにして
も良い。例えば、入力文中に、解析対象の部分文字列の
先頭及び終了位置を規定する特殊記号を盛り込んで装置
に入力させ、装置が、それら記号間の文字列を解析対象
として抽出して解析を実行させるようにしても良い。In the second embodiment, an input sentence is input first, and then a partial character string to be analyzed is specified by an interactive exchange with the user. You may make it apply. For example, a special symbol that defines the start and end positions of a partial character string to be analyzed is included in an input sentence and input to the device, and the device extracts a character string between those symbols as a target to be analyzed and executes the analysis. You may do it.
【0077】さらに、第2の実施形態においては、解析
対象の部分文字列側を直接指定するものであったが(非
解析対象の部分文字列は、これにより間接的に指定され
る)、非解析対象の部分文字列側を直接指定するもので
あっても良い(解析対象の部分文字列は、これにより間
接的に指定される)。この指定方法は、未知語と思われ
る部分を除いて解析させるような場合の指定方法として
好適である。Furthermore, in the second embodiment, the partial character string to be analyzed is directly specified (the partial character string to be analyzed is indirectly specified thereby). The partial character string to be analyzed may be directly specified (the partial character string to be analyzed is thereby indirectly specified). This designation method is suitable as a designation method in a case where analysis is performed excluding a portion considered to be an unknown word.
【0078】さらにまた、上記各実施形態においては、
解析対象の入力文又は部分文字列が日本語である形態素
解析装置を示したが、当然に、他の言語用の形態素解析
装置に対しても本発明を適用することができる。Further, in each of the above embodiments,
Although the morphological analysis device in which the input sentence or the partial character string to be analyzed is in Japanese has been described, the present invention is naturally applicable to morphological analysis devices for other languages.
【0079】[0079]
【発明の効果】以上のように、本発明によれば、入力さ
れた解析対象文中において、解析対象とする1又は複数
の部分文字列を決定する解析対象部分文字列決定手段
と、決定された各部分文字列に対して、形態素解析装置
本体に形態素解析を実行させる解析制御手段と、形態素
解析装置本体によって得られた、解析対象の各部分文字
列についての解析結果を少なくとも含む結果情報を出力
する結果出力手段とを有するので、予め格納しておく情
報を増大させることなく、未知語部分を含むような入力
文に対しても、短時間で実用に供することができるよう
な形態素解析結果を得ることができる。As described above, according to the present invention, the analysis target partial character string determining means for determining one or a plurality of partial character strings to be analyzed in the input analysis target sentence is determined. Analysis control means for causing the morphological analysis device to perform morphological analysis on each of the partial character strings, and output of result information including at least an analysis result of each of the partial character strings to be analyzed, obtained by the morphological analysis device main body Morphological analysis results that can be put to practical use in a short time, even for input sentences containing unknown words, without increasing the information stored in advance. Obtainable.
【図1】第1の実施形態の構成を示すブロック図であ
る。FIG. 1 is a block diagram illustrating a configuration of a first embodiment.
【図2】第1の実施形態の未知語処理装置の処理を示す
フローチャートである。FIG. 2 is a flowchart illustrating a process performed by the unknown word processing device according to the first embodiment;
【図3】具体的入力文に対する第1の実施形態での処理
やデータの流れを示す説明図である。FIG. 3 is an explanatory diagram showing a process and a data flow for a specific input sentence in the first embodiment.
【図4】第1の実施形態の拡張文字テーブルの格納例の
説明図である。FIG. 4 is an explanatory diagram of a storage example of an extended character table according to the first embodiment;
【図5】第2の実施形態の構成を示すブロック図であ
る。FIG. 5 is a block diagram illustrating a configuration of a second embodiment.
【図6】第2の実施形態の部分文字列処理装置の処理を
示すフローチャートである。FIG. 6 is a flowchart illustrating processing of the partial character string processing device according to the second embodiment.
【図7】第2の実施形態の拡張文字テーブルの格納例の
説明図である。FIG. 7 is an explanatory diagram of a storage example of an extended character table according to the second embodiment.
【図8】第2の実施形態の部分文字列の指定画面例を示
す説明図である。FIG. 8 is an explanatory diagram showing an example of a partial character string designation screen according to the second embodiment.
【図9】第2の実施形態の部分文字列の解析結果表示画
面例を示す説明図である。FIG. 9 is an explanatory diagram illustrating an example of a partial character string analysis result display screen according to the second embodiment.
1…入出力装置、2…未知語処理装置、3…形態素解析
装置本体、4…拡張文字テーブル、5…入力中間ファイ
ル、6…出力中間ファイル、7…部分文字列処理装置、
8…部分文字列格納ファイル、9…部分文字列解析結果
格納ファイル、21…未知語判定部、22…未知語範囲
推定部、23…入力文分割部、24…出力結果結合部、
31…拡張文字列生成部、32…連鎖確率計算部、33
…最適経路探索部、71…部分文字列指定部、72…部
分文字列生成部、73…部分文字列解析部。DESCRIPTION OF SYMBOLS 1 ... I / O device, 2 ... Unknown word processing device, 3 ... Morphological analyzer main body, 4 ... Extended character table, 5 ... Input intermediate file, 6 ... Output intermediate file, 7 ... Partial character string processing device,
8 ... partial character string storage file, 9 ... partial character string analysis result storage file, 21 ... unknown word determination unit, 22 ... unknown word range estimation unit, 23 ... input sentence division unit, 24 ... output result connection unit,
31: extended character string generator, 32: chain probability calculator, 33
... Optimal route search unit, 71... Partial character string designation unit, 72... Partial character string generation unit, 73.
Claims (5)
ルを備え、形態素解析装置本体がこの拡張文字テーブル
の格納情報を利用して、入力された解析対象文に対する
形態素解析を行う形態素解析装置において、 入力された解析対象文中において、解析対象とする1又
は複数の部分文字列を決定する解析対象部分文字列決定
手段と、 決定された各部分文字列に対して、上記形態素解析装置
本体に形態素解析を実行させる解析制御手段と、 上記形態素解析装置本体によって得られた、解析対象の
各部分文字列についての解析結果を少なくとも含む結果
情報を出力する結果出力手段とを有することを特徴とす
る形態素解析装置。1. A morphological analysis device comprising an extended character table storing extended character information, wherein a morphological analysis device body performs morphological analysis on an input analysis target sentence using information stored in the extended character table. An analysis target partial character string determining means for determining one or more partial character strings to be analyzed in the input analysis target sentence; and a morphological analysis unit for the determined partial character strings by the morphological analysis device main body. Morphological analysis, comprising: analysis control means for executing a morphological analysis unit; and result output means for outputting result information including at least an analysis result of each partial character string to be analyzed, obtained by the morphological analysis device main body. apparatus.
力された解析対象文における所定文字数の部分文字列を
上記拡張文字テーブルの格納内容と照合することによ
り、解析対象文における未知語部分を推定し、この未知
語部分以外の部分文字列を解析対象の部分文字列に決定
するものであることを特徴とする請求項1に記載の形態
素解析装置。2. The analysis target partial character string determination means compares the partial character string of a predetermined number of characters in the input analysis target sentence with the stored contents of the extended character table to determine an unknown word part in the analysis target sentence. 2. The morphological analyzer according to claim 1, wherein a partial character string other than the unknown word part is estimated and determined as a partial character string to be analyzed.
置本体によって得られた、解析対象の各部分文字列につ
いての解析結果と、上記解析対象部分文字列決定手段が
推定した未知語部分とを、解析対象文でのそれら部分の
並びに従って結合し、しかも、未知語部分の先頭位置及
び終了位置に区切り記号を付加して結合し、結合後の内
容を出力する結果情報とするものであることを特徴とす
る請求項2に記載の形態素解析装置。3. The result output means outputs the analysis result of each partial character string to be analyzed, obtained by the morphological analysis device main body, and the unknown word part estimated by the analysis target partial character string determination means. Must be combined according to the order of those parts in the sentence to be analyzed, and be combined by adding delimiters to the start position and end position of the unknown word part, and output the combined contents as result information The morphological analyzer according to claim 2, wherein:
ーザが指定操作した解析対象文中の部分文字列を、形態
素解析を実行する部分文字列と決定することを特徴とす
る請求項1に記載の形態素解析装置。4. The analysis method according to claim 1, wherein the analysis target partial character string determination unit determines a partial character string in the analysis target sentence designated by the user as a partial character string to be subjected to morphological analysis. Morphological analyzer.
せる部分文字列を特定する特殊記号を含むものであり、
上記解析対象部分文字列決定手段は、上記特殊記号の検
索に基づいて、形態素解析を実行する部分文字列を決定
することを特徴とする請求項1に記載の形態素解析装
置。5. The sentence to be analyzed includes a special symbol for specifying a partial character string to be subjected to morphological analysis.
2. The morphological analyzer according to claim 1, wherein the analysis target partial character string determining means determines a partial character string to be subjected to morphological analysis based on the search for the special symbol.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10052272A JPH11250057A (en) | 1998-03-04 | 1998-03-04 | Morpheme analyzer |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP10052272A JPH11250057A (en) | 1998-03-04 | 1998-03-04 | Morpheme analyzer |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH11250057A true JPH11250057A (en) | 1999-09-17 |
Family
ID=12910157
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP10052272A Pending JPH11250057A (en) | 1998-03-04 | 1998-03-04 | Morpheme analyzer |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH11250057A (en) |
-
1998
- 1998-03-04 JP JP10052272A patent/JPH11250057A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5930746A (en) | Parsing and translating natural language sentences automatically | |
| US6876963B1 (en) | Machine translation method and apparatus capable of automatically switching dictionaries | |
| JP2002215617A (en) | Method for attaching part of speech tag | |
| US20060277028A1 (en) | Training a statistical parser on noisy data by filtering | |
| JPH10326275A (en) | Method and device for morpheme analysis and method and device for japanese morpheme analysis | |
| US11893344B2 (en) | Morpheme analysis learning device, morpheme analysis device, method, and program | |
| JPH08129554A (en) | Relation expression extracting device and retrieval device for relation expression | |
| WO2009113289A1 (en) | New case generation device, new case generation method, and new case generation program | |
| JP4869281B2 (en) | Machine translation apparatus, program and method | |
| JP3952964B2 (en) | Reading information determination method, apparatus and program | |
| KR20040018008A (en) | Apparatus for tagging part of speech and method therefor | |
| KR20080028655A (en) | Part of speech tagging device and tagging method | |
| JP3939264B2 (en) | Morphological analyzer | |
| JPH11250057A (en) | Morpheme analyzer | |
| KR100420474B1 (en) | Apparatus and method of long sentence translation using partial sentence frame | |
| JP2632806B2 (en) | Language analyzer | |
| Savci et al. | TurkishLex: Development of a Context-Aware Spell Checker for Detecting and Correcting Spelling Errors in Turkish Texts | |
| CN114661917B (en) | Text augmentation method, system, computer device and readable storage medium | |
| JPH0635961A (en) | Document summerizing device | |
| JP2004326584A (en) | Bilingual named entity extraction apparatus and method, bilingual named entity extraction program | |
| JP2005345846A (en) | Pose position prediction device for input text | |
| JP4812811B2 (en) | Machine translation apparatus and machine translation program | |
| JPH11282839A (en) | Machine translation system and computer-readable recording medium recording machine translation processing program | |
| JP2006243976A (en) | Word set generation method with frequency information, program and program storage medium, word set generation device with frequency information, text index word creation device, full-text search device, and text classification device | |
| JP3244286B2 (en) | Translation processing device |