Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP5258631B2 - Dictionary search device - Google Patents
[go: Go Back, main page]

JP5258631B2 - Dictionary search device - Google Patents

Dictionary search device Download PDF

Info

Publication number
JP5258631B2
JP5258631B2 JP2009051767A JP2009051767A JP5258631B2 JP 5258631 B2 JP5258631 B2 JP 5258631B2 JP 2009051767 A JP2009051767 A JP 2009051767A JP 2009051767 A JP2009051767 A JP 2009051767A JP 5258631 B2 JP5258631 B2 JP 5258631B2
Authority
JP
Japan
Prior art keywords
word
score
search
maximum
node
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
JP2009051767A
Other languages
Japanese (ja)
Other versions
JP2010205119A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2009051767A priority Critical patent/JP5258631B2/en
Publication of JP2010205119A publication Critical patent/JP2010205119A/en
Application granted granted Critical
Publication of JP5258631B2 publication Critical patent/JP5258631B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明は、ダブル配列を用いて辞書検索を行う辞書検索装置に関する。   The present invention relates to a dictionary search apparatus that performs a dictionary search using a double array.

従来のダブル配列による辞書検索では、BaseとCheckと呼ばれる2つの配列によってトライ構造を実現し、高速な辞書検索と共通接頭辞検索を行っていた(例えば、非特許文献1参照)。また、トライ構造による辞書検索において、逆方向トライによってワイルドカードや正規表現を含む文字列検索を高速に行う方法も提案されている(例えば、特許文献1参照)。   In a conventional dictionary search using a double array, a trie structure is realized by two arrays called Base and Check, and a high-speed dictionary search and a common prefix search are performed (for example, see Non-Patent Document 1). In addition, in a dictionary search using a trie structure, a method has been proposed in which a character string search including a wild card and a regular expression is performed at a high speed by a reverse trie (see, for example, Patent Document 1).

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

青江:ダブル配列による高速ディジタル検索アルゴリズム,電子通信学会論文誌,J71−D,No.9,pp.1592−1600(1987)Aoe: Double-sequence high-speed digital search algorithm, IEICE Transactions, J71-D, No. 9, pp. 1592-1600 (1987)

従来の検索方式では、入力文字を元に1文字ずつ遷移し、その都度遷移先が正しいか確認する。このため、形態素解析器における辞書検索のように入力文字列の先頭部分が辞書中の単語として登録されているか判定する共通接頭辞検索は高速に実現できる一方、数文字の入力文字列に対して、これを先頭に含む単語を辞書から検索する前方一致検索は高速にはできないという問題があった。   In the conventional search method, transition is made character by character based on the input character, and it is confirmed whether the transition destination is correct each time. For this reason, a common prefix search that determines whether the leading part of the input character string is registered as a word in the dictionary, such as a dictionary search in a morphological analyzer, can be realized at high speed. There is a problem that the forward matching search for searching for a word including this at the beginning from the dictionary cannot be performed at high speed.

以下、従来方式の問題点を明らかにするため、ダブル配列による単語検索について簡単に説明する。
ダブル配列はトライ構造を2つの配列上で表現したものであり、図15は{“aaa”,“abc”,“abcd”,“abfgh”,“afghi”}を登録したダブル配列の例を示したものである。ダブル配列は、Base配列とCheck配列からなり、Stateは配列のインデックスを示し、トライ構造のノードに相当する。図16はこのダブル配列が表現するトライ構造を図示したものである。図15のStateが図16のノード番号に対応する。ダブル配列によるトライの遷移(ノードの移動)はBase配列とCheck配列を参照しながら行う。
Hereinafter, in order to clarify the problems of the conventional method, a simple word search using a double array will be described.
The double array represents a trie structure on two arrays, and FIG. 15 shows an example of a double array in which {“aaa”, “abc”, “abcd”, “abfgh”, “afghhi”} are registered. It is a thing. The double array includes a Base array and a Check array, and State indicates an index of the array and corresponds to a node of a tri structure. FIG. 16 illustrates the trie structure represented by this double array. The State in FIG. 15 corresponds to the node number in FIG. Trie transition (node movement) by the double array is performed with reference to the Base array and the Check array.

以降では文字集合をS={‘#’,‘a’,‘b’,…,‘z’}、文字集合と1:1に対応する内部コード集合をScode={1,2,3,…,27}とし、SからScodeへの写像をCode()で表す。例えばCode(‘b’)=3となる。‘#’は文字列の終端を表す特殊な文字であるとし、終端記号と呼ぶことにする。
ダブル配列における遷移では、現在のStateをs、遷移先のStateをt、入力文字をcとすると下記の(式1)に従ってtを求める。
Hereinafter, the character set is S c = {'#', 'a', 'b',..., 'Z'}, and the character set and the internal code set corresponding to 1: 1 are S code = {1, 2, 3 , ..., and 27}, it represents a mapping from S c to the S code in Code (). For example, Code ('b') = 3. '#' Is a special character representing the end of a character string, and is called a terminal symbol.
In the transition in the double array, when the current State is s, the transition destination State is t, and the input character is c, t is obtained according to (Equation 1) below.

t=Base[s]+Code(c) (式1)
このとき、
Check[t]=s (式2)
であれば遷移は成功となる。Base[t]=−1のとき単語の終端であることを示し、そこで遷移は終了する。もし、Check[t]≠sであれば、文字cによる遷移はできず、つまり、そのような文字列が登録されていないということになる。遷移できなくなるか、文字列の終端に辿りつくまで(式1)により遷移することで単語の検索が可能である。
このようなBase配列とCheck配列を構成する方法は上記の非特許文献1に示されているように公知である。以下に文字列を検索する例を示す。
t = Base [s] + Code (c) (Formula 1)
At this time,
Check [t] = s (Formula 2)
If so, the transition is successful. When Base [t] = − 1, it indicates the end of the word, and the transition ends there. If Check [t] ≠ s, transition by the character c cannot be made, that is, such a character string is not registered. Searching for a word is possible by making a transition according to (Equation 1) until the transition becomes impossible or the end of the character string is reached.
A method for constructing such a Base array and a Check array is known as shown in Non-Patent Document 1 above. An example of searching for a character string is shown below.

(例1)“abc”が存在するか検索する。
1.State=1から“a”(Code(‘a’)=2)により遷移し、Base[1]=1なので、State=Base[1]+Code(‘a’)=3となる。Check[3]=1なので遷移は成功する。
2.State=3から“b”(Code(‘b’)=3)により遷移し、Base[3]=2なのでState=5となる。Check[5]=3なので遷移は成功する。
3.State=5から“c”(Code(‘c’)=4)により遷移し、Base[5]=3なのでState=7となる。Check[7]=5なので遷移は成功する。
4.State=7から“#”(終端記号,Code(‘#’)=1)により遷移し、Base[7]=7なので状態8となる。Check[8]=7なので遷移は成功する。
5.Base[8]=−1なので文字列の終端であることが分かり、“abc”が登録されていることが分かる。
(Example 1) Search for “abc”.
1. Transition from State = 1 to “a” (Code (′ a ′) = 2) and Base [1] = 1, and therefore State = Base [1] + Code (′ a ′) = 3. Since Check [3] = 1, the transition is successful.
2. Transition from State = 3 by “b” (Code ('b') = 3), and Base [3] = 2, so State = 5. Since Check [5] = 3, the transition is successful.
3. Transition from State = 5 by “c” (Code ('c') = 4). Since Base [5] = 3, State = 7. Since Check [7] = 5, the transition is successful.
4). A transition is made from State = 7 by “#” (terminal symbol, Code (′ # ′) = 1), and since Base [7] = 7, state 8 is entered. Since Check [8] = 7, the transition is successful.
5. Since Base [8] = − 1, it can be seen that the character string is at the end, and that “abc” is registered.

(例2)“aba”が存在するか検索する。
1.State=1から“a”(Code(‘a’)=2)により遷移し、Base[1]=1なのでState=3となる。Check[3]=1なので遷移は成功する。
2.State=3から“b”(Code(‘b’)=3)により遷移し、Base[3]=2なのでState=5となる。Check[5]=3なので遷移は成功する。
3.State=5から“a”(Code(‘a’)=2)により遷移し、Base[5]=3なのでState=5となる。Check[5]=3なので遷移は失敗し、“aba”が登録されていないことが分かる。
(Example 2) Search whether "aba" exists.
1. Transition from State = 1 to “a” (Code ('a') = 2), and Base [1] = 1, so State = 3. Since Check [3] = 1, the transition is successful.
2. Transition from State = 3 by “b” (Code ('b') = 3), and Base [3] = 2, so State = 5. Since Check [5] = 3, the transition is successful.
3. Transition from State = 5 by “a” (Code (′ a ′) = 2), and Base [5] = 3, so State = 5. Since Check [5] = 3, the transition fails and it is understood that “aba” is not registered.

しかしながら、上記のように入力文字を元に1文字ずつ遷移し、その都度遷移先が正しいか確認することで遷移を確定させるため、前方一致検索を行うためには遷移可能な文字を再帰的に探索する必要がある。例えば“ab”に前方一致する単語を探索するには、以下のようになる。   However, as described above, transition is made one character at a time based on the input character, and the transition is confirmed by confirming whether the transition destination is correct each time. Need to explore. For example, to search for a word that directly matches “ab”, it is as follows.

(例3)“ab”に前方一致する単語を検索する。
1.State=1から“a”(Code(‘a’)=2)により遷移し、Base[1]=1なのでState=3となる。Check[3]=1なので遷移は成功する。
2.State=3から“b”(Code(‘b’)=3)により遷移し、Base[3]=2なのでState=5となる。Check[5]=3なので遷移は成功する。
3.State=5からx∈Sについて(式1)により新しいState=tを計算し、Check[t]=5であるものを列挙する。{‘c’,‘f’}が得られる。
4.State=5から上記3.で得られた“c”(Code(‘c’)=4)により遷移し、Base[5]=3なのでState=7となる。Check[7]=5なので遷移は成功する。
5.State=7から上記3.と同様の処理を再帰的に行い、{“abc”,“abcd”}を発見する(得られる文字集合が終端記号のみになれば終了。終端記号以降は遷移はしない)。
6.上記4.〜5.と同様に、State=5から“f”により遷移し、再帰的に探索することで{“abfgh”}を発見する。
(Example 3) A word that matches forward with “ab” is searched.
1. Transition from State = 1 to “a” (Code ('a') = 2), and Base [1] = 1, so State = 3. Since Check [3] = 1, the transition is successful.
2. Transition from State = 3 by “b” (Code ('b') = 3), and Base [3] = 2, so State = 5. Since Check [5] = 3, the transition is successful.
3. It calculates a new State = t by (Equation 1) for ∀ x∈S c from State = 5, listed as a Check [t] = 5. {'C', 'f'} is obtained.
4). From State = 5 to 3. The transition is made by “c” (Code ('c') = 4) obtained in the above, and since Base [5] = 3, State = 7. Since Check [7] = 5, the transition is successful.
5. From State = 7 to 3. The process similar to the above is performed recursively to find {“abc”, “abcd”} (end if the obtained character set is only a terminal symbol. No transition is made after the terminal symbol).
6). 4. above. ~ 5. In the same manner as described above, {= abfgh}} is found by making a transition from State = 5 by “f” and recursively searching.

このように、従来の検索方式では再帰的に探索しなければならないため、前方一致検索を高速には行えないという問題があった。   As described above, the conventional search method has to be searched recursively, and there is a problem that the forward matching search cannot be performed at high speed.

この発明は上記のような課題を解決するためになされたもので、ダブル配列による前方一致検索を高速に行うことのできる辞書検索装置を得ることを目的とする。   The present invention has been made to solve the above-described problems, and an object of the present invention is to provide a dictionary search apparatus that can perform a forward match search using a double array at high speed.

この発明に係る辞書検索装置は、検索文字列が与えられた場合、ダブル配列索引より検索文字列に該当するノードを探索するダブル配列索引探索手段と、ダブル配列索引中のトライ構造における子ノードのうち辞書順で最小となる登録単語へ遷移するための情報と最大となる登録単語へ遷移するための情報とを格納する最小・最大子ノード索引に基づいて、ダブル配列索引探索手段で探索されたノードの子ノードのうち、辞書順で最小の文字列となるノードと最大の文字列となるノードとを探索する最小・最大子ノード探索手段と、登録単語を辞書順にソートして格納する単語リストから、最小・最大子ノード探索手段で探索された最小ノードに対応する単語から最大ノードに対応する単語までの単語を抽出する単語抽出手段とを備えたものである。   When a search character string is given, the dictionary search device according to the present invention has a double array index search means for searching for a node corresponding to the search character string from the double array index, and a child node in the trie structure in the double array index. Based on the minimum / maximum child node index that stores information for transitioning to the smallest registered word in the dictionary order and information for transitioning to the largest registered word, it was searched by the double array index search means. Among the child nodes of the node, a word list for searching for the minimum / maximum child node for searching for the node having the smallest character string and the node having the largest character string in the dictionary order, and storing the registered words sorted in the dictionary order And word extraction means for extracting words from the word corresponding to the minimum node searched for by the minimum / maximum child node search means to the word corresponding to the maximum node. A.

この発明の辞書検索装置は、ダブル配列索引探索手段で探索されたノードの子ノードのうち、辞書順で最小の文字列となるノードと最大の文字列となるノードとを探索し、最小ノードに対応する単語から最大ノードに対応する単語までの単語を抽出するようにしたので、ダブル配列による前方一致検索を高速に行うことができる。   The dictionary search device according to the present invention searches for a node having the smallest character string and a node having the largest character string in the dictionary order among the child nodes of the node searched by the double array index search means, Since the words from the corresponding word to the word corresponding to the maximum node are extracted, the forward matching search by the double arrangement can be performed at high speed.

この発明の実施の形態1による辞書検索装置を示す構成図である。It is a block diagram which shows the dictionary search device by Embodiment 1 of this invention. この発明の実施の形態1による辞書検索装置の検索手順を示すフローチャートである。It is a flowchart which shows the search procedure of the dictionary search device by Embodiment 1 of this invention. この発明の実施の形態1による辞書検索装置のダブル配列索引と最小・最大子ノード索引の一例を示す説明図である。It is explanatory drawing which shows an example of the double arrangement | sequence index and minimum / maximum child node index of the dictionary search device by Embodiment 1 of this invention. この発明の実施の形態1による辞書検索装置の単語リストの一例を示す説明図である。It is explanatory drawing which shows an example of the word list | wrist of the dictionary search device by Embodiment 1 of this invention. この発明の実施の形態1による辞書検索装置の索引作成手順を示すフローチャートである。It is a flowchart which shows the index creation procedure of the dictionary search device by Embodiment 1 of this invention. この発明の実施の形態1による辞書検索装置の単語登録の手順を示すフローチャートである。It is a flowchart which shows the procedure of the word registration of the dictionary search device by Embodiment 1 of this invention. この発明の実施の形態2による辞書検索装置の構成図である。It is a block diagram of the dictionary search device by Embodiment 2 of this invention. この発明の実施の形態2による辞書検索装置のブロック化単語リストの一例を示す説明図である。It is explanatory drawing which shows an example of the blocked word list | wrist of the dictionary search device by Embodiment 2 of this invention. この発明の実施の形態2による辞書検索装置の単語登録の手順を示すフローチャートである。It is a flowchart which shows the procedure of the word registration of the dictionary search device by Embodiment 2 of this invention. この発明の実施の形態2による辞書検索装置の単語登録における単語Wの探索手順を示すフローチャートである。It is a flowchart which shows the search procedure of the word W in the word registration of the dictionary search device by Embodiment 2 of this invention. この発明の実施の形態3による辞書検索装置の構成図である。It is a block diagram of the dictionary search device by Embodiment 3 of this invention. この発明の実施の形態3による辞書検索装置のスコア付きブロック化単語リストの一例を示す説明図である。It is explanatory drawing which shows an example of the blocked word list with a score of the dictionary search apparatus by Embodiment 3 of this invention. この発明の実施の形態3による辞書検索装置のスコア上位抽出の手順を示すフローチャートである。It is a flowchart which shows the procedure of the score high-order extraction of the dictionary search device by Embodiment 3 of this invention. この発明の実施の形態4による辞書検索装置のスコア付きブロック化単語リストの一例を示す説明図である。It is explanatory drawing which shows an example of the block-ized word list with a score of the dictionary search apparatus by Embodiment 4 of this invention. 一般的なダブル配列の一例を示す説明図である。It is explanatory drawing which shows an example of a general double arrangement | sequence. 図15のダブル配列を木構造で示す説明図である。It is explanatory drawing which shows the double arrangement | sequence of FIG. 15 with a tree structure.

実施の形態1.
図1は、実施の形態1の辞書検索装置を示す構成図である。
図示の辞書検索装置は、検索文字列入力手段101、ダブル配列索引探索手段102、最小・最大子ノード探索手段103、単語抽出手段104、検索結果出力手段105、索引作成手段106、ダブル配列索引111、最小・最大子ノード索引112、単語リスト113、単語集合114を備えている。
Embodiment 1 FIG.
FIG. 1 is a configuration diagram illustrating the dictionary search apparatus according to the first embodiment.
The illustrated dictionary search apparatus includes a search character string input means 101, a double array index search means 102, a minimum / maximum child node search means 103, a word extraction means 104, a search result output means 105, an index creation means 106, and a double array index 111. , A minimum / maximum child node index 112, a word list 113, and a word set 114.

図1において、ダブル配列索引111は、ダブル配列法におけるBase配列とCheck配列を格納するデータである。最小・最大子ノード索引112は、辞書順で最小となる文字列へ遷移するための内部コードおよび最大となる文字列へ遷移するための内部コードを値に持つ配列を格納するデータである。単語リスト113は、登録されている単語の文字列を辞書順にソートして格納するデータである。単語集合114は、索引を作成する対象とする単語のリストである。   In FIG. 1, a double array index 111 is data for storing a Base array and a Check array in the double array method. The minimum / maximum child node index 112 is data that stores an internal code for transitioning to the minimum character string in the dictionary order and an array having values for the internal code for transitioning to the maximum character string. The word list 113 is data in which character strings of registered words are sorted and stored in dictionary order. The word set 114 is a list of words to be indexed.

検索文字列入力手段101は、検索する文字列を入力するものである。ダブル配列索引探索手段102は、ダブル配列索引111に検索文字列入力手段101で入力された文字列が登録されているか探索し、該当するノードを取得するものである。最小・最大子ノード探索手段103は、ダブル配列索引探索手段102で探索されたノードの子ノードのうち、辞書順で最小の文字列となるノードと最大の文字列となるノードを最小・最大子ノード索引112より探索し、該当するノードを取得するものである。単語抽出手段104は、最小・最大子ノード探索手段103で取得した最小ノードと最大ノードより、単語リスト113から最小ノードに対応する単語および最大ノードに対応する単語およびその間に含まれる単語の集合を取得するものである。検索結果出力手段105は単語抽出手段104で取得した単語の集合を出力する手段である。索引作成手段106は単語集合114を入力とし、ダブル配列索引111、最小・最大子ノード索引112、単語リスト113を作成または更新し単語を登録するものである。   The search character string input means 101 is for inputting a character string to be searched. The double array index search means 102 searches the double array index 111 for the character string input by the search character string input means 101 and acquires the corresponding node. The minimum / maximum child node search unit 103 selects the node that becomes the minimum character string and the node that becomes the maximum character string in the dictionary order from among the child nodes of the node searched by the double array index search unit 102. A search is made from the node index 112 to obtain the corresponding node. The word extraction unit 104 obtains a word corresponding to the minimum node and a word corresponding to the maximum node from the word list 113 and a set of words included between the minimum node and the maximum node acquired by the minimum / maximum child node search unit 103. To get. The search result output unit 105 is a unit that outputs a set of words acquired by the word extraction unit 104. The index creating means 106 receives the word set 114, creates or updates the double array index 111, the minimum / maximum child node index 112, and the word list 113, and registers the words.

尚、辞書検索装置はコンピュータを用いて実現され、ダブル配列索引探索手段102〜単語抽出手段104および索引作成手段106は、それぞれの機能に対応したソフトウェアとこれを実行するためのCPUやメモリといったハードウェアから構成されている。あるいは、これら手段をそれぞれ専用のハードウェアで構成してもよい。また、ダブル配列索引111〜単語集合114は、辞書検索装置と一体に設けてもよいが、辞書検索装置の外部に設け、ネットワークを介してダブル配列索引探索手段102〜単語抽出手段104がアクセスするといった構成であってもよい。   The dictionary search device is realized by using a computer. The double array index search means 102 to the word extraction means 104 and the index creation means 106 are software corresponding to each function and hardware such as a CPU and a memory for executing the software. It consists of hardware. Alternatively, each of these means may be configured by dedicated hardware. The double sequence index 111 to the word set 114 may be provided integrally with the dictionary search device, but is provided outside the dictionary search device and accessed by the double sequence index search unit 102 to the word extraction unit 104 via the network. It may be configured as follows.

次に、実施の形態1の辞書検索装置の動作について説明する。
本実施の形態では単語の検索動作と単語の登録(索引作成)動作に分かれるため、まず検索動作について説明する。
図2は、本実施形態における検索の手順を示したフローチャートである。検索の手順は次の通りである。
まず、検索文字列入力手段101より検索する文字列を取得する(ステップST1)。ダブル配列索引探索手段102により検索文字列が登録されているか調べる(ステップST2)。ステップST3において、もし登録単語であればノード情報から単語抽出手段104により該当単語を取得する(ステップST4)。一方、ステップST3において登録単語ではないが前方一致する単語が存在する場合(ステップST5)、最小・最大子ノード探索手段103により前方一致する単語のうち辞書順で最小となる単語と最大となる単語のノードを取得し(ステップST6)、次に単語抽出手段104により前方一致するすべての単語を抽出する(ステップST4)。単語抽出手段104による単語抽出後、検索結果出力手段105により検索結果を出力し(ステップST7)、検索を終了する。登録単語ではなく前方一致する単語も存在しない場合はそのまま検索を終了する。
Next, the operation of the dictionary search apparatus according to the first embodiment will be described.
Since the present embodiment is divided into a word search operation and a word registration (index creation) operation, the search operation will be described first.
FIG. 2 is a flowchart showing a search procedure in the present embodiment. The search procedure is as follows.
First, a character string to be searched is acquired from the search character string input means 101 (step ST1). The double array index search means 102 checks whether a search character string is registered (step ST2). In step ST3, if it is a registered word, the corresponding word is acquired from the node information by the word extraction means 104 (step ST4). On the other hand, if there is a word that is not a registered word but matches forward in step ST3 (step ST5), the word that is the smallest and largest in dictionary order among the words that are forward matched by the minimum / maximum child node search means 103. Are obtained (step ST6), and then all words that match forward are extracted by the word extraction means 104 (step ST4). After the word extraction by the word extraction means 104, the search result output means 105 outputs the search result (step ST7), and the search ends. If there is no word that matches the front rather than the registered word, the search is terminated as it is.

以下、図3から図6を参照しつつ、実施の形態1の動作の概要について説明する。
図3は、単語集合114を{“aaa”,“abc”,“abcd”,“abfgh”,“afghi”}とした場合のダブル配列索引111と最小・最大子ノード索引112の例である。同様に、図4は単語リスト113の例である。アドレス部1001は単語リスト113に登録されている単語へアクセスするためのアドレスを示すものである。エントリ部1002は登録されている単語を格納するものである。図3のChild_First配列には各Stateから遷移できる子ノードのうち、辞書順で最小となる単語に遷移するための内部コードを格納しておき、Child_Lastには辞書順で最大と成る単語に遷移するための内部コードを格納しておく。また、単語の終端に対応するノードのBase配列の値を従来では−1としていたが、本実施の形態では、対応する単語が登録されている単語リスト113へのアドレス値を負の値として格納する。
The outline of the operation of the first embodiment will be described below with reference to FIGS.
FIG. 3 is an example of the double array index 111 and the minimum / maximum child node index 112 when the word set 114 is {“aaa”, “abc”, “abcd”, “abfgh”, “afghhi”}. Similarly, FIG. 4 is an example of the word list 113. An address portion 1001 indicates an address for accessing a word registered in the word list 113. The entry unit 1002 stores registered words. The Child_First array of FIG. 3 stores an internal code for transitioning to the word that becomes the smallest in the dictionary order among the child nodes that can transit from each State, and Child_Last changes to the word that becomes the largest in the dictionary order. The internal code for this is stored. Further, although the value of the Base array of the node corresponding to the end of the word is conventionally -1, in this embodiment, the address value to the word list 113 in which the corresponding word is registered is stored as a negative value. To do.

このように構成したダブル配列索引111、最小・最大子ノード索引112、単語リスト113を用いて、前方一致検索を行うには次のようにする。まず、ダブル配列索引探索手段102はダブル配列索引111上で検索文字列の先頭から1文字ずつ(式1)および(式2)を用いて遷移する。検索文字列の終端まで達したときのStateをtとしたとき、t以降の遷移は最小・最大子ノード探索手段103によりChild_First配列に格納されている内部コードを用いて遷移する。Base配列の要素が負の値になるまで遷移したとき、それが検索単語に前方一致する単語のうち辞書順で最小となる単語の終端である。さらに、State=tからChild_Last配列に格納されている内部コードにより遷移する。Base配列の要素が負の値になるまで遷移したとき、それが検索単語に前方一致する単語のうち辞書順で最大となる単語の終端である。具体例として図3のダブル配列索引111、最小・最大子ノード索引112において“ab”に前方一致する単語を検索する例を次に示す。   To perform a forward matching search using the double array index 111, the minimum / maximum child node index 112, and the word list 113 configured as described above, the following is performed. First, the double array index search means 102 transitions on the double array index 111 using (Equation 1) and (Equation 2) one character at a time from the beginning of the search character string. When the state when reaching the end of the search character string is t, the transition after t is transitioned by the minimum / maximum child node search means 103 using the internal code stored in the Child_First array. When a transition is made until the element of the Base array becomes a negative value, it is the end of the word that becomes the smallest in dictionary order among the words that match the search word. Further, transition is made from State = t by the internal code stored in the Child_Last array. When a transition is made until the element of the Base array becomes a negative value, it is the end of the word that becomes the largest in dictionary order among the words that match the search word forward. As a specific example, an example of searching for a word that matches forward with “ab” in the double array index 111 and the minimum / maximum child node index 112 of FIG. 3 is shown below.

(例4)“ab”に前方一致する単語をすべて取得する。
1.State=1から“a”(Code(‘a’)=2)により遷移し、Base[1]=1なのでState=Base[1]+Code(‘a’)=3となる。Check[3]=1なので遷移は成功する。
2.State=3から“b”(Code(‘b’)=3)により遷移し、Base[3]=2なのでState=5となる。Check[5]=3なので遷移は成功する。
3.入力は終了したので、前方一致する最小単語を探索するためChild_First[5]を次の入力の内部コードとみなし遷移する。Base[5]=3,Child_First[5]=4なのでState=7となる。
4.State=7からChild_First[7]を入力の内部コードとみなし遷移する。Base[7]=7,Child_First[7]=1なのでState=8に遷移する。
5.Base[8]=−501<0なので単語の終端であり、これが最小単語にアクセスするための単語リスト113のアドレス値となる。−501をFirst_Indexとして記憶しておく。
(Example 4) All words that match the prefix "ab" are acquired.
1. Transition from State = 1 to “a” (Code (′ a ′) = 2) and Base [1] = 1, so that State = Base [1] + Code (′ a ′) = 3. Since Check [3] = 1, the transition is successful.
2. Transition from State = 3 by “b” (Code ('b') = 3), and Base [3] = 2, so State = 5. Since Check [5] = 3, the transition is successful.
3. Since the input is completed, in order to search for the smallest word that matches forward, Child_First [5] is regarded as the internal code of the next input and a transition is made. Since Base [5] = 3 and Child_First [5] = 4, State = 7.
4). From State = 7, Child_First [7] is regarded as an input internal code and a transition is made. Since Base [7] = 7 and Child_First [7] = 1, the state transitions to State = 8.
5. Since Base [8] = − 501 <0, it is the end of the word, and this is the address value of the word list 113 for accessing the minimum word. -501 is stored as First_Index.

6.State=5から前方一致する最大単語を探索するためChild_Last[5]を次の入力の内部コードとみなし遷移する。Base[5]=3,Child_Last[5]=7なのでState=10に遷移する。以降同様にChild_Lastを入力の内部コードとみなし、State=15に遷移する。
7.Base[15]=−503<0なので単語の終端であり、これが最大単語にアクセスするための単語リスト113のアドレス値となる。−503をLast_Indexとして記憶する。
8.単語リスト113のFirst_IndexからLast_Indexまでを順次取得する。図4を参照すると、501から503の単語集合{“abc”,“abcd”,“abfgh”}を得ることができる。ここで得られた単語はすべて“ab”に前方一致する単語となる。
6). In order to search for the largest word that matches forward from State = 5, Child_Last [5] is regarded as an internal code of the next input and a transition is made. Since Base [5] = 3 and Child_Last [5] = 7, the state transitions to State = 10. Similarly, Child_Last is regarded as an input internal code, and a transition is made to State = 15.
7. Since Base [15] = − 503 <0, it is the end of the word, and this is the address value of the word list 113 for accessing the maximum word. Store -503 as Last_Index.
8). The word list 113 is sequentially acquired from First_Index to Last_Index. Referring to FIG. 4, word sets {“abc”, “abcd”, “abfgh”} from 501 to 503 can be obtained. All of the words obtained here are words that coincide with “ab”.

以上のように、Child_FirstとChild_Lastを辿って前方一致する単語の範囲を取得するようにしているので、単語の登録数には依らず高速にすべての前方一致単語を取得することができる。   As described above, the range of forward matching words is acquired by tracing Child_First and Child_Last, so that all the forward matching words can be acquired at high speed regardless of the number of registered words.

次に、最小・最大子ノード索引112と単語リスト113を構築する方法について説明する。尚、ダブル配列索引111の構築については、例えば非特許文献1に記載されている方法を用いる。
図5は、単語集合からダブル配列索引111、最小・最大子ノード索引112、単語リスト113を作成する手順を示した図である。図6は、図5における1単語の登録について、ダブル配列索引111と最小・最大子ノード索引112を構築する手順を示した図である。
索引を作成するには、単語集合から1単語ずつ取り出し、図6の手順に従ってダブル配列索引111と最小・最大子ノード索引112を構築する(ステップST11〜ST13)。すべての単語を登録後、この段階ではダブル配列索引111におけるBase配列中の終端記号に対応する終端ノードの値は従来通り−1となっている。次にこの値を単語リスト113中の対応する単語へのアドレス値に更新する(ステップST14〜ST18)。まず、単語リスト113を辞書順で昇順ソートする(ステップST14)。次に、単語リスト113の先頭から順に単語を取り出し(ステップST15)、ダブル配列索引探索手段102により検索を行う(ステップST16)。そして、この探索で、単語の終端記号に該当するノードを取得し、Base配列の値を単語リスト113へのアドレス値に置換する(ステップST17)。ステップST18において、すべての単語についてBase配列の値を置換すれば索引作成が終了する。
Next, a method for constructing the minimum / maximum child node index 112 and the word list 113 will be described. For the construction of the double array index 111, for example, the method described in Non-Patent Document 1 is used.
FIG. 5 shows a procedure for creating the double array index 111, the minimum / maximum child node index 112, and the word list 113 from the word set. FIG. 6 is a diagram showing a procedure for constructing the double array index 111 and the minimum / maximum child node index 112 for the registration of one word in FIG.
To create an index, one word is taken out from the word set, and a double array index 111 and minimum / maximum child node index 112 are constructed according to the procedure of FIG. 6 (steps ST11 to ST13). After registering all the words, at this stage, the value of the terminal node corresponding to the terminal symbol in the Base array in the double array index 111 is −1 as usual. Next, this value is updated to the address value for the corresponding word in the word list 113 (steps ST14 to ST18). First, the word list 113 is sorted in ascending order in dictionary order (step ST14). Next, words are sequentially extracted from the top of the word list 113 (step ST15), and the double array index search means 102 performs a search (step ST16). In this search, the node corresponding to the terminal symbol of the word is acquired, and the value of the Base array is replaced with the address value to the word list 113 (step ST17). In step ST18, if the values of the Base array are replaced for all words, index creation is completed.

図6に示した1単語ごとの登録処理については次のようにする。最小・最大子ノード索引112は、Child_FirstとChild_Lastをすべて0に設定しておく。Child_FirstとChild_Lastの更新は、トライ構造の新規枝分かれ時に枝分かれするStateでChild_FirstとChild_Lastの値を参照し行う。各単語を登録する場合、Stateの初期値をs=1とし(ステップST21)、
単語の文字列を1文字ずつ取得しながら(式1)と(式2)に従ってダブル配列索引111上で遷移する(ステップST22〜ST25)。
The registration process for each word shown in FIG. 6 is as follows. In the minimum / maximum child node index 112, all of Child_First and Child_Last are set to 0. The update of Child_First and Child_Last is performed by referring to the values of Child_First and Child_Last in the State that branches at the time of new branching of the trie structure. When registering each word, the initial value of State is set to s = 1 (step ST21),
While acquiring the character string of the word one by one, the transition is made on the double array index 111 according to (Equation 1) and (Equation 2) (steps ST22 to ST25).

上記ステップST22〜ST25において、(式2)が成立しないState=sの場合は、例えば従来の方法を用いてState[t]におけるBase配列、Check配列の値を設定する(ステップST26)。そして、次の遷移文字cの内部コードがChild_First[s]よりも小さいかあるいはChild_First[s]が0の場合はChild_First[s]=Code(c)とする(ステップST27〜ステップST28)。同時に、cの内部コードがChild_Last[s]よりも大きいかあるいはChild_Last[s]が0の場合はChild_Last[s]=Code(c)とする(ステップST29〜ステップST30)。次に、現在のState[s]に遷移先のState[t]を代入し(ステップST31)、ステップST22からの処理を繰り返す。cが終端記号である場合はChild_First[s]とChild_Last[s]は更新せず、単語リスト113に登録中の単語を追加する。   In the above-described steps ST22 to ST25, when State = s in which (Equation 2) does not hold, for example, the values of the Base array and Check array in State [t] are set using a conventional method (step ST26). Then, if the internal code of the next transition character c is smaller than Child_First [s] or Child_First [s] is 0, Child_First [s] = Code (c) is set (step ST27 to step ST28). At the same time, if the internal code of c is larger than Child_Last [s] or Child_Last [s] is 0, Child_Last [s] = Code (c) is set (step ST29 to step ST30). Next, the state [t] of the transition destination is substituted for the current State [s] (step ST31), and the processing from step ST22 is repeated. If c is a terminal symbol, Child_First [s] and Child_Last [s] are not updated, and the word being registered is added to the word list 113.

図3のダブル配列索引111、最小・最大子ノード索引112に単語“abz”を追加する例を示す。
(例5)“abz”を追加する。
1.State=1から“a”(Code(‘a’)=2)により遷移し、Base[1]=1なのでState=Base[1]+Code(‘a’)=3となる。Check[3]=1なので遷移は成功する。
2.State=3から“b”(Code(‘b’)=3)により遷移し、Base[3]=2なのでState=5となる。Check[5]=3なので遷移は成功する。
3.State=5から“z”(Code(‘z’)=27)により遷移し、Base[5]=3なのでState=30となる。Base配列およびCheck配列はState=19までしかないのでまだ登録されていないことが分かり、State=5からの新規子ノードとしてState=30を作成する。すなわち、Base[30]の値を然るべき値に設定し、Check[30]=5とする。Base[30]の値の求め方は、非特許文献1に記載の方法を用いる。ここではBase[30]の値を30とする。
An example of adding the word “abz” to the double array index 111 and the minimum / maximum child node index 112 in FIG.
(Example 5) "abz" is added.
1. Transition from State = 1 to “a” (Code (′ a ′) = 2) and Base [1] = 1, so that State = Base [1] + Code (′ a ′) = 3. Since Check [3] = 1, the transition is successful.
2. Transition from State = 3 by “b” (Code ('b') = 3), and Base [3] = 2, so State = 5. Since Check [5] = 3, the transition is successful.
3. Transition from State = 5 by “z” (Code ('z') = 27), and Base [5] = 3, so State = 30. Since the Base array and the Check array have only State = 19, it is understood that they are not yet registered, and State = 30 is created as a new child node from State = 5. That is, the value of Base [30] is set to an appropriate value, and Check [30] = 5. The method described in Non-Patent Document 1 is used to obtain the value of Base [30]. Here, the value of Base [30] is 30.

4.State=5において、Code(‘z’)=27はChild_First[5]の値4より大きいためChild_First[5]は更新しない。
5.State=5において、Code(‘z’)=27はChild_Last[5]の値7より大きいためChild_Last[5]の値を更新しChild_Last[5]=27とする。
6.State=30から“#”(Code(‘#’)=1)により遷移し、Base[30]=30なのでState=31となる。Base配列およびCheck配列はState=30までしかないのでまだ登録されていないことが分かり、State=30からの新規子ノードとしてState=31を作成する。終端記号なのでBase[31]の値を−1にし、Check[31]=30とする。
7.単語リスト113に“abz”を追加する。
4). At State = 5, Code _ '[1] = 27 is larger than the value 4 of Child_First [5], so Child_First [5] is not updated.
5. At State = 5, Code ('z') = 27 is larger than the value 7 of Child_Last [5], so the value of Child_Last [5] is updated to Child_Last [5] = 27.
6). Transition from State = 30 by “#” (Code (“#”) = 1) and Base [30] = 30, so State = 31. Since the Base array and the Check array have only State = 30, it is understood that they are not yet registered, and State = 31 is created as a new child node from State = 30. Since it is a terminal symbol, the value of Base [31] is set to -1, and Check [31] = 30.
7. “Abz” is added to the word list 113.

以上により、本実施の形態におけるダブル配列索引111、最小・最大子ノード索引112、単語リスト113を作成することができる。上記例ではノード作成時に枝分かれがないState=30以降もBase配列とCheck配列に格納したが、非特許文献1のようにTail配列を用いても良い。   As described above, the double array index 111, the minimum / maximum child node index 112, and the word list 113 in the present embodiment can be created. In the above example, State = 30 and beyond after no branching at the time of node creation is stored in the Base array and the Check array. However, as in Non-Patent Document 1, a Tail array may be used.

本実施の形態では登録する単語はアルファベットから構成されるものとし、内部コードをScode={1,2,3,…,27}としたが、一般の文字列(平仮名、漢字、中国語など)の場合も文字列を1バイト単位で区切り、内部コードとみなすことで全く同じように適用できる。また、その場合、Child_FirstとChild_Lastはそれぞれ1バイトで済むので、ダブル配列索引111と最小・最大子ノード索引112の容量は従来のダブル配列索引に比べて(Base配列サイズ×2)バイト大きくなるだけである。尚、これは、以降の実施の形態についても同様に適用可能である。 In this embodiment, the registered word is composed of alphabets, and the internal code is S code = {1, 2, 3,..., 27}, but a general character string (Hiragana, Kanji, Chinese, etc.) In the case of), it can be applied in exactly the same way by dividing the character string in units of 1 byte and considering it as an internal code. In this case, since Child_First and Child_Last each need only 1 byte, the capacity of the double array index 111 and the minimum / maximum child node index 112 is only (Base array size × 2) bytes larger than the conventional double array index. It is. This can also be applied to the following embodiments.

また、本実施の形態では単語リスト113に登録した単語の読みまたは見出しを格納することとしたが、単語の読みまたは見出しを含むその他の詳細情報を格納するデータベース上のインデックスを持つだけでも良い。その場合、単語リスト113から単語文字列を取得するにはデータベースからインデックスにより取得すればよい。   In this embodiment, the word readings or headings registered in the word list 113 are stored. However, it is sufficient to have an index on a database for storing other detailed information including word readings or headings. In that case, the word character string may be acquired from the word list 113 by an index from the database.

以上のように、実施の形態1の辞書検索装置によれば、検索文字列が与えられた場合、ダブル配列索引より検索文字列に該当するノードを探索するダブル配列索引探索手段と、ダブル配列索引中のトライ構造における子ノードのうち辞書順で最小となる登録単語へ遷移するための情報と最大となる登録単語へ遷移するための情報とを格納する最小・最大子ノード索引に基づいて、ダブル配列索引探索手段で探索されたノードの子ノードのうち、辞書順で最小の文字列となるノードと最大の文字列となるノードとを探索する最小・最大子ノード探索手段と、登録単語を辞書順にソートして格納する単語リストから、最小・最大子ノード探索手段で探索された最小ノードに対応する単語から最大ノードに対応する単語までの単語を抽出する単語抽出手段とを備えたので、ダブル配列による前方一致検索を高速に行うことができる。   As described above, according to the dictionary search device of the first embodiment, when a search character string is given, the double array index search means for searching for a node corresponding to the search character string from the double array index, and the double array index Double based on the minimum / maximum child node index that stores information for transitioning to the smallest registered word in dictionary order and information for transitioning to the largest registered word among the child nodes in the trie structure in the middle Among the child nodes of the node searched by the array index search means, the minimum / maximum child node search means for searching for the node having the smallest character string and the node having the largest character string in the dictionary order, and the registered word A word extractor that extracts words from the word corresponding to the minimum node searched by the minimum / maximum child node search means to the word corresponding to the maximum node from the word list sorted and stored in order. Since a unit, the prefix search by double array can be performed at high speed.

実施の形態2.
上述した実施の形態1では、単語リスト113を全体で連続するデータとしたものであるが、単語リスト113を分割することで単語の追加または削除を高速に行う例を実施の形態2として次に示す。
図7は、実施の形態2の辞書検索装置の構成図である。
図において、ブロック化単語リスト121は実施の形態1における単語リスト113をブロック化して分割したものである。ブロック化単語リスト作成手段107は、ブロック化単語リスト121を作成または更新する手段である。
Embodiment 2. FIG.
In the first embodiment described above, the word list 113 is the continuous data as a whole, but an example in which words are added or deleted at high speed by dividing the word list 113 will be described as a second embodiment. Show.
FIG. 7 is a configuration diagram of the dictionary search apparatus according to the second embodiment.
In the figure, a blocked word list 121 is obtained by dividing the word list 113 in the first embodiment into blocks. The blocked word list creation unit 107 is a unit that creates or updates the blocked word list 121.

図8は、単語リスト113をブロック化単語リスト121のようにブロックに分割する例である。ブロックアドレス部1001aはブロック番号とブロック内アドレスを持ち、図8では「:」で区切って示している。「:」の左側がブロック番号、右側がブロック内アドレスを示す。また、エントリ部1002aは、ブロックアドレス部1001aに対応した登録単語である。単語リスト113をこのように分割するには、辞書順で昇順ソート済みの単語リスト113を固定の単語数ごとに分割すればよい。ただし、ブロックアドレス部1001aはブロック番号とブロック内アドレスの二つの値が必要になるため、ダブル配列索引111におけるBase配列の要素に格納できない。そこで、Child_First配列およびChild_Last配列を用いることにし、Base配列中の終端記号に対応する要素には実施の形態1のように負の値としてブロック内アドレスを格納する。このときChild_FirstとChild_Lastはいずれも0になっているが、実施の形態1における索引作成処理でBase配列中の単語の終端ノードに対応する要素の値を−1から単語リストへのアドレス値に置換する際、Child_FirstとChild_Lastも変更し、ブロック番号を格納するようにする。   FIG. 8 is an example in which the word list 113 is divided into blocks like the blocked word list 121. The block address portion 1001a has a block number and an in-block address, and is indicated by “:” in FIG. The left side of “:” indicates a block number, and the right side indicates an in-block address. The entry part 1002a is a registered word corresponding to the block address part 1001a. In order to divide the word list 113 in this way, the word list 113 that has been sorted in ascending order in dictionary order may be divided for each fixed number of words. However, since the block address portion 1001a requires two values of a block number and an in-block address, it cannot be stored in the elements of the Base array in the double array index 111. Therefore, the Child_First array and the Child_Last array are used, and the in-block address is stored as a negative value in the element corresponding to the terminal symbol in the Base array as in the first embodiment. At this time, both Child_First and Child_Last are 0, but the value of the element corresponding to the terminal node of the word in the Base array is replaced with the address value from -1 to the word list in the index creation process in the first embodiment. At this time, Child_First and Child_Last are also changed to store the block number.

次に、ブロック化単語リスト121およびダブル配列索引111のBase配列を更新する手順を説明する。図9はブロック化単語リスト121に対して、新規に単語を追加する場合の手順を示した図である。図10は図9における単語Wを検索する手順を示した図である。ブロック化単語リスト作成手段107は以下のように動作する。
1.ダブル配列索引111に登録されている単語のうち、追加する単語よりも辞書順で小さい最大の単語Wを検索する(ステップST41)。
2.検索された単語Wが登録されているブロック番号をChild_FirstとChild_Lastから取得する(ステップST42)。
3.対応するブロックに単語を追加し、ブロック内で昇順ソートする(ステップST43,ST44)。
4.対応するブロックの新しく追加された単語以降の単語は、ブロック内アドレスが変更されるため、これらの単語をダブル配列索引111より検索し、終端記号に対応するBase配列の要素を新しいブロック内アドレスに置換する(ステップST45)。
Next, a procedure for updating the Base array of the blocked word list 121 and the double array index 111 will be described. FIG. 9 is a diagram showing a procedure when a new word is added to the blocked word list 121. FIG. 10 is a diagram showing a procedure for searching for the word W in FIG. The blocked word list creation means 107 operates as follows.
1. Among words registered in double array index 111, the largest word W that is smaller in dictionary order than the word to be added is searched (step ST41).
2. The block number in which the searched word W is registered is obtained from Child_First and Child_Last (step ST42).
3. Words are added to the corresponding block and sorted in ascending order within the block (steps ST43 and ST44).
4). Since the in-block address of the word after the newly added word in the corresponding block is changed, these words are searched from the double array index 111, and the element of the Base array corresponding to the terminal symbol is used as the new in-block address. Replace (step ST45).

上記1.でダブル配列索引111に登録されている単語のうち、追加する単語よりも辞書順で小さい最大の単語Wを検索するには図10に示した手順に従い、次のようにする。
1.追加する単語の先頭文字から順に(式1)により遷移する(ステップST51〜STステップST54)。
2.ステップST54において(式2)が成立しないとき、そのとき遷移に利用した文字の内部コードをyに保存する(ステップST55)。
3.yをy−1とし、(式2)により遷移する(ステップST56〜ST58)。
4.ステップST58において(式2)が成立しないとき3.に戻る。
5.追加する単語よりも辞書順で小さい最大の単語Wが存在するとき、y=0となる前に(式2)が成立するyを必ず発見できる。次にこのyで遷移するため、sにtを代入する(ステップST59)。
6.Base配列値が負であるとき(ステップST60)、それが追加する単語よりも辞書順で小さい最大の単語Wの終端ノードであり、検索を終了する。
7.Base配列値が負でないとき、次の文字での遷移を探索するため、yに内部コードの最大値を代入し(ステップST61)、4.に戻る。
Above 1. In order to search for the largest word W that is smaller in dictionary order than the word to be added among the words registered in the double array index 111, the following procedure is performed as shown in FIG.
1. Transitions are made sequentially from the first character of the word to be added according to (Equation 1) (step ST51 to ST step ST54).
2. When (Equation 2) is not satisfied in step ST54, the internal code of the character used for the transition at that time is stored in y (step ST55).
3. Let y be y-1, and transition is made according to (Equation 2) (steps ST56 to ST58).
4). 2. When (Equation 2) is not satisfied in step ST58. Return to.
5. When there is a maximum word W that is smaller in dictionary order than the word to be added, y for which (Equation 2) holds can always be found before y = 0. Next, in order to make a transition at y, t is substituted for s (step ST59).
6). When the Base array value is negative (step ST60), it is the terminal node of the largest word W that is smaller in dictionary order than the word to be added, and the search is terminated.
7. 3. When the Base array value is not negative, the maximum value of the internal code is substituted for y in order to search for a transition at the next character (step ST61). Return to.

以上のように単語リスト113をブロックに分割することにより、単語リスト113全体を変更する必要がなくなり、ブロック内だけの変更で済むため単語の追加にかかるコストを削減できる。
単語を削除する場合は、削除する単語を検索し、ダブル配列索引111から削除すればよい。単語リスト113aからも削除する場合、削除した単語より辞書順で大きい単語についてはブロック内アドレスが変更されるため、追加するときと同様にそれらの単語をダブル配列索引111から検索し、終端記号に対応するBase配列の要素を新しいブロック内アドレスに置換すればよい。
By dividing the word list 113 into blocks as described above, it is not necessary to change the entire word list 113, and only the change within the block is sufficient, so the cost for adding words can be reduced.
When deleting a word, the word to be deleted may be searched and deleted from the double array index 111. When deleting also from the word list 113a, the addresses in the block are changed for words that are larger in the dictionary order than the deleted word. Therefore, those words are searched from the double array index 111 and added to the terminal symbol as in the case of adding. A corresponding element in the Base array may be replaced with a new in-block address.

以上のように、実施の形態2の辞書検索装置によれば、単語リストは、登録単語を所定の数ごとに分割した複数のブロックからなり、単語リストに新たな単語を登録する場合は、登録単語のうち、新たな単語よりも辞書順で小さい最大の単語を検索し、検索した単語のブロックに新たな単語を追加するブロック化単語リスト作成手段を備えたので、単語を登録する場合でも単語リスト全体を変更する必要がなく、単語リストのメンテナンスが容易となる。   As described above, according to the dictionary search device of the second embodiment, the word list is composed of a plurality of blocks obtained by dividing the registered word into predetermined numbers, and registration is performed when a new word is registered in the word list. It has a block word list creation means that searches for the largest word that is smaller in dictionary order than the new word and adds the new word to the searched word block, so even when registering a word It is not necessary to change the entire list, and the maintenance of the word list becomes easy.

実施の形態3.
以上の実施の形態では、検索単語に前方一致する単語を全件取得するものであるが、単語ごとに予め付与されたスコアで上位M件を取得する場合に、単語リストのブロック分割とブロック内最大スコアにより高速にM件を取得する例を次に実施の形態3として説明する。
Embodiment 3 FIG.
In the above embodiment, all the words that coincide with the search word are acquired. However, when the top M items are acquired with a score given in advance for each word, the word list is divided into blocks. An example of acquiring M items at a high speed based on the maximum score will be described as a third embodiment.

図11は、実施の形態3の辞書検索装置の構成図である。
スコア付きブロック化単語リスト122は単語ごとにスコアを持つブロックに分割された単語リストである。スコア付きブロック化単語リスト作成手段108はスコア付きブロック化単語リスト122を作成または更新する手段である。スコア上位単語抽出手段109は前方一致検索の結果得られた単語集合のうちスコアの上位M件を抽出する単語抽出手段である。
まず、説明のため、ブロック化されていないスコア付き単語リストから、検索文字列に前方一致する単語を検索し、スコアが上位のM件を取得する方法を述べる。
FIG. 11 is a configuration diagram of the dictionary search apparatus according to the third embodiment.
The scored blocked word list 122 is a word list divided into blocks each having a score. The scored blocked word list creation means 108 is means for creating or updating the scored blocked word list 122. The higher score word extraction means 109 is a word extraction means for extracting the highest M scores from the word set obtained as a result of the forward match search.
First, for the sake of explanation, a method is described in which a word that matches the search character string is searched from a scored word list that is not blocked, and the M score is obtained.

図12における左側の図はスコア情報を持つスコア付き単語リスト113aの例である。アドレス部1001、エントリ部1002、スコア部1003から成る。各単語に付与するスコアは特に限定する必要はなく、例えばある文書内に単語が出現する頻度などでよい。まず実施の形態1のように前方一致する単語の単語リスト113上での範囲を検索する。その範囲の単語を順次取得し、スコアが上位のものだけを残すようにする。次に具体例を示す。   The left diagram in FIG. 12 is an example of the scored word list 113a having score information. It consists of an address part 1001, an entry part 1002, and a score part 1003. The score given to each word need not be particularly limited, and may be, for example, the frequency of appearance of a word in a document. First, as in the first embodiment, a range on the word list 113 of words that match forward is searched. Get the words in that range sequentially, and leave only those with the highest score. A specific example is shown below.

(例6)図12のスコア付き単語リスト113から“a”に前方一致する単語を2件出力する。
1.実施の形態1と同様の方法により辞書順で最小の前方一致単語“aaa”と最大の前方一致単語“azzz”を検索し、それぞれが指すアドレス500と505を取得する。
2.アドレス500から順に単語リスト113を走査し、“aaa”,“abc”を出力候補に追加する。
3.次に“abcd”を取得するが、上記手順2.の時点で出力候補のスコア最小値は30となっており、“abcd”のスコアは5であるため出力候補に追加しない。
4.次に“abfgh”を取得するが、スコアが最小スコア以下であるため出力候補には追加しない。
5.次に“afghi”を取得するが、スコアが最小スコア以下であるため出力候補には追加しない。
6.次に“azzz”を取得する。スコアは40であり、現在のスコア最小値30より大きいため現在の最小スコアである“aaa”を削除して“azzz”を出力候補に追加し、最小スコアを40に更新する。
7.アドレス505に達したので現在の出力候補を出力とする。{“abc”,“azzz”}
(Example 6) From the word list with scores 113 in FIG.
1. The minimum forward matching word “aaa” and the maximum forward matching word “azzz” are searched in dictionary order by the same method as in the first embodiment, and the addresses 500 and 505 pointed to by each are obtained.
2. The word list 113 is scanned sequentially from the address 500, and “aaa” and “abc” are added to the output candidates.
3. Next, “abcd” is acquired. Since the minimum score of the output candidate is 30 and the score of “abcd” is 5, the output candidate is not added to the output candidate.
4). Next, “abfgh” is acquired, but is not added to the output candidate because the score is below the minimum score.
5. Next, “afghi” is acquired, but is not added to the output candidate because the score is below the minimum score.
6). Next, “azzz” is acquired. Since the score is 40, which is larger than the current score minimum value 30, the current minimum score “aaa” is deleted, “azzz” is added to the output candidate, and the minimum score is updated to 40.
7. Since address 505 is reached, the current output candidate is output. {“Abc”, “azzz”}

しかし、上記の方法では前方一致する単語がN個ある場合、N回の単語リストアクセスとスコア比較が発生するため効率が悪い。そこで単語リスト113を図12のスコア付きブロック化単語リスト122のように所定の数ごとに複数のブロックに分割する。ブロックアドレス部1001aは実施の形態2と同様に「ブロック番号:ブロック内アドレス」と表記している。スコア部1003aは単語リスト113のスコア部1003に対応する部分で各単語のスコアを格納するものである。ブロック内最大スコア部1004は各ブロック内で最大のスコアを格納する。スコア付きブロック化単語リスト作成手段108は、単語追加時に実施の形態2のブロック化単語リスト作成手段107と同様に追加すべきブロックを検索して単語を追加する。ただし、その際、ブロック内最大スコア部1004を参照し、追加する単語のスコアがブロック内最大スコアよりも大きければブロック内最大スコア部1004を追加する単語のスコアに更新する。   However, in the above method, when there are N words that match forward, N word list accesses and score comparisons occur, which is inefficient. Therefore, the word list 113 is divided into a plurality of blocks every predetermined number like the scored blocked word list 122 of FIG. The block address portion 1001a is expressed as “block number: address in block” as in the second embodiment. The score part 1003a stores the score of each word in a part corresponding to the score part 1003 of the word list 113. The intra-block maximum score unit 1004 stores the maximum score in each block. The scored blocked word list creation unit 108 searches for a block to be added and adds a word in the same manner as the blocked word list creation unit 107 of the second embodiment when adding a word. However, at that time, the intra-block maximum score part 1004 is referred to, and if the score of the word to be added is larger than the intra-block maximum score, the intra-block maximum score part 1004 is updated to the word score to be added.

図13は、このような構成によりスコアの上位M件を取得する手順を示した図である。(例6)のように単語リストから順次単語を取得してスコアを比較する際に、ブロック内最大スコアと比較することによりブロック単位で読み飛ばすことができ、効率的に上位M件を取得できる。具体例を次に示す。   FIG. 13 is a diagram showing a procedure for acquiring the top M scores by such a configuration. When sequentially acquiring words from the word list and comparing the scores as in (Example 6), the score can be skipped by comparing with the maximum score in the block, and the top M items can be acquired efficiently. . A specific example is shown below.

(例7)図12のスコア付きブロック化単語リスト122から“a”に前方一致する単語を2件出力する。
1.出力候補のスコア最小値を0に初期化し、ブロック番号Bを最小単語のブロック番号、ブロック内アドレスAを最小単語のブロック内アドレスとして初期化する(ステップST71,ST72)。そして、実施の形態1と同様の方法により辞書順で最小の前方一致単語“aaa”と最大の前方一致単語“azzz”を検索し、それぞれが指すブロックアドレス5:14と7:1を取得する。
2.ブロックアドレス5:14から順にスコア付きブロック化単語リスト122cを走査し、“aaa”を取得する。まだ1件も取得していないので出力候補に追加し、ブロック終了ではないのでブロック内アドレスAをインクリメントする(ステップST73→ST74→ST75→ST78→ST79→ST80)。
3.次に“abc”を取得する。まだ1件しか取得していないので出力候補に追加する。この時点で最小スコアは30となる。ブロック内アドレスAをインクリメントする(ステップST73→ST74→ST75→ST78→ST79→ST80)。
4.次に“abca”を取得するが、すでに出力候補を2件取得済みのため出力候補最小スコアとスコアを比較する(ステップST73→ST74→ST76)。出力候補最小スコアのほうが大きいので出力候補には追加しない。ブロックの終了であるのでブロック番号Bをインクリメントする(ステップST78→ST79→ST81)。
(Example 7) From the scored blocked word list 122 of FIG.
1. The minimum score value of the output candidate is initialized to 0, the block number B is initialized as the block number of the minimum word, and the intra-block address A is initialized as the intra-block address of the minimum word (steps ST71 and ST72). Then, the smallest forward matching word “aaa” and the largest forward matching word “azzz” are searched in the dictionary order by the same method as in the first embodiment, and block addresses 5:14 and 7: 1 pointed to by each are obtained. .
2. The scored blocked word list 122c is scanned in order from the block address 5:14 to obtain “aaa”. Since one item has not yet been acquired, it is added to the output candidate, and since it is not the block end, the block address A is incremented (step ST73 → ST74 → ST75 → ST78 → ST79 → ST80).
3. Next, “abc” is acquired. Since only one item has been acquired yet, it is added as an output candidate. At this point, the minimum score is 30. The in-block address A is incremented (steps ST73 → ST74 → ST75 → ST78 → ST79 → ST80).
4). Next, “abca” is acquired. Since two output candidates have already been acquired, the output candidate minimum score is compared with the score (steps ST73 → ST74 → ST76). Since the output candidate minimum score is larger, it is not added to the output candidate. Since this is the end of the block, the block number B is incremented (steps ST78 → ST79 → ST81).

5.Bのインクリメントの結果、ブロック6を参照するが、ブロック6のブロック内最大スコアは20であり、現在の最小スコア30より小さいためこのブロック内には出力候補に追加すべき単語は存在しないことが分かる(ステップST82)。ブロック6からの単語取得を行わず、Bをインクリメントしブロック7へ移動する(ステップST79→ST81)。
6.ステップST82において、ブロック7のブロック内最大スコアは70であり、現在の最小スコア30より大きいため、このブロック内に出力候補に追加すべき単語が存在する可能性がある。そのため“azzz”を取得し、スコアは40なので、現在のスコア最小値30より大きいため現在の最小スコアである“aaa”を削除して“azzz”を出力候補に追加し、最小スコアを40に更新する(ステップST83→ST73→ST74→ST76→ST77)。
7.ステップST78において、アドレス7:1に達したので現在の出力候補を出力とする{“abc”,“azzz”}。
以上のように、単語リストを分割した上でブロック内最大スコアを格納することにより、ダブル配列による文字列の高速な検索と、効率的なスコアの上位抽出を行うことができる。
5. As a result of the increment of B, reference is made to block 6, but since the maximum score in block 6 is 20 and is smaller than the current minimum score 30, there may be no word to be added to the output candidate in this block. It can be understood (step ST82). Word acquisition from block 6 is not performed, and B is incremented and moved to block 7 (step ST79 → ST81).
6). In step ST82, since the maximum score in the block 7 is 70 and is larger than the current minimum score 30, there is a possibility that a word to be added to the output candidate exists in this block. Therefore, “azzz” is acquired and the score is 40. Therefore, the current minimum score “aaa” is deleted because it is larger than the current score minimum value 30 and “azzzz” is added to the output candidate, and the minimum score is set to 40. Update (steps ST83 → ST73 → ST74 → ST76 → ST77).
7. In step ST78, since address 7: 1 has been reached, the current output candidate is output {“abc”, “azzz”}.
As described above, by dividing the word list and storing the maximum score in the block, it is possible to perform a high-speed search of a character string by a double arrangement and efficient extraction of the upper rank of the score.

以上のように、実施の形態3の辞書検索装置によれば、単語リストは、登録単語を所定の数ごとに分割した複数のブロックからなり、かつ、各登録単語にスコアが付与されていると共に、ブロックごとにそのブロックに属する登録単語の最大スコアを有し、単語抽出手段は、単語リストから、スコアが上位である任意の件数の単語を抽出する場合、出力候補最小スコアより最大スコアが小さいブロックは抽出対象から除外するようにしたので、検索を高速に行うことができると共に、スコアが上位の単語を効率的に抽出することができる。   As described above, according to the dictionary search device of the third embodiment, the word list is composed of a plurality of blocks obtained by dividing the registered words into predetermined numbers, and each registered word is given a score. , Each block has a maximum score of registered words belonging to the block, and the word extraction means has a maximum score smaller than the output candidate minimum score when extracting an arbitrary number of words having a higher score from the word list Since the block is excluded from the extraction target, the search can be performed at high speed, and the word having the higher score can be efficiently extracted.

実施の形態4.
実施の形態3では単語リストの分割方法を所定の数ごととしたが、同一の形態素を持つ単語集合ごとにグループ化して分割することによって、グループ単位で効率的に検索結果を取得する例を次に実施の形態4として説明する。尚、実施の形態4における辞書検索装置の図面上の構成は実施の形態3と同様であるため、図11の構成を用いて説明する。
Embodiment 4 FIG.
In the third embodiment, the word list is divided into a predetermined number. However, an example in which search results are efficiently obtained in groups by grouping and dividing each word set having the same morpheme is described below. Embodiment 4 will be described below. The configuration of the dictionary search apparatus in the fourth embodiment in the drawing is the same as that in the third embodiment, and will be described with reference to the configuration in FIG.

図14に、実施の形態4におけるスコア付きブロック化単語リスト122の例を示す。図14における左側の図は形態素の区切りに「/」を挿入した単語リスト113bの例である。例えば、エントリ部1002bの「とうかい/だいがく」は「とうかい」と「だいがく」の2つの形態素から成ることを示す。また、スコア部1003bは、エントリ部1002bに対応したスコアである。このような単語リストから検索文字列に前方一致する単語を検索して、該当する単語の先頭形態素を出力することを考える。スコア上位のM件だけを出力する場合は、グループ内のスコアの最大値をグループのスコアとみなしてスコア上位のグループを出力する。   FIG. 14 shows an example of the scored blocked word list 122 in the fourth embodiment. The left diagram in FIG. 14 is an example of the word list 113b in which “/” is inserted in the morpheme break. For example, “Tokai / Daigaraku” in the entry portion 1002b indicates that it is composed of two morphemes “Tokaikai” and “Daigaraku”. The score part 1003b is a score corresponding to the entry part 1002b. Consider searching for a word that matches the search character string from such a word list and outputting the first morpheme of the corresponding word. When outputting only M cases with higher scores, the maximum score within the group is regarded as the group score, and the group with higher scores is output.

図14左の単語リスト113bの場合、「とう」に前方一致する単語は「とうかい/だいがく」,「とうかい/ほんせん」,「とうきょう/えき」,「とうきょう/だいがく/ひろば」,「とうきょう/だいがく/まえ」,「とうほく/だいがく」,「とうほく/ほてる」の7個であるが、それぞれの先頭グループは「とうかい」,「とうかい」,「とうきょう」,「とうきょう」,「とうきょう」,「とうほく」,「とうほく」となるので重複するものがある。重複を除去すると「とうかい」,「とうきょう」,「とうほく」の3つが出力となる。   In the case of the word list 113b on the left side of FIG. / Daigaku / Mae, Tohoku / Daigaku, “Tohoku / Hotel”, but the first groups are “Tokai”, “Tokai”, “Tokyo”, “Tokyo” , “Tokyo”, “Tohoku”, and “Tohoku”, so there are duplicates. When duplication is removed, the output is “Tokai”, “Tokyo”, and “Tohoku”.

スコアの上位2件を出力する場合、「とうかい」グループはグループ内の最大スコアが45、「とうきょう」グループは70、「とうほく」グループが40なので、「とうかい」と「とうきょう」を出力する。   When outputting the top two scores, the “Tokai” group has a maximum score of 45 in the group, the “Tokyo” group is 70, and the “Tohoku” group is 40. .

次に、本実施の形態が、単語リスト113bを同一の先頭形態素でグループ化してブロック分割することにより、効率的に上位M件を出力する例を示す。
スコア付きブロック化単語リスト122の例を図14の右側に示す。エントリ部1002cが「とうかい」,「とうきょう」,「とうほく」でグループ化し、ブロック分割してある。また、スコア部1003cはエントリ部1002cに対応したスコア、ブロック内最大スコア部1004aは、ブロック内の最大スコアを示している。ブロック7は同一の先頭形態素が複数無いため実施の形態3のように所定の単語数でブロック分割している。実施の形態3と同様に、単語抽出手段であるスコア上位単語抽出手段109は、ブロック単位で読み飛ばすことで、スコア上位のグループを効率的に取得できる。
Next, the present embodiment shows an example in which the top M items are efficiently output by grouping the word list 113b with the same head morpheme and dividing it into blocks.
An example of the scored blocked word list 122 is shown on the right side of FIG. The entry portion 1002c is grouped by “TOKAI”, “TOKYO”, and “TOHOHOKU”, and is divided into blocks. The score portion 1003c indicates the score corresponding to the entry portion 1002c, and the intra-block maximum score portion 1004a indicates the maximum score in the block. Since the block 7 does not have a plurality of the same head morphemes, the block is divided into a predetermined number of words as in the third embodiment. As in the third embodiment, the higher score word extraction unit 109, which is a word extraction unit, can efficiently acquire a higher score group by skipping blocks.

例えば図14右のスコア付きブロック化単語リスト122において、「と」に前方一致するスコア上位2件の単語の先頭グループを検索する場合、実施の形態2と同様に、まずブロックアドレス「4:1」から「7:1」までが前方一致する単語として検索する。
ブロックアドレス「4:1」から順次単語を取得し、先頭形態素「とうかい」とブロック内最大スコア45を取得し出力候補に追加する。次にブロック5から先頭形態素「とうきょう」とブロック内最大スコア70を取得し出力候補に追加する。この時点で出力候補グループの最小スコア45であり、次のブロック6はブロック内最大スコアが40なので読み飛ばすことができる。さらに次のブロック7はブロック内最大スコアが65であるため順次単語を取得し、先頭形態素「とりつ」とスコア50を取得し、出力候補中の「とうかい」を「とりつ」と入れ替える。ここで前方一致単語が終了するので、「とうきょう」と「とりつ」が出力となる。
For example, in the blocked word list 122 with a score on the right side of FIG. 14, when searching for the first group of the top two words with the highest score that matches “to”, first, as in the second embodiment, first the block address “4: 1” is searched. ”To“ 7: 1 ”are searched as forward matching words.
Words are sequentially acquired from the block address “4: 1”, the leading morpheme “Toukai” and the maximum score 45 in the block are acquired and added to the output candidates. Next, the top morpheme “Tokyo” and the maximum score 70 in the block are acquired from the block 5 and added to the output candidates. At this time, the output candidate group has a minimum score of 45, and the next block 6 has a maximum score in the block of 40, so that it can be skipped. Further, since the next block 7 has a maximum score in the block of 65, the word is sequentially acquired, the first morpheme “Toritsu” and the score 50 are obtained, and “Tokakai” in the output candidates is replaced with “Toritsu”. Since the forward matching word ends here, “Tokyo” and “Toritsu” are output.

以上のように出力形式に合わせてグループ化することで、効率的にスコア上位のグループを取得することができる。
本実施の形態では先頭形態素のみでグループ化したが、第二形態素以降でも階層的にグループ化することで出力の単位を任意の階層にすることも可能である。
By grouping in accordance with the output format as described above, it is possible to efficiently acquire a group having a higher score.
In the present embodiment, only the first morpheme is used for grouping. However, it is possible to set the output unit to an arbitrary layer by grouping hierarchically after the second morpheme.

以上のように、実施の形態4の辞書検索装置によれば、単語リストは、同一の形態素を持つ単語の集合でブロックごとに分割され、各登録単語にスコアが付与されていると共に、ブロックごとにそのブロックに属する登録単語の最大スコアを有し、単語抽出手段は、スコアが上位である任意の件数の単語を抽出する場合、出力候補最小スコアより最大スコアが小さいブロックは抽出対象から除外するようにしたので、単語リストを同一の形態素を持つ単語集合とした場合でも、検索を高速に行うことができると共に、スコアが上位の単語を効率的に抽出することができる。   As described above, according to the dictionary search device of the fourth embodiment, the word list is divided into blocks with a set of words having the same morpheme, and each registered word is given a score, and each block When the word extraction unit extracts an arbitrary number of words having a higher score, the block having the maximum score lower than the output candidate minimum score is excluded from the extraction target. As described above, even when the word list is a word set having the same morpheme, the search can be performed at a high speed, and a word having a higher score can be efficiently extracted.

101 検索文字列入力手段、102 ダブル配列索引探索手段、103 最小・最大子ノード探索手段、104 単語抽出手段、105 検索結果出力手段、106 索引作成手段、107 ブロック化単語リスト作成手段、108 スコア付きブロック化単語リスト作成手段、109 スコア上位単語抽出手段、111 ダブル配列索引、112 最小・最大子ノード索引、113 単語リスト、114 単語集合、121 ブロック化単語リスト、122 スコア付きブロック化単語リスト。   101 search character string input means, 102 double array index search means, 103 minimum / maximum child node search means, 104 word extraction means, 105 search result output means, 106 index creation means, 107 blocked word list creation means, 108 with score Blocked word list creation means, 109 score higher word extraction means, 111 double array index, 112 minimum / maximum child node index, 113 word list, 114 word set, 121 blocked word list, 122 blocked word list with score.

Claims (4)

検索文字列が与えられた場合、ダブル配列索引より当該検索文字列に該当するノードを探索するダブル配列索引探索手段と、
前記ダブル配列索引中のトライ構造における子ノードのうち辞書順で最小となる登録単語へ遷移するための情報と最大となる登録単語へ遷移するための情報とを格納する最小・最大子ノード索引に基づいて、前記ダブル配列索引探索手段で探索されたノードの子ノードのうち、辞書順で最小の文字列となるノードと最大の文字列となるノードとを探索する最小・最大子ノード探索手段と、
前記登録単語を辞書順にソートして格納する単語リストから、前記最小・最大子ノード探索手段で探索された最小ノードに対応する単語から最大ノードに対応する単語までの単語を抽出する単語抽出手段とを備えた辞書検索装置。
When a search character string is given, a double array index search means for searching for a node corresponding to the search character string from the double array index;
In the minimum / maximum child node index storing information for transitioning to the smallest registered word in dictionary order and information for transitioning to the largest registered word among the child nodes in the trie structure in the double array index Based on the child node of the node searched by the double array index search means, minimum and maximum child node search means for searching for the node that becomes the minimum character string and the node that becomes the maximum character string in the dictionary order; ,
A word extracting unit that extracts words from a word corresponding to the minimum node searched by the minimum / maximum child node searching unit to a word corresponding to the maximum node from a word list in which the registered words are sorted and stored in a dictionary order; A dictionary search device comprising:
単語リストは、登録単語を所定の数ごとに分割した複数のブロックからなり、
前記単語リストに新たな単語を登録する場合は、前記登録単語のうち、前記新たな単語よりも辞書順で小さい最大の単語を検索し、当該検索した単語のブロックに前記新たな単語を追加するブロック化単語リスト作成手段を備えたことを特徴とする請求項1記載の辞書検索装置。
The word list is composed of a plurality of blocks obtained by dividing a registered word into predetermined numbers.
When registering a new word in the word list, the largest word that is smaller in dictionary order than the new word is searched for among the registered words, and the new word is added to the block of the searched word 2. The dictionary search apparatus according to claim 1, further comprising a block word list creating means.
単語リストは、登録単語を所定の数ごとに分割した複数のブロックからなり、かつ、各登録単語にスコアが付与されていると共に、ブロックごとにそのブロックに属する登録単語の最大スコアを有し、
単語抽出手段は、前記単語リストから、前記スコアが上位である任意の件数の単語を抽出する場合、出力候補最小スコアより前記最大スコアが小さいブロックは抽出対象から除外することを特徴とする請求項1または請求項2記載の辞書検索装置。
The word list is composed of a plurality of blocks obtained by dividing a registered word by a predetermined number, and each registered word has a score, and each block has a maximum score of the registered words belonging to the block,
The word extracting means, when extracting an arbitrary number of words having a higher score from the word list, excludes blocks whose maximum score is lower than an output candidate minimum score from extraction targets. The dictionary search device according to claim 1 or 2.
単語リストは、同一の形態素を持つ単語の集合でブロックごとに分割され、各登録単語にスコアが付与されていると共に、ブロックごとにそのブロックに属する登録単語の最大スコアを有し、
単語抽出手段は、前記スコアが上位である任意の件数の単語を抽出する場合、出力候補最小スコアより前記最大スコアが小さいブロックは抽出対象から除外することを特徴とする請求項1記載の辞書検索装置。
The word list is divided into blocks with a set of words having the same morpheme, and each registered word is given a score, and each block has a maximum score of registered words belonging to that block,
2. The dictionary search according to claim 1, wherein the word extraction unit excludes a block having the maximum score lower than the output candidate minimum score from the extraction target when extracting an arbitrary number of words having the higher score. apparatus.
JP2009051767A 2009-03-05 2009-03-05 Dictionary search device Expired - Fee Related JP5258631B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009051767A JP5258631B2 (en) 2009-03-05 2009-03-05 Dictionary search device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009051767A JP5258631B2 (en) 2009-03-05 2009-03-05 Dictionary search device

Publications (2)

Publication Number Publication Date
JP2010205119A JP2010205119A (en) 2010-09-16
JP5258631B2 true JP5258631B2 (en) 2013-08-07

Family

ID=42966507

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009051767A Expired - Fee Related JP5258631B2 (en) 2009-03-05 2009-03-05 Dictionary search device

Country Status (1)

Country Link
JP (1) JP5258631B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5237400B2 (en) * 2011-01-21 2013-07-17 株式会社三菱東京Ufj銀行 Search device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3585944B2 (en) * 1993-11-01 2004-11-10 キヤノン株式会社 Data processing method and apparatus
JP3427679B2 (en) * 1997-06-18 2003-07-22 富士ゼロックス株式会社 Computer-readable recording medium recording word search device and word search program
JP2000259629A (en) * 1999-03-11 2000-09-22 Hitachi Ltd Morphological analysis method and its device
JP5024294B2 (en) * 2006-11-01 2012-09-12 日本電気株式会社 Information storage retrieval method, apparatus and program for state transition table

Also Published As

Publication number Publication date
JP2010205119A (en) 2010-09-16

Similar Documents

Publication Publication Date Title
CN111460311B (en) Search processing method, device, equipment and storage medium based on dictionary tree
US8095526B2 (en) Efficient retrieval of variable-length character string data
JP2683870B2 (en) Character string search system and method
US7809744B2 (en) Method and system for approximate string matching
JP3302988B2 (en) Character processing method and character identification method
US20130297641A1 (en) Code string search apparatus, search method, and program
CN116562297B (en) Chinese sensitive word variant recognition method and system based on HTrie tree
US12456012B2 (en) Inference methods for word or wordpiece tokenization
CN106528647B (en) A method of term matching based on cedar double-array dictionary tree algorithm
US9720976B2 (en) Extracting method, computer product, extracting system, information generating method, and information contents
JP2008065395A (en) Translation device, translation method and translation program
JP2002189747A (en) Search method of document information
CN109165331A (en) A kind of index establishing method and its querying method and device of English place name
JP5258631B2 (en) Dictionary search device
JPH07152774A (en) Document retrieval method and device
KR101245631B1 (en) Approximate collation device, approximate collation method, program, and recording medium
US20110066638A1 (en) Bit strings search apparatus, search method, and program
JP4208326B2 (en) Information indexing device
JP5807592B2 (en) Encoding method, encoding apparatus, and computer program
CN115795060A (en) Entity alignment method based on knowledge enhancement
US9009200B1 (en) Method of searching text based on two computer hardware processing properties: indirect memory addressing and ASCII encoding
CN117851537A (en) An index construction method for a time series data storage engine
CN121638174A (en) Real-time log analysis method and system integrating position information and fixed depth tree
HK40023497A (en) Search processing method, apparatus, device and storage medium based on dictionary tree
JPH0784772A (en) Name dictionary creation device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110920

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130315

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: 20130326

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130423

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

Free format text: PAYMENT UNTIL: 20160502

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5258631

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees