JP3728789B2 - Japanese sentence analyzer and Japanese sentence analysis method - Google Patents

Japanese sentence analyzer and Japanese sentence analysis method Download PDF

Info

Publication number
JP3728789B2
JP3728789B2 JP03033996A JP3033996A JP3728789B2 JP 3728789 B2 JP3728789 B2 JP 3728789B2 JP 03033996 A JP03033996 A JP 03033996A JP 3033996 A JP3033996 A JP 3033996A JP 3728789 B2 JP3728789 B2 JP 3728789B2
Authority
JP
Japan
Prior art keywords
word
character string
unregistered
registered
words
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.)
Expired - Fee Related
Application number
JP03033996A
Other languages
Japanese (ja)
Other versions
JPH09223141A (en
Inventor
多田  智之
秀信 金岡
稔弘 藤並
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
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 Omron Corp filed Critical Omron Corp
Priority to JP03033996A priority Critical patent/JP3728789B2/en
Publication of JPH09223141A publication Critical patent/JPH09223141A/en
Application granted granted Critical
Publication of JP3728789B2 publication Critical patent/JP3728789B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Machine Translation (AREA)
  • Document Processing Apparatus (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、入力された日本語文に含まれる辞書にのっていない単語、特にカタカナで記載された単語を検出し、この検出した単語を登録する日本語文解析装置および日本語文解析方法に関する。
【0002】
【従来の技術】
機械翻訳の前処理には、形態素解析と言われる処理が行われている。形態素解析とは、簡単にいうと入力された日本語文に対して辞書を用いて文節切りや単語切りなどを行う処理である。ここで、問題となるのは入力された日本語文中に辞書に載っていない単語(以下、未登録単語と言う。)が存在すると、形態素解析が正確に行えないという点である。したがって、機械翻訳にも失敗するという結果となる。そこで、機械翻訳の前処理で翻訳に失敗しそうなところを予め警告するためには、未登録語を正確に検出する必要がある。
【0003】
また、未登録単語は文献中のキーワードとなる単語として用いられる新語である場合が多い。このため、文書検索の自動キーワード作成(インデックス作成)等の技術では、未登録単語をキーワードとして登録する必要がある。すなわち、文書検索の自動キーワード作成で辞書にない未登録単語をキーワードとして登録するためには、未登録単語を正確に検出しなければならない。
【0004】
従来、未登録単語の検出処理は、未登録単語がカタカナ文字列である場合がほとんどであることから、辞書引きに失敗した文字列に同じ文字種(カタカナ)が連接する文字列全体を未登録語として検出するというものであった。
例えば、「インタラプタ」という文字列に対して「イン」、「タラ」が辞書に登録されている登録語で、「プタ」が未登録語である場合には、「インタラプタ」を未登録単語として検出する方法(情報処理学会第36回(昭和63年前記)全国大会予稿集1231頁〜1232頁「日英機械翻訳用前編集システム(2)-形態素のあいまい性の検出方法- 」参照)や、
「ニューステーションホテル」と言う文字列に対して辞書引きされる「ニュー」、「ニュース」「ホテル」等の情報は無視し、カタカナ文字列全体である「ニューステーションホテル」を未知語(本願で言う未登録単語)として検出する方法(情報処理学会第47回(平成5年後期)全国大会予稿集3−159頁〜3−160頁「選択的辞書引き機構を導入した日本語形態素解析における未知語推定機構」参照)であった。
【0005】
【発明が解決しようとする課題】
しかしながら、上記した未登録単語を抽出する方法では、カタカナの文字列が複数の単語からなる複合語であると、この複合語を未登録単語として検出してしまうという問題がある。例えば、「ファイナンシャルシステム」という文字列の単語(「ファイナンシャル」が未登録語であり、「システム」とつながって複合語を形成している単語)がある場合、登録語である「ファイ」や「システム」等の辞書引きされる情報を無視し(「ファイ」、「システム」は辞書ファイルに登録されている単語とする。)、「ファイナンシャルシステム」全体が未登録単語として検出される。また、「ファイナンシャル」という未登録単語を含む複合語である「ファイナンシャルバンキング」、「ファイナンシャルセンター」、「ファイナンシャルアドバイザー」、「ファイナンシャルプランナー」等も別の未登録単語として検出される(「バンキング」、「センター」、「アドバイザー」、「プランナー」等は辞書に登録されている単語であるとする。)。このため、機械翻訳の前処理における処理量が増加したり、文書検索のキーワードとして冗長なキーワード(複合語)が作成されるという結果となる。
【0006】
ここで、登録単語と照合しない部分のみを未登録単語として検出するという手法も考えられるが、この手法では検出すべき未登録単語の一部が登録単語と一致していると、この一致した部分が切り離された不適当な文字列の未登録単語が検出されることになる。上記した例の「ファイナンシャルシステム」という文字列に対して、「ファイ」、「システム」と言う登録単語に一致する部分を除いた「ナンシャル」という単語として正当性のない文字列を未登録単語として検出してしまう。さらに、未登録単語の文字列が複数の単語を連接させた文字列とたまたま一致する場合には、未登録単語が検出されないという問題もある。例えば、「カリマンタン」と言う文字列の未登録単語に対して「カリ」「マン」「タン」という3つの登録単語があると、未登録単語が検出されないということである。
【0007】
この発明の目的は、未登録単語を含むカタカナ文字列中から正確に未登録単語を形成する文字列のみを検出し、この検出した未登録単語を登録することのできる日本語文解析装置および日本語文解析方法を提供することにある。
【0008】
また、この発明は、検出された未登録単語の正当性を検出し、誤って検出されて登録された未登録単語を取り消すことのできる日本語文解析装置および日本語文解析方法を提供することを目的とする。
【0009】
【課題を解決するための手段】
この発明の日本語文解析装置は、単語の文字列およびその単語の属性を示すデータを登録した辞書ファイルと、前記辞書ファイルを用いて入力された文字列を単語に分割する形態素解析を行う形態素解析手段と、
前記入力された文字列中の連接するカタカナ文字列が前記形態素解析によって複数の単語に分割されたとき、この分割された単語内に文字列長が1文字の未登録単語が含まれていれば、該未登録単語と該未登録単語の前または後ろに隣合う単語とをつないだ文字列を未登録単語として検出する未登録単語検出手段と、
該検出された未登録単語を前記辞書ファイルに仮登録する未登録単語登録手段と、
前記未登録単語検出手段で検出され、前記辞書ファイルに仮登録されている未登録単語と一致する文字列の単語が前記形態素解析によって連接するカタカナ文字列を分割した複数の単語に含まれているとき、一致する文字列以外の単語の正当性を検証した検証結果に基づいて、該未登録単語が単語として正当なものであるかどうかを検証する正当性検証手段と、を備え、
前記未登録単語登録手段は、前記正当性検証手段が正当であることを検証した仮登録されている未登録単語を前記辞書ファイルに正式に登録する。
【0010】
この構成では、形態素解析手段が辞書ファイルを用いて入力された文字列を単語に分割する形態素解析を行う。形態素解析された結果、連接するカタカナ文字列が複数の単語に分割されたときに、分割された単語内に文字列長が1文字の未登録単語が含まれていれば、未登録単語検出手段がこの1文字の未登録単語と該未登録単語の前または後ろに隣合う単語とをつないだ文字列を未登録単語として検出する。そして、未登録単語登録手段がこの検出された未登録単語を辞書ファイルに仮登録する。また、正当性検証手段が前記形態素解析によって連接するカタカナ文字列を分割した複数の単語に前記未登録単語検出手段で検出され、登録されている未登録単語と一致する文字列の単語が含まれるとき、一致する文字列以外の単語の正当性を検証した検証結果に基づいて、該未登録単語が単語として正当なものであるかどうかを検証する。そして、未登録単語登録手段が単語として正当なものであることが検証された辞書ファイルに仮登録されている未登録単語を正式に登録する。
【0022】
【発明の実施の形態】
図1は、この発明の実施の形態である日本語文解析装置の機能を示すブロック図である。日本語文解析装置1は、テキストデータ記憶部2と、形態素解析部3、辞書ファイル4と、単語候補検出部5と、単語候補登録部6と、単語候補検証部7と、単語候補削除部8と、登録単語検証部9と、単語候補正式登録部10とを備えている。
テキストデータ記憶部2は、処理の対象となるテキストデータを記憶する。
形態素解析部3は、前記テキストデータ記憶部2に記憶されているテキストデータに対して形態素解析を行う。
辞書ファイル4は、単語の文字列と、該単語の属性(品詞等)を対応させて記憶している。
単語候補検出部5は、前記形態素解析部3で形態素解析された結果に基づいて、辞書ファイル4に登録されていない未登録単語を単語候補として検出する。
単語候補登録部6は、前記単語候補検出部5で検出された単語候補を辞書ファイル4に仮登録する。
単語候補検証部7は、辞書ファイル4に仮登録されている単語候補の正当性を検証する。
単語候補削除部8は、辞書ファイル4に仮登録されている単語候補で正当性が検証されなかった単語を削除する。
登録単語検証部9は、未登録単語の含まれている可能性がある文字列中から検出された辞書ファイル4に登録されている単語の正当性を検証する。
単語候補正式登録部10は、仮登録されている単語候補で正当性が検証されたときにこの単語候補を正式に登録する。
【0023】
図2は、この発明の実施の形態である日本語群解析装置の処理を示すフローチャートである。ここでは、日本語文解析装置1の一連の処理を簡単に説明する。日本語文解析装置1は、テキストデータ記憶部2に処理対象となるテキストデータを取り込み、記憶する(n1)。形態素解析部3は、句読点で区切られた文字列単位毎にテキストデータを取り込む(n2)。形態素解析部3は、句読点で区切られたテキストデータを取り込むと、辞書ファイル4を用いて形態素解析を行う(n3)。この形態素解析によって、n2で取り込まれた句読点で区切られたテキストデータが形態素に分割される。日本語文解析装置1は、n3において形態素解析部3で形態素解析された結果にカタカナ文字列の単語が含まれているかどうかを判定する(n4)。カタカナ文字列の単語が含まれていない場合には、n1でテキストデータ記憶部2に記憶したテキストデータを全て処理したかどうか(未処理のテキストデータが残っていないかどうか)を判定し(n11)、処理されていないテキストデータが残っているとn2に戻る。
【0024】
カタカナ文字列の単語が含まれている場合には、単語候補検出部5がこのカタカナ文字列の単語に未登録単語が含まれているかどうかを判定する(n5)。未登録語が含まれていると、単語候補検出部5はこの未登録単語に連接するカタカナ文字列の単語を含めたカタカナ文字列全体から単語候補を検出し、この検出した単語候補を辞書ファイル4に仮登録する第1の単語候補検出、登録処理を行う(n6)。n5で未登録単語が含まれていないと判定した場合、または、上記したn6の処理を完了すると、辞書ファイル4に登録されている複数のカタカナ文字列の登録単語が連接している箇所の有無を判定する(n7)。カタカナ文字列の登録単語が連接した箇所があると、この登録単語をつなげたカタカナ文字列全体から単語候補を検出し、この検出した単語候補を辞書ファイル4に仮登録する第2の単語候補検出、登録処理を行う(n8)。
【0025】
また、単語候補検証部7は、形態素解析によって分割された単語の中に、n6、または、n8で辞書ファイル4に仮登録されている単語候補と同じカタカナ文字列の単語があるかどうか(n6、または、n8で辞書ファイル4に仮登録した単語候補が別の文字列中から再出現しているかどうか)を判定する(n9)。単語候補が再出現していると、単語候補検証部7が辞書ファイル4に仮登録されているこの再出現した単語候補の正当性を検証する単語候補正当性検証処理を実行する(n10)。
【0026】
そして、未処理のテキストデータが残っていないかどうかをn11で判定し、未処理のテキストデータが残っていれば上記したn2〜n10の処理をくりかえす。未処理のテキストデータがなければ、辞書ファイル4に仮登録されている不要な単語候補(正当性が検証されなかった単語候補等)を全て削除して処理を完了する(n12)。
【0027】
以下、上記した処理を詳細に説明する。
n1では、テキストデータ記憶部2が形態素解析を行う一連のテキストデータ(ファイル単位、レコード単位、ディレクトリ単位、ハードディスク単位、時間単位、100MB等のデータ量単位等)を取り込み、記憶する。
【0028】
n2、n3では、形態素解析部3がテキストデータ記憶部2に記憶された一連のテキストデータから、順次句読点で区切られた文字列単位で取り出し、形態素解析を行う。そして、形態素解析部3はこの形態素解析を行った句読点で区切られた文字列単位のテキストデータを単語に分割して出力する。
例えば、形態素解析を行うテキストデータに「ファイナンシャルシステム」というカタカナ文字列が含まれているとする。また、辞書ファイル4には図3(A)に示すように「ファイ」「システム」という文字列が単語として登録されており、「ナンシャル」「ファイナンシャル」「ファイナンシャルシステム」という文字列の単語が登録されていないものとする。ここで、形態素解析部3はこの「ファイナンシャルシステム」と言うカタカナ文字列に対して形態素解析を行うと、図3(B)に示すように「ナ」「ン」「シャ」「ル」で辞書引きに失敗し、「ファイ」と「システム」とを品詞が名詞である単語として検出する。そして、形態素解析部3はこの連続して辞書引きに失敗した「ナ」「ン」「シャ」「ル」をつなげたカタカナ文字列「ナンシャル」を1つの未登録単語とみなし、図3(C)に示すように「ファイナンシャルシステム」と言う文字列の形態素解析の結果として「ファイ」、「ナンシャル」および「システム」の3つの単語を出力する。このとき「ナンシャル」の品詞は未登録語として出力される。
【0029】
n4では、形態素解析部3が出力した形態素解析結果にカタカナ文字列の単語が含まれているかどうかを判定する。ここで、形態素解析結果にカタカナ文字列の単語が含まれていない場合には、n5〜n10の処理を行わず、n11で未処理のテキストデータの有無を判定する。一方、形態素解析結果にカタカナ文字列の単語が含まれている場合にはn5〜n10の処理を行う。
【0030】
n5では、単語候補検出部5がこの形態素解析結果に未登録単語が含まれているかどうかを判定する。この実施の形態では、形態素解析の結果にその品詞が未登録語とされた単語を含んでいるときに、未登録単語が含まれていると判定する。上記した例では、品詞が未登録語とされた「ナンシャル」と言う単語が含まれているので、n5で未登録単語を含んでいると判定される。
【0031】
単語候補検出部5は、n5で未登録単語を含んでいると判定すると、この未登録単語に連接するカタカナ文字列全体から、単語候補を検出し、この検出した単語候補を辞書ファイル4に仮登録する第1の単語候補検出、登録処理を実行する。ここで、未登録単語に連接するカタカナ文字列全体とは、未登録単語の前または/および後ろに連続しているカタカナ文字列の単語(未登録単語に連接している単語)を含めたカタカナ文字列のことである。上記した例では、「ファイナンシャルシステム」が未登録単語に連接するカタカナ文字列全体となる。なお、「ファイ」の前および「システム」の後ろに、カタカナ文字列の単語が連接していないものとする。
【0032】
ここで、図4を参照しながら第1の単語候補検出、登録処理を詳細に説明する。図4は第1の単語候補検出、登録処理の流れを示すフローチャートである。このカタカナ文字列の未登録単語に連接するカタカナ文字列全体を1つの単語とし、品詞を名詞として辞書ファイル4に登録する(n21)。上記している例では「ファイナンシャルシステム」が単語(品詞は名詞)として辞書ファイル4に登録される。つぎに、n21で辞書ファイル4に登録した単語のカタカナ文字列中に含まれる未登録単語が1文字の単語であるかどうかを判定する(n22)。ここで、1文字の単語でなければこの未登録単語を単語候補の構成要素として検出する(n23)。未登録単語が1文字であり、この未登録単語の前にカタカナ文字列の登録単語が連接しているとこの登録単語と未登録単語とをつないだ文字列からなる単語を単語候補の構成要素として検出し、また、この未登録単語の前または後ろにカタカナ文字列の登録単語が連接しているとこの登録単語と未登録単語とをつないだ文字列からなる単語を単語候補の構成要素として検出する(n24)。例えば、「イリオモテ」と言う文字列に対して、形態素解析結果が「イ」が未登録語、「リオ」「モテ」が登録語である場合、「イ」が1文字の未登録であるので後ろの登録語「リオ」とつながれた「イリオ」が単語候補の構成要素として検出される。なお、形態素解析部3で未登録語である「イ」の前に検出している単語はカタカナ文字列ではないとする。また、この1文字の未登録単語の前後両方にカタカナ文字列の登録単語が連接している場合には、前に連接する登録単語とつながれた単語候補の構成要素と、後ろに連接する登録単語とつながれた単語候補の構成要素とを検出する。
【0033】
そして、形態素解析において、未登録単語を含むカタカナ文字列全体から検出されている登録単語(辞書ファイル4に登録されている単語)の正当性の対象となる登録単語の正当性検証処理を行う(n25)。ここでは、検証する登録単語が、複合語を形成しうる単語であれば正当性がある、複合語を形成しえない単語であれば正当性がない、とする。上記した「ファイナンシャルシステム」という文字列の例では「ファイ」と「システム」との2つの登録単語が正当性の検証対象となる。単語の正当性の検証は登録単語検証部9で行われる。単語の正当性は以下に示す▲1▼〜▲3▼のルールに基づいて検証される。
▲1▼単語の文字列長によるルール
このルールでは、複合語ではない単語の文字列中に、登録単語と一致する文字列が含まれる可能性は、登録単語の文字列長が長くなるにつれて低下するという理由から、この実施の形態では、
(1) 文字列長が4文字以上の単語であれば正当性のある単語、
(2) 文字列長が2または3文字の単語であれば正当性の有無を判定できない単語、
(3) 1文字であれば正当性がない単語、であるとする。
▲2▼単語の品詞によるルール
このルールでは以下に示す品詞の働きに基づいて正当性を検証する。
感動詞は、他の単語を修飾したり、他の単語に修飾されたりする性質がないため、複合語の構成単語とはならない。
副詞は、他の単語を修飾したり、他の単語に修飾されたりする性質がないため、複合語の構成単語とはならない。
サ行変格活用以外の動詞は、複合語の構成単語とならない。
接頭辞は、複合語の最後に来ることはない。
接尾辞は、複合語の先頭にくることはない。
連濁は、複合語の先頭にくることはない。
以上の理由から、本実施の形態では
(1) 単語が感動詞、副詞、サ行変格活用以外の動詞、のいずれかであれば、正当性のない単語、
(2) 単語が接頭辞で、且つ、該単語の後ろにカタカナ文字列が連接していないと、正当性のない単語、
(3) 単語が接尾辞、連濁で、且つ、該単語の前にカタカナ文字列が連接していないと、正当性のない単語、
(4) 上記(1)(2)(3) のいずれにも該当しないと、正当性の有無を判定できない単語、であるとする。
▲3▼単語の性質によるルール
このルールでは、単語毎にその性質を、複合語を形成する可能性の多い単語、複合語を形成する可能性の少ない単語、どちらでもない単語(以下、有用な性質を持たない単語、と言う。)、のいずれかに設定しておき、
(1) 単語の性質が複合語を形成する可能性の多い単語であれば、正当性のある単語、
(2) 単語の性質が複合語を形成する可能性の少ない単語であれば、正当性のない単語、
(3) 単語の性質が有用な性質を持たない単語であれば、正当性の有無を判定できない単語、であるとする。
なお、この単語毎に性質を種類分けはする方法としては、複数の文献等から、単語毎に形成された複合語の数、一致する文字列を含む独立した単語(複合語でない単語)の数等の統計を取り、この統計に基づいて単語の性質を設定すればよい。また、人手による作業でこの統計を取ってもよいし、自動的に統計を取って単語の性質を設定するようにしてもよい。自動的にこの統計を取って単語の性質を設定する処理については後述する。
【0034】
図5は、n25における登録単語の正当性検証処理のフローチャートである。この処理は、最初に文字列長によるルールから単語の正当性を検証する。正当性を検証する登録単語の文字列長が、4文字以上、2または3文字、1文字、のいずれであるかを判定する(n41、n42)。ここで、文字列長が4文字以上であればn48において正当性のある単語と判定する。文字列長が1文字であればn49において正当性のない単語と判定する。文字列長が2または3文字であれば、単語の文字列長によるルールからは、該単語の正当性を検証できないとして、単語の品詞による正当性の検証を行う。
【0035】
ここでは、
▲1▼単語の品詞が感動詞、副詞、サ行変格活用以外の動詞、であるか、
▲2▼単語の品詞が接頭辞で且つ後ろにカタカナ文字列が続いていないか、
▲3▼単語の品詞が接尾辞または連濁で且つ前にカタカナ文字列が続いていないか、
を判定し(n43〜n45)、この▲1▼〜▲3▼のいずれかに該当する単語であれば、n49で正当性のない単語と判定する。また、この▲1▼〜▲3▼のいずれにも該当しない単語であれば、この単語の品詞によるルールからは該単語の正当性が検証できないとして、以下の単語の性質による正当性の検証を行う。
【0036】
上記したように、単語毎に、複合語を形成する可能性の多い単語、複合語を形成する可能性の少ない単語、有用な性質を持たない単語、のいずれかの性質が設定されている。検証する単語の性質が上記したいずれに設定されているかを判定し(n46、n47)、複合語を形成する可能性の多い単語であればn48で正当性のある単語と判定する。また、複合語を形成する可能性の少ない単語であればn49で正当性のない単語と判定する。また、有用な性質を持たない単語であれば正当性を検証できない単語と判定する(n50)。以上のように、この処理では登録単語が正当性のある単語、正当性のない単語、または、正当性の検証できない単語のいずれかに判定される。なお、上記した実施の形態では、単語の文字列長によるルール、単語の品詞によるルール、単語の性質によるルール、の3つで単語の正当性を検証しているが、上記した任意のルール1つまたは2つを組み合わせて単語の正当性を検証するようにしてもよい。
【0037】
単語候補検出部5は,登録単語の正当性検証処理で、正当性があると判定された単語を単語候補の構成要素としては検出しない(n26→n30)。また、正当性がないと判定された単語であれば、前にカタカナ文字列の単語が連接していると、この単語とをつないだ文字列からなる単語を単語候補の構成要素として検出する(n29)。また、後ろにカタカナ文字列の単語が連接しているとこの単語とつないだ文字列からなる単語を単語候補の構成要素として検出する(n29)。正当性が検証されなかった単語であれば、その単語を単語候補の構成要素として検出する(n28)。
【0038】
例えば、図6(A)に示すように、「ファイナンシャルシステム」と言う文字列に対して、形態素解析によって「ファイ」「システム」が登録語、「ナンシャル」が未登録語とする結果であれば、未登録語である「ナンシャル」の文字列長は1文字ではないので、単語候補の構成要素として検出される。登録単語である「ファイ」は文字列長、単語の品詞、および、その性質からも正当性が検証されない単語であるので、単語候補の構成要素として検出される(「ファイ」は有用な性質を持たない単語であるとする。)。また、登録単語である「システム」は文字列長が4文字であるので、文字列長によるルールによって正当性がある単語と判定され、単語候補の構成要素として検出されない。したがって、この例では、「ファイ」と「ナンシャル」の2つが単語候補の構成要素として検出される。また、図6(B)に示すように、「インフレーター」と言う文字列に対して、形態素解析の結果が「イン」「フレー」を登録語、「ター」を未登録語とするものであれば、未登録語である「ター」の文字列長は1文字ではないので単語候補の構成要素として検出される。「イン」は文字列長、単語の品詞、および、その性質からも正当性が検証されない単語であるので、単語候補の構成要素として検出される(「イン」は有用な性質を持たない単語であるとする。)。また、感動詞「フレー」は単語の品詞によるルールによって正当性のない単語と判定されるので、前に隣合う単語「イン」とつなげた「インフレー」と後ろに隣合う単語「ター」とつなげた「フレーター」が単語候補の構成要素として検出される。したがって、この例では、「イン」「インフレー」「フレーター」「ター」の4つが単語候補の構成要素として検出される。
また、図6(C)に示すように、「イリオモテ」と言う文字列に対して、形態素解析の結果が「イ」が未登録語、「リオ」「モテ」が登録語とするものであれば、未登録語である「イ」の文字列長は1文字であるので、その後ろに隣合う単語「リオ」とつながる。また、下一段動詞である「モテ」は単語の品詞によるルールによって正当性のない単語と判定され、前に隣合う単語「リオ」とつながる。ここで、「リオ」にはすでに「イ」が接続されているので、「イリオモテ」が単語候補の構成要素として検出される。
さらに、図6(D)に示すように、「インタラプタ」言う文字列に対して、形態素解析の結果が「イン」「タラ」が登録語「プタ」が未登録語とするものであれば、未登録語である「プタ」の文字列長は1文字ではないの単語候補の構成要素として検出される。「イン」「タラ」は文字列長、単語の品詞、および、その性質からも正当性が検証されない単語であるので、その単語が単語候補の構成要素として検出される(「イン」「タラ」は有用な性質を持たない単語であるとする。)。したがって、この例では、「イン」「タラ」「プタ」の3つが単語候補の構成要素として検出される。
【0039】
このようにして検出された単語候補の構成要素および単語候補の構成要素で連接するものの組み合わせを、単語候補として作成する(n31)。例えば、図6(A)に示す例では、「ファイ」「ナンシャル」「ファイナンシャル」の3つが単語候補として作成される。また、図6(B)に示す例では、「イン」「インフレー」「フレーター」「ター」「インフレータ」が単語候補として作成される。図6(C)に示す例では、「イリオモテ」が単語候補として作成される。図6(D)に示す例では「イン」「タラ」「プタ」「インタラ」「タラプタ」「インタラプタ」が単語候補として作成される。なお、連接していない単語「イン」と「プタ」をつないだ「インプタ」という単語候補は作成されない。そして、n31で作成された単語候補で且つ辞書ファイル4に登録されていない文字列の単語候補を、辞書ファイル4に仮登録する(n32)。仮登録された単語候補の品詞は「候補」に設定される。また、単語候補の仮登録においては、この単語候補が切り出された元の文字列の単語(n21で登録された単語)を登録した辞書ファイル4内の位置を示すデータ(ポインタ)も同時に登録する。図7に単語候補が登録された辞書ファイル4の例を示す。図6(A)に示す例では、「ファイ」はすでに辞書に登録されているので「ナンシャル」「ファイナンシャル」の2つが単語候補として登録され、品詞は候補に設定されている。また、これらの単語候補は切り出された元の文字列の単語「ファイナンシャルシステム」が登録されている辞書ファイル4内の位置を示すデータ(ポインタ8)が付加されて辞書ファイル4に登録される。
【0040】
以下、n21で登録した単語の品詞を名詞とした理由について簡単に説明する。カタカナの未登録語の発生源は大きく分けて以下に示す▲1▼〜▲3▼の3つであると考えられる。
▲1▼外来語の動詞、形容詞、名詞がカタカナ表記された日本語となる場合(図8(A)参照)
外来語の動詞は日本語のサ行変格活用の動詞の語幹となり、サ行変格活用の動詞の語幹は名詞として使われている。また、外来語の形容詞は日本語の形容動詞になる。さらに、外来語としても形容詞と名詞の両方の性質をもつものがカタカナ表記されることが多い。これらの理由から、この発生源から発生するカタカナ未登録語が名詞である確率が非常に高いといえる。
▲2▼日本語で難しい漢字や強調したい単語などがカタカナ表記された場合(図8(B)参照)
この発生源から発生するカタカナ未登録語は上記したようにサ行変格活用の動詞、形容動詞、名詞に加えて文法的に「名詞」と同様に扱われる固有名詞がほとんどであるといえる。したがって、この発生源から発生するカタカナ未登録語も名詞である確率が非常に高いといえる。
▲3▼外来語の擬音語や擬態語を転用、外来語の短縮、または、和声カタカナ語から発生する場合(図8(C)参照)
この場合には、その品詞がいろいろあって、どの品詞が多いということは一概に言うことはできないが、統計的に言って、このような発生源から発生するカタカナ未登録語の出現の頻度は非常に少ない。
以上の▲1▼〜▲3▼の理由から、カタカナ未登録語の品詞を名詞とすることが最適である考えられるからである。
【0041】
n7では、形態素解析の結果から複数のカタカナ文字列の登録単語が連接している箇所があるかどうかを判定する。ここで、複数のカタカナ文字列の登録単語が連接している箇所があれば、n8で第2の単語候補検出、登録処理が実行される。図9は、第2の単語候補検出、登録処理の流れを示すフローチャートである。形態素解析結果において、複数のカタカナ文字列の登録単語が連接する例としては「カリマンタン」「カードシステム」等の文字列がある。「カリマンタン」という文字列の形態素解析結果を図10(A)に示し、「カードシステム」という文字列に対する形態素解析結果を図10(B)に示す。「カリマンタン」と言う文字列は、形態素解析で「カリ」「マン」「タン」という3つの登録単語が連接する文字列であると判定される。「カードシステム」と言う文字列は形態素解析で「カード」「システム」という2つの登録単語が連接する文字列であると判定される。
【0042】
登録単語検証部9が各登録単語に対して、単語の正当性を検証する(n51、n52)。この単語の正当性は上記した図5に示した処理で検証される。そして、正当性のない単語が検出されているか(n53)、または、正当性の検証できない単語が連接して検出されているかを判定する(n54)。ここで、正当性のない単語が検出されておらず、且つ、正当性の検証できない単語が連接していなければ、未登録単語が含まれている可能性が無いとして処理を完了する。正当性のない単語が検出されている場合、または、正当性を検証できない単語が連接して検出されている場合には、以下の処理が行われる。
【0043】
このカタカナ文字列全体を1つの単語とし、品詞を名詞として辞書ファイル4に登録する(n55)。正当性の検証できない単語を、単語候補の構成要素として検出する(n56)。また、正当性がないと判定された単語は、前にカタカナ文字列の登録単語が連接しているとこの登録単語とつないだ文字列からなる単語を単語候補の構成要素として検出し、また、後ろにカタカナ文字列の登録単語が連接しているとこの登録単語をつないだ文字列からなる単語を単語候補の構成要素として検出する(n57)。そして、検出された単語候補の構成要素を組み合わせて単語候補を作成し(n58)、作成された単語候補で且つ辞書ファイル4に登録されていない文字列の単語候補を、辞書ファイル4に仮登録する(n59)。仮登録された単語候補の品詞は候補に設定される。また、この単語候補が切り出された元の文字列の単語(n55で登録された単語)が登録されている辞書ファイル4内の位置も記憶される。
【0044】
例えば、「カリマンタン」という文字列を形態素解析した結果の「カリ」「マン」「タン」の3つの登録単語が全て正当性の検証できない単語であったとする。この場合、n55で「カリマンタン」の品詞を名詞として辞書ファイル4に登録する。また、「カリ」「マン」「タン」が単語候補の構成要素として検出され、「カリマン」「マンタン」が単語候補として仮登録される。なお、連接していない単語「カリ」「タン」をつないだ「カリタン」という単語は単語候補として作成されない。
また、「カードシステム」という文字列の形態素解析の結果である「システム」は上記した文字列によるルールから正当性のある単語と判定される。したがって、正当性のない単語が検出されておらず、且つ、正当性の検証できない単語も連接しないので、未登録単語が含んでいる可能性が無いと判定され、n55以降処理が行われない。
【0045】
すなわち、この実施の形態では、形態素解析の結果に正当性のない単語が含まれている場合、または、正当性が検証できない単語が連接している場合に、カタカナ文字列中に未登録語含まれている可能性があると判断し、その他の場合であればカタカナ文字列中に未登録語含まれている可能性がないと判断している。そして、カタカナ文字列中に未登録語含まれている可能性があると判断した場合には、単語候補を作成し、これを辞書ファイル4に仮登録している。
【0046】
なお、この第2の単語候補検出、登録処理における単語の正当性の検証において、上記したルールでは厳しすぎて、正当性のある単語を正当性のない単語であると判定してしまうケースも想定される。このような場合には、辞書ファイル4に登録されている複数の単語からなる複合語が、未登録単語として登録されてしまうという問題が生じる恐れもある。このため、この第2の単語候補検出、登録処理における、上記した単語の正当性を検証する単語の文字列長によるルールを以下のように変更してもよい。
【0047】
(1) 文字列長が3文字以上の単語であれば正当性のある単語、
(2) 文字列長が2文字の単語であれば正当性の有無を判定できない単語、
(3) 1文字であれば正当性がない単語、であるとする。
このように、変更することで辞書ファイル4に複数の登録単語からなる複合語が登録される可能性を減少させることができる。
【0048】
n9では、形態素解析された結果に辞書ファイル4に仮登録されている単語候補が含まれているか(単語候補が再出現したか)どうかを判定している。ここで、単語候補が再出現したと判定すると、n10の単語候補の正当性検証処理が実行される。図11は、単語候補の正当性検証処理を示すフローチャートである。最初に、再出現した単語候補に連接するがカタカナ文字列全体が、該単語候補を辞書ファイル4に仮登録したときに切り出した文字列と一致しているかどうかを判定する(n61)。すなわち、「ファイナンシャルシステム」という文字列から切り出された「ファイナンシャル」という単語が辞書ファイル4に仮登録されている場合、再度同じ文字列から「ファイナンシャル」という単語候補が切り出されたのかどうかを判定する。n61で、単語候補が切り出された文字列と同一であると判定すると、単語候補の正当性を正確に検証ができないとして処理を完了する。
【0049】
n61で文字列が同一でないと判定すると、この文字列の形態素解析された結果に単語候補が2つ以上含まれているかどうかを判定する(n62)。n62で単語候補が2つ以上含まれている場合には、単語候補の正当性の検証ができないと判定して処理を完了する。一方、このカタカナ文字列中に単語候補が1つしか含まれていない場合には、各登録単語に対して上記した図5に示す正当性の検証処理を行う(n63、n64)。そして、全ての登録単語が正当性のある単語として判定されなければ(n65)、単語候補の正当性が検証できないとして処理を完了する。全ての登録単語の正当性が検証されれば、該単語候補は正当性があると判定して、辞書ファイル4に該単語候補を正式に登録する(n66)。単語候補を辞書ファイル4に正式に登録する処理は、その品詞を候補から名詞に変更する処理である。単語候補正式登録部10がこの仮登録されている単語候補を正式に登録する処理を行う。
【0050】
例えば、「ファイナンシャルシステム」という文字列が検出されて、辞書ファイル4に「ファイナンシャル」「ナンシャル」が単語候補として仮登録されている。ここで、「ファイナンシャルアドバイザ」という文字列の形態素解析の結果は図12(A)に示すようになる。なお、「ファイナンシャルアドバイザ」という文字列の形態素解析の結果が、図12(B)に示すようになると考えることもできるが、形態素解析の一般的な手法である最長一致法(最も長い単語を優先する。)や、文節数最小法(分割する単語数を最小にする。)を用いることでこのような結果となることはない。そして、「アドバイザ」は文字列長から正当性のある単語と判定される。これにより、「ファイナンシャル」という文字列も正当性がある単語候補と判定され、辞書ファイル4における「ファイナンシャル」の品詞が候補から名詞に変更される。これによって、「ファイナンシャル」が辞書ファイル4に正式に登録されたことになる。
【0051】
n1で記憶した一連のテキストデータ全体に対して上記した処理が完了すると、辞書ファイル4に仮登録されている不要な単語を削除する処理を実行する。図14は、不要な単語を削除する不要単語削除処理の流れを示すフローチャートである。辞書ファイル4に登録されている単語で、その品詞が候補である単語を全て検出して削除する(n71〜n73)。これによって、単語候補として仮登録されたがその後に同じ文字列が出現しなかったものや、正当性が検証されなかった単語候補は全て削除される。例えば、図13に示した辞書ファイル4であれば「ナンシャル」「インフレー」「フレーター」・・・等が削除される(図15(A)参照)。そして、もとの文字列の位置を示すポインタを記憶している単語があれば、このポインタで指定される位置に登録されている単語を削除するとともに、このポインタも同時に削除する(n74〜n77)。これによって、上記した処理で正当性が検証され、正式な単語として辞書ファイル4に登録された単語を切り出したカタカナ文字列の単語が削除される。なお、このカタカナ文字列は複合語であり、辞書ファイル4に登録されていなくても問題はない。例えば、図15(A)に示した辞書ファイル4では「ファイナンシャルシステム」が削除される(図15(B)参照)が、「ファイナンシャル」と「システム」は単語として登録されているので、「ファイナンシャルシステム」が削除されたことで問題が生じることはない。
【0052】
以上、説明したように、本願発明では未登録単語と登録単語とが連接して形成されたカタカナ文字列の複合語から、未登録単語を正確に検出して辞書ファイル4に登録することができる。
また、未登録単語の文字列と、複数の登録単語が連接して形成されたカタカナ文字列とが一致する場合であっても、未登録単語を正確に検出して辞書ファイル4に登録することができる。
さらに、誤って登録された単語は、最終的に削除されるので、辞書ファイル4に不要な単語が登録されることもない。
【0053】
次に、自動的に統計を取って、単語毎にその性質を、複合語を形成することが多い単語、複合語を形成することが少ない単語、有用な性質を持たない単語、のいずれかに設定する処理を説明する。図16は、この単語の性質判定処理を示すフローチャートである。ここでは、図17に示すように辞書ファイル4は、単語毎にその性質を記憶するエリアを有している。図中において、複合語を形成することが多い単語の性質は1であり、複合語を形成することが少ない単語の性質は2であり、有用な性質を持たない単語の性質は3である。また、統計を取るデータとして複合語および単語(辞書ファイル4に登録されていない未登録単語を含む)を登録した統計データを用意する(図18参照)。なお、複合語には単語間に・を単語の区切りを示す記号として入れられている。
【0054】
n81で、統計を取る単語(以下、対象単語と言う。)が選択入力されると、その単語が部分文字列として含まれている全ての単語を検出する(n82)。例えば、対象単語が「イズム」であれば、図17に示す辞書ファイル4からは「イズム」「エゴイズム」「ダダイズム」「ヒロイズム」「ヘブライズム」が検出され、対象単語が「マネー」であれば「マネー」「マネージ」「マネージメント」「マネージャ」「マネージャー」が検出される。そして、統計データから1つずつ単語を抽出して(n83)、以下に示す判定を行う。なお、複合語からは・で区切られた単語毎に抽出する。例えば、統計データに複合語である「イズム・グループ」が入っていれば、「イズム」「グループ」の2つの単語として抽出する。
【0055】
n83で抽出した単語に対象単語が部分文字列として含まれているかどうかを判定し(n84)、含まれていなければn83に戻って次の単語を抽出する。一方、対象単語が部分文字列として含まれていれば、n83で抽出した単語と対象単語が完全に一致するか(文字列長がおなじかどうか)を判定し(n85)、文字列長が同じであれば、図示していないカウンタaを1カウントアップする(n86)。また、文字列長が同じでなければ、(n83で抽出した単語の文字列長が対象単語の文字列長よりも長ければ)、n83で抽出された単語と同じ単語がn82で検出されているかどうか(辞書ファイル4に完全に一致する単語が登録されているかどうか)を判定する(n87)。ここで、辞書ファイル4に完全に一致する単語が登録されていると判定すれば、n83に戻って次の単語を抽出する。例えば、辞書ファイル4に「エゴイズム」が登録されており、n83で抽出された単語も「エゴイズム」である場合である。辞書ファイル4に完全に一致する単語が登録されていないと判定すれば、図示していないカウンタbを1カウントアップする(n88)。n86、またはn88の処理が完了すると、n83に戻って次の単語を抽出する。なお、カウンタaおよびカウンタbは、n81で対象単語が選択されたときにカウント値が0に設定される。統計データの全ての単語を抽出して上記したn83以降の処理を完了すると(n89)、以下に示す単語の性質を判定する処理を行い(n90)、この性質を対象単語の性質として辞書ファイル4に登録する(n91)。
【0056】
図17に示す辞書ファイル4と図18に示す統計データを用い、「イズム」と「マネー」を対象単語としたときには、上記した処理でカウンタa、および、カウンタbの計数値は、以下のようになる。
「イズム」 a=1、b=6
「マネー」 a=5、b=0
単語の性質は、上記したように複合語を形成することが多い単語、複合語を形成することが少ない単語、有用な性質を持たない単語、の3つのいずれかに判定される。この実施の形態では、
a/(a+b)>0.8 が成立すればその性質を複合語のなかで独立した単語となりやすいとし、
b/(a+b)>0.8 が成立すればその性質を複合語のなかで独立した単語となりにくいとし、
それ以外は、有用な性質をもたない単語であると判定する。
【0057】
n90では、上記した処理で得られたカウンタa、および、カウンタbの計数値を用いて、上記の演算を行い、単語の性質を判定する。そして、n91でこの性質を対象単語の性質として辞書ファイル4に登録し、処理を完了する。
【0058】
以上のように、本実施の形態では単語の性質を統計に基づいて設定するようにしているので、客観的に単語の性質を設定することができる。
【0059】
【発明の効果】
以上のように、この発明によれば、連接するカタカナ文字列に未登録単語含まれるときに、正確に未登録単語を形成する文字列の範囲を特定して、未登録単語を検出し、この検出した未登録単語を登録することができる。また、誤って検出され、辞書ファイルに登録された単語は最終的に削除されるので、辞書ファイルの容量が不要に大きくなることもない。
【図面の簡単な説明】
【図1】この発明の実施の形態である日本語文解析装置の機能を示すブロック図である。
【図2】この実施の形態の日本語文解析装置の処理を示すフローチャートである。
【図3】形態素解析の概念を示す図である。
【図4】第1の単語候補検出、登録処理の流れを示すフローチャートである。
【図5】登録単語の正当性検証処理のフローチャートである。
【図6】検出される単語候補の構成要素および作成される単語候補の例を示す図である。
【図7】単語候補が登録された辞書ファイルを示す図である。
【図8】カタカナ未登録語の発生源を説明する図である。
【図9】第2の単語候補検出、登録処理の流れを示すフローチャートである。
【図10】検出される単語候補の構成要素および作成される単語候補の例を示す図である。
【図11】単語候補の正当性検証処理を示すフローチャートである。
【図12】単語候補が含まれる文字列の形態素解析結果を示す図である。
【図13】仮登録されていた単語候補が正式に登録されたときの辞書ファイルを示す図である。
【図14】不要な単語を削除する不要単語削除処理の流れを示すフローチャートである。
【図15】不要な単語が削除されたときの辞書ファイルを示す図である。
【図16】単語性質判定処理を示すフローチャートである
【図17】単語の性質を記憶する辞書ファイルを示す図である。
【図18】統計データを示す図である。
【符号の説明】
1−日本語文解析装置
2−テキストデータ記憶部
3−形態素解析部
4−辞書ファイル
5−単語候補検出部
6−単語候補登録部
7−単語候補検証部
8−単語候補削除部
9−登録単語検証部
10−単語候補正式登録部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a Japanese sentence analysis apparatus and a Japanese sentence analysis method for detecting words not included in a dictionary included in an inputted Japanese sentence, particularly words written in katakana, and registering the detected words.
[0002]
[Prior art]
In the pre-processing of machine translation, processing called morphological analysis is performed. To put it simply, the morphological analysis is a process of cutting a sentence or a word using a dictionary for an inputted Japanese sentence. The problem here is that morphological analysis cannot be performed accurately if there is a word (hereinafter referred to as an unregistered word) that is not in the dictionary in the input Japanese sentence. Therefore, machine translation also fails. Therefore, in order to warn in advance that a translation is likely to fail in the machine translation preprocessing, it is necessary to accurately detect unregistered words.
[0003]
Unregistered words are often new words used as keywords in documents. For this reason, in a technique such as automatic keyword creation (index creation) for document search, it is necessary to register an unregistered word as a keyword. That is, in order to register an unregistered word that is not in the dictionary as a keyword in automatic keyword creation for document search, the unregistered word must be accurately detected.
[0004]
Conventionally, the unregistered word detection process is based on the fact that the unregistered word is mostly a katakana character string. It was something to detect as.
For example, if “IN” and “TARA” are registered words registered in the dictionary for the character string “INTERRUPTERS” and “DATA” is an unregistered word, “INTERRUPTERS” is set as an unregistered word. Detecting method (see IPSJ 36th (1988) National Convention Preprints, pp. 1231-1232, "Pre-editing System for Japanese-to-English Machine Translation (2) -Method for Detecting Morphological Ambiguity-") and ,
Ignore information such as “New”, “News”, “Hotel”, etc., that is drawn for the character string “New Station Hotel”, and use the word “New Station Hotel” as an unknown word (in this application). Method of Detecting as Unregistered Words (Information Processing Society of Japan 47th (Second 1993) National Convention Preprints, pp. 3-159 to 3-160, "Unknown in Japanese Morphological Analysis Introducing Selective Dictionary Lookup Mechanism" Word Estimation Mechanism ”).
[0005]
[Problems to be solved by the invention]
However, the above-described method for extracting unregistered words has a problem that if a katakana character string is a compound word composed of a plurality of words, this compound word is detected as an unregistered word. For example, if there is a word of the word “financial system” (“final” is an unregistered word and a word connected to “system” to form a compound word), the registered words “phi” and “ Information such as “system” or the like that is looked up in the dictionary is ignored (“Phi” and “system” are words registered in the dictionary file), and the entire “financial system” is detected as an unregistered word. In addition, compounds such as “financial banking”, “financial center”, “financial advisor”, and “financial planner” that include the unregistered word “financial” are also detected as other unregistered words (“banking”, "Center,""advisor,""planner," etc. are words registered in the dictionary.) For this reason, the amount of processing in the pre-processing of machine translation increases, and redundant keywords (compound words) are created as document search keywords.
[0006]
Here, a method of detecting only a portion that does not match a registered word as an unregistered word is also conceivable, but in this method, if a part of the unregistered word to be detected matches the registered word, this matched portion Is detected, an unregistered word of an inappropriate character string is detected. For the character string “Financial System” in the above example, a character string that is not legitimate as an unregistered word as the word “Nancial”, excluding the portion that matches the registered words “Fi” and “System” It will be detected. Furthermore, when the character string of the unregistered word happens to coincide with a character string obtained by connecting a plurality of words, there is a problem that the unregistered word is not detected. For example, if there are three registered words “Kali”, “Man”, and “Tan” for the unregistered word in the character string “Kalimantan”, the unregistered word is not detected.
[0007]
An object of the present invention is to detect only a character string that accurately forms an unregistered word from a katakana character string including an unregistered word, and to register the detected unregistered word and Japanese sentence analyzer It is to provide an analysis method.
[0008]
Another object of the present invention is to provide a Japanese sentence analysis device and a Japanese sentence analysis method capable of detecting the validity of a detected unregistered word and canceling an unregistered word that has been erroneously detected and registered. And
[0009]
[Means for Solving the Problems]
A Japanese sentence analysis apparatus according to the present invention includes a dictionary file in which a character string of a word and data indicating the attribute of the word are registered, and a morpheme analysis for dividing a character string input by using the dictionary file into words. Means,
When concatenated katakana character strings in the input character string are divided into a plurality of words by the morphological analysis, a character string length of one character is included in the divided words. Unregistered If a word is included, Unregistered Words and the Unregistered Unregistered word detecting means for detecting a character string connecting a word adjacent before or after the word as an unregistered word,
Unregistered word registration means for temporarily registering the detected unregistered word in the dictionary file;
A word of a character string that is detected by the unregistered word detection means and matches an unregistered word temporarily registered in the dictionary file is obtained by the morphological analysis. Split concatenated katakana strings Multiple words Included in Rare Have And verifying whether or not the unregistered word is valid as a word based on the verification result of verifying the validity of a word other than the matching character string, and
The unregistered word registering means formally registers, in the dictionary file, a temporarily registered unregistered word verified by the validity verifying means to be valid.
[0010]
In this configuration, the morphological analysis unit performs a morphological analysis that divides a character string input using a dictionary file into words. As a result of the morphological analysis, when the concatenated katakana character string is divided into a plurality of words, the character string length is one character in the divided words. Unregistered If a word is included, the unregistered word detection means Unregistered Words and the Unregistered A character string that connects an adjacent word before or after the word is detected as an unregistered word. Then, the unregistered word registering means temporarily registers the detected unregistered word in the dictionary file. In addition, the validity verification unit performs the morphological analysis Multiple words divided from concatenated katakana strings Is detected by the unregistered word detection means and includes a word of a character string that matches the registered unregistered word, based on the verification result of verifying the validity of the word other than the matching character string, It is verified whether the unregistered word is valid as a word. Then, the unregistered word registering means formally registers the unregistered words temporarily registered in the dictionary file verified to be valid as words.
[0022]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing functions of a Japanese sentence analyzing apparatus according to an embodiment of the present invention. The Japanese sentence analysis apparatus 1 includes a text data storage unit 2, a morphological analysis unit 3, a dictionary file 4, a word candidate detection unit 5, a word candidate registration unit 6, a word candidate verification unit 7, and a word candidate deletion unit 8 , A registered word verification unit 9 and a word candidate formal registration unit 10.
The text data storage unit 2 stores text data to be processed.
The morphological analysis unit 3 performs a morphological analysis on the text data stored in the text data storage unit 2.
The dictionary file 4 stores a character string of a word and an attribute (part of speech, etc.) of the word in association with each other.
The word candidate detection unit 5 detects unregistered words that are not registered in the dictionary file 4 as word candidates based on the result of the morphological analysis performed by the morphological analysis unit 3.
The word candidate registration unit 6 temporarily registers the word candidates detected by the word candidate detection unit 5 in the dictionary file 4.
The word candidate verification unit 7 verifies the validity of the word candidates provisionally registered in the dictionary file 4.
The word candidate deletion unit 8 deletes words whose validity has not been verified among the word candidates temporarily registered in the dictionary file 4.
The registered word verification unit 9 verifies the validity of a word registered in the dictionary file 4 detected from a character string that may include an unregistered word.
The word candidate formal registration unit 10 officially registers the word candidate when the validity is verified with the temporarily registered word candidate.
[0023]
FIG. 2 is a flowchart showing the processing of the Japanese group analysis device according to the embodiment of the present invention. Here, a series of processes of the Japanese sentence analysis apparatus 1 will be briefly described. The Japanese sentence analysis device 1 fetches and stores the text data to be processed into the text data storage unit 2 (n1). The morphological analyzer 3 takes in text data for each character string unit delimited by punctuation (n2). When the morpheme analysis unit 3 takes in text data delimited by punctuation marks, the morpheme analysis unit 3 performs morpheme analysis using the dictionary file 4 (n3). By this morphological analysis, the text data delimited by the punctuation taken in n2 is divided into morphemes. The Japanese sentence analyzer 1 determines whether the result of the morphological analysis by the morphological analyzer 3 in n3 includes a word of a katakana character string (n4). If the word of the katakana character string is not included, it is determined whether or not all the text data stored in the text data storage unit 2 has been processed in n1 (whether or not unprocessed text data remains) (n11). ), If any unprocessed text data remains, the process returns to n2.
[0024]
If a word in the katakana character string is included, the word candidate detection unit 5 determines whether or not an unregistered word is included in the word in the katakana character string (n5). If an unregistered word is included, the word candidate detection unit 5 detects a word candidate from the entire katakana character string including the katakana character string words connected to the unregistered word, and stores the detected word candidate in a dictionary file. Then, the first word candidate to be temporarily registered in No. 4 is detected and registered (n6). If it is determined in n5 that an unregistered word is not included, or if the above-described processing of n6 is completed, the presence or absence of a portion where registered words of a plurality of katakana character strings registered in the dictionary file 4 are connected. Is determined (n7). If there is a portion where the registered words of the katakana character string are concatenated, a word candidate is detected from the entire katakana character string connecting the registered words, and the detected word candidate is temporarily registered in the dictionary file 4. , A registration process is performed (n8).
[0025]
In addition, the word candidate verification unit 7 determines whether any of the words divided by the morphological analysis has the same katakana character string as the word candidates provisionally registered in the dictionary file 4 at n6 or n8 (n6 Or (whether the word candidate temporarily registered in the dictionary file 4 at n8 reappears from another character string) (n9). If the word candidate reappears, the word candidate verification unit 7 executes a word candidate validity verification process for verifying the validity of the re-appearing word candidate temporarily registered in the dictionary file 4 (n10).
[0026]
Then, it is determined at n11 whether or not unprocessed text data remains, and if the unprocessed text data remains, the above-described processes n2 to n10 are repeated. If there is no unprocessed text data, all unnecessary word candidates temporarily registered in the dictionary file 4 (such as word candidates whose validity has not been verified) are deleted and the processing is completed (n12).
[0027]
Hereinafter, the above processing will be described in detail.
In n1, the text data storage unit 2 takes in and stores a series of text data (file unit, record unit, directory unit, hard disk unit, time unit, 100 MB data amount unit, etc.) for morphological analysis.
[0028]
At n2 and n3, the morpheme analysis unit 3 takes out from the series of text data stored in the text data storage unit 2 in units of character strings sequentially delimited by punctuation marks, and performs morpheme analysis. Then, the morpheme analysis unit 3 divides the text data in units of character strings divided by punctuation marks subjected to this morpheme analysis into words and outputs the words.
For example, it is assumed that the text data to be subjected to morphological analysis includes a katakana character string “financial system”. In the dictionary file 4, as shown in FIG. 3A, the character strings "phi" and "system" are registered as words, and the words of the character strings "nancial", "financial" and "financial system" are registered. It shall not be. Here, when the morphological analysis unit 3 performs the morphological analysis on the katakana character string called “financial system”, as shown in FIG. 3 (B), the dictionary includes “na”, “n”, “sha”, and “le”. Pulling is failed, and "phi" and "system" are detected as words whose parts of speech are nouns. Then, the morphological analysis unit 3 regards the katakana character string “Nancial” connecting “na”, “n”, “sha”, and “ru”, which has failed in the dictionary lookup consecutively, as one unregistered word. As shown in (3), three words "phi", "nancial" and "system" are output as a result of the morphological analysis of the character string "financial system". At this time, the part of speech of “Nancial” is output as an unregistered word.
[0029]
In n4, it is determined whether or not the word of the katakana character string is included in the morphological analysis result output by the morphological analysis unit 3. Here, when the word of the katakana character string is not included in the morphological analysis result, the process of n5 to n10 is not performed, and the presence or absence of unprocessed text data is determined in n11. On the other hand, if the morphological analysis result includes the words of the katakana character string, the processing of n5 to n10 is performed.
[0030]
In n5, the word candidate detection unit 5 determines whether the morphological analysis result includes an unregistered word. In this embodiment, when the part-of-speech includes a word that is not registered as a result of the morphological analysis, it is determined that an unregistered word is included. In the example described above, since the word “Nancial” whose part of speech is an unregistered word is included, it is determined that n5 includes the unregistered word.
[0031]
If the word candidate detection unit 5 determines that n5 includes an unregistered word, the word candidate detection unit 5 detects a word candidate from the entire katakana character string connected to the unregistered word, and temporarily stores the detected word candidate in the dictionary file 4. First word candidate registration and registration processing to be registered is executed. Here, the entire katakana character string connected to the unregistered word is a katakana character including a word of a katakana character string that is continuous before or / and after the unregistered word (a word connected to the unregistered word). It is a character string. In the above example, "financial system" is the entire katakana character string connected to the unregistered word. It is assumed that words in the katakana character string are not concatenated before “Phi” and after “System”.
[0032]
Here, the first word candidate detection and registration processing will be described in detail with reference to FIG. FIG. 4 is a flowchart showing the flow of the first word candidate detection and registration process. The entire katakana character string connected to the unregistered word of the katakana character string is set as one word, and the part of speech is registered as a noun in the dictionary file 4 (n21). In the example described above, “financial system” is registered in the dictionary file 4 as a word (the part of speech is a noun). Next, it is determined whether or not the unregistered word included in the katakana character string of the word registered in the dictionary file 4 in n21 is a one-character word (n22). Here, if it is not a word of one character, the unregistered word is detected as a component of a word candidate (n23). If the unregistered word is one character and the registered word of the katakana character string is connected before this unregistered word, the word consisting of the character string connecting the registered word and the unregistered word is used as a constituent element of the word candidate If a registered word in the katakana character string is connected before or after this unregistered word, a word consisting of a character string connecting the registered word and the unregistered word is used as a constituent element of the word candidate. Detect (n24). For example, for a character string "Iriomote", if the morphological analysis result is "I" is an unregistered word and "Rio""Mote" is a registered word, "I" is unregistered with one character. “Irio” connected to the subsequent registered word “Rio” is detected as a component of the word candidate. It is assumed that the word detected before “i”, which is an unregistered word, by the morpheme analyzer 3 is not a katakana character string. If the registered word of the katakana character string is connected before and after both the unregistered word of one character, the constituent elements of the word candidate connected to the registered word connected before and the registered word connected after The connected word candidate components are detected.
[0033]
In the morphological analysis, the validity verification process of the registered word that is the target of the validity of the registered word (word registered in the dictionary file 4) detected from the entire katakana character string including the unregistered word is performed ( n25). Here, it is assumed that if the registered word to be verified is a word that can form a compound word, there is legitimacy, and if the registered word is a word that cannot form a compound word, there is no legitimacy. In the above-described example of the character string “financial system”, two registered words of “phi” and “system” are subject to verification of validity. The registered word verification unit 9 verifies the validity of the word. The validity of a word is verified based on the following rules (1) to (3).
(1) Rule based on word string length
According to this rule, the possibility that a character string that matches a registered word is included in a character string of a word that is not a compound word decreases in this embodiment because the character string length of the registered word decreases. ,
(1) If the character string length is a word of 4 characters or more, a valid word,
(2) A word whose character string length is 2 or 3 characters whose validity cannot be determined,
(3) It is assumed that a single character is a word having no validity.
(2) Rules based on part of speech of words
This rule verifies the validity based on the function of the part of speech shown below.
The impression verb is not a constituent word of a compound word because it has no property of modifying other words or being modified by other words.
Adverbs are not constituent words of a compound word because they do not have the property of modifying other words or being modified by other words.
Verbs other than the inflection of the line are not compound words.
The prefix never comes at the end of a compound word.
The suffix does not come at the beginning of a compound word.
Rendaku does not precede compound words.
For the above reasons, in this embodiment,
(1) If the word is one of a verb, a verb other than a verb, adverb, or saber modification,
(2) If a word is a prefix and no katakana character string is concatenated after the word, an invalid word,
(3) If a word is suffixed or connected, and a katakana character string is not connected in front of the word, an invalid word,
(4) It is assumed that the word cannot be judged whether it is valid or not unless it falls under any of the above (1), (2), and (3).
(3) Rules based on the nature of words
In this rule, the nature of each word is defined as a word that is likely to form a compound word, a word that is less likely to form a compound word, or a word that is neither (hereinafter, a word that does not have a useful property). )),
(1) If the nature of the word is a word that is likely to form a compound word,
(2) If the nature of the word is a word that is unlikely to form a compound word, an invalid word,
(3) If a word does not have a useful property, it is assumed that the word cannot be determined for validity.
In addition, as a method of classifying the characteristics for each word, the number of compound words formed for each word, the number of independent words (words that are not compound words) including matching character strings from a plurality of documents, etc. And the like, and the nature of the word may be set based on the statistics. Further, the statistics may be collected manually, or the characteristics of the words may be set automatically. The process of automatically collecting the statistics and setting the nature of the word will be described later.
[0034]
FIG. 5 is a flowchart of the validity verification process of the registered word in n25. In this process, first, the validity of a word is verified from a rule based on a character string length. It is determined whether the character string length of the registered word for verifying the validity is 4 characters or more, 2 or 3 characters, 1 character (n41, n42). Here, if the character string length is four characters or more, it is determined that the word is valid at n48. If the character string length is one character, it is determined as an invalid word in n49. If the character string length is two or three characters, it is determined that the validity of the word cannot be verified from the rule based on the character string length of the word, and the validity of the word is verified based on the part of speech.
[0035]
here,
(1) Whether the part of speech of a word is an inflection verb, an adverb, or a verb other than the inflection
(2) Check if the part of speech of the word is a prefix and no katakana character string follows
(3) Whether the part of speech of the word is a suffix or rendaku and is not preceded by a katakana character string,
(N43 to n45), and if it is a word corresponding to any of the above (1) to (3), it is determined that the word is not valid in n49. If the word does not correspond to any of (1) to (3), the validity of the word cannot be verified from the rule based on the part of speech of the word. Do.
[0036]
As described above, for each word, any one of a word that is likely to form a compound word, a word that is unlikely to form a compound word, and a word that does not have a useful property is set. It is determined to which of the above-mentioned characteristics of the word to be verified is set (n46, n47), and if it is a word that is likely to form a compound word, it is determined as a valid word at n48. If the word is unlikely to form a compound word, the word is judged to be invalid in n49. If the word does not have a useful property, it is determined that the validity cannot be verified (n50). As described above, in this process, the registered word is determined as a valid word, an invalid word, or a word whose validity cannot be verified. In the embodiment described above, the validity of a word is verified by three rules: a rule based on the character string length of the word, a rule based on the part of speech of the word, and a rule based on the nature of the word. One or a combination of the two may be used to verify the correctness of the word.
[0037]
The word candidate detection unit 5 does not detect a word determined to be valid as a component of the word candidate in the registered word validity verification processing (n26 → n30). In addition, if the word is determined to be invalid, if a word of the katakana character string is connected before, a word composed of the character string connected to the word is detected as a constituent element of the word candidate ( n29). If a word of a katakana character string is connected behind, a word composed of a character string connected to this word is detected as a component of a word candidate (n29). If the word is not verified, the word is detected as a component of the word candidate (n28).
[0038]
For example, as shown in FIG. 6A, if a character string “financial system” is a result of morphological analysis that “fi” and “system” are registered words and “nancial” is an unregistered word. Since the character string length of the unregistered word "Nancial" is not one character, it is detected as a component of a word candidate. The registered word “Phi” is a word whose validity is not verified from the length of the character string, the part of speech of the word, and its nature, so it is detected as a constituent element of the word candidate (“Phi” has a useful property. It is assumed that the word does not have.). In addition, since the registered word “system” has a character string length of four characters, it is determined as a valid word by a rule based on the character string length, and is not detected as a component of a word candidate. Therefore, in this example, two of "phi" and "noncial" are detected as components of the word candidate. Also, as shown in FIG. 6B, for the character string “inflator”, the result of the morphological analysis is that “in” and “frame” are registered words and “tar” is an unregistered word. For example, since the character string length of the unregistered word "tar" is not one character, it is detected as a component of a word candidate. “In” is a word whose validity is not verified based on the length of the character string, the part of speech of the word, and its nature, so it is detected as a constituent element of the word candidate (“In” is a word having no useful property) Suppose there is.) In addition, the inflection word "Fray" is determined to be invalid according to the rules of word part-of-speech, so it is connected to the adjacent word "In" and the subsequent word "Inflation" and the subsequent word "Tar". “Flator” is detected as a constituent element of the word candidate. Therefore, in this example, four of “in”, “inflation”, “flater”, and “tar” are detected as components of word candidates.
In addition, as shown in FIG. 6C, for the character string “Iriomote”, the result of morphological analysis is that “I” is an unregistered word and “Rio” and “Mote” are registered words. For example, since the character string length of “i” which is an unregistered word is one character, it is connected to the word “Rio” which is adjacent to it. Further, the lower verb "Mote" is determined to be an invalid word by the rule of the part of speech of the word, and is connected to the preceding word "Rio". Here, since “I” is already connected to “Rio”, “Iriomote” is detected as a constituent element of the word candidate.
Furthermore, as shown in FIG. 6D, for a character string “interrupter”, if the result of morphological analysis is “in” “tara” and the registered word “puta” is an unregistered word, The character string length of the unregistered word “puta” is detected as a component of a word candidate that is not one character. “In” and “Tara” are words whose validity is not verified based on the character string length, the part of speech of the word, and the nature thereof, so that the word is detected as a constituent element of the word candidate (“In” “Tara”). Is a word that has no useful properties.) Therefore, in this example, three of “in”, “cod”, and “puta” are detected as components of word candidates.
[0039]
A combination of the word candidate components detected in this way and the word candidate components connected to each other is created as a word candidate (n31). For example, in the example shown in FIG. 6A, three words “Fi”, “Nancial”, and “Financial” are created as word candidates. In the example shown in FIG. 6B, “In”, “Inflation”, “Flator”, “Tur” and “Inflator” are created as word candidates. In the example shown in FIG. 6C, “Iriomote” is created as a word candidate. In the example shown in FIG. 6D, “IN”, “TARA”, “PUTTER”, “INTERLA”, “TARAPTA”, and “INTERRUPTTER” are created as word candidates. It should be noted that a word candidate "impta", which connects unconnected words "in" and "puta", is not created. Then, a word candidate of a character string which is a word candidate created in n31 and is not registered in the dictionary file 4 is provisionally registered in the dictionary file 4 (n32). The part of speech of the temporarily registered word candidate is set to “candidate”. Further, in the temporary registration of word candidates, data (pointer) indicating the position in the dictionary file 4 in which the words (words registered in n21) of the original character string from which the word candidates are cut out are also registered. . FIG. 7 shows an example of the dictionary file 4 in which word candidates are registered. In the example shown in FIG. 6A, since “Phi” is already registered in the dictionary, two “Nancial” and “Financial” are registered as word candidates, and the part of speech is set as a candidate. In addition, these word candidates are registered in the dictionary file 4 with data (pointers 8) indicating positions in the dictionary file 4 in which the words "financial system" of the extracted original character string are registered.
[0040]
Hereinafter, the reason why the part of speech of the word registered in n21 is used as a noun will be briefly described. The sources of unregistered words in Katakana can be broadly divided into the following three (1) to (3).
(1) When verbs, adjectives and nouns of foreign words are in Japanese with katakana notation (see Fig. 8 (A))
Foreign verb verbs become the stems of Japanese verbs, and the verb stems are used as nouns. In addition, adjectives in foreign words become Japanese adjective verbs. Furthermore, even foreign words having both adjective and noun properties are often written in katakana. For these reasons, it can be said that the probability that a katakana unregistered word generated from this source is a noun is very high.
(2) When Japanese characters that are difficult to pronounce in Japanese or words to be emphasized are written in katakana (see Fig. 8 (B))
The katakana unregistered words generated from this source are mostly proper nouns that are treated grammatically in the same way as "nouns" in addition to the verbs, adjective verbs, and nouns that are used for sacra modification. Therefore, it can be said that katakana unregistered words generated from this source are also very likely to be nouns.
(3) When diverting an onomatopoeia or mimetic word of a foreign word, shortening the foreign word, or originating from a harmony katakana word (see FIG. 8C)
In this case, there are various parts of speech, and it cannot be generally said which parts of speech are many, but statistically speaking, the frequency of occurrence of unregistered words from katakana is such a frequency. Very little.
This is because, for the reasons (1) to (3) above, it is considered optimal to use the part of speech of an unregistered word as a noun.
[0041]
In n7, it is determined from the result of the morphological analysis whether or not there is a portion where registered words of a plurality of katakana character strings are connected. Here, if there is a location where the registered words of a plurality of katakana character strings are connected, the second word candidate detection and registration process is executed at n8. FIG. 9 is a flowchart showing the flow of the second word candidate detection and registration process. In the result of morphological analysis, examples of connecting registered words of a plurality of katakana character strings include character strings such as “Kalimantan” and “card system”. FIG. 10A shows the morphological analysis result of the character string “Kalimantan”, and FIG. 10B shows the morphological analysis result for the character string “card system”. The character string “Kalimantan” is determined by morphological analysis to be a character string in which three registered words “Kali”, “Man”, and “Tan” are connected. The character string “card system” is determined by morphological analysis to be a character string in which two registered words “card” and “system” are connected.
[0042]
The registered word verification unit 9 verifies the validity of each registered word (n51, n52). The validity of this word is verified by the process shown in FIG. Then, it is determined whether an invalid word is detected (n53) or whether a word whose validity cannot be verified is connected and detected (n54). Here, if an invalid word is not detected and a word whose validity cannot be verified is not connected, the processing is completed assuming that there is no possibility that an unregistered word is included. When an invalid word is detected or when a word whose validity cannot be verified is connected and detected, the following processing is performed.
[0043]
The entire katakana character string is set as one word, and the part of speech is registered as a noun in the dictionary file 4 (n55). A word whose validity cannot be verified is detected as a component of a word candidate (n56). In addition, a word that is determined to be invalid is detected as a word candidate component that includes a word string that is connected to the registered word of the katakana character string, and connected to the registered word. If the registered words of the katakana character string are contiguously connected, a word composed of the character string connecting the registered words is detected as a constituent element of the word candidate (n57). Then, word candidates are created by combining the components of the detected word candidates (n58), and the word candidates of the character strings that are not registered in the dictionary file 4 but are created are temporarily registered in the dictionary file 4. (N59). The part of speech of the temporarily registered word candidate is set as a candidate. Further, the position in the dictionary file 4 in which the word of the original character string from which the word candidate is cut out (word registered in n55) is also stored.
[0044]
For example, it is assumed that all three registered words “Kali”, “Man”, and “Tan” as a result of morphological analysis of a character string “Kalimantan” are words whose validity cannot be verified. In this case, the part of speech of “Kalimantan” is registered in the dictionary file 4 as a noun in n55. In addition, “Kali”, “Man”, and “Tan” are detected as components of the word candidate, and “Kaliman” and “Mantan” are provisionally registered as word candidates. It should be noted that the word "Karitan" which connects the unconnected words "Kari" and "Tan" is not created as a word candidate.
Further, “system”, which is the result of the morphological analysis of the character string “card system”, is determined to be a valid word from the rule based on the character string. Therefore, since a word having no validity is not detected and a word whose validity cannot be verified is not connected, it is determined that there is no possibility that an unregistered word is included, and the processing after n55 is not performed.
[0045]
In other words, in this embodiment, when the result of the morphological analysis includes an invalid word or when a word whose validity cannot be verified is connected, an unregistered word is included in the katakana character string. In other cases, it is determined that there is no possibility that an unregistered word is included in the katakana character string. When it is determined that there is a possibility that an unregistered word is included in the katakana character string, a word candidate is created and temporarily registered in the dictionary file 4.
[0046]
In addition, in the verification of the validity of the word in the second word candidate detection and registration process, it is assumed that the above-described rules are too strict and it is determined that a valid word is an invalid word. Is done. In such a case, there is a possibility that a compound word composed of a plurality of words registered in the dictionary file 4 is registered as an unregistered word. For this reason, the rule based on the character string length of the word for verifying the validity of the word in the second word candidate detection and registration process may be changed as follows.
[0047]
(1) If the character string length is a word of 3 characters or more, a valid word,
(2) A word whose character string length cannot be determined as valid if it is a two-character word,
(3) It is assumed that a single character is a word having no validity.
In this way, the possibility that a compound word including a plurality of registered words is registered in the dictionary file 4 can be reduced by making the change.
[0048]
In n9, it is determined whether or not the result of the morphological analysis includes a word candidate temporarily registered in the dictionary file 4 (whether the word candidate has reappeared). Here, when it is determined that the word candidate has reappeared, the validity verification processing of the n10 word candidate is executed. FIG. 11 is a flowchart showing the word candidate validity verification processing. First, it is determined whether the entire katakana character string connected to the re-appearing word candidate matches the character string cut out when the word candidate is temporarily registered in the dictionary file 4 (n61). That is, when the word “financial” extracted from the character string “financial system” is provisionally registered in the dictionary file 4, it is determined again whether the word candidate “financial” is extracted from the same character string. . If it is determined in n61 that the word candidate is the same as the extracted character string, the validity of the word candidate cannot be accurately verified, and the process is completed.
[0049]
If it is determined at n61 that the character strings are not identical, it is determined whether or not two or more word candidates are included in the result of the morphological analysis of the character string (n62). If two or more word candidates are included in n62, it is determined that the validity of the word candidates cannot be verified, and the process is completed. On the other hand, when only one word candidate is included in the katakana character string, the above-described validity verification process shown in FIG. 5 is performed on each registered word (n63, n64). If all the registered words are not determined as valid words (n65), the process is completed because the validity of the word candidates cannot be verified. If the validity of all registered words is verified, it is determined that the word candidate is valid, and the word candidate is formally registered in the dictionary file 4 (n66). The process of formally registering a word candidate in the dictionary file 4 is a process of changing the part of speech from a candidate to a noun. The word candidate formal registration unit 10 performs a process of formally registering the temporarily registered word candidate.
[0050]
For example, a character string “financial system” is detected, and “financial” and “nancial” are temporarily registered in the dictionary file 4 as word candidates. Here, the result of the morphological analysis of the character string “Financial Advisor” is as shown in FIG. Although it can be considered that the result of the morphological analysis of the character string “financial advisor” is as shown in FIG. 12B, the longest matching method (priority is given to the longest word), which is a general method of morphological analysis. ) Or the minimum number of clauses method (minimizing the number of words to be divided) does not produce such a result. Then, the “advisor” is determined as a valid word from the character string length. Thus, the character string “financial” is also determined as a valid word candidate, and the part of speech of “financial” in the dictionary file 4 is changed from a candidate to a noun. As a result, "financial" is formally registered in the dictionary file 4.
[0051]
When the above-described processing is completed for the entire series of text data stored in n1, processing for deleting unnecessary words temporarily registered in the dictionary file 4 is executed. FIG. 14 is a flowchart illustrating a flow of an unnecessary word deletion process for deleting an unnecessary word. Among words registered in the dictionary file 4, all words whose parts of speech are candidates are detected and deleted (n71 to n73). As a result, all of the word candidates that have been temporarily registered as word candidates but for which the same character string did not appear after that and whose word validity has not been verified are deleted. For example, in the case of the dictionary file 4 shown in FIG. 13, “Nancial”, “Inflation”, “Flator”, etc. are deleted (see FIG. 15A). If there is a word storing a pointer indicating the position of the original character string, the word registered at the position designated by this pointer is deleted, and this pointer is also deleted simultaneously (n74 to n77). ). As a result, the validity is verified by the above-described processing, and the katakana character string word obtained by cutting out the word registered in the dictionary file 4 as an official word is deleted. This katakana character string is a compound word, and there is no problem even if it is not registered in the dictionary file 4. For example, in the dictionary file 4 shown in FIG. 15A, “financial system” is deleted (see FIG. 15B), but “financial” and “system” are registered as words. There is no problem with removing the "system".
[0052]
As described above, in the present invention, an unregistered word can be accurately detected and registered in the dictionary file 4 from a compound word of a katakana character string formed by connecting an unregistered word and a registered word. .
Further, even when a character string of unregistered words and a katakana character string formed by concatenating a plurality of registered words match, unregistered words are accurately detected and registered in the dictionary file 4. Can be.
Furthermore, words registered incorrectly are finally deleted, so that unnecessary words are not registered in the dictionary file 4.
[0053]
Next, statistics are automatically taken and the nature of each word is changed to either a word that often forms a compound word, a word that rarely forms a compound word, or a word that does not have a useful property. The setting process will be described. FIG. 16 is a flowchart showing the word property determination processing. Here, as shown in FIG. 17, the dictionary file 4 has an area for storing the properties of each word. In the figure, the property of a word that often forms a compound word is 1, the property of a word that rarely forms a compound word is 2, and the property of a word that does not have a useful property is 3. Also, statistical data in which compound words and words (including unregistered words that are not registered in the dictionary file 4) are registered as statistical data is prepared (see FIG. 18). In the compound words, "/" is inserted between words as a symbol indicating a word delimiter.
[0054]
In n81, when a word for statistics (hereinafter referred to as a target word) is selected and input, all words including the word as a partial character string are detected (n82). For example, if the target word is “ism”, “ism”, “egoism”, “dadaism”, “heroism”, and “hebrism” are detected from the dictionary file 4 shown in FIG. 17, and if the target word is “money”, “ "Money", "Manage", "Management", "Manager", and "Manager" are detected. Then, words are extracted one by one from the statistical data (n83), and the following determination is made. From the compound word, it is extracted for each word separated by “·”. For example, if the statistical data includes the compound word “ism group”, the word is extracted as two words “ism” and “group”.
[0055]
It is determined whether or not the target word is included as a partial character string in the word extracted in n83 (n84). If not included, the process returns to n83 to extract the next word. On the other hand, if the target word is included as a partial character string, it is determined whether the word extracted in n83 completely matches the target word (whether the character string length is the same) (n85), and the character string length is the same. If so, the counter a (not shown) is incremented by 1 (n86). If the character string length is not the same (if the character string length of the word extracted in n83 is longer than the character string length of the target word), whether the same word as the word extracted in n83 is detected in n82 (N87) is determined (whether a word that completely matches the dictionary file 4 is registered). Here, if it is determined that a word that completely matches the dictionary file 4 is registered, the process returns to n83 and the next word is extracted. For example, “Egoism” is registered in the dictionary file 4 and the word extracted in n83 is also “Egoism”. If it is determined that a completely matching word is not registered in the dictionary file 4, the counter b (not shown) is incremented by 1 (n88). Upon completion of the process at n86 or n88, the process returns to n83 to extract the next word. Note that the count value of the counter a and the counter b is set to 0 when the target word is selected in n81. When all the words in the statistical data are extracted and the above-described processing after n83 is completed (n89), the processing for determining the characteristics of the words shown below is performed (n90). (N91).
[0056]
When the dictionary file 4 shown in FIG. 17 and the statistical data shown in FIG. 18 are used and “ism” and “money” are set as target words, the count values of the counter a and the counter b in the above processing are as follows. become.
"Ism" a = 1, b = 6
"Money" a = 5, b = 0
The nature of the word is determined to be one of three words: a word that often forms a compound word as described above, a word that rarely forms a compound word, and a word that does not have a useful property. In this embodiment,
If a / (a + b)> 0.8 holds, it is assumed that the property is likely to be an independent word in a compound word,
If b / (a + b)> 0.8 holds, the property is considered to be difficult to become an independent word in a compound word,
Otherwise, it is determined that the word has no useful property.
[0057]
In n90, the above calculation is performed using the count values of the counter a and the counter b obtained in the above processing, and the nature of the word is determined. Then, in n91, this property is registered in the dictionary file 4 as the property of the target word, and the process is completed.
[0058]
As described above, according to the present embodiment, the word properties are set based on statistics, so that the word properties can be set objectively.
[0059]
【The invention's effect】
As described above, according to the present invention, when an unregistered word is included in a concatenated katakana character string, the range of the character string that accurately forms the unregistered word is specified, and the unregistered word is detected. The detected unregistered word can be registered. In addition, since the words detected in error and registered in the dictionary file are finally deleted, the capacity of the dictionary file does not increase unnecessarily.
[Brief description of the drawings]
FIG. 1 is a block diagram showing functions of a Japanese sentence analyzing apparatus according to an embodiment of the present invention.
FIG. 2 is a flowchart showing processing of the Japanese sentence analysis apparatus according to this embodiment.
FIG. 3 is a diagram showing the concept of morphological analysis.
FIG. 4 is a flowchart showing a flow of first word candidate detection and registration processing;
FIG. 5 is a flowchart of registered word validity verification processing;
FIG. 6 is a diagram illustrating components of detected word candidates and examples of generated word candidates.
FIG. 7 is a diagram showing a dictionary file in which word candidates are registered.
FIG. 8 is a diagram illustrating the source of katakana unregistered words.
FIG. 9 is a flowchart showing a flow of second word candidate detection and registration processing;
FIG. 10 is a diagram illustrating an example of components of a detected word candidate and a created word candidate.
FIG. 11 is a flowchart showing word candidate validity verification processing;
FIG. 12 is a diagram illustrating a morphological analysis result of a character string including word candidates.
FIG. 13 is a diagram illustrating a dictionary file when a temporarily registered word candidate is formally registered.
FIG. 14 is a flowchart showing a flow of an unnecessary word deletion process for deleting an unnecessary word.
FIG. 15 is a diagram showing a dictionary file when unnecessary words are deleted.
FIG. 16 is a flowchart showing a word property determination process.
FIG. 17 is a diagram showing a dictionary file that stores word properties.
FIG. 18 is a diagram showing statistical data.
[Explanation of symbols]
1- Japanese sentence analyzer
2-Text data storage
3-Morphological analysis unit
4- Dictionary file
5-word candidate detection unit
6-word candidate registration unit
7-word candidate verification unit
8--word candidate deletion unit
9-Registered word verification unit
10- word candidate official registration department

Claims (2)

単語の文字列およびその単語の属性を示すデータを登録した辞書ファイルと、
前記辞書ファイルを用いて入力された文字列を単語に分割する形態素解析を行う形態素解析手段と、
前記入力された文字列中の連接するカタカナ文字列が前記形態素解析によって複数の単語に分割されたとき、この分割された単語内に文字列長が1文字の未登録単語が含まれていれば、該未登録単語と該未登録単語の前または後ろに隣合う単語とをつないだ文字列を未登録単語として検出する未登録単語検出手段と、
該検出された未登録単語を前記辞書ファイルに仮登録する未登録単語登録手段と、
前記未登録単語検出手段で検出され、前記辞書ファイルに仮登録されている未登録単語と一致する文字列の単語が前記形態素解析によって連接するカタカナ文字列を分割した複数の単語に含まれているとき、一致する文字列以外の単語の正当性を検証した検証結果に基づいて、該未登録単語が単語として正当なものであるかどうかを検証する正当性検証手段と、を備え、
前記未登録単語登録手段は、前記正当性検証手段が正当であることを検証した仮登録されている未登録単語を前記辞書ファイルに正式に登録する日本語文解析装置。
A dictionary file in which character strings of words and data indicating the attributes of the words are registered;
Morphological analysis means for performing morphological analysis to divide a character string input using the dictionary file into words,
When katakana character string concatenating in the input character string is divided into a plurality of words by the morphological analysis, the string length to the divided within word if it contains unregistered word one letter the unregistered word detection means for detecting a string that connects the word adjacent to the front or back of the unregistered word and the unregistered word as an unregistered word,
Unregistered word registration means for temporarily registering the detected unregistered word in the dictionary file;
The detected by the unregistered word detection means, Ru included Tei in more words word string matching the unregistered word being provisionally registered by dividing the katakana character string to be concatenated by said morphological analysis in the dictionary file A validity verification means for verifying whether or not the unregistered word is valid as a word based on a verification result of verifying the validity of a word other than a matching character string,
The unregistered word registering unit is a Japanese sentence analyzing apparatus for officially registering the temporarily registered unregistered word verified by the validity verifying unit in the dictionary file.
形態素解析手段が、単語の文字列およびその単語の属性を示すデータを登録した辞書ファイルを用いて入力された文字列を単語に分割する形態素解析を行うステップと、
未登録単語検出手段が、前記入力された文字列中の連接するカタカナ文字列が前記形態素解析によって複数の単語に分割されたとき、この分割された単語内に文字列長が1文字の未登録単語が含まれていれば、該未登録単語と該未登録単語の前または後ろに隣合う単語とをつないだ文字列を未登録単語として検出するステップと、
未登録単語登録手段が、該検出された未登録単語を前記辞書ファイルに仮登録するステップと、
正当性検証手段が、前記未登録単語検出手段で検出され、前記辞書ファイルに仮登録されている未登録単語と一致する文字列の単語が前記形態素解析によって連接するカタカナ文字列を分割した複数の単語に含まれているとき、一致する文字列以外の単語の正当性を検証した検証結果に基づいて、該未登録単語が単語として正当なものであるかどうかを検証するステップと、
前記未登録単語登録手段が、前記正当性検証手段が正当であることを検証した仮登録されている未登録単語を前記辞書ファイルに正式に登録するステップと、を有する日本語文解析方法。
A morpheme analysis unit that performs a morpheme analysis to divide a character string input using a dictionary file in which data indicating the character string of the word and the attribute of the word is registered;
When the unregistered word detecting means divides a concatenated katakana character string in the input character string into a plurality of words by the morphological analysis, the unregistered word having a character string length of one character in the divided word. if it contains a word, a step of detecting a character string that connects the word adjacent to the front or back of the unregistered word and the unregistered word as an unregistered word,
An unregistered word registering unit temporarily registers the detected unregistered word in the dictionary file;
Validity verification means is detected by the unregistered word detection means, and a plurality of katakana character strings in which words of a character string that matches unregistered words temporarily registered in the dictionary file are connected by the morphological analysis are divided . comprising the steps of: word to included Tei Rutoki, based on a match verification to verify the validity of the word other than the character string as a result, to verify whether the yet-registered word is legitimate as a word,
A method of analyzing a Japanese sentence, comprising: the unregistered word registering unit officially registering the temporarily registered unregistered word verified by the validity verification unit in the dictionary file.
JP03033996A 1996-02-19 1996-02-19 Japanese sentence analyzer and Japanese sentence analysis method Expired - Fee Related JP3728789B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03033996A JP3728789B2 (en) 1996-02-19 1996-02-19 Japanese sentence analyzer and Japanese sentence analysis method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03033996A JP3728789B2 (en) 1996-02-19 1996-02-19 Japanese sentence analyzer and Japanese sentence analysis method

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2003380248A Division JP3855989B2 (en) 2003-11-10 2003-11-10 Japanese sentence analysis device and Japanese sentence analysis method

Publications (2)

Publication Number Publication Date
JPH09223141A JPH09223141A (en) 1997-08-26
JP3728789B2 true JP3728789B2 (en) 2005-12-21

Family

ID=12301076

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03033996A Expired - Fee Related JP3728789B2 (en) 1996-02-19 1996-02-19 Japanese sentence analyzer and Japanese sentence analysis method

Country Status (1)

Country Link
JP (1) JP3728789B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7136803B2 (en) * 2001-09-25 2006-11-14 Apple Computer, Inc. Japanese virtual dictionary

Also Published As

Publication number Publication date
JPH09223141A (en) 1997-08-26

Similar Documents

Publication Publication Date Title
US6035268A (en) Method and apparatus for breaking words in a stream of text
US7069207B2 (en) Linguistically intelligent text compression
US7136806B2 (en) Sentence segmentation method and sentence segmentation apparatus, machine translation system, and program product using sentence segmentation method
KR100999488B1 (en) Method and apparatus for detecting document plagiarism
JP2001034623A (en) Information retrievel method and information reteraval device
JPH09198409A (en) Extremely similar docuemtn extraction method
Loftsson et al. Tagging a morphologically complex language using an averaged perceptron tagger: The case of Icelandic
US7684975B2 (en) Morphological analyzer, natural language processor, morphological analysis method and program
EP1575172A2 (en) Compression of logs of language data
Agbago et al. Truecasing for the Portage system
JP3855989B2 (en) Japanese sentence analysis device and Japanese sentence analysis method
JP3728789B2 (en) Japanese sentence analyzer and Japanese sentence analysis method
JP2000089786A (en) Method for correcting speech recognition result and apparatus therefor
CN113158693A (en) Uygur language keyword generation method and device based on Chinese keywords, electronic equipment and storage medium
CN114444491A (en) New word recognition method and device
KR100283100B1 (en) Statistical Application Extraction Method and Method for Massive Coral
O’Rourke et al. Word variant identification in old french
JPH10177575A (en) Device and method for extracting word and phrase and information storing medium
JP2009009583A (en) Method for segmenting non-segmented text using syntactic parse
JP3609252B2 (en) Automatic character string classification apparatus and method
JP2000222432A (en) Document retrieval device, document retrieval method and recording medium recording document retrieval program
JPH0668070A (en) Compound word dictionary registering device
JPS63192130A (en) Automatic key word extracting device
JP2001022752A (en) Method and device for character group extraction, and recording medium for character group extraction
Dash et al. Automatic Processing of Bangla Verbs

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040907

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041108

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050913

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050926

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091014

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101014

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101014

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111014

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111014

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121014

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121014

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131014

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees