JP3628565B2 - Dictionary search method, device, and recording medium recording dictionary search program - Google Patents
Dictionary search method, device, and recording medium recording dictionary search program Download PDFInfo
- Publication number
- JP3628565B2 JP3628565B2 JP30413099A JP30413099A JP3628565B2 JP 3628565 B2 JP3628565 B2 JP 3628565B2 JP 30413099 A JP30413099 A JP 30413099A JP 30413099 A JP30413099 A JP 30413099A JP 3628565 B2 JP3628565 B2 JP 3628565B2
- Authority
- JP
- Japan
- Prior art keywords
- word
- search
- dictionary
- words
- list
- 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
Images
Landscapes
- Document Processing Apparatus (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Machine Translation (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は辞書検索方法および装置に関する。
【0002】
【従来の技術】
自然言語を形態素に分割する形態素解析装置は日本語の仮名漢字変換装置や、情報検索装置、機械翻訳システム、音声認識装置などの自然言語処理システムに広く用いられる。
【0003】
日本語や中国語のように単語間に空白などの区切り記号がない言語の形態素解析では、語がどの文字から始まっているかが容易には判定できないため、入力文の部分文字列のうち単語の可能性があるものをすべて列挙することが必要である。また、英語など語間に空白がある言語でも、音声認識の場合には語間の区切りが明らかでないため、やはり語の可能性があるものすべてを列挙する必要がある。
【0004】
長さnの入力文中に含まれる可能性のあるすべての語を得るために、1文字めから始まる長さ1の語、長さ2の語、と順に辞書を検索し、次に2文字めから始まる長さ1の語、長さ2の語、と順に検索する方法がある。この方法でもすべての語が得られるが、この場合、n(n+1)/2回の辞書検索が必要となり、効率的ではなかった。
【0005】
また、高速な辞書構成方法としてはトライ構造(例えば「岩波講座ソフトウエア科学15 自然言語処理」)が知られているが、1文字ごとに木構造をたどる処理が必要なため、それぞれの回の検索の効率があまりよくないという問題があった。
【0006】
【発明が解決しようとする課題】
従来、高速な辞書構成方法として知られているトライ構造では、文字ごとに分岐する木構造で単語を格納する。この構造を用いた辞書検索でも、n回の検索で入力文に含まれている可能性のある単語をすべて得られるが、1文字ごとに木構造をたどる処理が必要なため、それぞれの回の検索の効率があまりよくないという問題があった。
【0007】
本発明の目的は、効率的な検索が可能な辞書検索方法、装置、および辞書検索プログラムを記録した記録媒体を提供することにある。
【0010】
本発明の第1の辞書検索装置は、辞書の各登録語に、その語の先頭部分と完全一致し、かつその語より短い語へのポインタを記載し、さらに、各語に後続語の可能性のある語のリストをあらかじめ与えることにより、最長一致する語を検索するだけで、入力文の先頭部分と一致するすべての語と2文字目から始まる可能性のある語のリストを一度の辞書検索で得られるようにしたものである。
【0011】
本発明の第2の辞書検索装置は、第1の辞書検索装置にさらに、入力文を1文字ずらしながら(先頭の1文字を除きながら)検索するようにしたものである。これにより、入力文長がnの場合、n回以下の辞書検索で、入力文に含まれている可能性のある単語が全て得られる。また、1回の検索を狭い範囲で行うので効率がよい。
【0012】
【発明の実施の形態】
次に、本発明の実施の形態について図面を参照して説明する。
【0013】
図1は本発明の第1の実施形態の辞書検索装置の構成図である。
【0014】
本実施形態の辞書検索装置は、文を入力するための入力装置101と、各登録語に、該語の先頭部分文字列と完全一致し、かつ該語よりも短かい語のうち、最長の語へのポインタが記載されている辞書102と、検索語リスト103と、入力文の先頭部分と完全一致する語を辞書102から検索し、検索した語を検索語リスト103に記憶する処理装置104と、検索語リスト103の内容を出力(表示または印字)する出力装置105で構成されている。
【0015】
図2は処理装置104の処理内容を示すフローチャートである。まず、ステップ201に、入力装置101から文を入力する。次に、ステップ202に、辞書102から入力文と等しいか、入力文より小さい(入力文より前にある)語を検索する。この検索は二分探索などにより行うことができる。ステップ203に、検索された語が入力文の先頭部分と完全に一致するかどうか判定する。完全一致するならば、ステップ208でその語を検索語リスト103に記憶する。完全一致しなければ、ステップ204で辞書102に記載されたポインタをたどり、ステップ205で完全一致するかどうか判定する。完全一致すれば、ステップ208に行く。完全一致しなければ、ステップ204で、次のポインタの語を探索する。ステップ206で、ポインタがなければ、完全一致する語がないことになり、ステップ207で、「該当語なし」を出力装置105に出力する。ステップ208の後、ステップ209で、完全一致した語にポインタが記載されていれば、ポインタをたどり、ステップ210に、完全一致した語と、その語のポインタを順にたどって得られた語を検索語リスト103に記憶する。最後のステップ211で、検索語リスト103の語を出力装置105に出力する。
【0016】
なお、ステップ208はステップ210と一緒にしてもよい。
【0017】
次に、本実施形態の辞書検索装置を日本語の検索に用いた場合で、「くるまでまつ」を検索する場合を例にとって本辞書検索装置の動作を説明する。辞書102には表1の語があったものとする。なお、括弧内の記述は動作の説明のために記載したもので、辞書検索装置の動作には関係がない。
【0018】
【表1】
【0019】
「くるまえび」には「くるま」へのポインタが記載されており、「くるま」には「くる」へのポインタが記載されており、「でし」と「でんたく」には「で」へのポインタが記載されている。
【0020】
「で」は助詞の「で」と助動詞「だ」の連用形の2種類があるが、このような同形語の場合、辞書には1つのエントリのみを設ける。辞書検索終了後に複数の語に展開するのが容易なことは明らかである。
【0021】
まず、ステップ201で「くるまでまつ」が入力され、ステップ202で「くるまでまつ」が検索される。辞書順の比較で(「くるまでまつ」<「で」)で、かつ(「くるまえび」<「くるまでまつ」)であるので、「3:くるまえび」を得る。次に、ステップ203で「くるまでまつ」と「くるまえび」が比較され、「くるまえび」は「くるまでまつ」の先頭部分と完全一致しないので、ステップ204でポインタをたどり、「2:くるま」を得る。ステップ205で「くるまでまつ」と「くるま」を比較し、「くるま」は「くるまでまつ」の先頭部分と完全一致するので、ステップ208で「2:くるま」を検索語リスト103に格納する。ステップ209で「2:くるま」のポインタをたどり、「1:くる」を得、ステップ210で「1:くる」を検索語リスト103に格納する。「1:くる」のポインタには記載がないので、ステップ211に進み、検索語リスト103の「2:くるま」と「1:くる」を出力する。
【0022】
図3は本発明の第2の実施形態の辞書検索装置の構成図である。
【0023】
本実施形態の辞書検索装置は、文を入力するための入力装置301と、各登録語に、該語の先頭部分文字列と完全一致し、かつ該語よりも短かい語のうち、最長の語へのポインタが記載されている辞書302と、検索語リスト303と、入力文の先頭部分と完全一致する語を辞書302から検索し、検索した語を検索語リスト303に記憶し、以降入力文の先頭の1文字ずらした各文について同様の処理を行う処理装置304と、検索語リスト303の内容を出力(表示または印字)する出力装置305で構成されている。
【0024】
図4は処理装置304の処理内容を示すフローチャートである。ステップ401〜410,413の処理は図2中のステップ201〜210,211と同じである。本実施形態では、ステップ410の後、ステップ411で、入力文を1文字ずらし、すなわち先頭の1文字を削除した文についてステップ402以降の処理を、入力文が無くなるまで繰り返す。
【0025】
次に、本実施形態2の辞書検索装置を同様に日本語の検索に用いた場合で、「くるまでまつ」を検索した場合を例にとって本辞書検索装置の動作を説明する。辞書302として第1の実施形態と同じ辞書102を用いる。
【0026】
まず、「くるまでまつ」が入力され、ステップ402で「くるまでまつ」が検索される。以下、第1の実施形態と同様の処理がされて「1:くる」と「2:くるま」の2語が得られ、この2語が検索語リスト303に格納される。ステップ411で入力文「くるまでまつ」を1文字ずらし「るまでまつ」で辞書302を検索する。「るまでまつ」を辞書検索にかけるが、語の候補は得られない。次に、「までまつ」を辞書検索にかけ、「3:まで」の1語が得られ、検索語リスト303に格納される。次に、「でまつ」を辞書検索にかける。この場合、ステップ402の検索では「5:でし」が得られるが、入力文の先頭部分とは完全一致しないのでステップ404で短い語をたどり、「4:で」を得、この語は先頭部分と完全一致するので「4:で」の1語が出力される。したがって、検索語リスト303には「4:で」の1語が格納される。次に、「まつ」を辞書検索にかけ、「7:まつ」の1語が得られ、検索語リスト303に格納される。次に、「つ」を辞書検索にかけるが、語の候補は得られない。
【0027】
結果として、検索語リスト303には、表2の語が得られ、「くるまでまつ」に含まれる可能性のある語がすべて得られている。
【0028】
【表2】
【0029】
図5は本発明の第3の実施形態の辞書検索装置の構成図である。
【0030】
本実施形態の辞書検索装置は、文を入力するための入力装置501と、各登録語に、該語の先頭部分文字列と完全一致し、かつ該語よりも短かい語のうち、最長の語へのポインタと、該語の2文字目以降を先頭に持つ語である可能後続語(FL)が記載されている辞書502と、可能後続語リスト503と、検索語リスト504と、入力文の先頭部分と完全一致する語を辞書502から検索し、検索した語を検索語リスト504に記憶し、また完全一致した語の、辞書502に記載されている可能後続語を可能後続語リスト503に記憶する処理装置505と、検索語リスト504と可能後続語リスト503の内容を出力(表示または印字)する出力装置506で構成されている。
【0031】
図6は処理装置505の処理内容を示すフローチャートである。ステップ601〜607,609,610の処理は図2中のステップ201〜207,209,210と同じである。本実施形態では、ステップ603で完全一致するならば、ステップ608で、辞書502に記載されている、完全一致する語の可能後続語を可能後続語リスト503に格納する。最後のステップ611では、可能後続語リスト503と検索語リスト504に格納された語を全て出力する。
【0032】
なお、ステップ601と602は順序が入れ替ってもよく、またステップ608はステップ610の後でもよい。
【0033】
次に、本実施形態の辞書検索装置を同様に日本語の検索に用いた場合で、「くるまでまつ」を辞書502中の全語から検索した場合を例にとって本辞書検索装置の動作を説明する。辞書502には表3の語があったものとする。なお、括弧内の記述は動作の説明のために記載したもので、辞書検索装置の動作には関係がない。
【0034】
【表3】
【0035】
「くる」の可能後続語としては、「9:るまん」と「10:るもい」が記載されている。これは「くる」の2文字目から始まる語としてはこの2語の可能性があることを示している。「くるま」の可能後続語としては、「9:るまん」のみが記載されている。これは「くるま」の2文字目から始まる語としては「るまん」のみが可能性があることを示している。「くるまえび」の場合には、2文字目から始まる、すなわち「るまえび」で始まる語が辞書502に存在していないため、可能後続語欄には“なし”と記載されている。同様に、「まで」の可能後続語には「4:で」から「6:でんたく」の語が記載されており、その他の語が「まで」の2文字目(で)から始まる可能性がないことを示している。
【0036】
まず、ステップ601で「くるまでまつ」が入力される。ステップ602で第1の実施形態のステップ202と同様の処理で「3:くるまえび」を得、ステップ603〜607で第1の第1の実施形態のステップ203〜207と同様の処理で、「2:くるま」を得る。ステップ608では「2:くるま」に記載されている可能後続語「9:るまん」を可能後続語リスト503に格納する。ステップ609,610では第1の実施形態のステップ209,210と同様の処理で、検索語リスト504に「2:くるま」と「1:くる」の2語を格納する。ステップ611では、検索語として「2:くるま」と「1:くる」の2語を、可能後続語として「9:るまん」を出力装置506に出力する。
【0037】
図7は本発明の第4の実施形態の辞書検索装置の構成図である。
【0038】
本実施形態の辞書検索装置は、文を入力するための入力装置701と、各登録語に、該語の先頭部分文字列と完全一致し、かつ該語よりも短かい語のうち、最長の語へのポインタと、該語の可能後続語(FL)が記載されている辞書702と、可能後続語リスト703と、検索語リスト704と、入力文の先頭部分と完全一致する語を辞書702から検索し、検索した語を検索語リスト704に記憶し、また完全一致した語の、辞書702に記載されている可能後続語を可能後続語リスト703に記憶し、以後入力文を1文字ずらし、すなわち先頭の1文字を順次除いた文について同様の処理を行う処理装置705と、検索語リスト704と可能後続語リスト703の内容を出力(表示または印字)する出力装置706で構成されている。
【0039】
図8は本実施形態の処理装置705の処理内容を示すフローチャートである。図8中、ステップ801、803〜808、810〜812、816の処理は図6中のステップ601、602〜607、608〜610、611と同じである。ステップ802では辞書702の検索範囲を「辞書中の全語」に初期化する。ステップ809で検索語が無かった場合、ステップ813で辞書702の検索範囲を「辞書中の全語」に設定する。ステップ814,815の処理は図4中のステップ411,412と同じである。
【0040】
なお、ステップ801と802の順序が入れ替っていてもよい。
【0041】
次に、同様に、本実施形態の辞書検索装置を日本語の検索に用いた場合で、「くるまでまつ」を検索した場合を例にとって本辞書検索装置の動作を説明する。辞書702として第3の実施形態と同じ辞書502を用いる。
【0042】
まず、ステップ801で「くるまでまつ」が入力され、ステップ802で検索範囲は「辞書中の全語」、すなわち(1〜10)と初期化される。ステップ803で「くるまでまつ」が検索範囲の中から検索される。検索によって前記実施形態と同様の処理をして「1:くる」と「2:くるま」の2語と可能後続語リスト(9〜9)が得られる。ステップ810で(9〜9)を可能後続語リスト703に格納する。ステップ812で「1:くる」と「2:くるま」の2語を検索語リスト704に格納する。
【0043】
次に、ステップ814で入力文を1文字ずらし、「るまでまつ」を与える。ステップ803では、「るまでまつ」を範囲(9〜9)から検索する。この場合、「るまん」は「るまでまつ」の先頭部分と完全一致しないので、語の候補が得られないことが、辞書全体から検索するよりも狭い検索範囲で判明する。検索語がなかったのでステップ813で検索範囲を「辞書中の全語」に設定する。
【0044】
次に、「までまつ」を辞書検索にかけ、「辞書中の全語」から検索する。その結果「8:まで」の1語が得られ、検索語リスト704に格納される。次に、「でまつ」を検索する。同様に、「4:で」から「6:でんたく」の範囲から検索し、「4:で」の1語が検索され検索語リスト704に格納される。
【0045】
次に、「まつ」を辞書検索にかけ、「4:で」の可能後続語(1〜10)のすべてから検索し、「7:まつ」の1語が得られ、検索語リスト704に格納される。
【0046】
「7:まつ」の可能後続語は“なし”と記載されているため、ステップ803で「つ」から始まる語は存在しないことを即座に判定し、語の候補は得られない。
【0047】
結果として、第2の実施形態と同様に表2の検索結果リストが得られ、「くるまでまつ」に含まれる可能性のある語がすべて得られている。
【0048】
図9は第1の実施形態の辞書検索装置をパソコン等のコンピュータで実施する場合の構成図である。
【0049】
入力装置901は入力装置101に対応し、キーボード等である。記憶装置902,903はそれぞれ辞書102、検索語リスト103に相当する。記憶装置904はハードディスクである。出力装置905は出力装置105に相当し、プリンタ、ディスプレイ等である。記録媒体906は処理装置104の処理(図2)を辞書検索プログラムとして記録した、フロッピィ・ディスク、CD−ROM、光磁気ディスク等の記録媒体である。データ処理装置907は記録媒体906から辞書検索プログラムを読み込んで、これを実行するCPUである。
【0050】
なお、第2、第3、第4の実施形態の辞書検索装置も同様に、パソコン等のコンピュータ上で実施することができる。
【0051】
【発明の効果】
以上説明したように、本発明によれば、下記のような効果がある。
【0052】
請求項1の発明では、各文字から始まる語の検索の際に自動的に後続語の可能 性の範囲が絞られるため、2文字目以降の辞書検索でより効率的な辞書検索が 実現できる。請求項2の発明によって、さらに高速な形態素解析が実現できる 。
【図面の簡単な説明】
【図1】本発明の第1の実施形態の辞書検索装置の構成図である。
【図2】第1の実施形態の処理の流れを示すフローチャートである。
【図3】本発明の第2の実施形態の辞書検索装置の構成図である。
【図4】第2の実施形態の処理の流れを示すフローチャートである。
【図5】本発明の第3の実施形態の辞書検索装置の構成図である。
【図6】第3の実施形態の処理の流れを示すフローチャートである。
【図7】本発明の第4の実施形態の辞書検索装置の構成図である。
【図8】第4の実施形態の処理の流れを示すフローチャートである。
【図9】第1の実施形態の辞書検索装置をパソコン等のコンピュータ上で実施する場合の構成図である。
【符号の説明】
101,301,501,701 入力装置
102,302,502,702 辞書
103,303,504,704 検索語リスト
104,304,505,705 処理装置
105,305,506,706 出力装置
503,703 可能後続語リスト
201〜211,401〜413,601〜611,801〜816 ステップ
901 入力装置
902,903,904 記憶装置
905 出力装置
906 記録媒体
907 データ処理装置[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a dictionary search method and apparatus.
[0002]
[Prior art]
Morphological analyzers that divide natural language into morphemes are widely used in natural language processing systems such as Japanese Kana-Kanji conversion devices, information retrieval devices, machine translation systems, and speech recognition devices.
[0003]
In morphological analysis of languages such as Japanese and Chinese that do not have a separator such as a space between words, it is not easy to determine which character a word starts. It is necessary to list all that are possible. Even in languages such as English where there is a space between words, in the case of speech recognition, it is not clear how words are separated, so it is necessary to list all possible words.
[0004]
To get all the words that may be included in an input sentence of length n, search the dictionary in order, starting with the first character and having a length of 1 and then a length of 2, then the second character There is a method of searching in order of a word having a length of 1 and a word having a length of 2 starting from. This method can also obtain all the words, but in this case, n (n + 1) / 2 dictionary searches are required, which is not efficient.
[0005]
As a high-speed dictionary construction method, a trie structure (for example, “Iwanami Course Software Science 15 Natural Language Processing”) is known. However, each character requires processing to follow a tree structure. There was a problem that the search efficiency was not so good.
[0006]
[Problems to be solved by the invention]
Conventionally, a trie structure known as a fast dictionary construction method stores words in a tree structure that branches for each character. Even in a dictionary search using this structure, all the words that may be included in the input sentence can be obtained by n searches. However, since it is necessary to process the tree structure for each character, There was a problem that the search efficiency was not so good.
[0007]
An object of the present invention is to provide a dictionary search method and apparatus capable of efficient search, and a recording medium on which a dictionary search program is recorded.
[0010]
The first dictionary search device of the present invention describes, for each registered word in the dictionary, a pointer to a word that completely matches the head part of the word and is shorter than that word, and that each word can be a subsequent word. By giving a list of possible words in advance , simply searching for the longest matching word, all the words that match the beginning of the input sentence and a list of words that may start from the second letter are stored in a single dictionary It can be obtained by searching.
[0011]
The second dictionary search device of the present invention is such that the first dictionary search device further searches the input sentence while shifting the input sentence by one character (excluding the first character). Thereby, when the input sentence length is n, all the words that may be included in the input sentence are obtained by dictionary search n times or less. Moreover, since a single search is performed within a narrow range, the efficiency is high.
[0012]
DETAILED DESCRIPTION OF THE INVENTION
Next, embodiments of the present invention will be described with reference to the drawings.
[0013]
FIG. 1 is a block diagram of the dictionary search apparatus according to the first embodiment of the present invention.
[0014]
The dictionary search apparatus according to the present embodiment includes an
[0015]
FIG. 2 is a flowchart showing the processing contents of the
[0016]
[0017]
Next, the operation of the dictionary search device will be described taking as an example the case where the dictionary search device of the present embodiment is used for searching Japanese and searching for “Katsuru Matsuri”. It is assumed that the
[0018]
[Table 1]
[0019]
“Kuruma shrimp” has a pointer to “car”, “car” has a pointer to “car”, and “de” and “den-taku” have “de” Pointer to is described.
[0020]
There are two types of “de”, the consecutive form of the particle “de” and the auxiliary verb “da”. In the case of such an isomorphic word, only one entry is provided in the dictionary. It is clear that it is easy to expand to a plurality of words after the dictionary search is completed.
[0021]
First, “until it comes” is input in
[0022]
FIG. 3 is a block diagram of the dictionary search apparatus according to the second embodiment of the present invention.
[0023]
The dictionary search apparatus according to the present embodiment includes an
[0024]
FIG. 4 is a flowchart showing the processing contents of the
[0025]
Next, the operation of the dictionary search apparatus will be described taking as an example the case where the dictionary search apparatus of the second embodiment is similarly used for searching Japanese and a search for “Katsuru Matsuri” is performed. As the
[0026]
First, “Matsuru” is input, and “Matsuru” is searched in
[0027]
As a result, the words in Table 2 are obtained in the
[0028]
[Table 2]
[0029]
FIG. 5 is a block diagram of the dictionary search apparatus according to the third embodiment of the present invention.
[0030]
The dictionary search apparatus according to the present embodiment includes an
[0031]
FIG. 6 is a flowchart showing the processing contents of the
[0032]
Note that the order of
[0033]
Next, the operation of the dictionary search apparatus will be described by taking, as an example, the case where the dictionary search apparatus according to the present embodiment is used for searching Japanese in the same manner, and “Katsuru Matsuri” is searched from all words in the
[0034]
[Table 3]
[0035]
As possible subsequent words of “Kuru”, “9: Rumun” and “10: Rumoi” are described. This indicates that there is a possibility that these two words are words that start from the second letter of “Kuru”. As a possible successor of “car”, only “9: Rum” is described. This indicates that there is a possibility that only “Ruman” is a word starting from the second letter of “Kuruma”. In the case of “Kuruma Ebi”, since there is no word starting from the second character, that is, “Ruma Ebi” in the
[0036]
First, in
[0037]
FIG. 7 is a block diagram of the dictionary search apparatus according to the fourth embodiment of the present invention.
[0038]
The dictionary search apparatus according to the present embodiment includes an
[0039]
FIG. 8 is a flowchart showing the processing contents of the
[0040]
Note that the order of
[0041]
Next, similarly, the operation of the dictionary search apparatus will be described taking as an example the case where the dictionary search apparatus according to the present embodiment is used for Japanese search and “Katsuru Matsuri” is searched. As the
[0042]
First, in
[0043]
Next, in step 814, the input sentence is shifted by one character to give "Rutama Matsu". In
[0044]
Next, “Matsumatsu” is searched for a dictionary, and “all words in the dictionary” are searched. As a result, one word “up to 8:” is obtained and stored in the
[0045]
Next, “Matsu” is subjected to a dictionary search, and a search is performed from all possible succeeding words (1 to 10) “4: de”, and one word “7: Matsu” is obtained and stored in the
[0046]
Since the possible successor of “7: matsu” is described as “none”, it is immediately determined in
[0047]
As a result, the search result list of Table 2 is obtained in the same manner as in the second embodiment, and all of the words that may be included in the “until the car” are obtained.
[0048]
FIG. 9 is a configuration diagram when the dictionary search apparatus of the first embodiment is implemented by a computer such as a personal computer.
[0049]
The
[0050]
Similarly, the dictionary search apparatus of the second, third, and fourth embodiments can be implemented on a computer such as a personal computer.
[0051]
【The invention's effect】
As described above, the present invention has the following effects.
[0052]
In the invention of
[Brief description of the drawings]
FIG. 1 is a configuration diagram of a dictionary search apparatus according to a first embodiment of this invention.
FIG. 2 is a flowchart showing a flow of processing of the first embodiment.
FIG. 3 is a configuration diagram of a dictionary search apparatus according to a second embodiment of this invention.
FIG. 4 is a flowchart showing a processing flow of the second embodiment.
FIG. 5 is a configuration diagram of a dictionary search apparatus according to a third embodiment of the present invention.
FIG. 6 is a flowchart illustrating a processing flow of the third embodiment.
FIG. 7 is a block diagram of a dictionary search apparatus according to a fourth embodiment of the present invention.
FIG. 8 is a flowchart showing the flow of processing of the fourth embodiment.
FIG. 9 is a configuration diagram when the dictionary search apparatus according to the first embodiment is implemented on a computer such as a personal computer.
[Explanation of symbols]
101, 301, 501, 701
Claims (5)
前記入力装置から前記処理装置に文を入力するステップと、
前記処理装置が、各登録語に、該語の先頭部分文字列と完全一致し、かつ該語よりも短かい語のうち、最長の語へのポインタと、該語の2文字目以降を先頭に持つ語である可能後続語が記載されている辞書から前記入力文と等しいか、前記入力文より小さい語を検索するステップと、
前記処理装置が、検索語が前記入力文の先頭部分と完全一致するかどうか判定するステップと、
前記処理装置が、完全一致していなければ、完全一致する語が見つかるまでポインタを順にたどるステップと、
前記処理装置が、完全一致した語の、前記辞書に記載されている可能後続語を可能後続語リストに記憶するステップと、
前記処理装置が、完全一致した語にポインタが記載されていれば、その語のポインタを順にたどるステップと、
前記処理装置が、完全一致した語と、その語のポインタを順にたどって得られた語を検索語リストに記憶するステップと、
前記処理装置が、前記検索語リストと前記可能後続語リストを前記出力装置に出力するステップを有する辞書検索方法。 A dictionary search method performed by a dictionary search device having an input device, a processing device, and an output device,
Inputting a sentence from the input device to the processing device ;
The processing device , for each registered word, completely matches the first partial character string of the word and has a pointer to the longest word among words shorter than the word and the second and subsequent characters of the word Searching for a word that is equal to or smaller than the input sentence from a dictionary that describes possible subsequent words that are in
The processor determines whether a search term exactly matches the beginning of the input sentence;
If the processing unit does not match exactly, stepping the pointer in order until an exact match is found;
The processing unit storing in the possible successor list a possible successor word of the exact match word described in the dictionary;
If the processing device has a pointer written to a completely matched word, the step of following the pointer of the word in order;
The processing device stores in the search word list a word that is completely matched and a word obtained by sequentially tracing the pointer of the word;
A dictionary search method , comprising: the processing device outputting the search word list and the possible subsequent word list to the output device .
前記処理装置が、前記入力装置から前記処理装置に文を入力するステップと、
前記処理装置が、各登録語に、該語の先頭部分文字列と完全一致し、かつ該語よりも短かい語のうち、最長の語へのポインタと、該語の2文字目以降を先頭に持つ語である可能後続語が記載されている辞書の検索範囲を辞書中の全語に初期化するステップと、
前記処理装置が、前記辞書から前記検索範囲の、前記入力文と等しいか、前記入力文より小さい語を検索し、検索語が前記入力文の先頭部分と完全一致するかどうか判定し、完全一致していなければ、完全一致する語が見つかるまでポインタを順にたどり、完全一致した語の、前記辞書に記載されている可能後続語を可能後続語リストに記憶し、完全一致した語にポインタが記載されていれば、その語のポインタを順にたどり、完全一致した語と、その語のポインタを順にたどって得られた語を検索語リストに記憶し、完全一致した語が見つからなければ辞書の検索範囲を全語に設定するステップと、
前記処理装置が、前記入力文の先頭の1文字,2文字,・・・を除いた各文について、前記の検索から検索範囲を設定するステップの処理を繰り返すステップと、
前記処理装置が、前記検索語リストと前記可能後続語リストを前記出力装置に出力するステップを有する辞書検索方法。 A dictionary search method performed by a dictionary search device having an input device, a processing device, and an output device,
The processing device inputting a sentence from the input device to the processing device ;
The processing device, for each registered word, completely matches the first partial character string of the word and has a pointer to the longest word among words shorter than the word and the second and subsequent characters of the word Initializing the search range of the dictionary in which possible subsequent words that are words in are written to all words in the dictionary;
The processing device searches the dictionary for a word in the search range that is equal to or smaller than the input sentence, and determines whether the search word completely matches the head part of the input sentence. If not, follow the pointer in order until an exact match is found, store the possible success words of the exact match described in the dictionary in the possible success word list, and write the pointer to the exact match If it is, the word pointer is followed in order, and the exact word and the word obtained by following the word pointer are stored in the search word list. If no exact word is found, the dictionary is searched. Setting the range to all words;
The processing device, the first character of the input sentence, two characters, for each sentence excluding ..., and repeating the process step of setting a search or found search range of said,
A dictionary search method , comprising: the processing device outputting the search word list and the possible subsequent word list to the output device .
検索語リストと、
可能後続語リストと、
文を入力する入力装置と、
前記辞書から前記入力文と等しいか、前記入力文より小さい語を検索し、検索語が前記入力文の先頭部分と完全一致するかどうか判定し、完全一致しなければ、完全一致する語が見つかるまで順にポインタをたどり、完全一致した語の前記辞書に記載されている可能後続語を前記可能後続語リストに記憶し、完全一致した語にポインタが記載されていれば、その語のポインタを順にたどり、完全一致した語と、その語のポインタを順にたどって得られた語を前記検索語リストに記憶する処理装置と、
前記検索語リストおよび前記可能後続語リストを出力する出力装置を有する辞書検索装置。Each registered word is a word that has a pointer to the longest word out of words that are exactly the same as the first partial character string of the word and shorter than the word, and that starts with the second and subsequent characters of the word. A dictionary with some possible successors,
Search term list,
A list of possible successors, and
An input device for inputting a sentence;
A word that is equal to or smaller than the input sentence is searched from the dictionary, and it is determined whether or not the search word completely matches the head part of the input sentence. The pointers are traced in order, and the possible successor words described in the dictionary of the completely matched words are stored in the possible successor word list. If the pointers are described in the completely matched words, the pointers of the words are sequentially A processing device for storing in the search word list the words that have been traced, and the words obtained by tracing the pointers of the words in order,
A dictionary search device having an output device for outputting the search word list and the possible subsequent word list.
検索語リストと、
可能後続語リストと、
文を入力する入力装置と、
前記辞書の検索範囲を辞書中の全語に初期化し、前記入力文と等しいか、前記入力文より小さい語を検索し、検索語が前記入力文の先頭部分と完全一致するかどうか判定し、完全一致しなければ、完全一致する語が見つかるまで順にポインタをたどり、完全一致した語の、前記辞書に記載されている可能後続語を前記可能後続語リストに記憶し、完全一致した語にポインタが記載されていれば、その語のポインタを順にたどり、完全一致した語と、その語のポインタを順にたどって得られた語を前記検索語リストに記憶し、完全一致した語が見つからなければ辞書の検索範囲を全語に設定し、前記入力文の先頭の1文字,2文字,・・・を除いた各文について、前記の検索から前記検索範囲の設定までの処理を繰り返す処理装置と、
前記検索語リストおよび前記可能後続語リストを出力する出力装置を有する辞書検索装置。Each registered word is a word that has a pointer to the longest word out of words that are exactly the same as the first partial character string of the word and shorter than the word, and that starts with the second and subsequent characters of the word. A dictionary with some possible successors,
Search term list,
A list of possible successors, and
An input device for inputting a sentence;
Initialize the search range of the dictionary to all words in the dictionary, search for words that are equal to the input sentence or smaller than the input sentence, and determine whether the search word completely matches the head part of the input sentence, If there is no exact match, the pointer is sequentially traced until a completely matched word is found, the possible successor words of the exact match word described in the dictionary are stored in the possible successor word list, and the exact match word is pointed to Is stored in the search word list by following the pointers of the words in order, and the exact words and the words obtained by following the pointers of the words in order. A processing device that sets the search range of the dictionary to all words and repeats the processing from the search to the setting of the search range for each sentence except the first character, two characters,. ,
A dictionary search device having an output device for outputting the search word list and the possible subsequent word list.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP30413099A JP3628565B2 (en) | 1999-10-26 | 1999-10-26 | Dictionary search method, device, and recording medium recording dictionary search program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP30413099A JP3628565B2 (en) | 1999-10-26 | 1999-10-26 | Dictionary search method, device, and recording medium recording dictionary search program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2001125907A JP2001125907A (en) | 2001-05-11 |
| JP3628565B2 true JP3628565B2 (en) | 2005-03-16 |
Family
ID=17929411
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP30413099A Expired - Fee Related JP3628565B2 (en) | 1999-10-26 | 1999-10-26 | Dictionary search method, device, and recording medium recording dictionary search program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3628565B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5497230B1 (en) * | 2013-06-10 | 2014-05-21 | 株式会社バイトルヒクマ | Translation system, translation program, and translation method |
| JP5586772B1 (en) * | 2013-11-22 | 2014-09-10 | 株式会社バイトルヒクマ | Translation system, translation program, and translation method |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH09212523A (en) * | 1996-01-30 | 1997-08-15 | Oki Electric Ind Co Ltd | Entire sentence retrieval method |
| JPH10177582A (en) * | 1996-12-18 | 1998-06-30 | Nippon Telegr & Teleph Corp <Ntt> | Longest match search method and apparatus |
-
1999
- 1999-10-26 JP JP30413099A patent/JP3628565B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2001125907A (en) | 2001-05-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2836159B2 (en) | Speech recognition system for simultaneous interpretation and its speech recognition method | |
| JPH1145241A (en) | Kana-kanji conversion system and computer-readable recording medium storing a program for causing a computer to function as each means of the system | |
| JP2005182795A (en) | System and method for indexing each level of inner structure of string over language having vocabulary and grammar | |
| JP2765665B2 (en) | Translation device for documents with typographical information | |
| JP3992348B2 (en) | Morphological analysis method and apparatus, and Japanese morphological analysis method and apparatus | |
| JP2002117027A (en) | Emotion information extraction method and emotion information extraction program recording medium | |
| JP4001283B2 (en) | Morphological analyzer and natural language processor | |
| JP2000298667A (en) | Kanji conversion device using syntactic information | |
| JP3628565B2 (en) | Dictionary search method, device, and recording medium recording dictionary search program | |
| US20050273316A1 (en) | Apparatus and method for translating Japanese into Chinese and computer program product | |
| JP2000311168A (en) | System and method for analyzing morpheme and recording medium recording morpheme analysis program | |
| JP2004046438A (en) | Text search method and apparatus, text search program, and storage medium storing text search program | |
| JP3953772B2 (en) | Reading device and program | |
| JP2019095603A (en) | Information generation program, word extraction program, information processing device, information generation method and word extraction method | |
| JP3873305B2 (en) | Kana-kanji conversion device and kana-kanji conversion method | |
| TWI364749B (en) | Method of synthesizing pronunciation of chinese sentence | |
| JP2695772B2 (en) | Kana-Kanji conversion device | |
| JP3847869B2 (en) | Character string conversion apparatus and method | |
| JP3048793B2 (en) | Character converter | |
| JPH0766380B2 (en) | Kana-Kanji converter | |
| JPH1063651A (en) | Chinese input device | |
| JP2000067045A (en) | Text converting device and computer readable recording medium stored with text conversion program | |
| JPH0916575A (en) | Pronunciation dictionary device | |
| JPS6118065A (en) | Kana-kanji conversion processing device | |
| JP2002342066A (en) | Text reading device, program, recording medium, and text reading method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040728 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040927 |
|
| RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20040927 |
|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20040927 |
|
| 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: 20041117 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20041208 |
|
| 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: 20071217 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081217 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091217 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101217 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |