JP3932912B2 - Character string shaping device, method and program - Google Patents
Character string shaping device, method and program Download PDFInfo
- Publication number
- JP3932912B2 JP3932912B2 JP2002019038A JP2002019038A JP3932912B2 JP 3932912 B2 JP3932912 B2 JP 3932912B2 JP 2002019038 A JP2002019038 A JP 2002019038A JP 2002019038 A JP2002019038 A JP 2002019038A JP 3932912 B2 JP3932912 B2 JP 3932912B2
- Authority
- JP
- Japan
- Prior art keywords
- character
- string
- character string
- same
- information
- 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
Links
- 238000000034 method Methods 0.000 title claims description 57
- 238000007493 shaping process Methods 0.000 title claims description 21
- 238000004458 analytical method Methods 0.000 claims description 86
- 239000000284 extract Substances 0.000 claims 1
- 238000012545 processing Methods 0.000 description 27
- 238000012950 reanalysis Methods 0.000 description 18
- 238000011161 development Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 230000000877 morphologic effect Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 239000000470 constituent Substances 0.000 description 2
- 239000008609 bushi Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
Images
Landscapes
- Machine Translation (AREA)
- Document Processing Apparatus (AREA)
Description
【0001】
【発明の属する技術分野】
本発明はテキストを整形する技術に関し、特に言語処理の対象となる文章のうち、重複文字を有する部分の誤字の除去を行い、正常な文章に回復した後に、検索、要約等の言語処理を行う技術に関する。
【0002】
【従来の技術】
コンピュータ技術の性能の向上に伴い、これまで様々な言語処理技術の提案がなされてきている。これらの技術の手法として、言語処理の対象となる文章を単語単位に区切り、解析を行う形態素解析手法を用いることがある。しかし、言語処理の対象となる文章が誤字を含む場合、当該文字は形態素解析を行う際に未登録語として処理され、正しい結果が得られない。たとえば、もともとのアプリケーションで、強調したい個所に影文字などの文字修飾を施してあった場合、このアプリケーションを別形式のデータに変換してテキストデータを抽出すると、文字修飾を施した部分の文字が重なって抽出されることがあった。一例として、米国マイクロソフト社のWord2000(登録商標)上で特定の単語、例えば「あいう」を強調するためにボールド体を使用した場合、これを米国アドービシステムズ社のPDF(Portable Document Format)フォーマットに変換し、Acrobat Readerのテキスト選択を用いてPDF(Portable Document Format)ファイルから抽出したテキストでは、「ああいいうう」等の連続する文字が抽出されることがある。そこで、誤字を修正する技術としてスペルチェッカーや単に連続する文字をまとめて1文字に置き換えるという方法が提案されている。
【0003】
【発明が解決しようとする課題】
しかし、スペルチェッカーでは、上記のような重複文字に対しては、修正候補の提示はおろか、ミススペルの発見すら困難である。また、連続して同じ文字が出現する場合に、単純に連続する文字を1文字に置き換えてしまうと、「ふたたび」という単語が「ふたび」になったりと、本来あるべき単語の構成文字まで削除される恐れがある。影文字などの文字修飾を施した部分は、本来作者が重要と考える部分に相当するが、従来技術では作者の意図が言語処理の結果に十分に反映されない恐れがある。
【0004】
本発明は、上記課題を解決するために発明されたものであり、誤字と思われる重複文字を除去して正しい単語に整形した後に、言語処理の対象とすることを目的とする。
【0005】
【発明を解決するための手段】
上記のような目的を達成するために、本発明の第1の特徴とするプログラムは、コンピュータを、同一文字が重複して出現する文字列のデータを受け付けるデータ受付手段と、前記受付手段により受け付けられた前記文字列を単語情報と品詞情報に基づいて複数の文字列に切り出す文章解析手段と、前記文章解析手段により前記切り出された複数の文字列のうち、第1の文字列が一文字であるか否かを判断する一文字判断手段と、前記一文字判断手段により前記第1の文字列が一文字であると判断された場合は、前記第1の文字列と前記第1の文字列の次に切り出された文字列の先頭文字とが同一であるか否かを判断する同一文字判断手段と、前記同一文字判断手段により同一文字であると判断された場合は、同一文字の整形を行う文字整形手段と、前記一文字判断手段により前記第1の文字列が一文字でないと判断された場合は、前記第1の文字列の品詞情報を判断する品詞情報判断手段と、前記品詞情報判断手段により前記第1の文字列が品詞情報として登録されていないと判断された場合は、前記第1の文字列から重複する同一の文字を一つにまとめる重複文字除去手段を有することを特徴とする。
【0006】
また、本発明の第2の特徴とするプログラムは、コンピュータを、同一文字が重複して出現する文字列のデータを受け付けるデータ受付手段と、前記受付手段により受け付けられた前記文字列を単語情報と品詞情報に基づいて複数の文字列に切り出す文章解析手段と、前記文章解析手段により前記切り出された複数の文字列のうち、第1の文字列が一文字であるか否かを判断する一文字判断手段と、前記一文字判断手段により前記第1の文字列が一文字であると判断された場合は、前記第1の文字列と前記第1の文字列の次に切り出された文字列の先頭文字とが同一であるか否かを判断する同一文字判断手段と、前記同一文字判断手段により同一文字であると判断された場合は、同一文字の整形を行う文字整形手段を有することを特徴とする。
【0007】
また、本発明の第3の特徴とするプログラムは、コンピュータを、同一文字が重複して出現する文字列のデータを受け付けるデータ受付手段と、前記受付手段により受け付けられた前記文字列を単語情報と品詞情報に基づいて複数の文字列に切り出す文章解析手段と、前記文章解析手段により前記切り出された複数の文字列のうち、第1の文字列の品詞情報を判断する品詞情報判断手段と、前記品詞情報判断手段により前記第1の文字列が品詞情報として登録されていないと判断された場合は、前記第1の文字列から重複する同一の文字を一つにまとめる重複文字除去手段を有することを特徴とする。
【0008】
また、本発明の第4の特徴とするプログラムは、前記文字整形手段により整形された文字列を出力する整形文字列出力手段を含み、前記重複文字除去手段により重複文字を除いた文字列を出力する重複文字除去後出力手段を含むことを特徴とする。
【0009】
このような様々な特徴を有する本発明のプログラムは、本発明の装置において、同様の特徴を有する。また、本発明の方法において、同様の特徴を有する。即ち、同一文字が重複して出現する文字列のデータを受け付けて、前記文字列を単語情報と品詞情報に基づいて複数の文字列に切り出す。また、前記切り出された複数の文字列のうち、第1の文字列が一文字であるか否かを判断し、一文字であると判断された場合は、前記第1の文字列と前記第1の文字列の次に切り出された文字列の先頭文字とが同一であるか否かを判断し、同一文字であると判断された場合は、同一文字の整形を行う。また、前記切り出された複数の文字列のうち、第1の文字列の品詞情報を判断し、品詞情報として登録されていないと判断された場合は、前記第1の文字列から重複する同一の文字を一つにまとめる。前記同一文字の整形後の内容及び前記重複する同一の文字を一つにまとめた後の内容は出力される。
【0010】
【発明の実施の形態】
本発明をその一実施形態に基づいて具体的に説明する。本実施形態では、形態素解析結果を利用して重複文字の除去を行う。本実施形態では、米国マイクロソフト社のWord2000(登録商標)上で、"「武士ゼロフウウCadrCdr(カダアクダア)」を開発、4月13日より発売"といった文字列の"「武士ゼロフウウCadrCdr(カダアクダア)」を開発"を影文字とした場合、別のファイル形式に変換した文書からは"「「武武士士ゼゼロロフフウウウウCCaaddrrCCddrr((カカダダアアククダダアア))」」をを開開発発"といった文字列が抽出されたときにおける重複文字の除去について説明する。
【0011】
図1は、本発明に関わる言語処理システムの概略構成を示す機能ブロック図である。この言語処理システムは、文章記憶手段1、単語記憶手段2、接続関係記憶手段3、文章解析手段4、解析結果記憶手段5、重複文字除去手段6、整形文字列記憶手段7から構成されている。
【0012】
文章記憶手段1には、言語処理の対象となる日本語文章が格納されている。単語記憶手段2は、単語とその属性情報を登録した日本語辞書である。各単語の属性情報には、品詞情報などが含まれている。接続関係記憶手段3には、単語間の接続の可否を示す接続情報が格納されている。文章解析手段4は、単語記憶手段2と接続関係記憶手段3を検索して文章記憶手段1に記憶された文章を単語単位に文章解析する。解析結果記憶手段5は、前記文章解析手段4で単語単位に解析された結果を記憶する。重複文字除去手段6は、解析結果記憶手段5の結果を調べ、整形文字列を整形文字列記憶手段7に格納する。整形文字列記憶手段7には整形文字列が格納される。
【0013】
上記言語処理システムにおいて、入力文中に同一文字が重複して出現する場合の処理手順を図2のフローチャートならびに図3から図7に基づいて説明する。図2において文章解析手段4は文章記憶手段1に記憶されている文章を取り出す操作を試み(ステップ101)、文章があるかどうかを判断する(ステップ102)。ここで、文章がないときは処理を終了し、文章があるときは、その中から1文を読み込む(ステップ103)。以下の処理では、この1文全体が処理の単位となる。ここでは、具体例として"「「武武士士ゼゼロロフフウウウウCCaaddrrCCddrr((カカダダアアククダダアア))」」をを開開発発"という文が読み込まれたものとする。
【0014】
文章解析手段4は、単語記憶手段2の日本語辞書を用いて入力文を文頭から文末まで単語検索する(ステップ105)。単語記憶手段2の内容の一例を図3に示す。単語検索によって、入力文の各単語(見出し語)に対応する語の情報が読み取られる。続いて、検索された単語が持つ品詞情報と、接続関係記憶手段3の接続情報とに基づいて単語間の接続関係をチェックする(ステップ106)。接続関係記憶手段3の内容の一例を図4に示す。図4において、単語間の接続の可否を示す接続情報としては、接続が可能である組み合わせには1という値が付けられ、接続できない組み合わせには0という値が付けられている。
【0015】
文章解析手段4は、これらの情報を用いて、文節数最少法により文章解析を行う(ステップ107)。文節数最少法とは、接続可能であった単語の内文節数が最少のものを結果として出力する文章解析方法である。なお、文章解析には最長一致法やコスト最少法を用いてもよい。この結果、"「/「/武/武士/士/ゼゼロロフフウウウウ/CCaaddrrCCddrr/(/(/カカダダアアククダダアア/)/)/」/」/を/を/開/開発/発"という単語列が切り出される。次に、文章解析手段4は、切り出した単語の表記、品詞、位置情報を解析結果記憶手段5に格納する(ステップ108)。解析結果記憶手段5格納された情報を図5に示す。図5に示すように、本来辞書に登録されている単語情報が正しく、切り出されない。
【0016】
次に、重複文字除去手段6は、重複文字の除去を実行する(ステップ200)。ステップ200の重複文字の除去のフローチャートを図6に示す。ここで、解析結果記憶手段5の中の単語No.を保持する変数としてiを、入力文の末尾の位置の値を保持する変数としてendを、整形文字列記憶手段7に出力した文字数を保持する変数としてlenを、使用する。
【0017】
重複文字除去手段6は、iとlenに0をセットする(ステップ201)。重複文字除去手段6は、lenの値がend以上になったかどうかを判定する(ステップ202)。判定結果がYesの場合、重複除去の処理を終了する(図2のステップ300へ戻る)。判定結果がNoの場合、ステップ210に処理を進める。ステップ210において、重複文字除去手段6は、i番目の単語の表記は1文字かどうかを判定する。判定結果が、Yesの場合、処理をステップ220に進め、Noの場合には、処理をステップ230に進める。
【0018】
ステップ220において、重複文字除去手段6は、i番目の単語の表記とi+1番目の単語の表記の先頭文字は同じかどうかを判定する。判定結果が、Yesの場合、処理をステップ240に進め、Noの場合には、処理をステップ270に進める。
【0019】
ステップ240において、重複文字除去手段6は、i+1番目の単語の表記を整形文字列記憶手段7に格納する。そして、ステップ241で、i+1番目の単語の表記の長さをlenに足し、iに1を足し、処理をステップ270に進める。
【0020】
ステップ230において、重複文字除去手段6は、i番目の単語の品詞は未登録語かどうかを判定する。判定結果が、Yesの場合、処理をステップ250に進め、Noの場合には処理をステップ260に進める。ステップ250において、重複文字除去手段6は、i番目の単語の表記から連続する文字が同一のもの(重複文字)を1つにまとめる。例えば、"ゼゼロロフフウウウウ"は"ゼロフウウ"にまとめられる。ステップ251において、重複文字を除いた文字列を整形文字列記憶手段7に格納する。そして、ステップ252において重複文字を除いた文字列の長さをlenに足し、処理をステップ270に進める。
【0021】
ステップ260において、重複文字除去手段6は、i番目の単語の表記を整形文字列記憶手段7に格納する。そして、ステップ261でi番目の形態素の表記の長さをlenに足し、処理を270に進める。ステップ270において重複文字除去手段6は、iに1を足し、処理をステップ202に進める。
【0022】
以上のように重複文字の除去が実行されると、図2のステップ300にて、文章解析手段4は、整形文字列記憶手段7の内容を図示しない記憶手段または記憶装置に出力し(ステップ300)、ステップ102の処理を行う。
【0023】
本実施の形態では、ステップ200の結果、整形文字列記憶手段7の内容は、"「武士ゼロフウウCadrCdr(カダアクダア)」を開発"となり、整形文字列記憶手段7に格納される。
【0024】
次に、本発明の第2の実施形態について具体的に説明する。第2の実施形態では、形態素解析結果を利用して重複文字の除去を行った後、再解析を行う。第2の実施形態では、米国マイクロソフト社のWord2000(登録商標)上で、"「武士ゼロフウウCadrCdr(カダアクダア)」を開発、4月13日より発売"といった文字列の"「武士ゼロフウウCadrCdr(カダアクダア)」を開発"を影文字とした場合、別のファイル形式に変換した文書からは"「「武武士士ゼゼロロフフウウウウCCaaddrrCCddrr((カカダダアアククダダアア))」」をを開開発発"といった文字列が抽出されたときにおける重複文字の除去後、再解析を行うことについて説明する。
【0025】
第2の実施形態は、図9に示すように、文章記憶手段91、単語記憶手段92、接続関係記憶手段93、文章解析手段94、解析結果記憶手段95、重複文字除去手段96、再解析文字列記憶手段97から構成されている。文章記憶手段91、単語記憶手段92、接続関係記憶手段93、文章解析手段94、解析結果記憶手段95は第1の実施形態における図1の文章記憶手段1、単語記憶手段2、接続関係記憶手段3、文章解析手段4、解析結果記憶手段5にそれぞれ対応するものである。第1の実施形態と比較して、重複文字除去手段96、再解析文字列記憶手段97の構成が異なる。重複文字除去手段96は、解析結果記憶手段95の結果を調べ、再解析の対象となる文字列を再解析文字列記憶手段97に格納する。再解析文字列記憶手段97には、文章解析手段94による再解析の対象となる文字列が格納される。
【0026】
次に、上記言語処理システムにおいて、入力文中に同一文字が重複して出現する場合の処理手順を図8と図10のフローチャートならびに図3、図4、図5、図7に基づいて説明する。図8において文章解析手段94は文章記憶手段91に記憶されている文章を取り出す操作を試み(ステップ8101)、文章があるかどうかを判断する(ステップ8102)。ここで、文章がないときは処理を終了し、文章があるときは、その中から1文を読み込む(ステップ8103)。以下の処理では、この1文全体が処理の単位となる。ここでは、具体例として"「「武武士士ゼゼロロフフウウウウCCaaddrrCCddrr((カカダダアアククダダアア))」」をを開開発発"という文が読み込まれたものとする。
【0027】
文章解析手段94は、再解析フラグをOffにする(ステップ8104)。文章解析手段94は、単語記憶手段92の日本語辞書を用いて入力文を文頭から文末まで単語検索する(ステップ8105)。単語記憶手段92の内容の一例を図3に示す。単語検索によって、入力文の各単語(見出し語)に対応する語の情報が読み取られる。続いて、検索された単語が持つ品詞情報と、接続関係記憶手段93の接続情報とに基づいて単語間の接続関係をチェックする(ステップ8106)。接続関係記憶手段93の内容の一例を図4に示す。図4において、単語間の接続の可否を示す接続情報としては、接続が可能である組み合わせには1という値が付けられ、接続できない組み合わせには0という値が付けられている。
【0028】
文章解析手段94は、これらの情報を用いて、接続可能であった単語の内文節数が最少のものを結果として出力する文節数最少法により文章解析を行う(ステップ8107)。なお、文章解析には最長一致法やコスト最少法を用いてもよい。この結果、"「/「/武/武士/士/ゼゼロロフフウウウウ/CCaaddrrCCddrr/(/(/カカダダアアククダダアア/)/)/」/」/を/を/開/開発/発"という単語列が切り出される。次に、文章解析手段94は、切り出した単語の表記、品詞、位置情報を解析結果記憶手段95に格納する(ステップ8108)。解析結果記憶手段95格納された情報を図5に示す。図5に示すように、本来辞書に登録されている単語情報が正しく、切り出されない。
【0029】
次に文章解析手段94は、再解析フラグがOffかどうかを判断する(ステップ8109)。フラグがOnで判定結果がNoの場合は、ステップ8113を実行する。フラグがOffで判定結果がYesであれば、ステップ8200を実行する。
【0030】
ステップ8200の重複文字の除去のフローチャートを図10に示す。ここで、解析結果記憶手段95の中の単語No.を保持する変数としてiを、入力文の末尾の位置の値を保持する変数としてendを、再解析文字列記憶手段97に出力した文字数を保持する変数としてlenを、使用する。
【0031】
重複文字除去手段96は、iとlenに0をセットする(ステップ1201)。重複文字除去手段96は、lenの値がend以上になったかどうかを判定する(ステップ1202)。判定結果がYesの場合、重複除去の処理を終了する(図8のステップ8110へ戻る)。判定結果がNoの場合、ステップ1210に処理を進める。ステップ1210において、重複文字除去手段96は、i番目の単語の表記は1文字かどうかを判定する。判定結果が、Yesの場合、処理をステップ1220に進め、Noの場合には、処理をステップ1230に進める。
【0032】
ステップ1220において、重複文字除去手段96は、i番目の単語の表記とi+1番目の単語の表記の先頭文字は同じかどうかを判定する。判定結果が、Yesの場合、処理をステップ1240に進め、Noの場合には、処理をステップ1270に進める。
【0033】
ステップ1240において、重複文字除去手段96は、i+1番目の単語の表記を再解析文字列記憶手段97に格納する。そして、ステップ1241で、i+1番目の単語の表記の長さをlenに足し、iに1を足し、処理をステップ1270に進める。
【0034】
ステップ1230において、重複文字除去手段96は、i番目の単語の品詞は未登録語かどうかを判定する。判定結果が、Yesの場合、処理をステップ1250に進め、Noの場合には処理をステップ1260に進める。ステップ1250において、重複文字除去手段96は、i番目の単語の表記から連続する文字が同一のもの(重複文字)を1つにまとめる。例えば、"ゼゼロロフフウウウウはゼロフウウ"にまとめられる。ステップ1251において、重複文字を除いた文字列を再解析文字列記憶手段97に格納する。そして、ステップ1252において重複文字を除いた文字列の長さをlenに足し、処理をステップ1270に進める。
【0035】
ステップ1260において、重複文字除去手段96は、i番目の単語の表記を再解析文字列記憶手段97に格納する。そして、ステップ1261でi番目の形態素の表記の長さをlenに足し、処理を1270に進める。ステップ1270において重複文字除去手段96は、iに1を足し、処理をステップ1202に進める。
【0036】
図8の説明に戻り、次に、文章解析手段94は、再解析文字列記憶手段97の内容と入力文の内容を比較する(ステップ8110)。ここで、入力文の内容と再解析文字列記憶手段97の内容が一致する場合、再解析は必要ないのでステップ8113を実行する。一致しない場合、判定結果がNoとなり、文章解析手段94は、再解析フラグをOnにし(ステップ8111)、入力文を再解析文字列とし、解析結果記憶手段95の内容を消去する(ステップ8112)。そして、ステップ8105に進み、入力文字列の再解析を行う。ステップ8105,8106,8107,8108と処理を進め、ステップ8109の判定結果はNoとなるので、文章解析手段94はステップ8113を実行する。
【0037】
ステップ8113にて、文章解析手段94は、解析結果記憶手段95の内容を図示しない記憶手段または記憶装置に出力し、ステップ8102の処理を行う。
【0038】
本実施形態での入力では、ステップ8200の結果、再解析文字列記憶手段97の内容は、"「武士ゼロフウウCadrCdr(カダアクダア)」を開発"となり、ステップ8110の判定結果がNoとなり、ステップ8111、8112、8105、8106、8107、8108と処理した結果、解析結果記憶手段95には、図7に示すような結果が格納されようになる。
【0039】
第2の実施形態においては、第1の実施形態と比較し、重複文字の除去を実施した後に入力文と再解析文字列の内容を比較し、内容が一致しない場合は入力文字の再解析を行う。これにより、精度の高い整形結果が得られる。
【0040】本発明は、上記実施形態に限定されることなく、例えば図8のステップ8113において、文章解析手段4は重複文字除去手段によって変換された文字列も解析結果とともに出力するように構成することも出来る。
【0041】
【発明の効果】
形態素解析の結果を利用して連続する文字を置き換えるため、誤って単語の構成文字を削除しないような連続文字の除去が可能とる。その結果、連続する文字を含むテキストの修正や、修正されたテキストを使った形態素解析結果を得ることができるようになる。
【図面の簡単な説明】
【図1】 第1の実施形態における言語処理システムの概略構成を示す機能ブロック図である。
【図2】 第1の実施形態における言語処理システムの処理手順を示すフローチャートである。
【図3】 単語記憶手段の内容を示す説明図である。
【図4】 接続関係記憶手段の内容を示す説明図である。
【図5】 初回の解析の結果、解析結果記憶手段に格納された情報を示す説明図である。
【図6】 第1の実施形態における重複文字除去の処理手順を示すフローチャートである。
【図7】 再解析の結果、解析結果記憶手段に格納された情報を示す説明図である。
【図8】 第2の実施形態における言語処理システムの処理手順を示すフローチャートである。
【図9】 第2の実施形態における言語処理システムの概略構成を示す機能ブロック図である。
【図10】 第2の実施形態における重複文字除去の処理手順を示すフローチャートである。
【符号の説明】
1 文章記憶手段
2 単語記憶手段
3 接続関係記憶手段
4 文章解析手段
5 解析結果記憶手段
6 重複文字除去手段
7 整形文字列記憶手段
91 文章記憶手段
92 単語記憶手段
93 接続関係記憶手段
94 文章解析手段
95 解析結果記憶手段
96 重複文字除去手段
97 再解析文字列記憶手段[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a technique for formatting text, and in particular, removes typographical errors in a portion of a sentence that is subject to linguistic processing and performs linguistic processing such as search and summarization after recovering to a normal sentence. Regarding technology.
[0002]
[Prior art]
With the improvement of the performance of computer technology, various language processing technologies have been proposed so far. As a technique of these techniques, there is a case of using a morpheme analysis technique in which a sentence to be subjected to language processing is divided into words and analyzed. However, when a sentence to be subjected to language processing includes an erroneous character, the character is processed as an unregistered word when performing morphological analysis, and a correct result cannot be obtained. For example, if the original application had a character modification such as a shadow character at the point you want to emphasize, converting this application to another format data and extracting the text data will result in the character modification part of the character being It was sometimes extracted with overlapping. As an example, if a bold word is used to emphasize a specific word, such as “Aoi”, in Microsoft Word 2000 (registered trademark) in the United States, it is converted into Adobe Systems PDF (Portable Document Format) format. However, in text extracted from a PDF (Portable Document Format) file using the text selection of Acrobat Reader, continuous characters such as “Oh,” may be extracted. Therefore, as a technique for correcting erroneous characters, a spell checker or a method of simply replacing consecutive characters with one character has been proposed.
[0003]
[Problems to be solved by the invention]
However, in the spell checker, it is difficult to detect misspellings as well as to present correction candidates for the above-mentioned overlapping characters. In addition, when the same character appears continuously, if the consecutive character is simply replaced with one character, the word “Futsu” will become “Future”, and the constituent characters of the original word should be May be deleted. A portion to which a character modification such as a shadow character is applied corresponds to a portion that the author originally considers important. However, in the conventional technique, the intention of the author may not be sufficiently reflected in the result of language processing.
[0004]
The present invention has been invented in order to solve the above-described problems, and has an object to remove a duplicate character that seems to be a typo and shape it into a correct word, and then set it as a language processing target.
[0005]
[Means for Solving the Invention]
In order to achieve the object as described above, a program as a first feature of the present invention is a program that accepts a computer by data accepting means for accepting data of a character string in which the same character appears repeatedly, and the accepting means. Sentence analyzing means for cutting the character string into a plurality of character strings based on word information and part-of-speech information, and the first character string is one character among the plurality of character strings cut out by the sentence analyzing means If the first character string is determined to be one character by the one character determining unit and the one character determining unit, the character string is cut out next to the first character string and the first character string. The same character determining means for determining whether or not the first character of the read character string is the same, and a character shaper for shaping the same character when the same character determining means determines that the same character is the same character If the first character string is determined not to be one character by the one-character determining means, the part-of-speech information determining means for determining the part-of-speech information of the first character string and the part-of-speech information determining means When it is determined that one character string is not registered as part-of-speech information, there is provided a duplicate character removing unit that collects duplicate identical characters from the first character string.
[0006]
Further, a program as a second feature of the present invention is a program for receiving data of a character string in which the same character appears repeatedly, and the character string received by the receiving means as word information. Sentence analysis means for cutting out into a plurality of character strings based on part-of-speech information, and one-character determination means for judging whether or not the first character string is one character among the plurality of character strings cut out by the sentence analysis means When the one character determining means determines that the first character string is one character, the first character string and the first character of the character string cut out next to the first character string are The same character judging means for judging whether or not they are the same, and the character shaping means for shaping the same character when the same character judging means judges that they are the same character.
[0007]
According to a third aspect of the present invention, there is provided a program for causing a computer to receive data of a character string in which the same character appears repeatedly, and to accept the character string received by the receiving unit as word information. Sentence analysis means for cutting out into a plurality of character strings based on part of speech information; part of speech information determination means for determining part of speech information of a first character string among the plurality of character strings cut out by the sentence analysis means; When the part of speech information judging means judges that the first character string is not registered as part of speech information, the part of speech information judging means has a duplicate character removing means for collecting the same characters duplicated from the first character string into one. It is characterized by.
[0008]
According to a fourth aspect of the present invention, there is provided a program that includes a shaped character string output unit that outputs a character string shaped by the character shaping unit, and outputs a character string from which duplicate characters have been removed by the duplicate character removal unit. And output means for removing duplicate characters.
[0009]
The program of the present invention having such various characteristics has the same characteristics in the apparatus of the present invention. The method of the present invention has similar characteristics. That is, data of a character string in which the same character appears repeatedly is received, and the character string is cut into a plurality of character strings based on word information and part-of-speech information. In addition, it is determined whether or not the first character string is one character among the plurality of character strings cut out. If it is determined that the first character string is one character, the first character string and the first character string are determined. It is determined whether or not the first character of the character string cut out after the character string is the same. If it is determined that the character is the same, the same character is shaped. If the part-of-speech information of the first character string is determined from the plurality of extracted character strings and it is determined that the part-of-speech information is not registered as the part-of-speech information, the same overlapping character string from the first character string Combine characters into one. The content after shaping the same character and the content after combining the same identical characters are output.
[0010]
DETAILED DESCRIPTION OF THE INVENTION
The present invention will be specifically described based on an embodiment thereof. In the present embodiment, duplicate characters are removed using the morphological analysis results. In this embodiment, on the Word 2000 (registered trademark) of Microsoft Corporation in the United States, the character string “Bushi Zero Fu CadrCdr (Kada Akdaa)” is developed, which is “Developed Samurai Zero Fu CadrCdr (Kada Akdaa)”. When "development" is used as a shadow character, a character such as "" Buy warrior ZEROROFUFUUU CCaaddrrCCddrr ((Kakadada Akakudadaaa)) "developed and developed from a document converted to another file format" The removal of duplicate characters when a column is extracted will be described.
[0011]
FIG. 1 is a functional block diagram showing a schematic configuration of a language processing system according to the present invention. This language processing system is composed of a sentence storage means 1, a word storage means 2, a connection relation storage means 3, a sentence analysis means 4, an analysis result storage means 5, a duplicate character removal means 6, and a shaped character string storage means 7. .
[0012]
The sentence storage means 1 stores Japanese sentences that are subject to language processing. The word storage means 2 is a Japanese dictionary in which words and their attribute information are registered. The attribute information of each word includes part-of-speech information. The connection relationship storage means 3 stores connection information indicating whether or not a connection between words is possible. The
[0013]
In the language processing system described above, a processing procedure when the same character appears in the input sentence will be described with reference to the flowchart of FIG. 2 and FIGS. 3 to 7. In FIG. 2, the
[0014]
The
[0015]
The sentence analysis means 4 analyzes the sentence by using this information by the phrase number minimum method (step 107). The phrase number minimization method is a sentence analysis method that outputs a word having the smallest number of internal phrases that can be connected as a result. For sentence analysis, the longest match method or the least cost method may be used. As a result, """/" / Takeshi / Samurai / Toshi / Zezerolofufuuou / CCaaddrrCCddrr / (/ (/ Kakadada Akukuda Aaa /) /) / "/" / "/" / Open / Development / Departure " Next, the
[0016]
Next, the duplicated
[0017]
The duplicate character removing means 6
[0018]
In
[0019]
In step 240, the duplicate
[0020]
In
[0021]
In
[0022]
When the removal of duplicate characters is executed as described above, in
[0023]
In the present embodiment, as a result of
[0024]
Next, the second embodiment of the present invention will be specifically described. In the second embodiment, re-analysis is performed after removing duplicate characters using the morphological analysis result. In the second embodiment, on the Word 2000 (registered trademark) of Microsoft Corporation in the United States, the character string "" Samurai Zero Fu CadrCdr (Kada Akda) "is developed and released from April 13th. Developed """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" On """""""""""""""""""""""""""" V "" A description will be given of performing reanalysis after the removal of duplicate characters when such a character string is extracted.
[0025]
In the second embodiment, as shown in FIG. 9, sentence storage means 91, word storage means 92, connection relation storage means 93, sentence analysis means 94, analysis result storage means 95, duplicate character removal means 96, reanalysis characters It consists of column storage means 97. The sentence storage means 91, the word storage means 92, the connection relation storage means 93, the sentence analysis means 94, and the analysis result storage means 95 are the sentence storage means 1, the word storage means 2, the connection relation storage means of FIG. 1 in the first embodiment. 3, corresponding to the sentence analysis means 4 and the analysis result storage means 5, respectively. Compared with the first embodiment, the configurations of the duplicate
[0026]
Next, in the language processing system, a processing procedure in the case where the same character appears repeatedly in the input sentence will be described with reference to the flowcharts of FIGS. 8 and 10 and FIGS. 3, 4, 5, and 7. FIG. In FIG. 8, the sentence analysis means 94 tries to take out the sentence stored in the sentence storage means 91 (step 8101), and determines whether there is a sentence (step 8102). If there is no sentence, the process is terminated. If there is a sentence, one sentence is read from the sentence (step 8103). In the following processing, this entire sentence is the unit of processing. Here, as a specific example, it is assumed that a sentence ““ development and development of ““ Samurai warrior Zezerofufuuou CCaaddrrCCddrr () ”” ”is read.
[0027]
The sentence analysis means 94 sets the reanalysis flag to Off (step 8104). The sentence analysis means 94 searches the input sentence from the beginning to the end of the sentence using the Japanese dictionary of the word storage means 92 (step 8105). An example of the contents of the word storage means 92 is shown in FIG. By word search, word information corresponding to each word (entry word) of the input sentence is read. Subsequently, the connection relation between words is checked based on the part of speech information of the searched word and the connection information in the connection relation storage means 93 (step 8106). An example of the contents of the connection relation storage means 93 is shown in FIG. In FIG. 4, as connection information indicating whether or not connection between words is possible, a value of 1 is assigned to a combination that can be connected, and a value of 0 is assigned to a combination that cannot be connected.
[0028]
Using this information, the
[0029]
Next, the sentence analysis means 94 determines whether or not the reanalysis flag is Off (step 8109). If the flag is On and the determination result is No,
[0030]
FIG. 10 shows a flowchart of the removal of duplicate characters in
[0031]
The duplicate
[0032]
In
[0033]
In step 1240, the duplicate
[0034]
In
[0035]
In
[0036]
Returning to the description of FIG. 8, the
[0037]
In
[0038]
In the input in the present embodiment, as a result of
[0039]
In the second embodiment, compared with the first embodiment, after removing duplicate characters, compare the contents of the input sentence and the re-analyzed character string, and if the contents do not match, re-analyze the input characters. Do. Thereby, a highly accurate shaping result is obtained.
The present invention is not limited to the above embodiment. For example, in
[0041]
【The invention's effect】
Since consecutive characters are replaced using the result of morphological analysis, it is possible to remove consecutive characters so as not to accidentally delete the constituent characters of the word. As a result, it becomes possible to correct a text including continuous characters and obtain a morphological analysis result using the corrected text.
[Brief description of the drawings]
FIG. 1 is a functional block diagram illustrating a schematic configuration of a language processing system according to a first embodiment.
FIG. 2 is a flowchart showing a processing procedure of the language processing system in the first embodiment.
FIG. 3 is an explanatory diagram showing the contents of word storage means.
FIG. 4 is an explanatory diagram showing the contents of a connection relationship storage unit.
FIG. 5 is an explanatory diagram showing information stored in an analysis result storage unit as a result of the first analysis.
FIG. 6 is a flowchart showing a processing procedure of duplicate character removal in the first embodiment.
FIG. 7 is an explanatory diagram showing information stored in an analysis result storage unit as a result of reanalysis.
FIG. 8 is a flowchart showing a processing procedure of the language processing system in the second embodiment.
FIG. 9 is a functional block diagram showing a schematic configuration of a language processing system in a second embodiment.
FIG. 10 is a flowchart showing a duplicate character removal processing procedure in the second embodiment;
[Explanation of symbols]
1 sentence storage means 2 word storage means 3 connection relation storage means 4 sentence analysis means 5 analysis result storage means 6 duplicate character removal means 7 shaped character string storage means 91 sentence storage means 92 word storage means 93 connection relation storage means 94 sentence analysis means 95 Analysis result storage means 96 Duplicate character removal means 97 Reanalysis character string storage means
Claims (14)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002019038A JP3932912B2 (en) | 2002-01-28 | 2002-01-28 | Character string shaping device, method and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002019038A JP3932912B2 (en) | 2002-01-28 | 2002-01-28 | Character string shaping device, method and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2003223441A JP2003223441A (en) | 2003-08-08 |
| JP3932912B2 true JP3932912B2 (en) | 2007-06-20 |
Family
ID=27743107
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002019038A Expired - Fee Related JP3932912B2 (en) | 2002-01-28 | 2002-01-28 | Character string shaping device, method and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3932912B2 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4591947B2 (en) * | 2004-05-13 | 2010-12-01 | 日本電信電話株式会社 | Information filtering apparatus and method |
| JP5203324B2 (en) * | 2009-09-16 | 2013-06-05 | 日本電信電話株式会社 | Text analysis apparatus, method and program for typographical error |
| JP2019197321A (en) * | 2018-05-08 | 2019-11-14 | 京セラドキュメントソリューションズ株式会社 | Image processing apparatus and image forming apparatus |
| CN114330302B (en) * | 2021-11-09 | 2025-09-12 | 腾讯科技(深圳)有限公司 | Sentence recognition method and device, storage medium and electronic device |
-
2002
- 2002-01-28 JP JP2002019038A patent/JP3932912B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2003223441A (en) | 2003-08-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN100440150C (en) | Machine translation system based on examples | |
| KR100912502B1 (en) | Automatic translation method for PDF files | |
| US7092871B2 (en) | Tokenizer for a natural language processing system | |
| CN111753531A (en) | Text error correction method and device based on artificial intelligence, computer equipment and storage medium | |
| KR100999488B1 (en) | Method and apparatus for detecting document plagiarism | |
| JPH09198409A (en) | Similar document extraction method | |
| Liyanapathirana et al. | Sinspell: A comprehensive spelling checker for sinhala | |
| US20040193399A1 (en) | System and method for word analysis | |
| JP3932912B2 (en) | Character string shaping device, method and program | |
| JP2000089786A (en) | Method and apparatus for correcting speech recognition result | |
| JP3080066B2 (en) | Character recognition device, method and storage medium | |
| KR0123238B1 (en) | Morphemes analysis system | |
| JPH1185756A (en) | Translation device and medium storing translation device control program | |
| JPH10232863A (en) | Kana-kanji conversion device and method, and recording medium | |
| JPH11338863A (en) | Unknown noun and katakana spelling automatic collection / authorization device, and recording medium recording processing procedure for it | |
| EP0469485B1 (en) | Language processing system using an expanded LR parser | |
| JP3907106B2 (en) | Translation rule creation device and program | |
| JP3924260B2 (en) | Clause boundary detection device, machine translation device, and computer program | |
| JPH10240736A (en) | Morphemic analyzing device | |
| JP2002297585A (en) | Splitting method for noun phrase in text in english, creating method and apparatus for syntax information in english | |
| JP2994539B2 (en) | Machine translation equipment | |
| JP2780726B2 (en) | Translation System Recognition Method | |
| Shishibori et al. | Improvement of the LR parsing table and its application to grammatical error correction | |
| JP2995717B2 (en) | Morphological analysis method and its device | |
| JP2560224B2 (en) | Contextual structure analyzer |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20040907 |
|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20050509 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20061017 |
|
| RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20061027 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20061117 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20061205 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070202 |
|
| 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: 20070227 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070312 |
|
| 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: 20110330 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120330 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130330 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |