JPH1185802A - Computer-readable recording medium recording full-text search data and character string collation device - Google Patents
Computer-readable recording medium recording full-text search data and character string collation deviceInfo
- Publication number
- JPH1185802A JPH1185802A JP10004535A JP453598A JPH1185802A JP H1185802 A JPH1185802 A JP H1185802A JP 10004535 A JP10004535 A JP 10004535A JP 453598 A JP453598 A JP 453598A JP H1185802 A JPH1185802 A JP H1185802A
- Authority
- JP
- Japan
- Prior art keywords
- character
- chain
- special
- search
- data
- 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.)
- Granted
Links
Landscapes
- Document Processing Apparatus (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
(57)【要約】
【課題】 情報検索処理装置で、検索する文字列に意味
の区切りなどのために特殊文字が挿入されている場合、
例えばそれが入力文字列の3文字に1文字の割合で挿入
されていた場合、その文字の出現回数が膨大になりその
文字の連鎖メモリのみが異常に膨大し、連鎖メモリを圧
迫するという問題点を解決することを目的とする。
【解決手段】 文字列変換手段301、304は、文字
列に特殊文字が出現した場合、特殊文字を隣接する文字
により検索対象とならない文字に変換し2文字連鎖検出
器302、305に出力する。2文字連鎖検出手段30
2は、特殊文字列を検索の対象とならない文字に変換さ
れた文字列に対し、2文字連鎖を抽出し、連鎖毎に出現
回数をカウントし2文字連鎖メモリ3030に格納す
る。比較器は、特殊文字を隣接する文字に従い変換した
検索対象文字列に対し、2文字連鎖メモリを用いて文字
連鎖の有無を調べる。
(57) [Summary] [Problem] In a case where a special character is inserted into a character string to be searched to separate meanings in an information search processing device,
For example, if it is inserted at a ratio of one character to three characters of the input character string, the number of appearances of the character is enormous, and only the chain memory of the character is abnormally enormous, which overwhelms the chain memory. The purpose is to solve. SOLUTION: When a special character appears in a character string, character string conversion means 301, 304 converts the special character into a character which is not a search target by an adjacent character and outputs it to a two-character chain detector 302, 305. Two-character chain detecting means 30
2 extracts a two-character chain from the character string obtained by converting the special character string into a character that is not a search target, counts the number of appearances for each chain, and stores it in the two-character chain memory 3030. The comparator checks the presence or absence of a character chain using a two-character chain memory for the search target character string obtained by converting the special character according to the adjacent character.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、情報検索処理分野
における文書中に記述された文字列を検索する全文検索
に利用されるもので、登録した文書中に含まれる全ての
文字列と入力する文字列を照合するための全文検索デー
タを記録したコンピュータ読み取り可能な記録媒体、お
よび文字列照合装置に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is used for a full-text search for searching for a character string described in a document in the field of information search processing, and inputs all the character strings contained in a registered document. The present invention relates to a computer-readable recording medium that records full-text search data for collating a character string, and a character string collating apparatus.
【0002】[0002]
【従来の技術】図36は従来の文字列照合装置の構成
図、図37は従来の文字照合の方法、および全文検索デ
ータの形式を示している。図37(a)において、801
は登録時に入力される文字列「いろaはに」、802は
最初に登録されるの2文字連鎖「いろ」、803は80
2の次の2文字連鎖「ろa」、804は803の次の2
文字連鎖「aは」、805は804の次の2文字連鎖
「はに」である。ここで、「a」は、文字列に意味の区
切りなどのために挿入されている特殊文字を意味してお
り、例えばハングル語で頻繁に出現するスペースなどが
ある。2. Description of the Related Art FIG. 36 shows the configuration of a conventional character string collating apparatus, and FIG. 37 shows a conventional character collating method and the format of full-text search data. In FIG. 37 (a), 801
Is a character string "iroa-hani" input at the time of registration, 802 is a two-character chain "iro" to be registered first,
The two-letter chain "ro a" next to "2", and 804
The character chain “a wa” and 805 are the next two character chain “hani” after 804. Here, “a” means a special character inserted into a character string to separate meanings, for example, a space that frequently appears in Hangul.
【0003】図37(c)において、811は検索時の検
索文字列「いろaはに」、812は最初に検索される2
文字連鎖「いろ」、813は812の次の2文字連鎖
「ろa」、814は813の次の2文字連鎖「aは」、
815は814の次の2文字連鎖「はに」である。In FIG. 37 (c), reference numeral 811 denotes a search character string "iro a ha ni" at the time of search, and 812 denotes a search character string which is searched first.
The character chain “Iro”, 813 is the next two-character sequence “roa” after 812, 814 is the next two-character sequence “8a” after 813,
815 is the two-letter chain “Hani” following 814.
【0004】図37(b)において、2文字連鎖802
は「い」および「ろ」の出現回数n1、n2を、2文字連鎖
803は「ろ」および「a」の出現回数n2、n3を、2文
字連鎖804は「a」および「は」の出現回数n3、n4
を、2文字連鎖805は「は」および「に」の出現回数
n4、n5を記憶する。In FIG. 37 (b), a two-character chain 802
The number of appearances n1 and n2 of “yes” and “ro”, the two-character chain 803 is the number of appearances n2 and n3 of “ro” and “a”, and the two-character chain 804 is the occurrence of “a” and “ha” Number of times n3, n4
, The two-character chain 805 is the number of appearances of “ha” and “ni”
Store n4 and n5.
【0005】また、図37(d)は入力された文字列に
「いろ」の連鎖が複数存在する場合の記録形式を示す。
即ち、「いろ」の連鎖はn1回目に出現した「い」とn2回
目に出現した「ろ」、na回目に出現した「い」とnb回目
に出現した「ろ」、・・・、nx回目に出現した「い」と
ny回目に出現した「ろ」からなることを示している。FIG. 37 (d) shows a recording format in the case where a plurality of "iro" chains exist in the input character string.
That is, the sequence of "iro" is such that "iro" appeared at the n1st time and "ro" appeared at the n2th time, "iro" appeared at the nath time and "ro" appeared at the nbth time, ..., nxth "I" appeared in
It is composed of "ro" that appeared at the ny-th time.
【0006】このとき従来の照合方法では、2文字連鎖
812の「いろ」に該当する2文字連鎖802を検出
し、このときの「ろ」の出現回数n2と、812の次の2
文字連鎖813の「ろa」に該当する2文字連鎖803
を検出し、このときの「ろ」の出現回数n2が一致するか
否か判断する。At this time, in the conventional collation method, a two-character chain 802 corresponding to the “color” of the two-character chain 812 is detected.
A two-character chain 803 corresponding to “a” in the character chain 813
Is detected, and it is determined whether or not the number of appearances n2 of “ro” at this time matches.
【0007】一致したら、次に803で検出した「a」
の出現回数n3と、813の次の2文字連鎖の「aは」に
該当する2文字連鎖804を検出し、このときの「a」
の出現回数が一致するか否か判断する。If they match, then "a"
Is detected, and a two-character chain 804 corresponding to “a wa” of the two-character chain following the 813 is detected.
It is determined whether or not the number of appearances of the two matches.
【0008】一致したら、次に804で検出した「は」
の出現回数n4と、814の次の2文字連鎖の「はに」に
該当する2文字連鎖805を検出し、このときの「は」
の出現回数が一致するか否か判断する。一致したら、文
字列811は801に一致したと判断する。以上によ
り、文字列の照合がなされる。If they match, then the "ha" detected at 804
Is detected, and a two-character chain 805 corresponding to “Hani” in the next two-character chain of 814 is detected.
It is determined whether or not the number of appearances of the two matches. If they match, it is determined that the character string 811 matches 801. As described above, the character strings are collated.
【0009】図36は図37に示す検索データを用いた
従来の文字列照合装置の構成を示したものである。FIG. 36 shows a configuration of a conventional character string collation apparatus using the search data shown in FIG.
【0010】図36において、701は登録する文字列
801から登録する2文字連鎖802、803、80
4、805を検出する2文字連鎖検出器、702は2文
字連鎖802、803、804、805およびそれらの
文字の出現回数を格納する2文字連鎖メモリ、703は
検索する文字列811から検索する2文字連鎖812、
813、814、815を検出する2文字連鎖検出器、
704は2文字連鎖検出器703より検出された2文字
連鎖812、813、814、815を2文字連鎖メモ
リ702で検出し、検出した2文字連鎖の前の文字の出
現回数が直前に検出した2文字連鎖の後の文字の出現回
数に一致するか否か判断する比較器、705は2文字連
鎖検出器703から検出される全ての2文字連鎖につい
ての比較器704で判断し、文字列の一致を判断する制
御部である。In FIG. 36, reference numeral 701 denotes a two-character chain 802, 803, 80 to be registered from a character string 801 to be registered.
2, a two-character chain detector 702 for detecting the two-character chains 802, 803, 804, 805 and the number of appearances of those characters; and 703, a two-character chain for searching from the character string 811 to be searched. Character chain 812,
A two-character chain detector that detects 813, 814, 815;
Reference numeral 704 denotes the two-character chain 812, 813, 814, and 815 detected by the two-character chain detector 703 in the two-character chain memory 702, and the number of appearances of the character preceding the detected two-character chain is detected by the last two characters. A comparator 705 determines whether or not the number of occurrences of the character after the character chain matches. The comparator 704 determines all character strings detected by the two-character chain detector 703 and matches the character strings. Is a control unit that determines
【0011】[0011]
【発明が解決しようとする課題】しかし、以上のような
構成では、登録時に入力する文字列に意味の区切りなど
のために特殊文字(ハングル語におけるスペース等)が
挿入されている場合、例えばそれが入力文字列の3文字
に1文字の割合で挿入されていた場合、その文字の出現
回数が膨大になりその文字の連鎖メモリのみが異常に膨
大し、連鎖メモリを圧迫するという問題点があった。ま
た、同一の文字連鎖に関し、出現回数の一致により連鎖
を抽出する処理が多数繰り返すことにになり、時間がか
かるという問題があった。However, in the above-described configuration, when a special character (such as a space in Hangul) is inserted into a character string input at the time of registration to separate meanings, for example, the character string may not be inserted. If one character is inserted into three characters of the input character string at a rate of one character, the number of appearances of the character becomes enormous, and only the chain memory of the character becomes abnormally enormous. Was. Further, for the same character chain, the process of extracting the chain based on the coincidence of the number of appearances is repeated many times, and there is a problem that it takes time.
【0012】本発明は従来技術の以上のような問題を解
決するもので、意味区切りで等で使用される特定の特殊
文字を間に挟む3文字連鎖として連鎖を作成するか、ま
たはその特殊文字に連接する文字により一意に決定され
る文字に変更するか、またはその特殊文字の前の文字は
その前の文字とその前の文字により一意に決定される文
字の2文字に、またその特殊文字の後の文字はその後の
文字により一意に決定される文字とその後の文字の2文
字に変更することにより、特殊文字の出現回数を減らし
特殊文字の連鎖メモリの増大を避けるもので、同時に出
現回数の一致による連鎖の抽出処理を効率的行うことを
目的とするものである。The present invention solves the above-mentioned problems of the prior art, and forms a chain as a three-character chain sandwiching a specific special character used as a delimiter or the like, or forms the special character. Is changed to a character uniquely determined by the character adjacent to the character, or the character before the special character is replaced by the two characters of the character before and the character uniquely determined by the preceding character, and the special character The character after is changed to two characters, a character uniquely determined by the following character and the subsequent character, thereby reducing the number of special characters and avoiding an increase in the special character chain memory. It is an object of the present invention to efficiently perform a process of extracting a chain based on the matching of.
【0013】[0013]
【課題を解決するための手段】本発明は、第1に、全文
検索データを、検索対象文字列に対し、予め指定された
特殊文字以外の文字からなる全ての2文字連鎖を検出
し、2文字連鎖毎に、2文字連鎖を構成する第1文字と
第2文字の検索対象文字列における出現回数を組として
記録した第1のデータと、予め指定された特殊文字が挿
入された特殊文字以外の2文字からなる全ての文字連鎖
を検出し、前記文字連鎖毎に、文字連鎖を構成する第1
文字と第2文字の検索対象文字列における出現回数を組
として記録した第2のデータを、第1データと第2デー
タとを区別して記録し、検索文字列から、予め指定され
た特殊文字以外の文字からなる全ての2文字連鎖と、予
め指定された特殊文字が挿入された特殊文字以外の2文
字からなる全ての文字連鎖を検出し、それぞれの文字連
鎖を第1のデータおよび第2のデータから検索し、検出
された文字連鎖に対応する出現回数の比較により、検索
文字列としての文字連鎖の有無を判定することにより上
記課題を解決している。According to the present invention, first, full-text search data is detected by detecting all two-character sequences consisting of characters other than special characters specified in advance for a character string to be searched. For each character chain, first data that records the number of appearances of the first character and the second character forming the two-character chain in the search target character string as a set, and special characters other than the special character in which a special character specified in advance is inserted All character chains consisting of two characters are detected, and a first character chain forming a character chain is detected for each of the character chains.
The second data, in which the number of appearances of the character and the second character in the search target character string are recorded as a set, is recorded separately from the first data and the second data. Are detected, and all character chains consisting of two characters other than the special character in which a special character specified in advance is inserted are detected, and the respective character chains are converted into the first data and the second data. The above problem is solved by searching data and comparing the number of appearances corresponding to the detected character chain to determine the presence or absence of a character chain as a search character string.
【0014】第2に、全文検索データを、検索対象文字
列の予め指定された特殊文字を隣接する文字に従い検索
の対象とならない文字に変換し、当該変換された文字列
に対し、前記検索の対象とならない文字も含め全ての2
文字連鎖を検出し、2文字連鎖毎に、2文字連鎖を構成
する第1文字と第2文字の検索対象文字列における出現
回数を組として記録し、検索文字列の予め指定された特
殊文字を前記記録媒体に記録されたデータに対し適用さ
れた同一の規則に従い、隣接する文字に基づき検索の対
象とならない文字に変換するし、変換された文字列に対
し、検索の対象とならない文字も含め全ての2文字連鎖
を検出し、検出された2文字連鎖を、前記記憶媒体から
検出し、対応する出現回数の比較により、検索文字列と
しての文字連鎖の有無を判定することにより上記課題を
解決している。Second, the full-text search data is converted into characters that are not to be searched according to adjacent special characters of a special character specified in the character string to be searched. All 2 including non-target characters
A character chain is detected, and for each two-character chain, the number of appearances of the first character and the second character constituting the two-character chain in the search target character string is recorded as a set. According to the same rules applied to the data recorded on the recording medium, convert to characters that are not to be searched based on adjacent characters, and include characters that are not to be searched for the converted character string. The above problem is solved by detecting all the two-character chains, detecting the detected two-character chains from the storage medium, and comparing the corresponding appearance counts to determine the presence or absence of a character chain as a search character string. doing.
【0015】第3に、全文検索データを、検索対象文字
列の予め指定された特殊文字を隣接する文字に従い検索
の対象とならない2文字に変換し、当該変換された文字
列に対し、前記検索の対象とならない文字も含め全ての
2文字連鎖を検出し、2文字連鎖毎に、2文字連鎖を構
成する第1文字と第2文字の検索対象文字列における出
現回数を組として記録し、検索文字列の予め指定された
特殊文字を前記記録媒体に記録されたデータに対し適用
された同一の規則に従い、隣接する文字に基づき検索の
対象とならない2文字に変換し、変換された文字列に対
し、検索の対象とならない2文字も含め全ての2文字連
鎖を検出し、検出された2文字連鎖を、前記記憶媒体か
ら検出し、対応する出現回数の比較により、検索文字列
としての文字連鎖の有無を判定することにより上記課題
を解決している。Third, the full-text search data is converted into two characters that are not to be searched according to adjacent special characters of a pre-specified special character of the character string to be searched. , And all the two-character chains including the characters that are not the target of the search are detected, and for each two-character chain, the number of appearances of the first character and the second character constituting the two-character chain in the search target character string is recorded as a set. In accordance with the same rule applied to the data recorded on the recording medium, the special character specified in advance in the character string is converted into two characters that are not searched based on adjacent characters, and the converted character string is obtained. On the other hand, all the two-character sequences including the two characters that are not searched are detected, the detected two-character sequences are detected from the storage medium, and the corresponding occurrence counts are compared to find a character sequence as a search character string. It solves the problem by determining the presence or absence.
【0016】第4に、全文検索データを、検索対象文字
列に対し、全ての文字に対し2文字連鎖を検出し、2文
字連鎖毎に2文字連鎖を構成する、予め指定された特殊
文字以外の文字連鎖を構成する第1文字と第2文字につ
いて、予め指定された特殊文字以外の文字はその出現回
数を、また予め指定された特殊文字の場合は一定の数値
を、組として記録した第3のデータと、検索対象文字列
に対し、予め指定された特殊文字が間に挿入された3文
字からなる全ての3文字連鎖を検出し、3文字連鎖毎
に、3文字連鎖を構成する第1文字と第3文字の出現回
数を組として記録した第4のデータを、記録、アクセス
することにより、上記課題を解決している。Fourth, the full-text search data is searched for a character string to be searched, and a two-character chain is detected for every character. For the first character and the second character constituting the character chain of, the number of appearances of characters other than the special character specified in advance, and a fixed numerical value in the case of the special character specified in advance, are recorded as a set. In the data 3 and the search target character string, all three-character chains consisting of three characters in which a special character designated in advance is inserted are detected, and a three-character chain is formed for each three-character chain. The above problem is solved by recording and accessing fourth data in which the number of appearances of one character and the third character is recorded as a set.
【0017】第5に、全文検索データを、検索対象文字
列に対し、予め指定された特殊文字以外の文字からなる
全ての2文字連鎖を検出し、2文字連鎖毎に2文字連鎖
を構成する第1文字と第2文字の検索対象文字列におけ
る出現回数を組として記録した第5のデータと、検索対
象文字列に対し、予め指定された特殊文字が間に挿入さ
れた3文字からなる全ての3文字連鎖を検出し、3文字
連鎖毎に、3文字連鎖を構成する第1文字の出現回数と
値0の組と、値0と第3文字の出現回数の組として記録
した第6のデータを、記録、アクセスすることにより、
上記課題を解決している。第6に、全文検索データを、
検索対象文字列に対し、予め指定された特殊文字以外の
文字からなる全ての2文字連鎖を検出し、2文字連鎖毎
に2文字連鎖を構成する第1文字と第2文字の検索対象
文字列における出現回数を組として記録した第7のデー
タと、検索対象文字列に対し、予め指定された特殊文字
が間に挿入された3文字からなる全ての3文字連鎖を検
出し、3文字連鎖毎に、3文字連鎖を構成する第2文字
の特殊文字を第3文字と同じ文字に変換し第2文字の出
現回数を第3文字の出現回数と同じ値としてから第1文
字と第2文字、第2文字と第3文字の2つの2文字連鎖
を生成し、各2文字連鎖毎に2文字連鎖を構成する第1
文字と第2文字の検索対象文字列における出現回数を組
として記録した第8のデータを、記録、アクセスするこ
とにより、上記課題を解決している。Fifth, in the full-text search data, a two-character chain consisting of characters other than a special character specified in advance is detected for a character string to be searched, and a two-character chain is formed for every two-character chain. Fifth data in which the number of appearances of the first character and the second character in the search target character string are recorded as a set, and all three characters including a special character specified in advance with respect to the search target character string And a sixth character string recorded as a set of the number of appearances of the first character and the value 0 and a set of the value 0 and the number of appearances of the third character for each three-character chain. By recording and accessing data,
The above problem has been solved. Sixth, full-text search data
For the character string to be searched, all two-character strings consisting of characters other than the special characters specified in advance are detected, and the first and second character strings forming the two-character string are formed for each two-character string. In the seventh data recorded as a set of the number of appearances in and the search target character string, all three-character chains consisting of three characters in which a special character specified in advance is inserted are detected. The first character and the second character are converted from the special character of the second character constituting the three-character chain to the same character as the third character, and the number of appearances of the second character is set to the same value as the number of occurrences of the third character. A first two-character chain that generates two character chains of a second character and a third character, and forms a two-character chain for each two-character chain
The above problem is solved by recording and accessing eighth data in which the number of appearances of a character and a second character in a search target character string is recorded as a set.
【0018】第7に全文検索に用いる検索データを、前
記検索データは検索対象文字列に対し、全ての2文字連
鎖を検出し、2文字連鎖毎に2文字連鎖を構成し、2文
字連鎖が、予め指定された特殊文字以外の文字連鎖の構
成の場合には、第1文字と第2文字について予め指定さ
れた特殊文字以外の文字はその出現回数の組を記録した
第9のデータと、2文字連鎖が、予め指定された特殊文
字を含む文字連鎖の構成の場合には、特殊文字に該当す
る第1文字または第2文字について、その出願回数が予
め指定された出現回数の最大値以下で割った余りと、ま
たは余りが0の場合は最大値、またはその最大値及び余
り、または1度目の出現回数が最大値以下である場合に
2度目以降の最大値以下の値が1度目の値と順番がユニ
ークとなるように値を持ち、特殊文字でない文字の出現
回数とを組として記憶した第10のデータで、かつ、第
1文字が特殊文字の場合、第10のデータの組は、第2
文字種別毎にソートされた前記第10のデータと、第9
データと第10データとを区別して記憶、アクセスする
ことがで、上記課題を解決している。Seventh, the search data used in the full-text search is detected. The search data detects all two-character chains in the search target character string, forms a two-character chain for every two-character chain, and In the case of a configuration of a character chain other than the special character designated in advance, ninth data in which a set of the number of appearances of the first character and the second character other than the special character designated in advance is recorded, In the case where the two-character chain is a character chain including a special character specified in advance, the number of applications for the first character or the second character corresponding to the special character is equal to or less than the maximum value of the number of appearances specified in advance. If the remainder is 0 or the remainder is 0, the maximum value, or the maximum value and the remainder, or if the first appearance count is less than the maximum value, the value less than or equal to the second maximum value is the first time Values and order are unique The have, in the tenth data storing and number of occurrences of the character is not a special character as a set, and, if the first character is a special character, the 10th set of data of the second
The tenth data sorted for each character type;
The above problem is solved by storing and accessing the data and the tenth data separately.
【0019】第8に、全文検索に用いる検索データは検
索対象文字列に対し、全ての2文字連鎖を検出し、2文
字連鎖毎に文書番号、2文字連鎖の文字種毎の出現回数
または任意の値の組からなる文字連鎖データを構成し、
前記文字連鎖データが、予め指定された特殊文字を含ま
ない場合は第1文字の出現回数と第2文字の出現回数を
格納するサイズが等しく、予め指定された特殊文字を含
む場合は特殊文字に該当する出現回数を格納するサイズ
が特殊文字を含まない文字に該当する任意の値を格納す
るサイズに比べて大きくなるように構成された文字連鎖
データで、前記文字連鎖データが、第1文字に予め指定
された特殊文字列を含む場合は、第2文字が指定された
値を格納し、次の連続した文字連鎖データの第1文字が
前の文字連鎖データの第2文字で指定された値に等しく
なるように構成される文字連鎖データを記憶し、アクセ
スすることができ、上記課題を解決している。Eighth, the search data used in the full-text search detects all two-character sequences in the character string to be searched, and outputs a document number for each two-character sequence, the number of appearances for each character type of the two-character sequence, or an arbitrary number. Construct character chain data consisting of value pairs,
If the character chain data does not include a special character specified in advance, the size of storing the number of appearances of the first character and the number of occurrences of the second character is equal. The character chain data configured so that the size for storing the corresponding number of appearances is larger than the size for storing an arbitrary value corresponding to a character that does not include a special character. When a special character string specified in advance is included, the second character stores the specified value, and the first character of the next continuous character chain data is the value specified by the second character of the previous character chain data. The character chain data configured to be equal to can be stored and accessed, thereby solving the above problem.
【0020】第9に、全文検索データを、検索対象文字
列に対し、特殊文字を含まない全ての2文字連鎖を検出
し、2文字連鎖毎を構成する、予め指定された特殊文字
以外の文字連鎖を構成する第1文字と第2文字につい
て、予め指定された特殊文字以外の文字はその出現回数
を組として記録した第11のデータと、検索対象文字列
に対して、予め指定された特殊文字をまたぐ2文字連鎖
について特殊文字の前にある2文字連鎖の1文字目の文
字種の出現回数と、特殊文字の後ろにある2文字連鎖の
1文字目の文字種の出現回数を組として記録した第12
のデータまたは特殊文字の前にある2文字連鎖の1文字
目の文字種の出現回数と、特殊文字の直後の文字の出現
回数を組とした第12のデータを、記録、アクセスする
ことにより上記課題を解決している。Ninth, the full-text search data is obtained by detecting all two-character chains that do not include special characters in the character string to be searched, and forming characters for each two-character chain except for the special characters specified in advance. Regarding the first character and the second character constituting the chain, the characters other than the special character designated in advance are stored in the eleventh data recorded as a set of the number of occurrences thereof, and the special character designated in advance for the search target character string. As a two-character chain that straddles characters, the number of appearances of the first character type of the two-character chain preceding the special character and the number of appearances of the first character type of the two-character chain following the special character are recorded as a set. Twelfth
The above problem can be solved by recording and accessing twelfth data, which is a combination of the number of occurrences of the first character type of the two-character chain preceding the special character or the special character and the number of occurrences of the character immediately after the special character. Has been resolved.
【0021】第10に、全文検索データを、検索対象文
字列に対し、予め指定された特殊文字以外の文字からな
る全ての2文字連鎖を検出し、2文字連鎖毎に、2文字
連鎖を構成する第1文字または第2文字の検索対象文字
列における出現位置を2文字連鎖の出現位置として記録
した第1の3データと、予め指定された特殊文字が挿入
された全ての文字連鎖を検出し、前記文字連鎖毎に、文
字連鎖を構成する第1文字の検索対象文字列における出
現位置を前記文字連鎖の出現位置として記録した第14
のデータを、第13データと第14データとを区別して
記録し、検索文字列から、予め指定された特殊文字以外
の文字からなる全ての2文字連鎖と、予め指定された特
殊文字が挿入された全ての文字連鎖を検出し、それぞれ
の文字連鎖を第13のデータおよび第14のデータから
検索し、検出された文字連鎖に対応する出現位置の比較
により、検索文字列としての文字連鎖の有無を判定する
ことにより上記課題を解決している。Tenth, in the full-text search data, a two-character chain consisting of characters other than a special character specified in advance is detected for a character string to be searched, and a two-character chain is formed for each two-character chain. The first three data in which the appearance position of the first character or the second character in the search target character string is recorded as the appearance position of a two-character chain, and all the character chains into which a special character specified in advance is inserted are detected. In the fourteenth aspect, for each of the character chains, the appearance position of the first character constituting the character chain in the search target character string is recorded as the appearance position of the character chain.
Is recorded separately from the thirteenth data and the fourteenth data, and from the search character string, all two-character chains consisting of characters other than the special character specified in advance and the special character specified in advance are inserted. All of the detected character chains are searched, and the respective character chains are searched from the thirteenth data and the fourteenth data. By comparing the appearance positions corresponding to the detected character chains, the presence or absence of the character chain as the search character string is determined. The above problem has been solved by determining.
【0022】第11に、全文検索データを、検索対象文
字列の予め指定された特殊文字を隣接する文字に従い検
索の対象とならない文字に変換し、当該変換された文字
列に対し、前記検索の対象とならない文字も含め全ての
2文字連鎖を検出し、2文字連鎖毎に、2文字連鎖を構
成する第1文字または第2文字の検索対象文字列におけ
る出現位置を2文字連鎖の出現位置として記録し、検索
文字列の予め指定された特殊文字を前記記録媒体に記録
されたデータに対し適用された同一の規則に従い、隣接
する文字に基づき検索の対象とならない文字に変換し、
変換された文字列に対し、検索の対象とならない文字も
含め全ての2文字連鎖を検出し、検出された2文字連鎖
を、前記記憶媒体から検出し、対応する出現位置の比較
により、検索文字列としての文字連鎖の有無を判定する
ことにより上記課題を解決している。Eleventh, the full-text search data is converted into a non-search target character according to adjacent characters of a pre-specified special character of the search target character string. Detects all two-character chains including non-target characters, and sets the appearance position of the first character or the second character constituting the two-character chain in the search target character string as the appearance position of the two-character chain for each two-character chain Record, according to the same rules applied to the data recorded on the recording medium, the pre-specified special character of the search character string is converted into a character that is not a search target based on adjacent characters,
In the converted character string, all the two-character sequences including the characters that are not to be searched are detected, the detected two-character sequences are detected from the storage medium, and the corresponding occurrence positions are compared to find the search character. The above problem is solved by determining the presence or absence of a character chain as a column.
【0023】第12に、全文検索データを、検索対象文
字列の予め指定された特殊文字を前後の隣接する文字に
従い検索の対象とならない2つの文字に変換し、当該変
換された文字列に対し、前記検索の対象とならない文字
も含め全ての2文字連鎖を検出し、2文字連鎖毎に、2
文字連鎖を構成する第1文字または第2文字の検索対象
文字列における出現位置を2文字連鎖の出現位置として
記録し、検索文字列の予め指定された特殊文字を前記記
録媒体に記録されたデータに対し適用された同一の規則
に従い、隣接する文字に基づき検索の対象とならない2
文字に変換し、変換された文字列に対し、検索の対象と
ならない2文字も含め全ての2文字連鎖を検出し、検出
された2文字連鎖を、前記記憶媒体から検出し、対応す
る出現位置の比較により、検索文字列としての文字連鎖
の有無を判定することにより上記課題を解決している。
第13に、全文検索データを、検索対象文字列に対し、
予め指定された特殊文字以外の文字からなる全ての2文
字連鎖を検出し、前記2文字連鎖毎に2文字連鎖を構成
する第1文字または第2文字の検索対象文字列における
出現位置を2文字連鎖の出現位置として記録したデータ
と、検索対象文字列に対し、予め指定された特殊文字が
間に挿入された3文字からなる全ての3文字連鎖を検出
し、3文字連鎖毎に、3文字連鎖を構成する第2文字の
特殊文字を第3文字と同じ文字に変換し第2文字の出現
位置を第3文字の出現位置と同じ値としてから第1文字
と第2文字、第2文字と第3文字の2つの2文字連鎖を
生成し、3文字連鎖の第1文字と第2文字からなる2文
字連鎖の第1文字または第2文字の出現位置を記録した
データからなる第15のデータと、前記3文字連鎖の第
2文字と第3文字からなる2文字連鎖の第1文字または
第2文字の出現位置を記録した第16のデータを、記
録、アクセスすることにより、上記課題を解決してい
る。Twelfth, the full-text search data is converted into two characters that are not to be searched according to adjacent special characters before and after a special character specified in the character string to be searched. , All the two-character sequences including the characters not to be searched are detected.
The appearance position of the first character or the second character constituting the character chain in the search target character string is recorded as the appearance position of the two-character chain, and the special character designated in advance in the search character string is recorded on the recording medium. Are not searched for based on adjacent characters according to the same rules applied to
The character string is converted to a character string, all two-character sequences including two characters that are not to be searched are detected in the converted character string, the detected two-character sequence is detected from the storage medium, and a corresponding appearance position is detected. The above problem is solved by determining the presence or absence of a character chain as a search character string by comparing.
Thirteenth, the full-text search data is
Detects all two-character sequences consisting of characters other than the special characters specified in advance, and sets the appearance position of the first character or the second character constituting the two-character sequence in the search target character string to two characters for each of the two-character sequences. With respect to the data recorded as the appearance position of the chain and the search target character string, all three-character chains consisting of three characters in which a special character specified in advance is inserted are detected. The special character of the second character constituting the chain is converted into the same character as the third character, and the appearance position of the second character is set to the same value as the appearance position of the third character. Fifteenth data consisting of data that generates two two-character chains of the third character and records the appearance position of the first character or the second character of the two-character chain consisting of the first character and the second character of the three-character chain And the second and third characters of the three-character chain The first 16 of the data recording the occurrence position of the first character or the second character Ranaru 2 character chain, recording, by accessing solves the above problems.
【0024】第14に、全文検索に用いる検索データを
記録したコンピュータ読み取り可能な記憶媒体であっ
て、前記検索データは検索対象文字列に対し、2文字連
鎖と文字位置を検出し、2文字連鎖毎に検索対象文字列
から構成される文書番号と2文字連鎖と文字位置の組を
2文字連鎖情報として構成し、2文字連鎖情報の文字位
置は、検索対象文字列の先頭を基準として予め指定され
た特殊文字の位置は除外して昇順に番号付けをし、さら
に文字連鎖の第1文字毎に文字連鎖情報を格納している
記憶媒体であって、特殊文字を含まない2文字連鎖で第
1文字と第2文字の組と、特殊文字を除外した文字位置
での第1文字の文字位置、および文書番号を組として記
録した第17のデータと、特殊文字の直前の文字と特殊
文字を組み合わせた2文字連鎖、特殊文字の文字種によ
り規定される任意の固定値、および文書番号の組から構
成される第18のデータと、特殊文字と特殊文字の直後
の文字を組合わせた2文字連鎖、特殊文字を除外した文
字位置での第2文字の文字位置、および文書番号から構
成される第19のデータと、特殊文字の直前と直後の文
字を組み合わせた2文字連鎖、特殊文字を除外した文字
位置での第1文字の文字位置、および文書番号から構成
される第20のデータと、第17のデータ、第18のデ
ータ、第19のデータ、第20のデータの2文字連鎖の
第1文字目毎に整列して文字連鎖情報として格納し、第
17のデータ、第18のデータおよび第19のデータに
対しては、2つの文字連鎖の1文字目が同じで2文字目
が特殊文字の場合に第17のデータの直後に第18のデ
ータを格納し、全文検索データを記録、アクセスするこ
とにより、上記課題を解決している。Fourteenth, a computer-readable storage medium storing search data used for full-text search, wherein the search data detects a two-character chain and a character position in a search target character string, A set of a document number, a two-character chain, and a character position composed of a search target character string is configured as two-character chain information for each time. The positions of the special characters are excluded and numbering is performed in ascending order. Further, the storage medium storing character chain information for each first character of the character chain. The seventeenth data recorded as a set of one character and the second character, the character position of the first character at the character position excluding the special character, and the document number, and the character immediately before the special character and the special character Combined A two-character chain combining the eighteenth data consisting of a character chain, an arbitrary fixed value defined by the character type of a special character, and a document number, a special character and the character immediately following the special character, a special character In the two-character chain combining the nineteenth data consisting of the character position of the second character at the character position excluding the character and the document number, and the characters immediately before and after the special character, the character position excluding the special character 20th data composed of the character position of the first character and the document number, and the first character of the two-character chain of the seventeenth data, the eighteenth data, the nineteenth data, and the twentieth data , And stored as character chain information. For the seventeenth data, the eighteenth data, and the nineteenth data, when the first character of the two character chains is the same and the second character is a special character, Seventeenth data The first 18 data stored after recording a full-text search data by accessing solves the above problems.
【0025】第15に、全文検索に用いる検索データを
記録したコンピュータ読み取り可能な記憶媒体であっ
て、前記検索データは検索対象文字列に対し、2文字連
鎖と文字位置を検出し、2文字連鎖毎に検索対象文字列
から構成される文書番号と2文字連鎖と文字位置の組を
2文字連鎖情報として構成し、文字連鎖の第1文字毎に
文字連鎖情報を格納している記憶媒体し、2文字連鎖情
報の文字位置は、検索対象文字列の先頭を基準として予
め指定された特殊文字の位置は除外して昇順または降順
に番号付けをし、特殊文字を含まない文字種の場合には
第1文字と第2文字の組と、第1文字の文字位置と、文
書番号を組として記録した第21のデータと、特殊文字
を含む文字連鎖情報は、特殊文字の直前の文字に対して
は、特殊文字の直前の文字と特殊文字の直後の文字を組
み合わせた文字連鎖、特殊文字の直前の文字位置および
文書番号の組から構成され、また該文字連鎖情報の文字
連鎖の第1文字と第2文字が、特殊文字を含まない場合
の文字連鎖情報の文字連鎖の第1文字または第2文字が
一致する場合には特殊文字を含まない文字連鎖情報の後
または前に別個に記録されるように構成される第22の
データと、特殊文字を含む文字連鎖情報は、特殊文字の
直後の文字に対しては、特殊文字の直後の文字とその文
字に続く文字を組合わせた文字連鎖、特殊文字の直後の
文字位置および文書番号から構成され、また該文字連鎖
情報の文字連鎖の第1文字が、特殊文字を含まない場合
の2文字連鎖の第1文字と一致する場合には特殊文字を
含まない文字連鎖情報の後または前に別個に記録される
ように構成される第23のデータと、特殊文字を含む文
字連鎖情報は、特殊文字の2個前の文字と特殊文字の直
後の文字とを組み合わせた文字連鎖、特殊文字の2個前
の文字位置および文書番号から構成される第24のデー
タと、第21データ、第22データ、第23データ、第
24データを区別して記憶されていることを特徴とす
る、全文検索データを記録、アクセスすることにより、
上記課題を解決している。Fifteenth, a computer-readable storage medium storing search data used for full-text search, wherein the search data detects a two-character chain and a character position with respect to a character string to be searched; A storage medium that stores a set of a document number, a two-character chain, and a character position, each of which is a search target character string, as two-character chain information, and stores character chain information for each first character of the character chain; The character position of the two-character chain information is numbered in ascending or descending order excluding the position of the special character specified in advance with respect to the beginning of the search target character string. The 21st data recorded as a set of one character and the second character, the character position of the first character, and the document number, and the character chain information including the special character are: , Just before special characters A character chain consisting of a character and a character immediately following a special character, a set of a character position immediately before the special character and a document number. The first and second characters of the character chain of the character chain information are special characters. When the first character or the second character of the character chain of the character chain information in the case where the character chain information does not include the character string information, the first character or the second character is separately recorded before or after the character chain information not including the special character. Data and character chain information including special characters, for the character immediately after the special character, the character chain that combines the character immediately after the special character and the character that follows that character, the character position immediately after the special character And a document number, and when the first character of the character chain of the character chain information matches the first character of the two-character chain when no special character is included, the character chain information without the special character is included. After or before The 23rd data configured to be recorded in each character and the character chain information including the special character include a character chain combining the character two characters before the special character and the character immediately after the special character, Full-text search data characterized in that the twenty-fourth data composed of the character position and the document number two characters before and the twenty-first data, the twenty-second data, the twenty-third data, and the twenty-fourth data are stored separately. By recording and accessing
The above problem has been solved.
【0026】また、本発明の文字列照合装置は、第1
に、上記課題解決するための第1の手段による全文検索
に用いる検索データを記録したコンピュータ読み取り可
能な記録媒体と、検索文字列から、予め指定された特殊
文字以外の文字からなる全ての2文字連鎖を検出する第
1の文字連鎖検出手段と、検索文字列から、予め指定さ
れた特殊文字が挿入された特殊文字以外の2文字からな
る全ての文字連鎖を検出する第2の文字連鎖検出手段
と、第1の文字連鎖検出手段により検出された2文字連
鎖を、前記記録媒体に記録された第1のデータから検索
し、第2の文字連鎖検出手段により検出された文字連鎖
を検出し、検出された文字連鎖に対応する出現回数の比
較により、検索文字列としての文字連鎖の連続の有無を
判定する比較手段とを備えたことを特徴とする。Further, the character string collating device of the present invention comprises:
In addition, a computer-readable recording medium storing search data used for full-text search by the first means for solving the above-mentioned problem, and all two characters consisting of characters other than special characters specified in advance from a search character string First character chain detecting means for detecting a chain, and second character chain detecting means for detecting, from the search character string, all character chains consisting of two characters other than the special character in which a predetermined special character is inserted. And searching the two-character chain detected by the first character chain detecting means from the first data recorded on the recording medium, detecting the character chain detected by the second character chain detecting means, A comparison unit that determines whether or not there is a continuation of the character chain as the search character string by comparing the number of appearances corresponding to the detected character chain.
【0027】第2に、第2の手段による全文検索に用い
る検索データを記録したコンピュータ読み取り可能な記
録媒体と、検索文字列の予め指定された特殊文字を前記
記録媒体に記録されたデータに対し適用された同一の規
則に従い、隣接する文字に基づき検索の対象とならない
文字に変換する文字列変換手段と、前記文字列変換手段
により変換された文字列に対し、検索の対象とならない
文字も含め全ての2文字連鎖を検出する2文字連鎖検出
手段と、前記2文字連鎖検出手段により検出された2文
字連鎖を、前記記録媒体から検出し、対応する出現回数
の比較により、検索文字列としての文字連鎖の連続の有
無を判定する比較手段とを備えたことを特徴とする。Secondly, a computer-readable recording medium storing search data used for full-text search by the second means, and a special character designated in advance as a search character string for data recorded on the recording medium. According to the same rule applied, a character string conversion unit that converts adjacent characters into characters that are not to be searched, and a character string that is converted by the character string conversion unit, including characters that are not to be searched. A two-character chain detecting means for detecting all the two-character chain, and a two-character chain detected by the two-character chain detecting means are detected from the recording medium, and the corresponding numbers of appearances are compared. Comparing means for judging the presence or absence of continuation of the character chain.
【0028】第3に、第3手段による全文検索に用いる
検索データを記録したコンピュータ読み取り可能な記録
媒体と、検索文字列の予め指定された特殊文字を前記記
録媒体に記録されたデータに対し適用された同一の規則
に従い、隣接する文字に基づき検索の対象とならない2
文字に変換する文字列変換手段と、前記文字列変換手段
により変換された文字列に対し、検索の対象とならない
2文字も含め全ての2文字連鎖を検出する2文字連鎖検
出手段と、前記2文字連鎖検出手段により検出された2
文字連鎖を、前記記録媒体から検出し、対応する出現回
数の比較により、検索文字列としての文字連鎖の連続の
有無を判定する比較手段とを備えたことを特徴とする文
字列照合装置。Third, a computer-readable recording medium on which search data used for full-text search by the third means is recorded, and a special character designated as a search character string is applied to data recorded on the recording medium. Not subject to search based on adjacent characters according to the same rule 2
A character string conversion means for converting to a character, a two-character chain detection means for detecting all two-character chains including two characters which are not to be searched from the character string converted by the character string conversion means, 2 detected by character chain detection means
A character string collating device comprising: a comparing unit that detects a character chain from the recording medium and determines whether there is a continuation of the character chain as a search character string by comparing the number of corresponding appearances.
【0029】第4に、第4の手段による全文検索に用い
る検索データを記録したコンピュータ読み取り可能な記
録媒体と、検索文字列から、予め指定された特殊文字以
外の文字からなる全ての2文字連鎖を検出する第1の文
字連鎖検出手段と、検索文字列から、予め指定された特
殊文字が挿入された3文字からなる全ての文字連鎖を検
出する第2の文字連鎖検出手段と、第1の文字連鎖検出
手段により検出された2文字連鎖を、前記記録媒体に記
録された第3のデータから検索し、第3の文字連鎖検出
手段により検出された文字連鎖を前記記録媒体に記録さ
れた第4のデータから検索し、検出された文字連鎖に対
応する出現回数の比較により、検索文字列としての文字
連鎖の連続の有無を判定する比較手段とを備えた構成と
なっている。Fourth, a computer-readable recording medium storing search data used for full-text search by the fourth means, and all two-character sequences consisting of characters other than special characters specified in advance from a search character string A first character chain detecting means for detecting all character chains consisting of three characters into which a special character designated in advance is inserted, from a search character string; and The two-character chain detected by the character chain detecting means is searched from the third data recorded on the recording medium, and the character chain detected by the third character chain detecting means is retrieved from the third data recorded on the recording medium. And a comparing unit that determines whether there is a continuation of the character chain as the search character string by comparing the number of appearances corresponding to the detected character chain by searching from the data of No. 4.
【0030】第5に、第5の手段による全文検索に用い
る検索データを記録したコンピュータ読み取り可能な記
録媒体と、検索文字列から、予め指定された特殊文字以
外の文字からなる全ての2文字連鎖を検出する第1の文
字連鎖検出手段と、検索文字列から、予め指定された特
殊文字が挿入された3文字からなる全ての文字連鎖を検
出する第3の文字連鎖検出手段と、第1の文字連鎖検出
手段により検出された2文字連鎖を、前記記録媒体に記
録された第5のデータから検索し、第3の文字連鎖検出
手段により検出された文字連鎖を前記記録媒体に記録さ
れた第6のデータから検索し、検出された文字連鎖に対
応する出現回数の比較により、検索文字列としての文字
連鎖の連続の有無を判定する比較手段とを備えた構成と
なっている。Fifth, a computer-readable recording medium storing search data used for full-text search by the fifth means, and all two-character sequences consisting of characters other than special characters specified in advance from a search character string A first character chain detecting means for detecting all character chains consisting of three characters into which a predetermined special character has been inserted, from a search character string; and The two-character chain detected by the character chain detecting means is searched from the fifth data recorded on the recording medium, and the character chain detected by the third character chain detecting means is retrieved from the fifth data recorded on the recording medium. And a comparing means for judging the presence or absence of continuation of the character chain as the search character string by comparing the number of appearances corresponding to the detected character chain by searching from the data of No. 6.
【0031】第6に、第6の手段による全文検索に用い
る検索データを記録したコンピュータ読み取り可能な記
録媒体と、検索文字列から、予め指定された特殊文字以
外の文字からなる全ての2文字連鎖を検出する第1の文
字連鎖検出手段と、検索文字列から、予め指定された特
殊文字が挿入された3文字からなる全ての3文字連鎖を
検出する第4の文字連鎖検出手段と、第1の文字連鎖検
出手段により検出された2文字連鎖を、前記記録媒体に
記録された第7のデータから検索し、第4の文字連鎖検
出手段により検出された特殊文字を変換して生成した2
文字連鎖を、前記記録媒体に記録された第8のデータか
ら検索し、検出された文字連鎖に対応する出現回数の比
較により、検索文字列としての文字連鎖の連続の有無を
判定する比較手段とを備えた構成となっている。Sixth, a computer-readable recording medium storing search data used for full-text search by the sixth means, and a two-character chain consisting of characters other than special characters specified in advance from a search character string A first character chain detecting unit for detecting all three-character chains consisting of three characters into which a predetermined special character has been inserted, from a search character string; The two-character chain detected by the character chain detecting means is searched from the seventh data recorded on the recording medium, and the special character detected by the fourth character chain detecting means is converted to generate a two-character string.
Comparing means for searching for a character chain from the eighth data recorded on the recording medium and comparing the number of appearances corresponding to the detected character chain to determine whether or not there is a continuation of the character chain as the search character string; Is provided.
【0032】第7に、第7の手段による全文検索に用い
る検索データを記録したコンピュータ読み取り可能な記
憶媒体と、検索文字列から、特殊文字を含まない全ての
2文字連鎖を検出する第5の文字連鎖検出手段と、検索
文字列から、特殊文字を含む全ての文字連鎖を検出する
第6の文字連鎖検出手段と、検索文字列が、第1の文字
連鎖検出手段で検出された2文字連鎖で構成される場合
には、検出された文字連鎖に対応する出現回数の比較に
より、検索文字列としての文字連鎖の連続の有無を判定
する比較手段と、検索文字列が、第6の文字連鎖検出手
段で検索された2文字連鎖で構成される場合には、検出
した文字連鎖の出現回数および特殊文字の出現回数の重
複した回数の比較により、検索文字列としての文字連鎖
の連続の有無を判定する比較手段とを備えた構成となっ
ている。Seventh, a computer-readable storage medium storing search data used for full-text search by the seventh means, and a fifth method for detecting all two-character sequences that do not include special characters from a search character string A character chain detecting means, a sixth character chain detecting means for detecting all character chains including special characters from the search character string, and a two-character chain detected by the first character chain detecting means. When the search string is composed of a sixth character chain, a comparison unit that determines the presence or absence of continuation of the character chain as a search character string by comparing the number of appearances corresponding to the detected character chain. In the case of a two-character chain searched by the detection means, the presence or absence of the continuation of the character chain as a search character string is determined by comparing the number of occurrences of the detected character chain and the number of times of occurrence of the special character. Size It has comparing means for a configuration with.
【0033】第8に、第8の手段による全文検索に用い
る検索データを前記記憶媒体と、検索文字列から、特殊
文字を含まない全ての2文字連鎖を検出する第5の文字
連鎖検出手段と、2文字連鎖が特殊文字を含まない場合
は、第5の文字連鎖検出手段で検出された連続した文字
連鎖に該当する文字連鎖データに対して、検出された文
字連鎖データの第2文字の出現回数と、前記文字連鎖に
続く文字連鎖の文字連鎖データの第1文字の出現回数を
比較することにより、検索文字列としての文字連鎖の連
続の有無を判定する比較手段とを備えた構成となってい
る。Eighthly, a fifth character chain detecting means for detecting, from the storage medium, search data used for full-text search by the eighth means, and all two-character strings that do not include special characters from a search character string. If the two-character chain does not include a special character, the appearance of the second character of the detected character chain data is compared with the character chain data corresponding to the continuous character chain detected by the fifth character chain detection unit. By comparing the number of times and the number of appearances of the first character of the character chain data of the character chain following the character chain, a comparison unit that determines whether or not the character chain as a search character string is continuous is provided. ing.
【0034】第9に、第9の手段による全文検索に用い
る検索データを前記記憶媒体と、検索文字列から、予め
指定された特殊文字以外の文字からなる全ての2文字連
鎖を検出する第1の文字連鎖検索手段と、特殊文字列か
ら、予め指定された特殊文字をまたぐ前後の2文字連鎖
に対して、特殊文字の前の2文字連鎖の第1文字と特殊
文字の後の2文字連鎖の第1文字とを組にした文字連鎖
を検出する第2の文字連鎖検出手段、または特殊文字の
前にある2文字連鎖の第1文字と特殊文字の直後の文字
の文字を組にした文字連鎖を検出する第2の文字連鎖検
出手段と、第1の文字連鎖検出手段により検出された2
文字連鎖を、前記記憶媒体に記録された第11のデータ
から検索または第12のデータから検索し、第11のデ
ータから検索した場合は第7の文字連鎖検出手段により
検出された文字連鎖を検索し、また第2のデータから検
索した場合は第1の文字連鎖検出手段により検出された
文字連鎖を検索し、検出された文字連鎖に対応する出現
回数の比較により、検索文字列としても文字連鎖の連続
の有無を判定する比較手段とを備えた構成となってい
る。Ninth, a first method for detecting, from the storage medium and the search character string, all two-character sequences consisting of characters other than the special characters specified in advance, using search data used for full-text search by ninth means. And a two-character chain before and after the special character and a two-character chain before and after the special character. A second character chain detecting means for detecting a character chain formed by combining the first character with the first character, or a character formed by combining the character of the first character of the two-character chain preceding the special character and the character immediately after the special character A second character chain detecting means for detecting a chain, and two characters detected by the first character chain detecting means.
The character chain is searched from the eleventh data or the twelfth data recorded on the storage medium. If the character chain is searched from the eleventh data, the character chain detected by the seventh character chain detecting means is searched. When the search is performed from the second data, the character chain detected by the first character chain detection means is searched, and the number of appearances corresponding to the detected character chain is compared, so that the character chain can be used as a search character string. And a comparing means for judging the presence or absence of the continuation.
【0035】また、第10に、第10の手段による全文
検索に用いる検索データを記録したコンピュータ読み取
り可能な記録媒体と、検索文字列から、予め指定された
特殊文字以外の文字からなる全ての2文字連鎖を検出す
る第1の文字連鎖検出手段と、検索文字列から、予め指
定された特殊文字が挿入された3文字からなる全ての文
字連鎖を検出する第2の文字連鎖検出手段と、第1の文
字連鎖検出手段により検出された2文字連鎖を、前記記
録媒体に記録された第13のデータから検索し、第8の
文字連鎖検出手段により検出された文字連鎖を前記記録
媒体に記録された第14のデータから検索し、検出され
た文字連鎖に対応する出現位置の比較により、検索文字
列としての文字連鎖の連続の有無を判定する比較手段と
を備えた構成となっている。Tenth, a computer-readable recording medium on which search data used for full-text search by the tenth means is recorded, and all two-byte characters consisting of characters other than special characters specified in advance from a search character string. A first character chain detecting means for detecting a character chain, a second character chain detecting means for detecting, from the search character string, all character chains of three characters into which a predetermined special character is inserted, The two-character chain detected by the first character-chain detecting means is searched from the thirteenth data recorded on the recording medium, and the character chain detected by the eighth character-chain detecting means is recorded on the recording medium. And a comparing unit that determines whether there is a continuation of the character chain as the search character string by comparing the appearance positions corresponding to the detected character chains by searching from the fourteenth data. To have.
【0036】第11に、第11の手段による全文検索に
用いる検索データを記録したコンピュータ読み取り可能
な記録媒体と、検索文字列の予め指定された特殊文字を
前記記録媒体に記録されたデータに対し適用された同一
の規則に従い、隣接する文字に基づき検索の対象となら
ない文字に変換する文字列変換手段と、検索文字列か
ら、検索の対象とならない文字も含め全ての2文字連鎖
を検出する2文字連鎖検出手段と、2文字連鎖検出手段
により検出された2文字連鎖を、前記記録媒体に記録さ
れたデータから検索し、検出された文字連鎖に対応する
出現位置の比較により、検索文字列としての文字連鎖の
連続の有無を判定する比較手段とを備えた構成となって
いる。Eleventh, a computer-readable recording medium recording search data used for full-text search by the eleventh means, and a special character designated in advance as a search character string are stored in the data recorded in the recording medium. A character string conversion unit that converts adjacent characters into characters that are not to be searched according to the same rule that has been applied, and detects all two-character chains from the search character string, including characters that are not to be searched. A character chain detecting unit and a two-character chain detected by the two-character chain detecting unit are searched from the data recorded on the recording medium, and an appearance position corresponding to the detected character chain is compared to form a search character string. And a comparing means for determining whether or not there is a continuation of the character chain.
【0037】第12に、第12の手段による全文検索に
用いる検索データを記録したコンピュータ読み取り可能
な記録媒体と、検索文字列の予め指定された特殊文字を
前記記録媒体に記録されたデータに対し適用された同一
の規則に従い、隣接する文字に基づき検索の対象となら
ない2文字に変換する文字列変換手段と、検索文字列か
ら、文字列に対し、検索の対象とならない2文字も含め
全ての2文字連鎖を検出する2文字連鎖検出手段と、2
文字連鎖検出手段により検出された2文字連鎖を、前記
記録媒体に記録されたデータから検索し、検出された文
字連鎖に対応する出現位置の比較により、検索文字列と
しての文字連鎖の連続の有無を判定する比較手段とを備
えた構成となっている。Twelfth, a computer-readable recording medium storing search data used for full-text search by the twelfth means, and a special character designated in advance as a search character string for data recorded on the recording medium. A character string conversion unit that converts adjacent characters into two characters that are not to be searched according to the same rule that has been applied, and all character strings, including two characters that are not to be searched, are converted from a search character string to a character string. Two-character chain detecting means for detecting a two-character chain;
The two-character chain detected by the character chain detecting means is searched from the data recorded on the recording medium, and the appearance position corresponding to the detected character chain is compared to determine whether or not the character chain as a search character string is continuous. And a comparing means for determining
【0038】第13に、第13の手段による全文検索に
用いる検索データを記録したコンピュータ読み取り可能
な記録媒体と、検索文字列から、予め指定された特殊文
字以外の文字からなる全ての2文字連鎖および予め指定
された特殊文字が間に挿入された3文字からなる全ての
3文字連鎖を検出し、3文字連鎖毎に、3文字連鎖を構
成する第2文字の特殊文字を第3文字と同じ文字に変換
し、第1文字と第2文字からなる2文字連鎖を検出する
第1の文字連鎖検出手段と、前記3文字連鎖の第2文字
と第3文字からなる2文字連鎖を検出する第10の文字
連鎖検出手段と、第1の文字連鎖検出手段により検出さ
れた2文字連鎖を、前記記録媒体に記録された第15の
データから検索し、第2の文字連鎖検出手段により検出
された特殊文字を変換して生成した2文字連鎖を、前記
記録媒体に記録された第16のデータから検索し、検出
された文字連鎖に対応する出現位置の比較により、検索
文字列としての文字連鎖の連続の有無を判定する比較手
段とを備えた構成となっている。Thirteenth, a computer-readable recording medium storing search data used for full-text search by the thirteenth means, and a two-character chain consisting of characters other than special characters specified in advance from a search character string And detects all three-character chains consisting of three characters with a special character inserted in advance, and for each three-character chain, the second special character constituting the three-character chain is the same as the third character A first character chain detecting means for converting the character sequence into a character and detecting a two-character chain composed of a first character and a second character; and a second character sequence detecting a two-character chain composed of a second character and a third character of the three-character sequence. The two character chains detected by the ten character chain detecting means and the first character chain detecting means are searched from the fifteenth data recorded on the recording medium, and are detected by the second character chain detecting means. Special characters The two-character chain generated by the replacement is searched from the sixteenth data recorded on the recording medium, and by comparing the appearance positions corresponding to the detected character chain, the presence or absence of the continuation of the character chain as the search character string is determined. And a comparing means for determining
【0039】第14に、第14の手段による全文検索に
用いる検索データを記録したコンピュータ読み取り可能
な記録媒体と、検索文字列から、特殊文字とその前後の
文字を除く全ての2文字連鎖を検出する第11の文字連
鎖検出手段と、検索文字列から、特殊文字の直前の文字
と直後の文字からなる2文字連鎖、特殊文字の直前の文
字と特殊文字からなる2文字連鎖、特殊文字と特殊文字
の直後の文字からなる2文字連鎖を検出する第12の文
字連鎖検出手段と、第11の文字連鎖検出手段で検出さ
れた2文字連鎖に対応する第17のデータと第12の文
字連鎖検出手段で検出された文字連鎖対応する第20の
データ、または第21のデータと第17のデータから2
つのデータの文字位置の差と文書番号の比較により、検
索文字列としての連続の有無を判断する比較手段と、第
20のデータの直後に第2のデータが続いていることに
より特殊文字を含む検索文字列としての連続の有無を判
断する比較手段とを備えた構成となっている。Fourteenthly, a computer-readable recording medium storing search data used for full-text search by the fourteenth means, and all two-character sequences except special characters and characters before and after the special characters are detected from a search character string. And a two-character chain consisting of the character immediately before and after the special character, a two-character chain consisting of the character immediately before the special character and the special character, and a special character and special character from the search character string. A twelfth character chain detecting means for detecting a two-character chain consisting of a character immediately following a character, and seventeenth data corresponding to the two-character chain detected by the eleventh character chain detecting means and a twelfth character chain detection From the 20th data corresponding to the character chain detected by the means, or the 21st data and the 17th data.
Comparing means for judging the presence or absence of continuation as a search character string by comparing the character position difference between the two data with the document number, and including a special character because the second data immediately follows the twentieth data A comparison means for determining whether or not there is a continuation as a search character string is provided.
【0040】第15に、第15の手段による全文検索に
用いる検索データを記録したコンピュータ読み取り可能
な記録媒体と、検索文字列から、特殊文字の前後の文字
を除く全ての2文字連鎖を検出する第13の文字連鎖検
出手段と、検索文字列から、特殊文字を間に挟む検索文
字列の場合は特殊文字の直前の文字と直後の文字を文字
連鎖として検出し、かつ該文字連鎖の第2文字は特殊文
字の直後の文字としてマークし、検索文字列の先頭が特
殊文字の場合は特殊文字の直後の文字とその次の文字を
文字連鎖として検出し、かつ該文字連鎖の第1文字は特
殊文字の直後の文字としてマークし、検索文字列の先頭
から3番目以降に特殊文字が出現する場合には、特殊文
字の2文字前の文字と特殊文字の直後の文字を文字連鎖
として検出し、かつ該文字連鎖の第2文字は特殊文字の
直後の文字としてマークし、さらに特殊文字の直後の文
字とその次の文字を文字連鎖として検出し、かつ該文字
連鎖の第1文字は特殊文字の直後の文字としてマークす
る第14の文字連鎖検出手段と、検索文字列が、第13
の文字連鎖検出手段で検出された2文字連鎖で構成され
る場合には、検出された文字連鎖に対応する文字位置と
文書番号の比較により、検索文字列としての文字連鎖の
連続の有無を判定する比較手段と、検索文字列が、第1
4の文字連鎖検出手段で検索された2文字連鎖で構成さ
れる場合には、第21データから第24データの文字連
鎖情報に一致するかどうかを文字連鎖と文書番号から検
索文字列としての文字連鎖の連続の有無を判定する比較
手段とを備えた構成となっている。Fifteenth, a computer-readable recording medium storing search data used for full-text search by the fifteenth means, and all two-character sequences excluding characters before and after a special character are detected from a search character string. A thirteenth character chain detecting means for detecting, from the search character string, a character immediately before and after the special character as a character chain in the case of a search character string sandwiching a special character; The character is marked as the character immediately following the special character. If the beginning of the search string is a special character, the character immediately after the special character and the next character are detected as a character chain, and the first character of the character chain is If the special character appears after the third character from the beginning of the search string, the character two characters before the special character and the character immediately after the special character are detected as a character chain. Or The second character of the character chain is marked as the character immediately after the special character, and the character immediately after the special character and the next character are detected as a character chain, and the first character of the character chain is immediately after the special character. The fourteenth character chain detecting means for marking the character as
In the case of a two-character chain detected by the character chain detecting means, the character position corresponding to the detected character chain is compared with the document number to determine the presence or absence of the continuation of the character chain as the search character string. And the search string are the first
In the case of a two-character chain searched by the character chain detecting means of No. 4, a character string as a search character string is determined from the character chain and the document number as to whether or not the character string matches the character chain information of the 21st data to the 24th data. And a comparing means for judging the presence or absence of continuation of the chain.
【0041】[0041]
【発明の実施の形態】以下、本発明の実施例について図
面を参照しながら説明する。Embodiments of the present invention will be described below with reference to the drawings.
【0042】(実施の形態1)図1(a)は、本発明に
よる記録媒体を用いて計算により文字列照合装置を構成
した場合の概略図、図1(b)は、本発明による文字列
照合装置のブロック構成図、図2は本発明の第1の方法
の文字列照合の方法の概念、及び全文検索データを記憶
した記録媒体の記憶形式を示している。(Embodiment 1) FIG. 1 (a) is a schematic diagram of a case where a character string collating apparatus is constructed by calculation using a recording medium according to the present invention, and FIG. 1 (b) is a character string according to the present invention. FIG. 2 is a block diagram of the collation apparatus, and FIG. 2 shows the concept of the character string collation method according to the first method of the present invention and the storage format of a recording medium that stores full-text search data.
【0043】図2(a)において、201は登録時に入力
される文字列「いろaはに」、202は最初に登録され
るの2文字連鎖「いろ」、203は202の次の3文字
連鎖「ろaは」、204は203の次の2文字連鎖「は
に」である。ここで「a」は、文字列に意味の区切りな
どのために挿入されている特殊文字を示す。In FIG. 2A, reference numeral 201 denotes a character string "iro a ha ni" inputted at the time of registration; 202, a two-character chain "iro" to be registered first; “Roaha” and 204 are the two-character chain “Hani” next to 203. Here, "a" indicates a special character inserted into the character string to separate the meaning.
【0044】図2(c)において、211は検索時の検索
文字列「いろaはに」、212は最初に検索される2文
字連鎖「いろ」、213は212の次の3文字連鎖「ろ
aは」、214は213の次の2文字連鎖「はに」であ
る。In FIG. 2 (c), reference numeral 211 denotes a search character string "iro a ha ni" at the time of search, 212 denotes a two-character chain "iro" to be searched first, and 213 denotes a three-character chain "ro" next to 212. a is "," 214 is a two-character sequence "Hani" following 213.
【0045】図2(b)において、2文字連鎖202は
「い」および「ろ」の出現回数n1、n2を、3文字連鎖2
03は「ろ」および「は」の出現回数n2、n3を、2文字
連鎖204は「は」および「に」の出現回数n3、n4を記
憶する。2文字連鎖202、204と3文字連鎖203
は異なる領域に記憶し、2文字連鎖か3文字連鎖かを識
別する。In FIG. 2B, the two-letter chain 202 determines the number of appearances n1 and n2 of “i” and “ro” by the three-letter chain 2
03 stores the number of appearances n2 and n3 of “ro” and “ha”, and the two-character chain 204 stores the number of appearances n3 and n4 of “ha” and “ni”. Two-character chains 202 and 204 and three-character chains 203
Is stored in a different area and distinguishes between a two-character chain and a three-character chain.
【0046】検索文字列図2(c)の入力に対し、本発明
の第1の方法による照合方法では、2文字連鎖212の
「いろ」に該当する2文字連鎖202を2文字連鎖を格
納した領域から検出し、このときの「ろ」の出現回数n2
と、212の次の3文字連鎖213の「ろaは」に該当
する3文字連鎖203「ろは」を3文字連鎖が格納され
た領域から検出し、このときの「ろ」の出現回数n2が一
致するか否か判断する。一致したら、次に203で検出
した「は」の出現回数n3と、213の次の2文字連鎖の
「はに」に該当する2文字連鎖204を2文字連鎖を格
納する領域から検出し、このときの「は」の出現回数が
一致するか否か判断する。一致したら、文字列211は
201に一致したと判断する。以上により、文字列の照
合がなされる。With respect to the input of FIG. 2 (c), in the collation method according to the first method of the present invention, a two-character chain 202 corresponding to the "color" of the two-character chain 212 is stored as a two-character chain. Detected from the area, the number of appearances of "ro" at this time n2
And a three-letter chain 203 “roha” corresponding to “ro aha” in a three-letter chain 213 next to 212 is detected from the area in which the three-letter chain is stored, and the number of appearances n2 of “ro” at this time is detected. It is determined whether or not matches. If they match, then the number of appearances n3 of “ha” detected in 203 and the two-character chain 204 corresponding to “hani” in the two-character chain following 213 are detected from the area storing the two-character chain. It is determined whether or not the number of appearances of “ha” at the time matches. If they match, it is determined that the character string 211 matches 201. As described above, the character strings are collated.
【0047】図1(b)は本発明の第1の方法の一実施
の形態における文字列照合装置の構成を示したものであ
る。FIG. 1B shows the configuration of a character string collating apparatus according to an embodiment of the first method of the present invention.
【0048】図1(b)において、101は登録する文
字列201から登録する2文字連鎖202、204、を
検出する2文字連鎖検出器、102は登録する文字列2
01から登録する3文字連鎖203を検出する3文字連
鎖検出器、103は2文字連鎖202、204およびそ
れらの文字の出現回数を格納する2文字連鎖メモリ、1
04は3文字連鎖203およびその連鎖の最初と最後の
文字の出現回数を格納する3文字連鎖メモリ、111は
検索する文字列211から検索する2文字連鎖212、
214を検出する2文字連鎖検出器、112は検索する
文字列211から検索する3文字連鎖213を検出する
3文字連鎖検出器、113は2文字連鎖検出器111よ
り検出された2文字連鎖212、214を2文字連鎖メ
モリ103で検出するかまたは、3文字連鎖検出器11
2より検出された3文字連鎖213を3文字連鎖メモリ
104で検出し、検出したそれぞれの文字連鎖の前の文
字の出現回数が直前に検出した文字連鎖の後の文字の出
現回数に一致するか否か判断する比較器、114は2文
字連鎖検出器111および3文字連鎖検出器112から
検出される全ての2文字または3文字の連鎖についての
一致を比較器113で判断し、文字列の一致を判断する
制御部である。In FIG. 1B, reference numeral 101 denotes a two-character chain detector for detecting two-character chains 202 and 204 to be registered from a character string 201 to be registered, and 102 denotes a character string 2 to be registered.
A three-character chain detector 103 detects a three-character chain 203 registered from 01, a two-character chain memory 103 for storing two-character chains 202 and 204 and the number of appearances of those characters, and
04 is a three-character chain memory for storing the three-character chain 203 and the number of appearances of the first and last characters of the chain; 111 is a two-character chain 212 to search from the character string 211 to be searched;
A two-character chain detector 214 for detecting 214; a three-character chain detector 112 for detecting a three-character chain 213 to be searched from the character string 211 to be searched; 113 a two-character chain 212 detected by the two-character chain detector 111; 214 in the two-character chain memory 103 or the three-character chain detector 11
The three-character chain 213 detected from the second character chain is detected by the three-character chain memory 104, and whether the number of appearances of the character before each detected character chain matches the number of occurrences of the character after the character chain detected immediately before is detected. A comparator 114 determines whether or not all two- or three-character chains detected by the two-character chain detector 111 and the three-character chain detector 112 match with each other. Is a control unit that determines
【0049】以上のような構成は、図1(a)の概略図
において、2文字連鎖メモリ103、3文字連鎖メモリ
104が外部記録装置40のフロッピー、または、ハー
ドディに、他の手段が本体30に対応する。In the above-described configuration, in the schematic diagram of FIG. Corresponding to
【0050】以上ように構成された文字列照合装置にお
いて、2文字連鎖メモリ103に図2(b)の202、
204の2文字連鎖が、3文字連鎖メモリに図2(b)
の203の3文字連鎖が格納されており、検索文字列と
して図2(c)の「いろaはに」が入力された場合の動
作について説明する。In the character string collating device configured as described above, the two-character chain memory 103 stores 202, FIG.
The two-character chain 204 is stored in the three-character chain memory as shown in FIG.
2 is stored, and an operation in the case where "iroa wa ni" in FIG. 2C is input as a search character string will be described.
【0051】検索文字列「いろaはに」が入力される
と、2文字連鎖検出手段は、予め特殊文字として指定さ
れた「a」を含まない2文字連鎖、「いろ」「はに」を
検出し、比較器113に出力する。また、3文字連鎖検
出器は、予め特殊文字として指定された「a」を中心
に、「a」が挿入された3文字連鎖「ろaは」を検出し
比較器113に出力する。When the search character string "color a han" is input, the two-character chain detection means converts the two character chain "color" and "hani" which do not include "a" specified as a special character in advance. Detected and output to the comparator 113. The three-letter chain detector detects the three-letter chain “roaha” in which “a” is inserted, centering on “a” specified as a special character in advance, and outputs it to the comparator 113.
【0052】このとき、比較器への出力は、連鎖順「い
ろ」「ろaは」「はに」としてもよいし、また、文字の
連鎖情報と共に、「いろ」「ろaは」「はに」を同時に
出力してもい。At this time, the output to the comparator may be in the order of the sequence "color", "color a", "color", or together with the character chain information, "color", "color a", "color". May be output at the same time.
【0053】比較器113は、2文字連鎖検出器からの
出力か3文字連鎖検出器からの出力かを区別し、それぞ
れ2文字連鎖メモリ103、3文字連鎖メモリ104か
ら「いろ」「はに」と「ろaは」に対応する「ろは」の
連鎖を検出し、出現回数に基づき連鎖を判断する。The comparator 113 discriminates between the output from the two-character chain detector and the output from the three-character chain detector. And a chain of “roha” corresponding to “ro a” is detected, and the chain is determined based on the number of appearances.
【0054】比較器が2文字連鎖か3文字連鎖かを区別
し、それぞれ異なる連鎖メモリから検出することによ
り、検索対象文字列として「いろaはに」と「いろは
に」を区別して検索することが可能となる。The comparator distinguishes between a two-character chain and a three-character chain, and detects them from different chain memories, thereby performing a search by distinguishing between "iro a ha ni" and "iro ha ni" as character strings to be searched. Becomes possible.
【0055】以上のように、本実施の形態によれば、予
め指定された特定の特殊文字「a」の出現回数に制限を
受けること無く、特殊文字による連鎖メモリの増大を避
けることができ、同時に出現回数の一致による連鎖の抽
出処理を効率的行うことが可能となる。As described above, according to the present embodiment, it is possible to avoid an increase in the chain memory due to special characters without being limited by the number of appearances of the specific character “a” specified in advance. At the same time, it is possible to efficiently perform a chain extraction process based on the coincidence of the number of appearances.
【0056】なお、本実施の形態では特殊文字を「a」
と表現したが、特殊文字の並び「a、a・・・,a」を
「a」と置き換えることにより、特殊文字の出現回数に
制限を受けることなく、特殊文字の挿入の有無を区別し
た文字連鎖による文字列照合を行うことが可能となる。In this embodiment, the special character is "a".
However, by replacing the special character sequence “a, a..., A” with “a”, a character that distinguishes whether a special character is inserted or not is not limited by the number of appearances of the special character. String matching by chaining can be performed.
【0057】即ち、「いろ(特殊文字1つ以上)はに」
と「いろはに」を異なる検索文字とした検索が可能とな
る。That is, “Iro (one or more special characters)
And "irohani" can be searched using different search characters.
【0058】また、本実施の形態では2文字連鎖と3文
字連鎖(特殊文字の挿入)を区別するために異なる連鎖
メモリを設けたが、同一メモリに2文字連鎖か3文字連
鎖かを識別する識別子を設けて、例えば3文字連鎖に対
しては図2(d)のようにして、記憶することも可能であ
る。 (実施の形態2)図3は、本発明の第2の実施の形態に
おける文字列照合装置の構成を示す概念図、図4は本実
施の形態における文字列照合の第2の方法の概念、及び
全文検索データを記憶した記録媒体の記憶形式を示して
いる。In this embodiment, different chain memories are provided to distinguish between a two-character chain and a three-character chain (insertion of special characters). However, the same memory is used to distinguish between a two-character chain and a three-character chain. It is also possible to provide an identifier and store it for a three-character chain, for example, as shown in FIG. (Embodiment 2) FIG. 3 is a conceptual diagram showing a configuration of a character string collating apparatus according to a second embodiment of the present invention. FIG. 4 is a conceptual diagram of a second method of character string collating according to the present embodiment. And a storage format of a recording medium storing full-text search data.
【0059】図4(a)において、401は登録時に入力
される文字列「いろaはに」、402は文字列401に
対して特定の特殊文字「a」をその後の文字「は」によ
り一意に決めた「a1」に変更した文字列「いろa1は
に」、403は最初に登録されるの2文字連鎖「い
ろ」、404は403の次の2文字連鎖「ろa1」、4
05は404の次の2文字連鎖「a1は」、406は4
05の次の2文字連鎖「はに」である。In FIG. 4A, reference numeral 401 denotes a character string "iro a ha ni" inputted at the time of registration, and 402 denotes a specific special character "a" for the character string 401 by the subsequent character "ha". The character string "iro a1 ha ni" changed to "a1" determined in 403, 403 is a two-character chain "iro" to be registered first, and 404 is a two-character chain "ro a1" next to 403.
05 is the next two-letter chain "a1" after 404, 406 is 4
It is the two-letter chain "Hani" following 05.
【0060】ここで「a」は、文字列に意味の区切りな
どのために挿入されている特殊文字、「a1」は、検索
対象とならない特定の記号、コードを表す。Here, "a" is a special character inserted into a character string to separate meanings and the like, and "a1" represents a specific symbol or code not to be searched.
【0061】図4(c)において、411は検索時の検索
文字列「いろaはに」、412は文字列411に対して
特定の特殊文字「a」をその後の文字「は」により一意
に決めた「a1」に変更した文字列「いろa1はに」、4
13は最初に検索される2文字連鎖「いろ」、414は
413の次の2文字連鎖「ろa1」、415は414の
次の2文字連鎖「a1は」、416は415の次の2文
字連鎖「はに」である。In FIG. 4C, reference numeral 411 denotes a search character string “Iro-a-ha-ni” at the time of search, and reference numeral 412 denotes a specific special character “a” for the character string 411 by the subsequent character “Ha”. Character string changed to "a1" decided "color a1 hanni", 4
13 is a two-letter chain "iro" to be searched first, 414 is a two-letter chain following the 413 "ro a1", 415 is a two-letter chain following the 414 "a1", and 416 is a two-letter character following the 415 The chain is "Hani".
【0062】図4(b)において、2文字連鎖403は
「い」および「ろ」の検索対象における今までの出現回
数n1、n2を、2文字連鎖404は「ろ」および「a1」
の出現回数n2、n3を、2文字連鎖405は「a1」およ
び「は」の出現回数n3、n4を、2文字連鎖406は
「は」および「に」の出現回数n4、n5を記憶する。In FIG. 4B, the two-letter chain 403 is the number of appearances n1 and n2 of the search target of “i” and “ro”, and the two-letter chain 404 is “ro” and “a1”.
The two-letter chain 405 stores the occurrence counts n3 and n4 of “a1” and “ha”, and the two-letter chain 406 stores the occurrence counts n4 and n5 of “ha” and “ni”.
【0063】このとき本発明の第2の方法による照合方
法では、2文字連鎖413の「いろ」に該当する2文字
連鎖403を検出し、このときの「ろ」の出現回数n2
と、413の次の2文字連鎖414の「ろa1」に該当
する2文字連鎖404を検出し、このときの「ろ」の出
現回数n2が一致するか否か判断する。一致したら、次に
404で検出した「a1」の出現回数n3と、414の次
の2文字連鎖の「a1は」に該当する2文字連鎖405
を検出し、このときの「a1」の出現回数が一致するか
否か判断する。一致したら、次に405で検出した
「は」の出現回数n4と、415の次の2文字連鎖の「は
に」に該当する2文字連鎖406を検出し、このときの
「は」の出現回数が一致するか否か判断する。一致した
ら、文字列411は401に一致したと判断する。以上
により、文字列の照合がなされる。At this time, in the collation method according to the second method of the present invention, the two-character chain 403 corresponding to the “iro” of the two-character chain 413 is detected, and the number of appearances n2 of “ro” at this time is detected.
, A two-character chain 404 corresponding to “ro a1” in the two-character chain 414 following 413 is detected, and it is determined whether or not the number of appearances n2 of “ro” at this time matches. If they match, then the number of appearances n3 of “a1” detected in 404 and the two-character sequence 405 corresponding to “a1” in the two-character sequence following 414
Is detected, and it is determined whether or not the number of appearances of “a1” at this time matches. If there is a match, then the number of appearances n4 of "ha" detected at 405 and the two-character chain 406 corresponding to "hani" of the next two-character chain of 415 are detected, and the number of occurrences of "ha" at this time It is determined whether or not matches. If they match, it is determined that the character string 411 matches 401. As described above, the character strings are collated.
【0064】図3は本発明の第2の方法の一実施の形態
における文字列照合装置の構成を示したものである。FIG. 3 shows the configuration of a character string collating apparatus according to an embodiment of the second method of the present invention.
【0065】図3において、301は登録する文字列4
01を特定の特殊文字「a」をその後の文字「は」によ
り一意に決めた「a1」に変更した文字列402に変更
する文字列変換器、302は文字列402から登録する
2文字連鎖403、404、405、406を検出する
2文字連鎖検出器、303は2文字連鎖403、40
4、405、406およびそれらの文字の出現回数を格
納する2文字連鎖メモリ、304は検索する文字列41
1を特定の特殊文字「a」をその後の文字「は」により
一意に決めた「a1」に変更した文字列412に変更す
る文字列変換器、305は文字列412において検索す
る2文字連鎖413、414、415、416を検出す
る2文字連鎖検出器、306は2文字連鎖検出器305
より検出された2文字連鎖413、414、415、4
16を2文字連鎖メモリ303で検出し、検出した2文
字連鎖の前の文字の出現回数が直前に検出した2文字連
鎖の後の文字の出現回数に一致するか否か判断する比較
器、307は2文字連鎖検出器305から検出される全
ての2文字連鎖について比較器306で判断し、文字列
の一致を判断する制御部である。In FIG. 3, reference numeral 301 denotes a character string 4 to be registered.
01 is a character string converter that changes a specific special character “a” to a character string 402 that is uniquely determined by the subsequent character “ha”, and 302 is a two-character chain 403 registered from the character string 402 , 404, 405, 406, and 303 is a two-character chain 403, 40.
4, 405, 406, and a two-character chain memory for storing the number of appearances of those characters.
1 is a character string converter that changes a specific special character “a” to a character string 412 that is uniquely determined by the subsequent character “ha”, and 305 is a two-character chain 413 to search in the character string 412. , 414, 415, and 416, a two-character chain detector 306, and a two-character chain detector 305
Two character chains 413, 414, 415, 4
307, a comparator 307 that detects 16 in the two-character chain memory 303 and determines whether the number of appearances of the character before the detected two-character chain matches the number of appearances of the character after the two-character chain detected immediately before. Is a control unit for determining by the comparator 306 all the two-character chains detected by the two-character chain detector 305, and determining whether the character strings match.
【0066】以上のように構成された文字列照合装置に
おいて、その動作について説明する。登録文字列が入力
されると文字列変換手段301は、予め指定された特殊
文字「a」をその後の文字により予め決められた検索対
象とならない記号、コード、即ち、検索文字列以外の記
号、コードに変換して出力する。The operation of the thus constructed character string collating apparatus will be described. When the registered character string is input, the character string conversion unit 301 converts the special character “a” specified in advance into a symbol or code that is not a predetermined search target by a subsequent character, that is, a symbol other than the search character string, Convert to code and output.
【0067】文字列変換手段には、図4(d)のよう
に、特殊記号の後の文字に対応し、どの記号に変換する
その対応が格納されている。この対応は421、422
のように文字毎に異なる対応でも、また、423のよう
に文字のグループに対応するものでもよい。In the character string conversion means, as shown in FIG. 4D, the correspondence to the character after the special symbol and the conversion to which symbol is stored. This correspondence is 421, 422
, Or may correspond to a group of characters, such as 423.
【0068】変換された文字列は、2文字連鎖検出器に
より実施の形態1と同様に2文字連鎖とその出現回収と
が検出され、2文字連鎖メモリに格納される。In the converted character string, a two-character chain and its appearance and recovery are detected by a two-character chain detector as in the first embodiment, and are stored in a two-character chain memory.
【0069】一方、検索文字列が与えられると文字列変
換器304により、文字列変換301で用いた対応と同
一の対応に従い、特殊文字を検索文字列以外の記号、コ
ードに変換し、2文字連鎖検出器に出力する。2文字連
鎖検出器は2文字連鎖を検出し、比較器306に出力す
る。On the other hand, when the search character string is given, the character string converter 304 converts the special character into a symbol or code other than the search character string according to the same correspondence as that used in the character string conversion 301, and converts the special character into two characters. Output to the chain detector. The two-character chain detector detects the two-character chain and outputs the result to the comparator 306.
【0070】比較器306は実施の形態1と同様の手順
に従い2文字連鎖メモリの内容に従い文字連鎖の一致を
検出する。但し、実施の形態2では、実施の形態1のよ
うに比較器が、2文字連鎖か3文字連鎖かを区別する必
要はない。The comparator 306 detects the coincidence of the character chains according to the contents of the two-character chain memory according to the same procedure as in the first embodiment. However, in the second embodiment, it is not necessary for the comparator to distinguish between a two-character chain and a three-character chain as in the first embodiment.
【0071】以上のように、本実施の形態によれば、出
現頻度の高い特殊文字「a」の連鎖メモリの増大を避け
ることができ、また、同一の特殊文字を後の文字に従い
異なる複数の文字に変換することにより、連鎖を抽出す
るための出現回数の一致を調べる候補が複数に分散され
ることにより、その処理時間が短くてすむ。As described above, according to the present embodiment, it is possible to avoid an increase in the chain memory of the special character “a” having a high appearance frequency, and to replace the same special character with a plurality of different characters in accordance with the subsequent characters. By converting to characters, candidates for checking the coincidence of the number of appearances for extracting a chain are dispersed into a plurality of candidates, so that the processing time is reduced.
【0072】なお、本実施の形態では特殊文字「a」
を、その後の文字によて変換先を決めたが、特殊文字の
前の文字により、変換先を決めた場合でも同様の効果を
得られることは明らかでる。In this embodiment, the special character "a"
Is determined based on the character after that, but it is clear that the same effect can be obtained even when the conversion destination is determined based on the character before the special character.
【0073】なお、計算機として実装した場合の概略図
は図1(a)と同じであり、本実施の形態では、2文字
連鎖メモリ303が外部記録装置40に対応する。The schematic diagram of the case where the present invention is implemented as a computer is the same as that of FIG. 1A.
【0074】(実施の形態3)図5は、本発明の第3の
実施の形態における文字列照合装置の構成を示すブロッ
ク図、図6〜図8は本発明の文字列照合の第3の方法の
概念、及び全文検索データを記憶した記録媒体の記憶形
式を示している。(Embodiment 3) FIG. 5 is a block diagram showing a configuration of a character string collating apparatus according to a third embodiment of the present invention. FIGS. 2 shows the concept of the method and the storage format of a recording medium that stores full-text search data.
【0075】図6において、601は登録時に入力され
る文字列「いろaはに」、602は文字列601に対し
て特定の特殊文字「a」をその前の文字「ろ」は「ろ」
および「ろ」により一意に決まる「ろ’」からなる「ろ
ろ’」に、またその後の文字「は」は「は」により一意
に決まる「は’」および「は」からなる「は’は」に変
更した文字列「いろろ’は’はに」、603は最初に登
録されるの2文字連鎖「いろ」、604は603の次の
2文字連鎖「ろろ’」、605は604の次の2文字連
鎖「ろ’は’」、606は605の次の2文字連鎖
「は’は」、607は606の次の2文字連鎖「はに」
である。In FIG. 6, reference numeral 601 denotes a character string “iroaha ni” inputted at the time of registration, 602 denotes a specific special character “a” for the character string 601 and the character “ro” preceding it is “ro”.
And "ro", which is uniquely determined by "ro", and the subsequent character "ha", which is uniquely determined by "ha", "ha", which is composed of "ha" and "ha""603" is a two-character chain "iro" that is registered first, 604 is a two-character chain "roro" next to 603, and 605 is a character sequence "604". The next two-letter chain "ro'ha '", 606 is the next two-letter chain after 605 "ha'ha", and 607 is the two-letter chain next to 606 "hani"
It is.
【0076】ここで「a」は、文字列に意味の区切りな
どのために挿入されている特殊文字、「ろ’」「は’」
は、検索対象とならない特定の記号、コードを表す。Here, "a" is a special character inserted into a character string for separating meanings, etc.
Represents a specific symbol or code not to be searched.
【0077】図8において、611は検索時の検索文字
列「いろaはに」、612は文字列611に対して特定
の特殊文字「a」をそのその前の文字「ろ」は「ろ」お
よび「ろ」により一意に決まる「ろ’」からなる「ろ
ろ’」に、またその後の文字「は」は「は」により一意
に決まる「は’」および「は」からなる「は’は」に変
更した文字列「いろろ’は’はに」、613は最初に検
索される2文字連鎖「いろ」、614は613の次の2
文字連鎖「ろろ’」、615は614の次の2文字連鎖
「ろ’は’」、616は615の次の2文字連鎖「は’
は」、617は616の次の2文字連鎖「はに」であ
る。In FIG. 8, reference numeral 611 denotes a search character string “iro a ha ni” at the time of search, and reference numeral 612 denotes a specific special character “a” for the character string 611 and the character “ro” preceding it is “ro”. And "ro", which is uniquely determined by "ro", and the subsequent character "ha", which is uniquely determined by "ha", "ha", which is composed of "ha" and "ha""613 is the two-character chain" iro "to be searched first, and 614 is the next two characters after 613.
The character chain "Roro '", 615 is the two-character chain next to 614 "Roh'", and 616 is the two-character chain next to 615 "Hana"
"Ha", 617 is a two-character chain "hani" next to 616.
【0078】図7において、2文字連鎖603は「い」
および「ろ」の出現回数n1、n2を、2文字連鎖604は
「ろ」および「ろ’」の出現回数n2、n3を、2文字連鎖
605は「ろ’」および「は’」の出現回数n3、n4を、
2文字連鎖606は「は’」および「は」の出現回数n
4、n5を、2文字連鎖607は「は」および「に」の出
現回数n5、n6を記憶する。このとき本発明の第3の方法
による照合方法では、2文字連鎖613の「いろ」に該
当する2文字連鎖603を検出し、このときの「ろ」の
出現回数n2と、613の次の2文字連鎖614の「ろ
ろ’」に該当する2文字連鎖604を検出し、このとき
の「ろ」の出現回数n2が一致するか否か判断する。一致
したら、次に604で検出した「ろ’」の出現回数n3
と、614の次の2文字連鎖の「ろ’は’」に該当する
2文字連鎖605を検出し、このときの「ろ’」の出現
回数が一致するか否か判断する。一致したら、次に60
5で検出した「は’」の出現回数n4と、615の次の2
文字連鎖の「は’は」に該当する2文字連鎖606を検
出し、このときの「は’」の出現回数が一致するか否か
判断する。一致したら、次に606で検出した「は」の
出現回数n5と、616の次の2文字連鎖の「はに」に該
当する2文字連鎖607を検出し、このときの「は」の
出現回数が一致するか否か判断する。一致したら、文字
列611は601に一致したと判断する。以上により、
文字列の照合がなされる。In FIG. 7, the two-character chain 603 is “I”.
And the number of appearances n1 and n2 of "ro", the two-character chain 604 is the number of appearances n2 and n3 of "ro" and "ro '", and the two-character chain 605 is the number of appearances of "ro'" and "ha '" n3, n4,
The two-character chain 606 indicates the number of appearances n of “ha” and “ha”.
The four-character chain 607 stores the number of appearances n5 and n6 of “ha” and “ni”. At this time, in the collation method according to the third method of the present invention, a two-character chain 603 corresponding to “iro” of the two-character chain 613 is detected, and the number of appearances n2 of “ro” at this time and the next two The two-character chain 604 corresponding to “Roro ′” in the character chain 614 is detected, and it is determined whether or not the number of appearances n2 of “Roro” at this time matches. If they match, then the number of appearances n3 of “ro '” detected in 604
, A two-character chain 605 corresponding to “ro'wa” in the two-character chain following 614 is detected, and it is determined whether the number of appearances of “ro '” at this time matches. If they match, then 60
The number of appearances n4 of “wa '” detected in 5 and the next 2 in 615
The two-character chain 606 corresponding to the character chain “ha′ha” is detected, and it is determined whether or not the number of appearances of “ha ′” at this time matches. If there is a match, then the number of occurrences n5 of “ha” detected in 606 and the two-character chain 607 corresponding to “hani” of the two-character chain following 616 are detected, and the number of occurrences of “ha” at this time It is determined whether or not matches. If they match, it is determined that the character string 611 matches 601. From the above,
String matching is performed.
【0079】図5は本発明の第3の方法の一実施の形態
における文字列照合装置の構成を示したものである。FIG. 5 shows a configuration of a character string collating apparatus according to an embodiment of the third method of the present invention.
【0080】図5において、501は登録する文字列6
01に対して特定の特殊文字「a」をその前の文字
「ろ」は「ろ」および「ろ」により一意に決まる
「ろ’」からなる「ろろ’」に、またその後の文字
「は」は「は」により一意に決まる「は’」および
「は」からなる「は’は」に変更した文字列602に変
更する文字列変換器、502は文字列602から登録す
る2文字連鎖603、604、605、606、607
を検出する2文字連鎖検出器、503は2文字連鎖60
3、604、605、606、607およびそれらの文
字の出現回数を格納する2文字連鎖メモリ、504は検
索する文字列611を特定の特殊文字「a」をその前の
文字「ろ」は「ろ」および「ろ」により一意に決まる
「ろ’」からなる「ろろ’」に、またその後の文字
「は」は「は」により一意に決まる「は’」および
「は」からなる「は’は」に変更した文字列612に変
更する文字列変換器、505は文字列612において検
索する2文字連鎖613、614、615、616、6
17を検出する2文字連鎖検出器、506は2文字連鎖
検出器505より検出された2文字連鎖613、61
4、615、616、617を2文字連鎖メモリ503
で検出し、検出した2文字連鎖の前の文字の出現回数が
直前に検出した2文字連鎖の後の文字の出現回数に一致
するか否か判断する比較器、507は2文字連鎖検出器
505から検出される全ての2文字連鎖について比較器
506で判断し、文字列の一致を判断する制御部であ
る。In FIG. 5, reference numeral 501 denotes a character string 6 to be registered.
01, the special character "a" is replaced by "ro" consisting of "ro", which is uniquely determined by "ro" and "ro", and the subsequent character "ro""Is a character string converter that is uniquely determined by" ha "and is changed to a character string 602 changed to"ha'ha"consistingof" ha '"and" ha ". 502 is a two-character chain 603 registered from the character string 602. , 604, 605, 606, 607
503 is a two-character chain that detects
3, 604, 605, 606, 607 and the two-character chain memory for storing the number of appearances of those characters. 504 is a character string 611 to be searched. "Ro" consisting of "ro" uniquely determined by "" and "ro", and the following character "ha" uniquely consisting of "ha" and "ha" consisting of "ha" and "ha" A character string converter for changing to a character string 612 changed to "ha". Reference numeral 505 denotes a two-character chain 613, 614, 615, 616, 6 to be searched in the character string 612.
17 is a two-character chain detector 506, and the two-character chain 613 and 61 detected by the two-character chain detector 505.
4, 615, 616, and 617 are stored in the two-character chain memory 503.
The comparator 507 determines whether or not the number of occurrences of the character before the detected two-character chain matches the number of occurrences of the character after the two-character chain detected immediately before. The controller 506 determines all the two-character chains detected from, and determines whether the character strings match.
【0081】以上ように、本実施の形態によれば、特殊
文字「a」の出現回数に制限を受けること無く文字連鎖
による文字列照合を行うことが可能となる。As described above, according to the present embodiment, it is possible to perform character string collation using character chains without being limited by the number of appearances of the special character “a”.
【0082】即ち、実施の形態によれば特殊文字「a」
はその前後の文字により別々の文字に変換され、変換さ
れた文字の出現回数が記録されるため、実施の形態2に
比べ、2文字連鎖ファイルがさらに細かく分散されるこ
とにより、使用頻度の高い特殊文字の出現頻度の高い特
殊文字「a」の連鎖メモリの増大を避けることができ、
同時に、連鎖の抽出処理の効率化が図れる。That is, according to the embodiment, the special character “a”
Is converted into separate characters by the characters before and after it, and the number of appearances of the converted characters is recorded. Therefore, compared to the second embodiment, the two-character chain file is further finely dispersed, so that the frequency of use is high. It is possible to avoid an increase in the chain memory of the special character “a” having a high appearance frequency of the special character,
At the same time, the efficiency of the chain extraction process can be improved.
【0083】なお、計算機として実装した場合の概略図
は図1(a)と同じであり、この場合、2文字連鎖メモ
リ503が外部記録装置40に対応する。 (実施の形態4)第10図は本発明の文字列照合の第4
の方法の概念を示している。第10図(a)において、1
001は登録時に入力される文字列「いろaはに」、1
002は最初に登録される2文字連鎖「いろ」、100
3は1002に続く特殊文字「a」をはさむ3文字列
「ろaは」から生成される最初の2文字連鎖「ろは」、
1004は1003の次に生成する特殊文字を含む2文
字連鎖「ろa」、1005は1004の次に生成する特
殊文字を含む2文字連鎖「aは」、1006は1005
の次の2文字連鎖「はに」である。第10図(c)におい
て、1011は検索時の検索文字列「いろaはに」、1
012は最初に検索される2文字連鎖「いろ」、101
3は1012に続く特殊文字「a」をはさむ3文字列
「ろaは」から生成される最初の2文字連鎖「ろは」、
1014は1013の次に生成する特殊文字を含む2文
字連鎖「ろa」、1015は1014の次に生成する特
殊文字を含む2文字連鎖「aは」、1016は1015
の次の2文字連鎖「はに」である。The schematic diagram in the case of being implemented as a computer is the same as FIG. 1A, and in this case, the two-character chain memory 503 corresponds to the external recording device 40. (Embodiment 4) FIG. 10 shows the fourth embodiment of the character string collation according to the present invention.
Shows the concept of the method. In FIG. 10 (a), 1
001 is a character string “Iro a Hani” entered at the time of registration, 1
002 is a two-character chain “Iro” that is registered first, 100
3 is the first two-character chain “loha” generated from the three-character string “roaha” sandwiching the special character “a” following 1002,
1004 is a two-character chain “roa” including a special character generated next to 1003, 1005 is a two-character chain “a wa” including a special character generated next to 1004, and 1006 is 1005
Is the next two-letter chain "Hani". In FIG. 10 (c), reference numeral 1011 denotes a search character string at the time of search,
012 is a two-character chain “iro” to be searched first, 101
3 is the first two-character chain “loha” generated from the three-character string “roaha” sandwiching the special character “a” following 1012,
1014 is a two-character chain “roa” including a special character generated next to 1013, 1015 is a two-character chain “a wa” including a special character generated next to 1014, and 1016 is 1015
Is the next two-letter chain "Hani".
【0084】第10図(b)において、2文字連鎖100
2は「い」および「ろ」の出現回数n1、n2を、2文字連
鎖1003は「ろ」および「は」の出現回数n2、n3を、
2文字連鎖1004は「ろ」の出現回数n2および「a」
に対しては一定値nを、2文字連鎖1005は「a」に
対して一定値nおよび「は」の出現回数n3を、2文字連
鎖1006は「は」および「に」の出現回数n3、n4を記
憶する。In FIG. 10 (b), a two-character chain 100
2 is the number of appearances n1 and n2 of “i” and “ro”, the two-character chain 1003 is the number of appearances n2 and n3 of “ro” and “ha”,
The two-character chain 1004 includes the number of appearances n2 of “ro” and “a”
Is a constant value n, a two-character chain 1005 is a constant value n and the number of appearances n3 of “ha” for “a”, a two-character chain 1006 is a number of appearances n3 of “ha” and “ni”, Remember n4.
【0085】このとき本発明の第4の方法による照合方
法では、2文字連鎖1012の「いろ」に該当する2文
字連鎖1002を検出し、このときの「ろ」の出現回数
n2と、1012の次の「a」をはさむ3文字列「ろa
は」より生成する2文字連鎖のうち2文字連鎖1013
の「ろは」に該当する2文字連鎖1003を検出し、こ
のときの「ろ」および「は」の出現回数n2、n3を検出す
る。文字連鎖1002および1003の「ろ」の出現回
数がn2で一致するか否か判断する。一致したら、次に文
字連鎖1014の「ろa」に該当する文字連鎖1004
を検出し「ろ」の出現回数がn2かどうか判断する。次
に、文字連鎖1015の「aは」に該当する文字連鎖1
005を検出し「は」の出現回数がn3で1003で検出
した「ろ」の出現回数n3と一致するか判断する。一致し
たら、次に1005で検出した「は」の出現回数n3と、
1015の次の2文字連鎖の「はに」に該当する2文字
連鎖1006を検出し、このときの「は」の出現回数が
一致するか否か判断する。一致したら、文字列1011
は1001に一致したと判断する。以上により、文字列
の照合がなされる。At this time, in the collation method according to the fourth method of the present invention, a two-character chain 1002 corresponding to “iro” of the two-character chain 1012 is detected, and the number of appearances of “ro” at this time is detected.
n2 and a three-character string "roa" sandwiching "a" next to 1012
Is a two-character chain 1013 out of the two-character chain generated from
Then, a two-character chain 1003 corresponding to "roha" is detected, and the number of appearances n2 and n3 of "ro" and "ha" at this time are detected. It is determined whether or not the number of appearances of “ro” in the character chains 1002 and 1003 matches with n2. If they match, a character chain 1004 corresponding to “a” in the character chain 1014 is next.
Is detected, and it is determined whether the number of appearances of “ro” is n2. Next, the character chain 1 corresponding to “a” in the character chain 1015
005 is detected, and it is determined whether the number of appearances of “ha” is n3 and coincides with the number of appearances n3 of “ro” detected in 1003. If there is a match, then the number of appearances n3 of “ha” detected in 1005,
A two-character chain 1006 corresponding to “Hani” in the next two-character chain after 1015 is detected, and it is determined whether or not the number of appearances of “Hana” at this time matches. If they match, the character string 1011
Is determined to match 1001. As described above, the character strings are collated.
【0086】第9図は本発明の第4の方法の一実施例に
おける文字列照合装置の構成を示したものである。FIG. 9 shows the configuration of a character string collating apparatus according to an embodiment of the fourth method of the present invention.
【0087】第9図において、901は登録する文字列
1001に対して特定の特殊文字「a」を検出する特殊
文字検出器、902は文字列1001から特殊文字がな
い場合に生成する登録する2文字連鎖1002、100
6を検出する2文字連鎖検出器、903は文字列100
1から特殊文字「a」をはさむ3文字列「ろaは」から
生成する2文字連鎖1003、1004、1005を検
出する特殊文字連鎖検出器、904は2文字連鎖検出器
902および特殊文字連鎖検出器903で検出された2
文字連鎖1002、1003、1004、1005、1
006およびそれぞれの連鎖文字で特殊文字は一定値を
またそのほかの文字はその出現回数を格納する2文字連
鎖メモリ、911は検索する文字列1011に対して特
定の特殊文字「a」を検出する特殊文字検出器、912
は文字列1011から特殊文字がない場合に生成する登
録する2文字連鎖1012、1016を検出する2文字
連鎖検出器、913は文字列1011から特殊文字列
「a」をはさむ3文字列「ろaは」から生成する2文字
連鎖1013、1014、1015を検出する特殊文字
連鎖検出器、914は2文字連鎖検出器912より検出
された2文字連鎖1012、1016を2文字連鎖メモ
リ904で検出し、検出した2文字連鎖の前の文字の出
現回数が直前に検出した2文字連鎖の後の文字の出現回
数に一致するか否か判断し、また特殊文字連鎖検出器9
13より検出された2文字連鎖1013、1014、1
015を2文字連鎖メモリ904で検出し、特殊文字以
外の「ろ」「は」の出現回数が検出した文字連鎖で一致
するか否か判断する比較器、915は2文字連鎖検出器
912および特殊文字連鎖検出器913から検出される
全ての2文字連鎖について比較器914で判断し、文字
列の一致を判断する制御部である。In FIG. 9, reference numeral 901 denotes a special character detector for detecting a specific special character “a” in the character string 1001 to be registered, and reference numeral 902 denotes a registration 2 generated when there is no special character from the character string 1001. Character chains 1002, 100
6, a two-character chain detector 903 detects the character string 100
A special character chain detector for detecting a two-character chain 1003, 1004, 1005 generated from a three-character string "roaha" sandwiching the special character "a" from 1; 904, a two-character chain detector 902 and a special character chain detection 2 detected by the detector 903
Character chains 1002, 1003, 1004, 1005, 1
006 and each chained character, a special character is a fixed value, and the other characters are a two-character chain memory that stores the number of appearances. 911 is a special character that detects a specific special character “a” in the character string 1011 to be searched. Character detector, 912
Is a two-character chain detector that detects two-character chains 1012 and 1016 to be registered, which are generated when there is no special character from the character string 1011; A special character chain detector that detects the two-character chain 1013, 1014, and 1015 generated from "ha", and 914 detects the two-character chain 1012 and 1016 detected by the two-character chain detector 912 in the two-character chain memory 904, It determines whether or not the number of appearances of the character before the detected two-character chain matches the number of occurrences of the character after the two-character chain detected immediately before.
13 two-character chain 1013, 1014, 1
015 is detected by the two-character chain memory 904, and a comparator that determines whether the number of appearances of “ro” and “ha” other than special characters matches in the detected character chain, and 915 is a two-character chain detector 912 and a special character The controller 914 determines all the two-character chains detected by the character chain detector 913 with the comparator 914 and determines whether the character strings match.
【0088】よって、この方法では特定の特殊文字
「a」はその出現頻度に関係なく前後の文字と連鎖を生
成することができるため、特殊文字「a」の出現回数に
制限を受けること無く文字連鎖による文字列照合を行う
ことが可能となる。Therefore, in this method, a specific special character “a” can be linked with the preceding and following characters irrespective of its appearance frequency. String matching by chaining can be performed.
【0089】(実施の形態5)第12図は本発明の第5
の方法の文字列照合の方法の概念を示している。第12
図(a)において、1201は登録時に入力される文字列
「いろaはに」、1202は最初に登録されるの2文字
連鎖「いろ」、1203は1202の次の3文字連鎖
「ろaは」、1204は1203の次の2文字連鎖「は
に」である。第12図(c)において、1211は検索時
の検索文字列「いろaはに」、1212は最初に検索さ
れる2文字連鎖「いろ」、1213は1212の次の3
文字連鎖「ろaは」、1214は1213の次の2文字
連鎖「はに」である。(Embodiment 5) FIG. 12 shows a fifth embodiment of the present invention.
3 shows the concept of the method of character string matching. Twelfth
In FIG. 12A, reference numeral 1201 denotes a character string “Iro a Hari” input at the time of registration; 1202 denotes a two-character chain “Iro” which is registered first; , 1204 is a two-character chain “Hani” next to 1203. In FIG. 12 (c), reference numeral 1211 denotes a search character string "iro a ha ni" at the time of search, reference numeral 1212 denotes a two-character chain "iro" to be searched first, and reference numeral 1213 denotes a character string next to 1212.
The character chain “roaha” and 1214 are the next two-character chain “hani” after 1213.
【0090】第12図(b)において、2文字連鎖120
2は「い」および「ろ」の出現回数n1、n2を、3文字連
鎖1203は「ろ」の出現回数n2および「a」の回数0
の組み合わせと、および「a」の回数0と「は」の出現
回数n3の組み合わせでn2、0および0、n3を、2文字連鎖
1204は「は」および「に」の出現回数n3、n4を記憶
する。In FIG. 12B, the two-character chain 120
2 is the number of appearances n1 and n2 of “i” and “ro”, and the three-character chain 1203 is the number of appearances n2 of “ro” and 0 of the number of “a”.
And the combination of the number of times “a” 0 and the number of appearances n3 of “ha”, n2, 0 and 0, n3. Remember.
【0091】このとき本発明の第5の方法による照合方
法では、2文字連鎖1212の「いろ」に該当する2文
字連鎖1202を検出し、このときの「ろ」の出現回数
n2と、1212の次の3文字連鎖1213の「ろaは」
に該当する3文字連鎖1203を検出し、このときの
「ろ」の出現回数n2が一致するか否か判断する。一致し
たら、次に3文字連鎖の間の「a」に該当する値0を検
出する。次に「は」の前の「a」の値0を検出し、12
03で検出した「は」の出現回数n3と、1213の次の
2文字連鎖の「はに」に該当する2文字連鎖1204を
検出し、このときの「は」の出現回数が一致するか否か
判断する。一致したら、文字列1211は1201に一
致したと判断する。以上により、文字列の照合がなされ
る。At this time, in the collation method according to the fifth method of the present invention, a two-character chain 1202 corresponding to “iro” of the two-character chain 1212 is detected, and the number of appearances of “ro” at this time is detected.
n2 and "roaha" in the three-character chain 1213 following 1212
Is detected, and it is determined whether or not the number of appearances n2 of “ro” at this time matches. If they match, a value 0 corresponding to "a" in the three-character chain is detected. Next, the value 0 of “a” before “ha” is detected, and 12
The number of appearances n3 of “ha” detected in 03 and the two-character chain 1204 corresponding to “hani” of the two-character chain next to 1213 are detected, and whether or not the number of appearances of “ha” at this time matches Judge. If they match, it is determined that the character string 1211 matches 1201. As described above, the character strings are collated.
【0092】第11図は本発明の第5の方法の一実施例
における文字列照合装置の構成を示したものである。FIG. 11 shows the configuration of a character string collating apparatus in one embodiment of the fifth method of the present invention.
【0093】第11図において、1101は登録する文
字列1201から登録する2文字連鎖1202、120
4、を検出する2文字連鎖検出器、1102は登録する
文字列1201から登録する3文字連鎖1203を検出
する3文字連鎖検出器、1103は2文字連鎖120
2、1204およびそれらの文字の出現回数を格納する
2文字連鎖メモリ、1104は3文字連鎖1203およ
びその連鎖の最初と最後の文字の出現回数を格納する3
文字連鎖メモリ、1111は検索する文字列1211か
ら検索する2文字連鎖1212、1214を検出する2
文字連鎖検出器、1112は検索する文字列1211か
ら検索する3文字連鎖1213を検出する3文字連鎖検
出器、1113は2文字連鎖検出器1111より検出さ
れた2文字連鎖1212、1214を2文字連鎖メモリ
1103で検出するかまたは、3文字連鎖検出器111
2より検出された3文字連鎖1213を3文字連鎖メモ
リ1104で検出し、検出したそれぞれの文字連鎖の前
の文字の出現回数が直前に検出した文字連鎖の後の文字
の出現回数に一致するか否か判断する比較器、1114
は2文字連鎖検出器1111および3文字連鎖検出器1
112から検出される全ての2文字または3文字の連鎖
についての一致を比較器1113で判断し、文字列の一
致を判断する制御部である。In FIG. 11, reference numeral 1101 denotes a two-character chain 1202, 120 to be registered from a character string 1201 to be registered.
4, a two-character chain detector 1102 detects a three-character chain 1203 to be registered from a character string 1201 to be registered, and a two-character chain detector 1103 detects a two-character chain 1203.
2, a two-character chain memory for storing 1204 and the number of appearances of those characters; and 1104, a three-character chain 1203 for storing the number of appearances of the first and last characters of the chain.
The character chain memory 1111 detects two-character chains 1212 and 1214 to be searched from the character string 1211 to be searched.
A character chain detector 1112 is a three-character chain detector that detects a three-character chain 1213 to be searched from a character string 1211 to be searched, and 1113 is a two-character chain of two-character chains 1212 and 1214 detected by the two-character chain detector 1111. Detected in memory 1103 or three-character chain detector 111
The three-character chain 1213 detected from the second character chain is detected by the three-character chain memory 1104, and whether the number of appearances of the character before each detected character chain matches the number of occurrences of the character after the character chain detected immediately before is detected. Comparator for determining whether or not 1114
Are the two-character chain detector 1111 and the three-character chain detector 1
The controller 1113 determines whether the two or three character chains detected from the sequence 112 match with each other by the comparator 1113 and determines whether the character strings match.
【0094】よって、この時特定の特殊文字「a」の出
現回数に制限を受けること無く文字連鎖による文字列照
合を行うことが可能となる。Therefore, at this time, it is possible to perform character string collation by character chains without being limited by the number of appearances of the specific special character “a”.
【0095】(実施の形態6)第14図は本発明の第5
の方法の文字列照合の方法の概念を示している。第14
図(a)において、1401は登録時に入力される文字列
「いろaはに」、1402は最初に登録されるの2文字
連鎖「いろ」、1403は1402の次の特殊文字が挿
入された3文字連鎖「ろaは」の第2文字で特殊文字
「a」を次の第3文字「は」に変換した3文字連鎖「ろ
はは」、1404は特殊文字「a」を次の文字に変換し
3文字連鎖1403の第1文字と第2文字による2文字
連鎖「ろは」、1405は3文字連鎖1403の第2文
字と第3文字による2文字連鎖「はは」、1406の次
の2文字連鎖「はに」である。第14図(c)において、
1411は検索時の検索文字列「いろaはに」、141
2は最初に検索される2文字連鎖「いろ」、1413は
1412の次の特殊文字が挿入された3文字連鎖「ろa
は」の第2文字で特殊文字「a」を次の第3文字「は」
に変換した3文字連鎖「ろはは」、1414は特殊文字
「a」を次の文字に変換し3文字連鎖1413の第1文
字と第2文字による2文字連鎖「ろは」、1415は3
文字連鎖1413の第2文字と第3文字による2文字連
鎖「はは」、1416は1415の次の2文字連鎖「は
に」である。(Embodiment 6) FIG. 14 shows a fifth embodiment of the present invention.
3 shows the concept of the method of character string matching. 14th
In FIG. 13A, reference numeral 1401 denotes a character string “Iro a Hari” input at the time of registration; 1402 denotes a two-character chain “Iro” which is registered first; The special character "a" is converted to the next character "ha" by the second character of the character chain "roaha". The two-character chain "roha" of the first character and the second character of the three-character chain 1403 is converted, and 1405 is the two-character chain "haha" of the second character and the third character of the three-character chain 1403. It is a two character chain "Hani". In FIG. 14 (c),
1411 is a search character string at the time of search “iro a hani”, 141
2 is a two-character chain “iro” to be searched first, and 1413 is a three-character chain “ro a” in which the special character next to 1412 is inserted.
The special character “a” is the second character of “ha” and the next third character is “ha”
1414 converts the special character "a" to the next character and converts the special character "a" into the next character and converts the special character "a" to the next character.
The two-character chain “Hana” consisting of the second and third characters in the character chain 1413 is shown, and 1416 is the two-character chain “Hani” next to 1415.
【0096】第14図(b)において、2文字連鎖140
2は「い」および「ろ」の出現回数n1、n2を、2文字連
鎖1404は「ろ」の出現回数n2および1403の第3
文字「は」の出現回数n3の組み合わせでn2、n3を、2文
字連鎖1405は2つの1403の第3文字「は」の出
現回数n3の組み合わせでn3、n3を、2文字連鎖1204
は「は」および「に」の出現回数n3、n4を記憶する。In FIG. 14B, a two-character chain 140
2 is the number of appearances n1 and n2 of “i” and “ro”, and the two-character chain 1404 is the third number of appearances n2 and 1403 of “ro”.
The combination of the number of appearances n3 of the character "ha" is n2, n3, and the two-character chain 1405 is the combination of the number of appearances n3 of the third character "ha" of two 1403, n3, n3 is the combination of two characters 1204.
Stores the number of appearances n3 and n4 of “ha” and “ni”.
【0097】このとき本発明の第6の方法による照合方
法では、2文字連鎖1412の「いろ」に該当する2文
字連鎖1402を検出し、このときの「ろ」の出現回数
n2と、1412の次の3文字連鎖1413の最初の2文
字連鎖1414の「ろは」に該当する2文字連鎖140
4を検出し、このときの「ろ」の出現回数n2が一致する
か否か判断する。一致したら、次に3文字連鎖の次の2
文字連鎖1415「はは」に該当する2文字連鎖140
5を検出し、この時の「は」の出現回数n3が一致し、か
つ1405の連鎖の第1文字「は」の出現回数と第2文
字「は」の出現回数がn3で一致することを検出する。次
に2文字連鎖1416の「はに」に該当する2文字連鎖
1406を検出し、1405で検出した「は」の出現回
数n3と、2文字連鎖1406の「は」の出現回数が一致
するか否か判断する。一致したら、文字列1411は1
401に一致したと判断する。以上により、文字列の照
合がなされる。At this time, in the collation method according to the sixth method of the present invention, a two-character chain 1402 corresponding to “iro” of the two-character chain 1412 is detected, and the number of appearances of “ro” at this time is detected.
n2 and a two-character chain 140 corresponding to “roha” of the first two-character chain 1414 of the three-character chain 1413 following the 1412
4 is detected, and it is determined whether or not the number of appearances n2 of “ro” at this time matches. If they match, then the next two in the three-character chain
Two-character chain 140 corresponding to character chain 1415 "haha"
5 is detected, and the number of appearances n3 of "ha" at this time matches, and the number of occurrences of the first character "ha" and the number of appearances of the second character "ha" in the chain of 1405 match at n3. To detect. Next, a two-character chain 1406 corresponding to "Hani" in the two-character chain 1416 is detected, and the number of appearances n3 of "H" detected in 1405 matches the number of occurrences of "Hana" in the two-character chain 1406? Determine whether or not. If they match, the character string 1411 is 1
It is determined that the number matches 401. As described above, the character strings are collated.
【0098】第13図は本発明の第6の方法の一実施例
における文字列照合装置の構成を示したものである。FIG. 13 shows the structure of a character string collating apparatus according to an embodiment of the sixth method of the present invention.
【0099】第13図において、1301は登録する文
字列1401から登録する2文字連鎖1402、140
6、及び各文字の出現回数を検出する2文字連鎖検出
器、1302は登録する文字列1401から登録する3
文字連鎖1403を検出する3文字連鎖検出器、130
3は3文字連鎖1403から挿入された特殊文字を次の
文字に変更して1404および1405の2つの2文字
連鎖及び各文字の出現回数を検出する特殊2文字連鎖生
成器、1304は2文字連鎖1402、1404、14
05、1406およびそれらの文字の出現回数を格納す
る2文字連鎖メモリ、1311は検索する文字列141
1から検索する2文字連鎖1412、1416を検出す
る2文字連鎖検出器、1312は検索する文字列141
1から検索する3文字連鎖1413を検出する3文字連
鎖検出器、1313は3文字連鎖1413から挿入され
た特殊文字を次の文字に変更して1414および141
5の2つの2文字連鎖及び各文字の出現回数を検出する
特殊2文字連鎖生成器、1314は2文字連鎖検出器1
311より検出された2文字連鎖1412、1416を
2文字連鎖メモリ1304で検出するかまたは、特殊2
文字連鎖生成器1313より生成された2文字連鎖14
14、1415を2文字連鎖メモリ1304で検出し、
検出したそれぞれの文字連鎖の前の文字の出現回数が直
前に検出した文字連鎖の後の文字の出現回数に一致する
か否か判断し、特殊2文字連鎖1415の場合は第1文
字と第2文字の出現回数が一致することを判断する比較
器、1315は2文字連鎖検出器1311および3文字
連鎖検出器1312から検出される全ての2文字または
3文字の連鎖についての一致を比較器1314で判断
し、文字列の一致を判断する制御部である。In FIG. 13, reference numeral 1301 denotes a two-character chain 1402, 140 to be registered from a character string 1401 to be registered.
6, a two-character chain detector 1302 that detects the number of appearances of each character,
Three-character chain detector 130 for detecting character chain 1403
3 is a special two-character chain generator for changing the special character inserted from the three-character chain 1403 to the next character and detecting two two-character chains 1404 and 1405 and the number of appearances of each character. 1402, 1404, 14
05, 1406 and a two-character chain memory for storing the number of appearances of those characters.
2 is a two-character chain detector that detects two-character chains 1412 and 1416 to be searched from 1, and 1312 is a character string 141 to be searched.
A three-character chain detector 1313 for detecting a three-character chain 1413 to be searched from 1 is used to change the special character inserted from the three-character chain 1413 to the next character, and 1414 and 141
5 is a special two-character chain generator for detecting the two two-character chain and the number of appearances of each character.
The two-character chains 1412 and 1416 detected from the 311 are detected by the two-character chain memory 1304 or the special 2
Two-character chain 14 generated by character chain generator 1313
14, 1415 are detected by the two-character chain memory 1304,
It is determined whether or not the number of occurrences of the character before the detected character chain matches the number of occurrences of the character after the character chain detected immediately before. In the case of the special two-character chain 1415, the first character and the second character are determined. A comparator 1315 determines that the appearance counts of the characters match each other. A comparator 1314 determines whether the two or three character chains detected by the two-character chain detector 1311 and the three-character chain detector 1312 match. It is a control unit that determines and determines whether the character strings match.
【0100】よって、この時特定の特殊文字「a」の出
現回数に制限を受けること無く文字連鎖による文字列照
合を行うことが可能となる。Therefore, at this time, it is possible to perform character string collation using character chains without being limited by the number of appearances of the specific special character “a”.
【0101】(実施の形態7)第15図は本発明の第7
の方法の文字列照合の方法の概念を示している。第15
図(a)において、1501は登録時に入力される文字
列「いろaはにaいろaはとa」、1502は最初に登
録される2文字連鎖「いろ」、1503は1502に続
く特殊文字「a」を含む2文字連鎖「ろa」、1504
は1503を含む次の2文字連鎖「aは」であり、以下
1505〜1512まで同じように2文字連鎖を生成す
る。(Embodiment 7) FIG. 15 shows a seventh embodiment of the present invention.
3 shows the concept of the method of character string matching. Fifteenth
Referring to FIG. 15A, reference numeral 1501 denotes a character string "color a wa ni a color a hat a" input at the time of registration; "a", 1502
Is the next two-letter chain "aha" including 1503, and similarly generates a two-letter chain from 1505 to 1512.
【0102】第15図(b)において、2文字連鎖15
02は「い」および「ろ」の出現回数をn1、n2を、2文
字連鎖1505は「は」および「に」の出現回数n3、n4
を、2文字連鎖1508は「い」「ろ」の出現回数n1+
1、n2+1を、2文字連鎖1511は「は」および「と」
の出現回数n3+1、n5を記憶する。例えば、第15図
(e)において、2文字連鎖「はと」の記憶されている
出現回数の組が示されている。In FIG. 15B, a two-character chain 15
02 indicates the number of appearances of “i” and “ro” as n1 and n2, and the two-character chain 1505 indicates the number of occurrences of “ha” and “ni” n3 and n4
, The two-character chain 1508 is the number of appearances n1 +
1, n2 + 1, the two-character chain 1511 is "ha" and "to"
Are stored n3 + 1 and n5. For example, FIG. 15 (e) shows a set of stored appearance counts of the two-character chain “hato”.
【0103】次に、特殊文字「a」の出現回数の最大値
を予め2と指定し、特殊文字の出現回数を最大値で割っ
たときの余りが0の場合には最大値をとなるように指定
する。この場合、特殊文字の出現回数は、1、2のいず
れかとなる。第15図(b)において、2文字連鎖15
03の特殊文字「a」は1度目の出現であるから出現回
数は1、文字連鎖1504の特殊文字「a」の出現回数
も同じく1、2文字連鎖1506の特殊文字「a」は1
度目の出現であるから出現回数は2、文字連鎖1507
の特殊文字「a」の出現回数も同じく2となる。一方、
2文字連鎖1509の特殊文字「a」は出現回数1が2
度目の出現であるから出現回数は1、文字連鎖1510
の特殊文字「a」の出現回数も同じく1、文字連鎖15
12の特殊文字「a」は2度目の出現であるから出現回
数は2となる。Next, the maximum value of the number of appearances of the special character "a" is designated as 2 in advance, and if the remainder obtained by dividing the number of occurrences of the special character by the maximum value is 0, the maximum value is set. To be specified. In this case, the number of appearances of the special character is one or two. In FIG. 15 (b), the two-character chain 15
03 is the first occurrence of the special character “a”, so the number of appearances is 1, the number of appearances of the special character “a” in the character chain 1504 is also the same, and the special character “a” in the two-character chain 1506 is 1
Since it is the second appearance, the number of appearances is 2, character chain 1507
The number of appearances of the special character “a” is also 2. on the other hand,
The special character “a” in the two-character chain 1509 has the appearance frequency 1 of 2
Since this is the second appearance, the number of appearances is 1, and the character chain 1510
The number of appearances of the special character "a" is also 1, and the character chain 15
Since the twelve special characters “a” appear for the second time, the number of appearances is two.
【0104】次に、特殊文字を含む2文字連鎖は第2文
字に対して文字種別毎にソートして記憶する。第15図
(c)において、2文字連鎖「ろa」の文字連鎖の組
は、2文字連鎖1503の組n2、1と2文字連鎖n2+1、
1で構成される。一方、第15図(d)において、2文
字連鎖「a*」の文字連鎖の組、*は出現するされる文
字種「い」と「は」で構成され、2文字連鎖1504、
1507、1510に対して文字種別毎にソートされて
いる。ここで文字種別毎のソートは文字コード順で、出
現回数が一致した場合には登録文字列で出現した順番と
する。ソートされた結果、文字連鎖は第15図(c)
(d)のように記憶される。Next, the two-character chain including the special character is stored by sorting the second character for each character type. In FIG. 15 (c), the set of the character chain of the two-character chain "roa" is the set n2,1 of the two-character chain 1503, and the two-character chain n2 + 1.
It is composed of 1. On the other hand, in FIG. 15 (d), a character chain set of a two-character chain "a *", * is composed of the character types "i" and "ha" that appear, and a two-character chain 1504;
1507 and 1510 are sorted for each character type. Here, the sorting for each character type is in the order of the character code, and when the number of appearances matches, the order in which the characters appear in the registered character string. As a result of the sorting, the character chain is as shown in FIG. 15 (c).
It is stored as shown in FIG.
【0105】このとき本発明の第16の方法による照合
方法では、第15図(f)にある検索文字列「ろaは
と」を例に説明する。At this time, in the collation method according to the sixteenth method of the present invention, a description will be given by taking as an example the search character string "roa-hato" shown in FIG. 15 (f).
【0106】先ず、文字連鎖「ろa」と「aは」の連続
性の照合を行う。照合が開始されると「ろa」と「a
は」の重複カウンタを0にリセットする。文字連鎖15
13の「ろa」に該当する2文字連鎖について第15図
(c)1503を最初に検出し、このときの「a」の出
現回数1から第15図(g)にある「ろa」重複カウン
タに出現回数1の重複回数0を記憶する。次に文字連鎖
1514の「aは」に該当する2文字連鎖について第1
5図(d)で「aは」の最初の文字連鎖から順番に出現
回数を検出し、さらにその重複回数0を「aは」重複カ
ウンタに記憶する。照合は、2つの文字連鎖1503の
第2文字の出現回数と1504の第1文字の出現回数、
および、「ろa」と「aは」の重複回数が一致している
かどうかを調べ一致していれば、さらに文字連鎖「は
と」の照合を行う。ここでは文字連鎖1504の第2文
字の出現回数と文字連鎖1510の第1文字の出現回数
が異なるため、次の文字連鎖の照合を行う。文字連鎖1
503と文字連鎖1509の特殊文字の出現回数の重複
を調べ、重複していれば「ろa」の重複カウンタ151
6を1つ増やす。これにより文字連鎖1510に該当す
る「aは」の重複カウンタ1517を1つ増やす。続い
て第15図(d)において「aは」の重複カウンタ15
16が1であるから第1文字が1つだけ重複した文字連
鎖1510を検出する。文字連鎖「はと」の連続の照合
から文字連鎖1509、1510、1511が最終的に
連続文字列として検出される。なお、このとき第15図
(g)の「ろa」「aは」の重複カウンタ値1(151
6、1517)が記憶されている。First, the continuity of the character chains “a” and “a” are collated. When the matching is started, “a” and “a”
Is reset to zero. Character chain 15
15 (c) 1503 is first detected for the two-character chain corresponding to the 13 "roa", and the "roa" overlap shown in FIG. The counter stores the number of occurrences 0 of the number of appearances 1 in the counter. Next, regarding the two-character chain corresponding to “a wa” of the character chain
5 In FIG. 5D, the number of appearances is detected in order from the first character chain of “a wa”, and the number of times of duplication 0 is stored in the “a wa” duplication counter. The collation is the number of appearances of the second character in the two character chains 1503 and the number of appearances of the first character in 1504,
It is checked whether or not the number of repetitions of “a” and “a” match, and if they do, the character chain “hato” is further collated. Here, since the number of appearances of the second character in the character chain 1504 is different from the number of appearances of the first character in the character chain 1510, the next character chain is collated. Character chain 1
The number of occurrences of special characters in the character chain 503 and the character chain 1509 is checked for overlap.
6 is increased by one. Thereby, the duplication counter 1517 of “a wa” corresponding to the character chain 1510 is increased by one. Subsequently, in FIG. 15 (d), the duplicate counter 15 of "a"
Since 16 is 1, a character chain 1510 in which only one first character is duplicated is detected. The character chains 1509, 1510, and 1511 are finally detected as a continuous character string from the collation of the character sequence "hato". At this time, the duplicate counter value 1 (151) of “a” and “a” in FIG.
6, 1517) are stored.
【0107】以上により、文字列の照合がなされる。な
お、特殊文字の最大値は任意に指定できること、また本
実施例では、特殊文字の出現回数を、予め指定した出現
回数の最大値で割った余りで、余りが0の場合は最大値
にする場合を挙げたが、出現回数は最大値以下で重複を
無視すればユニークであればよいので、出現回数の最大
値以下で割った余り、最大値−余り、昇順の偶数、昇順
の奇数、降順の奇数、降順の奇数などがある。例えば、
最大値を10として、特殊文字の出現回数が3、5、
7、8、6、4、2の繰り返しを出現回数としても構わ
ない。As described above, the character strings are collated. Note that the maximum value of the special character can be arbitrarily specified. In the present embodiment, the number of occurrences of the special character is a remainder obtained by dividing the number of occurrences of the special character by the maximum value of the number of occurrences specified in advance. If the remainder is 0, the maximum value is set. Although the case is given, the number of appearances is not more than the maximum value and it is only necessary to ignore duplication, so it is sufficient that the number of occurrences is less than the maximum value of the number of appearances. There are odd numbers, odd numbers in descending order, and so on. For example,
Assuming that the maximum value is 10, the number of appearances of special characters is 3, 5,
The repetition of 7, 8, 6, 4, 2 may be used as the number of appearances.
【0108】第16図は本発明の第7の方法の一実施例
における文字列照合装置の構成を示したものである。FIG. 16 shows the structure of a character string collating apparatus according to an embodiment of the seventh method of the present invention.
【0109】第16図において、1601は登録する文
字列1501に対して特定の特殊文字「a」を検出する
特殊文字検出器、1602は文字列1501から特殊文
字がない場合の文字連鎖の文字連鎖と出現回数を算出
し、1502、1505、1508、1511を2文字
連鎖メモリ1606に格納する2文字連鎖検出器、16
03は特殊文字を含む2文字連鎖で特殊文字を含まない
文字種の第1文字または第2文字の出現回数を2文字連
鎖メモリ1606から求め、さらに特殊文字の出現回数
を最大値以下になるように算出し、出現回数の重複回数
を出現重複メモリ1604に記憶し、次に出現した特殊
文字の出現回数の値を出現重複メモリ1604から算出
し、特殊文字を含む文字連鎖と出現回数である150
3、1504、1506、1507、159、151
0、1512を決定する特殊文字連鎖検出器、1605
は前記特殊文字連鎖検出器1605から特殊文字を第1
文字としてときに第2文字の文字種毎にソートし、その
ソートした結果(第15図(d))を2文字連鎖メモリ
1606に格納する特殊文字連鎖ソート器、1607は
検索文字列(第15図(f))から特殊文字「a」を検
出する特殊文字検出器、1608は前記検索文字列から
特殊文字がない場合に2文字連鎖を生成する2文字連鎖
検出器、1609は前記検索文字列から特殊文字を含む
2文字連鎖を生成する2文字連鎖検出器、1610は2
文字連鎖検出器1608と特殊文字連鎖検出器169で
検出された文字連鎖1513、1514、1515に該
当する文字連鎖と出現回数を2文字連鎖メモリ1606
から取り出し、2文字連鎖1513と1514について
は出現重複カウンタメモリ1612を0にセットし、2
文字連鎖1503と第2文字の重複回数が0、2文字連
鎖1504と第1文字の重複回数0を算出、続いて2文
字連鎖1509と第2文字の重複回数を1、2文字連鎖
1510と第1文字の重複回数1を算出、2文字連鎖1
515については1511を算出する比較器、1611
は2文字連鎖検出器1608および比較器1610で算
出した結果から、文字列の一致を判断する制御器であ
る。In FIG. 16, reference numeral 1601 denotes a special character detector for detecting a specific special character “a” in a registered character string 1501, and 1602 denotes a character chain of a character chain when there is no special character from the character string 1501. And a two-character chain detector that calculates the number of appearances and stores 1502, 1505, 1508, and 1511 in the two-character chain memory 1606.
03 is obtained from the two-character chain memory 1606 to determine the number of appearances of the first character or the second character of a character type that does not include special characters in a two-character chain including special characters, and further reduces the number of occurrences of special characters to a maximum value or less. The number of occurrences of the special character is calculated and stored in the occurrence overlap memory 1604, and the value of the number of appearances of the next special character is calculated from the occurrence overlap memory 1604.
3, 1504, 1506, 1507, 159, 151
Special character chain detector to determine 0, 1512, 1605
Is the first special character from the special character chain detector 1605.
A special character chain sorter that sometimes sorts by character type of the second character as a character and stores the sorted result (FIG. 15 (d)) in a two-character chain memory 1606. Reference numeral 1607 denotes a search character string (FIG. 15). (F)) a special character detector for detecting the special character “a” from the search character string, 1608 is a two-character chain detector for generating a two-character chain from the search character string when there is no special character, and 1609 is a A two-character chain detector that generates a two-character chain including special characters,
The two-character chain memory 1606 stores the character chains corresponding to the character chains 1513, 1514, and 1515 detected by the character chain detector 1608 and the special character chain detector 169 and the number of appearances.
From the two character chains 1513 and 1514, the appearance duplication counter memory 1612 is set to 0, and
The number of duplications between the character chain 1503 and the second character is 0, the number of duplications between the two-character chain 1504 and the first character is calculated as 0, and then the number of duplications between the two-character chain 1509 and the second character is 1, and the two-character chain 1510 and the Calculate the number of duplications of 1 character 1 and 2 character chains 1
For 515, a comparator for calculating 1511, 1611
Is a controller for judging a match between character strings from the results calculated by the two-character chain detector 1608 and the comparator 1610.
【0110】よって、この時特定の特殊文字「a」の出
現回数に制限を受けることなく文字連鎖による文字列照
合を行うことが可能となる。Therefore, at this time, it is possible to perform character string collation by character chain without being limited by the number of appearances of the specific special character “a”.
【0111】(実施の形態8)第17図は本発明の第8
の方法の登録方法と文字列照合の方法の概念を示してい
る。はじめに登録方法について説明する。(Embodiment 8) FIG. 17 shows an eighth embodiment of the present invention.
2 shows the concept of the method of registration and the method of character string collation. First, a registration method will be described.
【0112】第17図(d)において、1708は登録
時に入力される文字列「あいaあいaあいaあいあ
い」、1709は最初に登録される2文字連鎖「あ
い」、1710は1709に続く特殊文字「a」を含む
2文字連鎖「いa」、1711はを次の2文字連鎖「a
あ」であり、以下1712〜1720まで同じように2
文字連鎖を生成する。この2文字連鎖から文書番号、第
1文字と第2文字の出現回数または数値が格納された組
である文字連鎖データを生成する。In FIG. 17 (d), reference numeral 1708 denotes a character string "ai aai aai aaiai" input at the time of registration, 1709 denotes a two-character chain "ai" registered first, and 1710 denotes a special character following 1709. The two-letter chain "a", 1711 including the character "a" is converted to the next two-letter chain "a".
And the same applies to 1712-1720.
Generate a character chain. From this two-character chain, character chain data, which is a set in which a document number, the number of appearances of the first character and the second character, or a numerical value is stored, is generated.
【0113】第17図(a)〜(c)は2文字連鎖を構
成する文字種に応じて異なる文字連鎖データを示してい
る。第17図(a)は特殊文字を含まない文字連鎖デー
タで、第1文字の出現回数と第2文字の出現回数を格納
するサイズは同じである。一方、第17図(b)(c)
では特殊文字を含む文字連鎖データであり、特殊文字に
対する出現回数の格納するサイズは、特殊文字でない文
字に対する領域に比べて大きい。また特殊文字でない文
字に対する領域には指定された値(本実施例では0)を
記憶するものとする。FIGS. 17 (a) to 17 (c) show different character chain data according to the type of characters constituting the two-character chain. FIG. 17A shows character chain data that does not include special characters, and has the same size for storing the number of appearances of the first character and the number of appearances of the second character. On the other hand, FIGS. 17 (b) and (c)
Is character chain data including special characters, and the size of the number of appearances for special characters is larger than the area for characters that are not special characters. A designated value (0 in this embodiment) is stored in an area for a character that is not a special character.
【0114】第17図(e)において、登録文字列17
08に対して文字連鎖データ作成する。ここで「あ」の
出現回数をn1、「い」の出現回数をn2とする。2文字連
鎖1709は「あい」の文字連鎖データであり、「あ」
の出現回数はn1、「い」n2であるが、2文字連鎖「あ
い」に続く2文字連鎖「いa」1710の文字連鎖デー
タが第17図(c)で構成されることから「いa」の文
字連鎖データは「い」に該当する値が0、「a」に該当
する値は特殊文字出現回数1となる。従って、文字連鎖
データの連続性から「あい」の文字連鎖データは172
1のように第2文字に該当部分が0となる。以下同様に
1722〜1732のように文字連鎖データを構成する
ことができる。In FIG. 17 (e), the registered character string 17
08 to create character chain data. Here, the number of appearances of “A” is n1, and the number of appearances of “I” is n2. The two-character chain 1709 is character chain data of “Ai”, and “A”
Are n1 and "i" n2, but the character chain data of the two-character chain "a" 1710 following the two-character chain "ai" is composed of FIG. In the character chain data of "", the value corresponding to "i" is 0, and the value corresponding to "a" is 1 the number of special character appearances. Therefore, from the continuity of the character chain data, the character chain data of “A” is 172 characters.
The portion corresponding to the second character becomes 0, such as 1. Hereinafter, similarly, character chain data such as 1722 to 1732 can be constituted.
【0115】第17図(e)で生成された文字連鎖デー
タは、第17図(f)〜(i)のように出現する2文字
連鎖の組み合わせ毎に分けて格納する。The character chain data generated in FIG. 17 (e) is stored separately for each combination of two character chains appearing as shown in FIGS. 17 (f) to 17 (i).
【0116】以上の文字連鎖データの生成方法は、第1
8図のフローおよび第20図の文字列照合装置の構成に
より実現される。第20図において、2001は登録す
る文字列から2文字連鎖および文書番号を作成する2文
字連鎖検出器、2002は2文字連鎖から2文字連鎖の
各文字種に対して出現回数または値を算出し、さらに特
殊文字を含む2文字連鎖に続く2文字連鎖の場合には、
既に出現回数の値を算出した値に置き換えが必要かどう
かを2003特殊文字連鎖検出器に問い合わせ、その結
果から再度出現回数を算出する出現回数算出器、および
前記2002出現回数算出器が文書番号と出現回数の組
を文字連鎖データとして格納する2文字連鎖メモリ20
04から構成されている。第18図で文字連鎖検出器2
001は登録文字列データを読み取り(ステップ180
1)、文書番号をセットし(ステップ1802)、最大
文書数まで登録文字列を読み取り文書番号を付与し(ス
テップ1803)、さらに2文字連鎖(Ak,Ak+1)(Ak,A
k+1はk,k+1番目の文字種)の組を作成する(ステップ1
804)。続いて出現回数検出器2002は、2文字連
鎖に特殊文字列の有無を調べ(ステップ1805)、特
殊文字を含む場合は、特殊文字の出現回数N(Ak)またはN
(Ak+1)をカウントし、文字連鎖データSkを作成する(ス
テップ1806、1808)。また特殊文字を含まない
場合は出現回数をカウントし文字連鎖データSkを作成す
る(ステップ1810)。次に特殊文字連鎖検出器20
03は、前記文字連鎖データSkに連続する文字連鎖デー
タSk+1に対してSkの第2文字に該当する出現回数または
値が、Sk+1の第1文字に該当する出現回数または値に等
しくなるよう値を修正する(ステップ1807、180
8、1811)。以下全ての2文字連鎖、および登録文
字列について実施し(ステップ1812〜1814)、
生成された文字連鎖データを2文字連メモリ2004に
格納する。The above-described method of generating character chain data is based on the first method.
This is realized by the flow of FIG. 8 and the configuration of the character string collation device of FIG. In FIG. 20, 2001 is a two-character chain detector that creates a two-character chain and a document number from a registered character string, and 2002 calculates the number of appearances or value for each character type of the two-character chain from the two-character chain, Furthermore, in the case of a two-character chain following a two-character chain including special characters,
An inquiry is made to the 2003 special character chain detector as to whether it is necessary to replace the value of the number of appearances with a value already calculated, and an appearance number calculator for calculating the number of appearances again from the result. A two-character chain memory 20 for storing a set of occurrence counts as character chain data
04. In FIG. 18, the character chain detector 2
001 reads the registered character string data (step 180
1), a document number is set (step 1802), a registered character string is read up to the maximum number of documents, a document number is assigned (step 1803), and a two-character chain (Ak, Ak + 1) (Ak, A
Create a set of (k + 1 is the k, k + 1th character type) (Step 1)
804). Subsequently, the appearance number detector 2002 checks the presence or absence of a special character string in the two-character chain (step 1805). When the special character is included, the appearance number N (Ak) or N
(Ak + 1) is counted, and character chain data Sk is created (steps 1806 and 1808). If no special character is included, the number of appearances is counted to create character chain data Sk (step 1810). Next, the special character chain detector 20
03 is such that the number of appearances or value corresponding to the second character of Sk is equal to the number of appearances or value corresponding to the first character of Sk + 1 with respect to the character chain data Sk + 1 continuous with the character chain data Sk. The value is corrected so as to satisfy (steps 1807 and 180
8, 1811). The following is performed for all two-character chains and registered character strings (steps 1812 to 1814),
The generated character chain data is stored in the two-character continuous memory 2004.
【0117】次に文字列照合の方法について説明する。
検索文字列として第17図(j)1732の「いaあい
a」を例として説明する。検索文字列を2文字連鎖「い
a」1733、次の2文字連鎖「aあ」1734、以下
同様にして1735〜1736までを作成する。この2
文字連鎖に該当する文字連鎖データを2文字連鎖メモリ
2004から取り出し、1733から順番に連続性の照
合を行う。連続性の照合の概念は第17図(k)示して
いる。2文字連鎖「いa」1733に該当する文字連鎖
データを「いa」の文字連鎖データである第17図
(g)を先頭から検索し、文字連鎖データ1722を取
り出す。文字連鎖データ1722の文字種を調べ、予め
指定した特殊文字「a」を第2文字に含んでいるので、
「a」の出現回数を特殊文字出現カウンタメモリ(第2
0図の2007)に格納する。次に2文字連鎖「いa」
に続く2文字連鎖「aあ」に該当する文字連鎖データを
「aあ」の文字連鎖データである第17図(h)を先頭
から検索し、文字連鎖データ1722の第2文字の出現
回数と第17図(h)の文字連鎖データの第1文字の出
現回数が一致するかを調べ、文字連鎖データ1723を
取得する。これにより文字連鎖データ1722と172
3は連続と判定する。Next, a method of character string collation will be described.
The search character string will be described using "Ia aa" in FIG. 17 (j) 1732 as an example. For the search character string, a two-character chain “a” 1733, a next two-character chain “a” 1734, and so on are created in the same manner from 1735 to 1736. This 2
Character chain data corresponding to the character chain is retrieved from the two-character chain memory 2004, and continuity is collated sequentially from 1733. The concept of the continuity check is shown in FIG. 17 (k). The character chain data corresponding to the two-character chain “Ia” 1733 is searched from the beginning in FIG. 17G that is the character chain data of “Ia”, and the character chain data 1722 is extracted. The character type of the character chain data 1722 is checked, and the special character “a” specified in advance is included in the second character.
The number of occurrences of “a” is stored in the special character appearance counter memory (second
(2007) in FIG. Next, the two-letter chain "Ia"
The character chain data corresponding to the two-character chain “a-a” following the character string “a-a” is searched from the beginning in FIG. It is checked whether the number of appearances of the first character in the character chain data of FIG. 17 (h) matches, and character chain data 1723 is obtained. As a result, character chain data 1722 and 172
3 is determined to be continuous.
【0118】次に2文字連鎖「aあ」に続く2文字連鎖
「あい」に該当する文字連鎖データを「あい」の文字連
鎖データである第17図(f)を先頭から検索し、文字
連鎖データ1723の第2文字の出現回数と第17図
(f)の文字連鎖データの第1文字の出現回数が一致す
るかを調べ、文字連鎖データ1724を取得する。これ
により文字連鎖データ1723と1724は連続と判定
する。Next, character chain data corresponding to the two-character chain "A" following the two-character chain "a" is searched from the beginning in FIG. It is checked whether the number of appearances of the second character in the data 1723 matches the number of appearances of the first character in the character chain data in FIG. 17F, and character chain data 1724 is obtained. Thus, the character chain data 1723 and 1724 are determined to be continuous.
【0119】次に2文字連鎖「あい」に続く2文字連鎖
「いa」に該当する文字連鎖データを「いa」の文字連
鎖データである第17図(g)を先頭から検索し、文字
連鎖データ1724の第2文字の出現回数と第17図
(g)の文字連鎖データの第1文字の出現回数が一致す
るかを調べる。ここで2文字連鎖「いa」には再度特殊
文字「a」が出現したため特殊文字出現カウンタ173
8の値を1つ増やす(1738)。第17図(g)の先
頭から、文字連鎖データ1724の第2文字の出現回数
と「いa」の文字連鎖データの第1文字の値と一致する
文字連鎖データを調べると1722があるが、特殊文字
の出現回数を特殊文字出現カウンタ1738から2であ
ることから、次の文字連鎖データを探し1725を得
る。これにより文字連鎖データ1724と1725は連
続と判定し、検索文字列を含む登録文字列が存在すると
判定する。Next, the character chain data corresponding to the two-character chain "Ia" following the two-character chain "A" is searched from the top in FIG. 17 (g) which is the character chain data of "Ia". It is checked whether the number of appearances of the second character in the chained data 1724 and the number of appearances of the first character in the character chained data in FIG. 17 (g) match. Here, the special character appearance counter 173 appears because the special character “a” appears again in the two-character chain “a”.
The value of 8 is increased by one (1738). From the top of FIG. 17 (g), when character chain data that matches the number of appearances of the second character of the character chain data 1724 and the value of the first character of the character chain data of “Ia” is checked, there is 1722. Since the number of occurrences of the special character is 2 from the special character appearance counter 1738, the next character chain data is searched for 1725. As a result, the character chain data 1724 and 1725 are determined to be continuous, and it is determined that a registered character string including the search character string exists.
【0120】以上の文字列照合の方法は、第19図のフ
ローおよび第20図の文字列照合装置の構成により実現
される。第20図において、2005は検索する文字列
から2文字連鎖を作成する2文字連鎖検出器、2006
は2文字連鎖を構成する各文字種を調べ、2文字連鎖が
特殊文字を含まない場合は、文字連鎖検出器2005で
検出された連続した文字連鎖に該当する文字連鎖データ
に対して、検出された文字連鎖データの第2文字の出現
回数と、文字連鎖に続く文字連鎖の文字連鎖データの第
1文字の出現回数を比較することにより、検索文字列と
しての文字連鎖の連続の有無を判定し、2文字連鎖が特
殊文字を含む場合は、文字連鎖検出器2005で検索さ
れた連続した文字連鎖に該当する文字連鎖データに対し
て、比較手段と同様に文字の出現回数と比較し、比較す
る際に指定された特殊文字列の出現回数を特殊文字出現
カウンタメモリ2007に記憶し、連続した文字連鎖以
外では出現回数が重複しないことを基準として比較する
比較器、2008は比較器2007の結果から、文字連
鎖データの連続性の連続の有無を判定する制御器で構成
されている。第19図で2文字連鎖検出器2005は検
索文字列を読み取り(ステップ1901)、2文字連鎖
Ak,Ak+1を作成し(ステップ1902)、2文字連鎖を
先頭からセットし(ステップ1903)、比較器200
6は、2文字連鎖検出器2005から2文字連鎖を、連
続性の照合ができなくなるまで取り出し(ステップ19
04)、さらに2組の2文字連鎖(Ak,Ak+1)、(Ak+1,Ak+
2)(Ak,Ak+1,Ak+2はk,K+1,K+2番目の文字種)に対応す
る文字連鎖データSl(N(Ak),N(Ak+1))、Sm(M(Ak),M(Ak+
1))(Sl,Smはl,m番目の文字連鎖データ、N(Ak),M(Ak+1)
は各々文字種Ak,Ak+1の出現回数または値)を先頭から
取り出し(ステップ1905)、2文字連鎖に特殊文字
が含まれているかを調べる(ステップ1906)。特殊
文字が含まれている場合は、特殊文字の出現回数N(Ak)
またはN(Ak+1)をTとして格納し、次に文字連鎖データSl
の第2文字の出現回数N(Ak+1)と文字連鎖データSmの第
1文字の出現回数M(Ak+1)が一致しているかどうかを調
べ(ステップ1908)、一致していなければSmの次の
文字連鎖データSm+1にセットし(ステップ1910)、
ステップ1905に移る。出現回数が一致し、特殊文字
を特殊文字を含む文字連鎖データで、かつ特殊文字の出
現回数Tに一致しているかを判定し(ステップ190
9)、ステップ1909の条件を満たさない場合は、文
字連鎖データは連続と判定した結果を制御器2008に
返し(ステップ1911)、次の2文字連鎖の連続照合
に入る(ステップ1912)。The above-described method of character string collation is realized by the flow of FIG. 19 and the configuration of the character string collation apparatus of FIG. In FIG. 20, reference numeral 2005 denotes a two-character chain detector for creating a two-character chain from a character string to be searched;
Examines each character type constituting the two-character chain, and if the two-character chain does not include a special character, the character chain data corresponding to the continuous character chain detected by the character chain detector 2005 is detected. By comparing the number of appearances of the second character of the character chain data with the number of appearances of the first character of the character chain data of the character chain following the character chain, it is determined whether or not the character chain as a search character string is continuous. When the two-character chain includes a special character, the character chain data corresponding to the continuous character chain searched by the character chain detector 2005 is compared with the number of appearances of the character in the same manner as the comparing means. A comparator that stores the number of appearances of the special character string specified in the special character appearance counter memory 2007, and compares the number of occurrences other than continuous character chains based on the fact that the number of occurrences does not overlap. From result of the comparator 2007 is configured the presence or absence of continuity of the continuity of the character chain data determining controller. In FIG. 19, the two-character chain detector 2005 reads the search character string (step 1901), and the two-character chain
Ak, Ak + 1 are created (step 1902), and a two-character chain is set from the beginning (step 1903).
6 takes out a two-character chain from the two-character chain detector 2005 until the continuity can no longer be checked (step 19).
04), and two sets of two-character chains (Ak, Ak + 1) and (Ak + 1, Ak +
2) (Ak, Ak + 1, Ak + 2 is the k, K + 1, K + 2nd character type) Character chain data Sl (N (Ak), N (Ak + 1)), Sm (M (Ak), M (Ak +
1)) (Sl, Sm is the l, m-th character chain data, N (Ak), M (Ak + 1)
Extracts the number of appearances or values of the character types Ak and Ak + 1 from the beginning (step 1905) and checks whether a special character is included in the two-character chain (step 1906). If special characters are included, the number of occurrences of special characters N (Ak)
Or, store N (Ak + 1) as T, then character chain data Sl
Is checked whether the number of appearances N (Ak + 1) of the second character of the character string and the number of appearances M (Ak + 1) of the first character in the character chain data Sm match (step 1908). Is set to the next character chain data Sm + 1 (step 1910),
Move to step 1905. It is determined whether or not the number of appearances matches, whether the special character is character chain data including the special character, and matches the number of appearances T of the special character (step 190).
9) If the condition of step 1909 is not satisfied, the result of determining that the character chain data is continuous is returned to the controller 2008 (step 1911), and the continuous two-character chain collation is started (step 1912).
【0121】この時特定の特殊文字「a」の出現回数が
他の文字種に比べて多い場合に文字連鎖による文字列照
合を行うことが可能となる。なお、本発明の第8の方法
で、検索文字列で「aあい」のように先頭に特殊文字を
含む検索を行う場合、「あい」の文字連鎖データの第1
文字の出現回数は0であることから、「aあ」の文字連
鎖データを参照することなく、「あい」の文字連鎖デー
タで第1文字の出現回数が0であるかを最初に判定する
ことで照合処理を短縮することができる。At this time, if the number of occurrences of the specific special character "a" is larger than that of other character types, it is possible to perform character string collation by character chain. In the eighth method of the present invention, when performing a search including a special character at the beginning such as “a AI” in the search character string, the first character string data of “AI” is used.
Since the number of appearances of a character is 0, it is first determined whether the number of appearances of the first character is 0 in the character chain data of "A" without referring to the character chain data of "a". Can shorten the collation processing.
【0122】(実施の形態9)第22図は本発明の第9
の方法の文字列照合の方法の概念を示している。第22
図(a)において、2201は登録時に入力される文字
列「いろaはに」、2202は最初に登録される2文字
連鎖「いろ」、2203は2202に続く特殊2文字連
鎖であり、2202の第1文字と特殊文字「a」の次の
文字「は」の組にした特殊2文字連鎖「いは」、または
2003は、特殊文字「a」に続く2文字連鎖「はに」
(2204)の第1文字である。第22図(c)におい
て、2205は検索時の検索文字列「いろaはに」、続
いて2文字連鎖2206「いろ」、2206の第1文字
と特殊文字の直後の文字「は」を組とした文字連鎖22
07「いは」、特殊文字「a」の後の2文字連鎖「は
に」である。(Embodiment 9) FIG. 22 shows a ninth embodiment of the present invention.
3 shows the concept of the method of character string matching. 22nd
Referring to FIG. 9A, reference numeral 2201 denotes a character string “Iro a Hari” input at the time of registration; 2202 denotes a two-character chain “Iro” to be registered first; 2203 denotes a special two-character chain following 2202; The special two-character chain “Iha”, which is a set of the first character and the character “H” next to the special character “a”, or the two-character chain “Hani” following the special character “a”
This is the first character of (2204). In FIG. 22 (c), reference numeral 2205 denotes a search character string “iro a han” at the time of search, followed by a two-character chain 2206 “iro”, and the first character of 2206 and the character “ha” immediately after the special character. Character chain 22
07 "Iha" and the two-character chain "Hani" after the special character "a".
【0123】第22図(b)において、2文字連鎖22
02は「い」および「ろ」の出現回数n1、n2を、2文字
連鎖2203は「い」および「は」の出現回数n1、n3
を、2文字連鎖2204は「は」および「に」の出現回
数n3、n4を記憶する。In FIG. 22B, a two-character chain 22
02 is the number of appearances n1 and n2 of “i” and “ro”, and the two-character chain 2203 is the number of appearances n1 and n3 of “i” and “ha”.
And the two-character chain 2204 stores the number of appearances n3 and n4 of “ha” and “ni”.
【0124】このとき本発明の第9の方法による照合方
法では、2文字連鎖の個数の少ない方の文字連鎖または
特殊2文字連鎖を優先させて図22(b)より検索す
る。たとえば(1)2文字連鎖「いろ」の個数が2文字
連鎖「いは」の個数よりも多い場合には、2文字連鎖
「いは」を最初の検索文字連鎖とする、逆の場合は2文
字連鎖「いろ」を、または(2)特殊文字の前の2文字
連鎖と、特殊文字の前の2文字連鎖の第1文字と特殊文
字の直後の文字との組み合わせの2文字連鎖を最初の検
索文字連鎖となる。以下文字列の照合は第4の発明と同
様に、特殊2文字連鎖2207および2文字連鎖220
6を検出し、続けて特殊文字連鎖2207の第2文字
「は」の出現回数n3と、2文字連鎖2208の第1文字
「は」の出現回数が一致するか否かを判断する。以上に
より文字列の照合がなされる。At this time, in the collating method according to the ninth method of the present invention, the character chain with the smaller number of two-character chains or the special two-character chain is searched with priority given in FIG. For example, (1) when the number of two-character chains "iro" is greater than the number of two-character chains "Iha", the two-character chain "Iha" is used as the first search character chain; The character chain "Iro" or (2) the two-character chain of the combination of the two-character chain preceding the special character, the first character of the two-character chain preceding the special character, and the character immediately following the special character It becomes a search character chain. Hereinafter, the collation of the character strings is performed in the same manner as in the fourth invention, except for the special two-character chain 2207 and the two-character chain 220.
Then, it is determined whether or not the number of appearances n3 of the second character "ha" in the special character chain 2207 matches the number of occurrences of the first character "ha" in the two-character chain 2208. Thus, the character strings are collated.
【0125】第21図は本発明の第9の方法の一実施例
における文字列照合装置の構成を示したものである。第
21図において、2101は登録する文字列2201か
ら特殊文字「a」を検出する特殊文字検出器、2102
は文字列2201から特殊文字がない場合に2文字連鎖
を生成し、文字の出現回数を組として2文字連鎖メモリ
2104に登録する2文字連鎖2202、2204を検
出する2文字連鎖検出器、2103は文字列2201か
ら特殊文字をまたいだ特殊文字連鎖2203を生成し、
文字の出現回数を組として2文字連鎖メモリ2104に
登録する特殊2文字連鎖検出器、2105は検索する文
字列2205から特殊文字「a」を検出する特殊文字検
出器、2106は文字列2201から特殊文字がない場
合に2文字連鎖を生成し、2文字連鎖2202、220
4を検出する2文字連鎖検出器、2107は文字列22
05から特殊文字をまたいだ特殊文字連鎖2203を生
成する特殊2文字連鎖検出器、2108は、2文字連鎖
検出器2106および特殊2文字連鎖検出器2107か
ら2文字連鎖2207または2文字連鎖2206を2文
字連鎖メモリ2104から検出し、比較器2108で文
字の出現回数から文字連鎖の連続性を判断し、検索文字
列の一致を制御部2109で判断する。FIG. 21 shows the structure of a character string collating apparatus according to an embodiment of the ninth method of the present invention. In FIG. 21, reference numeral 2101 denotes a special character detector for detecting the special character "a" from the registered character string 2201;
Generates a two-character chain when there is no special character from the character string 2201, and detects a two-character chain 2202, 2204 registered in the two-character chain memory 2104 with the number of appearances of the character as a set. A special character chain 2203 that spans special characters is generated from the character string 2201.
A special two-character chain detector that registers the number of appearances of a character as a set in the two-character chain memory 2104, 2105 is a special character detector that detects the special character "a" from the character string 2205 to be searched, and 2106 is a special character detector that detects a special character from the character string 2201. If there is no character, a two-character chain is generated and the two-character chain 2202, 220
2 is a two-character chain detector for detecting the character string 2
The special two-character chain detector 2108 that generates a special character chain 2203 that straddles a special character from the special character chain 05 from the two-character chain detector 2106 and the special two-character chain detector 2107. The character string is detected from the character chain memory 2104, the continuity of the character chain is determined from the number of appearances of the character by the comparator 2108, and the matching of the search character string is determined by the control unit 2109.
【0126】よって、この方法では特定の特殊文字
「a」はその出現回数に関係なく前後の文字と連鎖を生
成することができるため、特殊文字「a」の制限を受け
ることなく文字連鎖による文字列照合を行うことができ
る。なお、特殊文字を含む照合、たとえば「aは」の場
合は、特殊文字を無視して「は」を第1文字とする文字
連鎖の照合を行いことができることはいうまでもない。Therefore, in this method, a specific special character "a" can be chained with the preceding and following characters irrespective of the number of appearances thereof, so that the character by the character chain is not restricted by the special character "a". Column matching can be performed. It is needless to say that in the case of a collation including a special character, for example, in the case of “a wa”, the collation of a character chain in which “ha” is the first character can be performed ignoring the special character.
【0127】(実施の形態10)図23は本発明の第1
0の実施の形態におけるによる文字列照合装置のブロッ
ク構成図、図24は本発明の第10の方法による文字列
照合の方法の概念、及び全文検索データを記憶した記録
媒体の記憶形式を示している。(Embodiment 10) FIG. 23 shows a first embodiment of the present invention.
FIG. 24 is a block diagram of a character string collating apparatus according to the tenth embodiment, and FIG. 24 shows a concept of a character string collating method according to a tenth method of the present invention and a storage format of a recording medium storing full-text search data. I have.
【0128】図24(a)において、2401は登録時に
入力される文字列「いろaはに」、2402は最初に登
録される2文字連鎖「いろ」、2403は2402の次
の3文字連鎖「ろaは」、2404は2403の次の2
文字連鎖「はに」である。ここで「a」は、文字列に意
味の区切りなどのために挿入されている特殊文字を示
す。In FIG. 24A, reference numeral 2401 denotes a character string “iro a ha ni” inputted at the time of registration, 2402 denotes a two-character chain “iro” registered first, and 2403 denotes a three-character chain next to 2402. 2404 is 2403 next to 2403
The character chain is "Hani". Here, "a" indicates a special character inserted into the character string to separate the meaning.
【0129】図24(c)において、2411は検索時の
検索文字列「いろaはに」、2412は最初に検索され
る2文字連鎖「いろ」、2413は2412の次の3文
字連鎖「ろaは」、2414は2413の次の2文字連
鎖「はに」である。In FIG. 24 (c), reference numeral 2411 denotes a search character string “iro a ha ni” at the time of search, 2412 denotes a two-character chain “iro” to be searched first, and 2413 denotes a three-character chain “ro” next to 2412. a is ", and 2414 is a two-character sequence" Hani "following 2413.
【0130】図24(b)において、2文字連鎖2402
は「い」の出現位置nを、3文字連鎖2403は「ろ」
の出現位置n+1を、2文字連鎖2404は「は」の出
現位置n+2を記憶する。2文字連鎖2402、240
4と3文字連鎖2403は異なる領域に記憶し、2文字
連鎖か3文字連鎖かを識別する。検索文字列図24(c)
の入力に対し、本発明の第10の方法による照合方法で
は、2文字連鎖2412の「いろ」に該当する2文字連
鎖2402を2文字連鎖を格納した領域から検出し、こ
のときの出現位置nと、2412の次の3文字連鎖24
13の「ろaは」に該当する3文字連鎖2403「ろ
は」を3文字連鎖が格納された領域から検出し、このと
きの出現位置n+1が前記の2402の出現位置+1と
一致するか否か判断する。一致したら、次に2413の
次の2文字連鎖2414「はに」に該当する2文字連鎖
2404を2文字連鎖を格納する領域から検出し、この
ときの出現位置n+2が前記の2403の出現位置+1
と一致するか否か判断する。一致したら、文字列211
は201に一致したと判断する。以上により、文字列の
照合がなされる。In FIG. 24B, a two-character chain 2402
Is the appearance position n of "i", and the three-character chain 2403 is "ro"
The two-character chain 2404 stores the appearance position n + 2 of “ha”. Two-character chain 2402, 240
The 4 and 3 character chains 2403 are stored in different areas, and identify whether they are 2 character chains or 3 character chains. Search character string figure 24 (c)
In the collation method according to the tenth method of the present invention, a two-character chain 2402 corresponding to the "color" of the two-character chain 2412 is detected from the area storing the two-character chain, and the appearance position n And the three-character sequence 24 following 2412
The three-character chain 2403 corresponding to thirteen “ro aha” is detected from the area where the three-character chain is stored, and whether or not the appearance position n + 1 at this time coincides with the appearance position +1 of 2402 is determined. Judge. If they match, a two-character chain 2404 corresponding to the two-character chain 2414 “Hani” next to 2413 is detected from the area storing the two-character chain, and the appearance position n + 2 at this time is the appearance position of the aforementioned 2403 + 1
It is determined whether or not they match. If they match, the character string 211
Is determined to match 201. As described above, the character strings are collated.
【0131】図23は本発明の第10の方法の一実施の
形態における文字列照合装置の構成を示したものであ
る。FIG. 23 shows the configuration of a character string collating apparatus according to an embodiment of the tenth method of the present invention.
【0132】図23において、2301は登録する文字
列2401から登録する2文字連鎖2402、240
4、およびそれらの出現位置を検出する2文字連鎖位置
検出器、2302は登録する文字列2401から登録す
る3文字連鎖2403およびその出現位置を検出する3
文字連鎖位置検出器、2303は2文字連鎖2402、
2404およびそれらの出現位置を格納する2文字連鎖
位置メモリ、2304は3文字連鎖2403およびその
連鎖の出現位置を格納する3文字連鎖位置メモリ、23
11は検索する文字列2411から検索する2文字連鎖
2412、2414を検出する2文字連鎖検出器、23
12は検索する文字列211から検索する3文字連鎖2
413を検出する3文字連鎖検出器、2313は2文字
連鎖検出器2311より検出された2文字連鎖241
2、2414を2文字連鎖位置メモリ2303で検出す
るかまたは、3文字連鎖検出器2312より検出された
3文字連鎖2413を3文字連鎖位置メモリ2304で
検出し、検出したそれぞれの文字連鎖の出現位置が直前
に検出した文字連鎖の出現位置+1に一致するか否か判
断する比較器、2314は2文字連鎖検出器2311お
よび3文字連鎖検出器2312から検出される全ての2
文字または3文字の連鎖についての一致を比較器231
3で判断し、文字列の一致を判断する制御部である。In FIG. 23, reference numeral 2301 denotes a two-character chain 2402, 240 to be registered from a character string 2401 to be registered.
4, and a two-character chain position detector 2302 for detecting their appearance position, a three-character chain 2403 to be registered from the registered character string 2401, and a detection for their appearance position 3
A character chain position detector 2303 is a two-character chain 2402,
Reference numeral 2404 denotes a two-character chain position memory for storing the appearance positions thereof, and reference numeral 2304 denotes a three-character chain position memory for storing the three-character chain 2403 and the appearance position of the chain.
Reference numeral 11 denotes a two-character chain detector that detects two-character chains 2412 and 2414 to be searched from a character string 2411 to be searched;
12 is a three-character chain 2 to be searched from the character string 211 to be searched
A three-character chain detector 231 for detecting 413 is a two-character chain 241 detected by the two-character chain detector 2311.
2, 2414 is detected by the two-character chain position memory 2303, or the three-character chain 2413 detected by the three-character chain detector 2312 is detected by the three-character chain position memory 2304, and the appearance position of each detected character chain is detected. The comparator 2314 determines whether or not matches the appearance position +1 of the character chain detected immediately before, and 2314 detects all of the 2 characters detected from the two-character chain detector 2311 and the three-character chain detector 2312.
The comparator 231 checks for a match on a character or a three-character chain.
The control unit determines in step 3 whether the character strings match.
【0133】以上ように構成された文字列照合装置にお
いて、2文字連鎖位置メモリ2303に図24(b)の
2402、2404の2文字連鎖が、3文字連鎖位置メ
モリに図24(b)の2403の3文字連鎖が格納され
ており、検索文字列として図24(c)の「いろaは
に」が入力された場合の動作について説明する。In the character string collating device configured as described above, the two-character chain 2402 and 2404 in FIG. 24B is stored in the two-character chain position memory 2303, and the two-character chain 2403 in FIG. The following describes the operation performed when the three-character chain is stored, and “iroa wa ni” in FIG. 24C is input as a search character string.
【0134】検索文字列「いろaはに」が入力される
と、2文字連鎖検出器は、予め特殊文字として指定され
た「a」を含まない2文字連鎖、「いろ」「はに」を検
出し、比較器2313に出力する。また、3文字連鎖検
出器は、予め特殊文字として指定された「a」を中心
に、「a」が挿入された3文字連鎖「ろaは」を検出し
比較器2313に出力する。When the search character string "color a han" is input, the two-character chain detector detects a two character chain "iro" and "hani" that do not include "a" specified as a special character in advance. Detected and output to the comparator 2313. The three-letter chain detector detects a three-letter chain “roaha” in which “a” is inserted, centering on “a” specified as a special character in advance, and outputs it to the comparator 2313.
【0135】このとき、比較器への出力は、連鎖順「い
ろ」「ろaは」「はに」としてもよいし、また、文字の
連鎖情報と共に、「いろ」「ろaは」「はに」を同時に
出力してもい。At this time, the output to the comparator may be in the order of the sequence "color", "color a", "color", or together with the character chain information, "color", "color a", "color". May be output at the same time.
【0136】比較器2313は、2文字連鎖検出器から
の出力か3文字連鎖検出器からの出力かを区別し、それ
ぞれ2文字連鎖メモリ103、3文字連鎖メモリ104
から「いろ」「はに」と「ろaは」に対応する「ろは」
の連鎖を検出し、出現回数に基づき連鎖を判断する。The comparator 2313 distinguishes between the output from the two-character chain detector and the output from the three-character chain detector.
"Roha" corresponding to "iro", "hani" and "roaha"
Are detected, and the chain is determined based on the number of appearances.
【0137】比較器が2文字連鎖か3文字連鎖かを区別
し、それぞれ異なる連鎖メモリから検出することによ
り、検索対象文字列として「いろaはに」と「いろは
に」を区別して検索することが可能となる。The comparator discriminates between a two-character chain and a three-character chain, and detects them from different chain memories, thereby performing a search by distinguishing between "iro a ha ni" and "iro ha ni" as character strings to be searched. Becomes possible.
【0138】以上のように、本実施の形態によれば、予
め指定された特定の特殊文字「a」の出現回数に制限を
受けることなく、特殊文字による連鎖メモリの増大を避
けることができ、同時に出現回数の一致による連鎖の抽
出処理を効率的に行うことが可能となる。As described above, according to the present embodiment, it is possible to avoid an increase in the chain memory due to special characters without being limited by the number of appearances of a specific special character “a” specified in advance. At the same time, it is possible to efficiently perform a chain extraction process based on the coincidence of the number of appearances.
【0139】なお、本実施の形態では特殊文字を「a」
と表現したが、特殊文字の並び「a、a・・・,a」を
「a」と置き換えることにより、特殊文字の出現回数に
制限を受けることなく、特殊文字の挿入の有無を区別し
た文字連鎖による文字列照合を行うことが可能となる。In this embodiment, the special character is "a".
However, by replacing the special character sequence “a, a..., A” with “a”, a character that distinguishes whether a special character is inserted or not is not limited by the number of appearances of the special character. String matching by chaining can be performed.
【0140】即ち、「いろ(特殊文字1つ以上)はに」
と「いろはに」を異なる検索文字とした検索が可能とな
る。That is, "Iro (one or more special characters) is a character"
And "irohani" can be searched using different search characters.
【0141】また、本実施の形態では2文字連鎖と3文
字連鎖(特殊文字の挿入)を区別するために異なる連鎖
メモリを設けたが、同一メモリに2文字連鎖か3文字連
鎖かを識別する変位を設けて、例えば図24(d)のよ
うに2文字連鎖と3文字連鎖を記憶することができる。
この場合、文字連鎖2402、2403、2404の出
現位置をn、n+1、n+3、変位を1、2、1とし、
各文字連鎖の連続性を各文字連鎖の出現位置がその文字
連鎖の直前の文字連鎖の出現位置+変位と一致するか比
較することで、2文字連鎖か3文字連鎖かの識別が変位
により識別され、同一の領域にこれらのデータを格納し
て、本発明の第10の方法により、文字列の照合を行う
ことができる。In this embodiment, different chain memories are provided to distinguish between a two-character chain and a three-character chain (insertion of special characters). By providing a displacement, for example, a two-character chain and a three-character chain can be stored as shown in FIG.
In this case, the appearance positions of the character chains 2402, 2403, 2404 are n, n + 1, n + 3, the displacements are 1, 2, 1, and
The continuity of each character chain is compared to determine whether the appearance position of each character chain matches the appearance position of the character chain immediately before the character chain plus the displacement, so that the two-character chain or the three-character chain is identified by the displacement. Then, by storing these data in the same area, the character string can be collated by the tenth method of the present invention.
【0142】(実施の形態11)図26は、本発明の第
11の実施の形態における文字列照合装置の構成を示す
概念図、図25は本発明の第11の方法による文字列照
合の方法の概念、及び全文検索データを記憶した記録媒
体の記憶形式を示している。(Embodiment 11) FIG. 26 is a conceptual diagram showing a configuration of a character string collating apparatus according to an eleventh embodiment of the present invention, and FIG. 25 is a character string collating method according to an eleventh method of the present invention. And the storage format of a recording medium storing full-text search data.
【0143】図26(a)において、2601は登録時
に入力される文字列「いろaはに」、2602は文字列
2601に対して特定の特殊文字「a」をその後の文字
「は」により一意に決めた「a1」に変更した文字列
「いろa1はに」、2603は最初に登録されるの2文
字連鎖「いろ」、2604は2603の次の2文字連鎖
「ろa1」、2605は2604の次の2文字連鎖「a1
は」、2606は2605の次の2文字連鎖「はに」で
ある。In FIG. 26A, reference numeral 2601 denotes a character string “iro a ha ni” inputted at the time of registration, and reference numeral 2602 denotes a specific special character “a” for the character string 2601 by a subsequent character “ha”. The character string "iro a1 ha ni" changed to "a1", 2603 is a two-character chain "iro" to be registered first, 2604 is a two-character chain "ro a1" next to 2603, and 2605 is 2604. The next two-letter chain "a1
"", And 2606 is a two-character chain "" in the next of 2605.
【0144】ここで「a」は、文字列に意味の区切りな
どのために挿入されている特殊文字、「a1」は、検索
対象とならない特定の記号、コードを表す。Here, "a" is a special character inserted into a character string to separate meanings and the like, and "a1" represents a specific symbol or code not to be searched.
【0145】図26(c)において、2611は検索時
の検索文字列「いろaはに」、2612は文字列261
1に対して特定の特殊文字「a」をその後の文字「は」
により一意に決めた「a1」に変更した文字列「いろa1
はに」、2613は最初に検索される2文字連鎖「い
ろ」、2614は2613の次の2文字連鎖「ろa
1」、2615は2614の次の2文字連鎖「a1は」、
2616は2615の次の2文字連鎖「はに」である。In FIG. 26 (c), reference numeral 2611 denotes a search character string "iro a ha ni" at the time of search, and 2612 denotes a character string 261.
1 for the special character "a" followed by the character "wa"
The character string "iro a1" changed to "a1" uniquely determined by
"Hani", 2613 is a two-character chain "iro" to be searched first, and 2614 is a two-character chain "ro a" following the 2613.
1 ", 2615 is the two-letter chain following 2614" a1 ",
2616 is a two-character chain “Hani” next to 2615.
【0146】図26(b)において、2文字連鎖260
3は「い」の検索対象文字列における出現位置nを、2
文字連鎖2604は「ろ」の出現位置n+1を、2文字
連鎖2605は「a1」の出現位置n+2を、2文字連
鎖2606は「は」の出現位置n+3を記憶する。In FIG. 26B, a two-character chain 260
3 indicates the occurrence position n in the search target character string of "i"
The character chain 2604 stores the appearance position n + 1 of “ro”, the two-character chain 2605 stores the appearance position n + 2 of “a1”, and the two-character chain 2606 stores the appearance position n + 3 of “ha”.
【0147】このとき本発明の第11の方法による照合
方法では、2文字連鎖2613の「いろ」に該当する2
文字連鎖2603を検出し、また2613の次の2文字
連鎖2614の「ろa1」に該当する2文字連鎖260
4を検出し、このときの2文字連鎖2604の出現位置
n+1が前記検出の2文字連鎖2603の出現位置nに
+1したものと一致するか否か判断する。一致したら、
次に2604で検出した出現位置n+1に+1した値
と、2614の次の2文字連鎖の「a1は」に該当する
2文字連鎖2605の出現位置n+2が一致するか否か
判断する。一致したら、次に2605で検出した出現位
置n+2に+1値と、2615の次の2文字連鎖の「は
に」に該当する2文字連鎖2606の出現位置n+3が
一致するか否か判断する。一致したら、文字列2611
は2601に一致したと判断する。以上により、文字列
の照合がなされる。At this time, in the collation method according to the eleventh method of the present invention, 2 characters corresponding to “color” in the two-character chain 2613 are used.
A character chain 2603 is detected, and a two-character chain 2601 corresponding to “a1” of a two-character chain 2614 next to 2613 is detected.
4 is detected, and it is determined whether or not the occurrence position n + 1 of the two-character chain 2604 at this time matches the occurrence position n of the detected two-character chain 2603 by +1. If they match,
Next, it is determined whether or not the value obtained by adding +1 to the appearance position n + 1 detected in 2604 matches the appearance position n + 2 of the two-character chain 2605 corresponding to “a1” in the two-character chain following 2614. If they match, then it is determined whether the occurrence position n + 2 detected at 2605 is equal to the +1 value, and whether the occurrence position n + 3 of the two-character chain 2606 corresponding to “Hana” of the next two-character chain after 2615 matches. If they match, the character string 2611
Is determined to match 2601. As described above, the character strings are collated.
【0148】図25は本発明の第11の方法の一実施の
形態における文字列照合装置の構成を示したものであ
る。FIG. 25 shows the configuration of a character string collation apparatus according to an embodiment of the eleventh method of the present invention.
【0149】図25において、2501は登録する文字
列2601を特定の特殊文字「a」をその後の文字
「は」により一意に決めた「a1」に変更した文字列2
602に変更する文字列変換器、2502は文字列26
02から登録する2文字連鎖2603、2604、26
05、2606およびそれらの2文字連鎖の出現位置を
検出する2文字連鎖位置検出器、2503は2文字連鎖
2603、2604、2605、2606およびそれら
の文字連鎖の出現位置を格納する2文字連鎖位置メモ
リ、2504は検索する文字列2611を特定の特殊文
字「a」をその後の文字「は」により一意に決めた「a
1」に変更した文字列2612に変更する文字列変換
器、2505は文字列2612において検索する2文字
連鎖2613、2614、2615、2616を検出す
る2文字連鎖検出器、2506は2文字連鎖検出器25
05より検出された2文字連鎖2613、2614、2
615、2616を2文字連鎖位置メモリ2503で検
出し、検出した2文字連鎖の出現位置が直前に検出した
2文字連鎖の出現位置に+1したものに一致するか否か
判断する比較器、2507は2文字連鎖検出器2505
から検出される全ての2文字連鎖について比較器250
6で判断し、文字列の一致を判断する制御部である。In FIG. 25, reference numeral 2501 denotes a character string 2401 in which a character string 2601 to be registered is changed from a specific special character “a” to “a1” uniquely determined by the subsequent character “ha”.
A character string converter for changing to 602, and 2502 for the character string 26
2 character chain 2603, 2604, 26 to be registered from 02
05, 2606 and a two-character chain position detector for detecting the appearance position of the two-character chain, and a two-character chain position memory 2503 for storing the two-character chain 2603, 2604, 2605, 2606 and the occurrence position of the character chain , 2504 designates a character string 2611 to be searched as “a” in which a specific special character “a” is uniquely determined by a subsequent character “ha”.
A character string converter for changing to a character string 2612 changed to "1", 2505 is a two-character chain detector for detecting a two-character chain 2613, 2614, 2615, 2616 to be searched in the character string 2612, and 2506 is a two-character chain detector 25
05 two-character chain 2613, 2614, 2
The comparator 2507 detects 615 and 2616 in the two-character chain position memory 2503, and determines whether or not the detected occurrence position of the two-character chain matches the appearance position of the two-character chain detected immediately before by +1. Two-character chain detector 2505
The comparator 250 for all two-letter chains detected from
The control unit determines in step 6 and determines whether the character strings match.
【0150】以上ように構成された文字列照合装置にお
いて、その動作さについて説明する。登録文字列が入力
されると文字列変換手段2501は、予め指定された特
殊文字「a」をその後の文字により予め決められた検索
対象とならない記号、コード、即ち、検索文字列以外の
記号、コードに変換して出力する。The operation of the thus constructed character string collating apparatus will be described. When the registered character string is input, the character string conversion unit 2501 converts the special character “a” specified in advance into symbols or codes that are not to be searched by predetermined characters, that is, symbols other than the search character string, Convert to code and output.
【0151】文字列変換手段には、図26(d)のよう
に、特殊記号の後の文字に対応し、どの記号に変換する
その対応が格納されている。この対応は2621、26
22のように文字毎に異なる対応でも、また、2623
のように文字のグループに対応するものでもよい。As shown in FIG. 26 (d), the character string conversion means stores the correspondence corresponding to the character following the special symbol and the conversion to which symbol. This correspondence is 2621, 26
Even if the correspondence differs for each character, such as 22,
May correspond to a group of characters.
【0152】変換された文字列は、2文字連鎖検出器に
より実施の形態10と同様に2文字連鎖とその出現位置
とが検出され、2文字連鎖位置メモリに格納される。In the converted character string, a two-character chain and its appearance position are detected by a two-character chain detector as in the tenth embodiment, and are stored in a two-character chain position memory.
【0153】一方、検索文字列が与えられると文字列変
換器2504により、文字列変換2501で用いした対
応と同一の対応に従い、特殊文字を検索文字列以外の記
号、コードに変換し、2文字連鎖検出器に出力する。2
文字連鎖検出器は2文字連鎖を検出し、比較器2506
に出力する。On the other hand, when the search character string is given, the character string converter 2504 converts the special character into a symbol or code other than the search character string according to the same correspondence as that used in the character string conversion 2501, and converts the special character into two characters. Output to the chain detector. 2
The character chain detector detects the two-character sequence, and outputs the result to the comparator 2506.
Output to
【0154】比較器2506は実施の形態10と同様の
手順に従い2文字連鎖メモリの内容に従い文字連鎖の一
致を検出する。但し、実施の形態11では、実施の形態
10のように比較器が、2文字連鎖か3文字連鎖かを区
別する必要はない。The comparator 2506 detects a match between character chains in accordance with the contents of the two-character chain memory according to the same procedure as in the tenth embodiment. However, in the eleventh embodiment, it is not necessary for the comparator to distinguish between a two-character chain and a three-character chain as in the tenth embodiment.
【0155】以上のように、本実施の形態によれば、出
現頻度の高い特殊文字「a」の連鎖メモリの増大を避け
ることができ、また、同一の特殊文字を後の文字に従い
異なる複数の文字に変換することにより、連鎖を抽出す
るための出現回数の一致を調べる候補が複数に分散され
ることにより、その処理時間が短くてすむ。As described above, according to the present embodiment, it is possible to avoid an increase in the chain memory of the special character “a” having a high appearance frequency, and to replace the same special character with a plurality of different characters in accordance with the subsequent characters. By converting to characters, candidates for checking the coincidence of the number of appearances for extracting a chain are dispersed into a plurality of candidates, so that the processing time is reduced.
【0156】なお、本実施の形態では特殊文字「a」
を、その後の文字によて変換先を決めたが、特殊文字の
前の文字により、変換先を決めた場合でも同様の効果を
得られることは明らかでる。In the present embodiment, the special character "a"
Is determined based on the character after that, but it is clear that the same effect can be obtained even when the conversion destination is determined based on the character before the special character.
【0157】なお、計算機として実装した場合の概略図
は図1(a)と同じであり、本実施の形態では、2文字
連鎖位置メモリ2503が外部記録装置40に対応す
る。The schematic diagram of the case where the present invention is implemented as a computer is the same as that of FIG. 1A. In this embodiment, the two-character chain position memory 2503 corresponds to the external recording device 40.
【0158】また、本実施の形態では図26(b)のよ
うな2文字連鎖位置メモリを設けたが、同一メモリに2
文字連鎖位置情報として変位を設けて、例えば図26
(e)のように2文字連鎖を記憶することができる。こ
の場合、文字連鎖2603、2604、2605、26
06の出現位置をn、n+1、n+2、n+3、変位を
1、1、1、1として、各文字連鎖の連続性を各文字連
鎖の出現位置がその文字連鎖の直前の文字連鎖の出現位
置+変位と一致するか比較することで、本発明の第11
の方法により、文字列の照合を行うことができる。In this embodiment, a two-character chain position memory as shown in FIG. 26B is provided.
By providing a displacement as character chain position information, for example, FIG.
As shown in (e), a two-character chain can be stored. In this case, the character chains 2603, 2604, 2605, 26
Assuming that the appearance position of 06 is n, n + 1, n + 2, n + 3 and the displacement is 1, 1, 1, 1, the continuity of each character chain is represented by the appearance position of the character chain immediately before the character chain + By comparing with or comparing with the displacement, the eleventh aspect of the present invention
By the method described above, character string collation can be performed.
【0159】(実施の形態12)図27は、本発明の第
12の実施の形態における文字列照合装置の構成を示す
ブロック図、図28は本発明の文字列照合の第12の方
法の概念、及び全文検索データを記憶した記録媒体の記
憶形式を示している。(Embodiment 12) FIG. 27 is a block diagram showing a configuration of a character string collating apparatus according to a twelfth embodiment of the present invention, and FIG. 28 is a concept of a twelfth method of character string collation of the present invention. , And the storage format of the recording medium storing the full-text search data.
【0160】図28(a)において、2801は登録時
に入力される文字列「いろaはに」、2802は文字列
601に対して特定の特殊文字「a」をその前の文字
「ろ」は「ろ」および「ろ」により一意に決まる
「ろ’」からなる「ろろ’」に、またその後の文字
「は」は「は」により一意に決まる「は’」および
「は」からなる「は’は」に変更した文字列「いろろ’
は’はに」、2803は最初に登録されるの2文字連鎖
「いろ」、2804は2803の次の2文字連鎖「ろ
ろ’」、2805は2804の次の2文字連鎖「ろ’
は’」、2806は2805の次の2文字連鎖「は’
は」、2807は2806の次の2文字連鎖「はに」で
ある。In FIG. 28 (a), reference numeral 2801 denotes a character string “iro a ha ni” inputted at the time of registration, and 2802 denotes a specific special character “a” with respect to the character string 601; "Roro", which consists of "ro" uniquely determined by "ro" and "ro", and the subsequent character "ha", which consists of "ha" and "ha", which is uniquely determined by "ha" Character string changed to 'ha'
Is' Hani ', 2803 is the two-letter chain "iro" that is registered first, 2804 is the two-letter chain "Roro" next to 2803, and 2805 is the two-letter chain "Ro'" next to 2804.
"", 2806 is the two-letter chain following 2805 ""
"Ha", 2807 is the next two-character chain "hani" after 2806.
【0161】ここで「a」は、文字列に意味の区切りな
どのために挿入されている特殊文字、「ろ’」「は’」
は、検索対象とならない特定の記号、コードを表す。Here, “a” is a special character inserted into a character string for separating meanings, etc.
Represents a specific symbol or code not to be searched.
【0162】図28(c)において、2811は検索時
の検索文字列「いろaはに」、2812は文字列281
1に対して特定の特殊文字「a」をそのその前の文字
「ろ」は「ろ」および「ろ」により一意に決まる
「ろ’」からなる「ろろ’」に、またその後の文字
「は」は「は」により一意に決まる「は’」および
「は」からなる「は’は」に変更した文字列「いろろ’
は’はに」、2813は最初に検索される2文字連鎖
「いろ」、2814は2813の次の2文字連鎖「ろ
ろ’」、2815は2814の次の2文字連鎖「ろ’
は’」、2816は2815の次の2文字連鎖「は’
は」、2817は2816の次の2文字連鎖「はに」で
ある。In FIG. 28 (c), reference numeral 2811 denotes a search character string "iro a ha ni" at the time of search, and 2812 denotes a character string 281.
The special character "a" is replaced by "ro" consisting of "ro" which is uniquely determined by "ro" and "ro", and the subsequent character "ro". "Ha" is a character string changed to "ha'ha" consisting of "ha '" and "ha" uniquely determined by "ha".
Is 'Hani', 2813 is the two-letter chain “iro” that is searched first, 2814 is the two-letter chain “Roro” next to 2813, and 2815 is the two-letter chain “Ro” next to 2814.
"', 2816 is the two-letter chain following 2815""
"Ha", 2817 is the two-character chain "hani" following 2816.
【0163】図28(b)において、2文字連鎖280
3は「いろ」の出現位置nを、2文字連鎖2804は
「ろろ’」の出現位置n+1を、2文字連鎖2805は
「ろ’は’」の出現位置n+2を、2文字連鎖2806
は「は’は」の出現位置n+3を、2文字連鎖2807
は「はに」の出現位置n+4を記憶する。In FIG. 28B, a two-character chain 280
3 is an appearance position n of "iro", a two-character chain 2804 is an appearance position n + 1 of "roro '", a two-character chain 2805 is an appearance position n + 2 of "ro'ha'", and a two-character chain 2806.
Is the appearance position n + 3 of "ha'ha" and the two-character chain 2807
Stores the appearance position n + 4 of "Hani".
【0164】このとき本発明の第12の方法による照合
方法では、2文字連鎖2813の「いろ」に該当する2
文字連鎖2803を検出し、2803の出現位置nに+
1した値と、2813の次の2文字連鎖2814の「ろ
ろ’」に該当する2文字連鎖2804を検出し、280
4の出現位置n+1が一致するか否か判断する。一致し
たら、次に2804で検出した出現位置n+1に+1し
た値と、2814の次の2文字連鎖の「ろ’は’」に該
当する2文字連鎖2805を検出し、2805の出現位
置n+2が一致するか否か判断する。一致したら、次に
2805で検出した出現位置n+2に+1した値と、2
815の次の2文字連鎖の「は’は」に該当する2文字
連鎖2806を検出し、2806の出現位置n+3が一
致するか否か判断する。一致したら、次に2806で検
出した出現位置n+3に+1した値と、2816の次の
2文字連鎖の「はに」に該当する2文字連鎖2807を
検出し、2807の出現位置n+4が一致するか否か判
断する。一致したら、文字列2811は2801に一致
したと判断する。以上により、文字列の照合がなされ
る。At this time, in the collation method according to the twelfth method of the present invention, two characters corresponding to “color” of the two-character chain 2813
The character chain 2803 is detected, and + appears at the appearance position n of 2803.
The two-character chain 2804 corresponding to “Roro '” in the two-character chain 2814 following the 2813 is detected, and the value 280 is detected.
It is determined whether or not the appearance position n + 1 of 4 matches. If they match, then the value obtained by adding +1 to the appearance position n + 1 detected in 2804 and the two-character chain 2805 corresponding to “ro'wa '” in the next two-character chain following 2814 are detected, and the appearance position n + 2 of 2805 matches. It is determined whether or not to do. If they match, then a value obtained by adding +1 to the appearance position n + 2 detected in 2805 and 2
A two-character chain 2806 corresponding to “ha'ha” of the two-character chain following 815 is detected, and it is determined whether or not the appearance position n + 3 of 2806 matches. If they match, then a value obtained by adding +1 to the appearance position n + 3 detected in 2806 and a two-character chain 2807 corresponding to “Hana” in the next two-character chain after 2816 are detected, and is the appearance position n + 4 of 2807 the same? Determine whether or not. If they match, it is determined that the character string 2811 matches 2801. As described above, the character strings are collated.
【0165】図27は本発明の第12の方法の一実施の
形態における文字列照合装置の構成を示したものであ
る。FIG. 27 shows the configuration of a character string collating apparatus according to an embodiment of the twelfth method of the present invention.
【0166】図27において、2701は登録する文字
列2801に対して特定の特殊文字「a」をその前の文
字「ろ」は「ろ」および「ろ」により一意に決まる
「ろ’」からなる「ろろ’」に、またその後の文字
「は」は「は」により一意に決まる「は’」および
「は」からなる「は’は」に変更した文字列2802に
変更する文字列変換器、2702は文字列2802から
登録する2文字連鎖2803、2804、2805、2
806、2807およびそれらの出現位置を検出する2
文字連鎖位置検出器、2703は2文字連鎖2803、
2804、2805、2806、2807およびそれら
の出現位置を格納する2文字連鎖位置メモリ、2704
は検索する文字列2811を特定の特殊文字「a」をそ
の前の文字「ろ」は「ろ」および「ろ」により一意に決
まる「ろ’」からなる「ろろ’」に、またその後の文字
「は」は「は」により一意に決まる「は’」および
「は」からなる「は’は」に変更した文字列2812に
変更する文字列変換器、2705は文字列2812にお
いて検索する2文字連鎖2813、2814、281
5、2816、2817を検出する2文字連鎖検出器、
2706は2文字連鎖検出器2705より検出された2
文字連鎖2813、2814、2815、2816、2
817を2文字連鎖位置メモリ2703で検出し、検出
した2文字連鎖の出現位置が直前に検出した2文字連鎖
の出現位置に+1した値に一致するか否か判断する比較
器、2707は2文字連鎖検出器2705から検出され
る全ての2文字連鎖について比較器2706で判断し、
文字列の一致を判断する制御部である。In FIG. 27, reference numeral 2701 denotes a specific special character “a” for a character string 2801 to be registered, and the preceding character “ro” is composed of “ro” and “ro ′” uniquely determined by “ro”. A character string converter that changes the character string 2802 to “roro '” and the subsequent character “ha” uniquely determined by “ha”. , 2702 are two-character chains 2803, 2804, 2805, 2 registered from the character string 2802.
2 to detect 806, 2807 and their appearance position
A character chain position detector, 2703 is a two-character chain 2803,
A two-character chain position memory for storing 2804, 2805, 2806, 2807 and their appearance positions, 2704
Replaces the character string 2811 to be searched for a specific special character "a" with the preceding character "ro" as "roro" consisting of "ro" uniquely determined by "ro" and "ro", and thereafter The character "wa" is a character string converter that is uniquely determined by "ha" and is changed to a character string 2812 which is changed to "wa'ha" consisting of "ha" and "ha". Character chains 2813, 2814, 281
A two-character chain detector that detects 5, 2816, 2817;
2706 is the value of 2 detected by the two-character chain detector 2705.
Character chains 2813, 2814, 2815, 2816, 2
817 is detected by the two-character chain position memory 2703, and a comparator for determining whether or not the detected occurrence position of the two-character chain matches a value obtained by adding +1 to the occurrence position of the two-character chain detected immediately before, and 2707 is a two-character comparator. The comparator 2706 determines all two-character chains detected from the chain detector 2705,
This is a control unit that determines whether the character strings match.
【0167】本発明における特殊文字をその前後のに隣
接する文字により一意に定まる文字に変換する手段とし
て、図28(d)のように、特殊文字がその隣接する文
字に対応してどの文字に変換されるか、その対応が格納
されている。この対応は2821、2822のように文
字毎に異なる対応でも、また、2823のように文字の
グループに対応するものでもよい。As means for converting a special character into a character uniquely determined by adjacent characters before and after the special character in the present invention, as shown in FIG. It is converted or its correspondence is stored. This correspondence may be different for each character, such as 2821 and 2822, or may correspond to a group of characters, such as 2823.
【0168】以上ように、本実施の形態によれば、特殊
文字「a」の出現回数に制限を受けること無く文字連鎖
による文字列照合を行うことが可能となる。As described above, according to the present embodiment, it is possible to perform character string collation by character chain without being limited by the number of appearances of the special character “a”.
【0169】即ち、実施の形態によれば特殊文字「a」
はその前後の文字により別々の文字に変換され、変換さ
れた文字の出現回数が記録されるため、実施の形態11
に比べ、2文字連鎖ファイルがさらに細かく分散される
ことにより、使用頻度の高い特殊文字の出現頻度の高い
特殊文字「a」の連鎖メモリの増大を避けることがで
き、同時に、連鎖の抽出処理の効率化が図れる。That is, according to the embodiment, the special character "a"
Is converted into separate characters by the characters before and after it, and the number of appearances of the converted characters is recorded.
By distributing the two-character chain file more finely, it is possible to avoid an increase in the chain memory for the special character “a” with a high appearance frequency of the frequently used special character. Efficiency can be improved.
【0170】なお、計算機として実装した場合の概略図
は図1(a)と同じであり、この場合、2文字連鎖メモ
リ2703が外部記録装置40に対応する。The schematic diagram of the case where the present invention is implemented as a computer is the same as that of FIG. 1A. In this case, the two-character chain memory 2703 corresponds to the external recording device 40.
【0171】また、本実施の形態では図28(b)のよ
うな2文字連鎖位置メモリを設けたが、同一メモリに2
文字連鎖位置情報として変位を設けて、例えば図28
(e)のように2文字連鎖を記憶することができる。こ
の場合、文字連鎖2803、2804、2805、28
06、2807の出現位置をn、n+1、n+2、n+
3、n+4、変位を1、1、1、1、1として、各文字
連鎖の連続性を各文字連鎖の出現位置がその文字連鎖の
直前の文字連鎖の出現位置+変位と一致するか比較する
ことで、本発明の第12の方法により、文字列の照合を
行うことができる。In this embodiment, a two-character chain position memory as shown in FIG. 28B is provided.
By providing a displacement as character chain position information, for example, FIG.
As shown in (e), a two-character chain can be stored. In this case, the character chains 2803, 2804, 2805, 28
06, 2807 are n, n + 1, n + 2, n +
Assuming that 3, n + 4 and the displacement are 1, 1, 1, 1, and 1, the continuity of each character chain is compared to see if the appearance position of each character chain matches the appearance position + displacement of the character chain immediately before the character chain. Thus, the character string can be collated by the twelfth method of the present invention.
【0172】(実施の形態13)図29は、本発明の第
13の実施の形態における文字列照合装置の構成を示す
ブロック図、図30は本発明の文字列照合の第13の方
法の概念、及び全文検索データを記憶した記録媒体の記
憶形式を示している。(Embodiment 13) FIG. 29 is a block diagram showing a configuration of a character string collating apparatus according to a thirteenth embodiment of the present invention, and FIG. 30 is a concept of a thirteenth method of character string collating according to the present invention. , And the storage format of the recording medium storing the full-text search data.
【0173】図30は本発明の第13の方法の文字列照
合の方法の概念を示している。図30(a)において、
3001は登録時に入力される文字列「いろaはに」、
3002は最初に登録されるの2文字連鎖「いろ」、3
003は3002の次の特殊文字が挿入された3文字連
鎖「ろaは」の第2文字で特殊文字「a」を次の第3文
字「は」に変換した3文字連鎖「ろはは」、3004は
3文字連鎖3003の第1文字と第2文字による2文字
連鎖「ろは」、3005は3文字連鎖3003の第2文
字と第3文字による第1文字が特殊文字「a」に対応す
る特殊2文字連鎖「はは」、3006は3005の次の
2文字連鎖「はに」である。図30(c)において、3
011は検索時の検索文字列「いろaはに」、3012
は最初に検索される2文字連鎖「いろ」、3013は3
012の次の特殊文字が挿入された3文字連鎖「ろa
は」の第2文字で特殊文字「a」を次の第3文字「は」
に変換した3文字連鎖「ろはは」、3014は3文字連
鎖3013の第1文字と第2文字による2文字連鎖「ろ
は」、3015は3文字連鎖3013の第2文字と第3
文字による第1文字が特殊文字「a」に対応する特殊2
文字連鎖「はは」、3016は3015の次の2文字連
鎖「はに」である。FIG. 30 shows the concept of a character string collation method according to the thirteenth method of the present invention. In FIG. 30 (a),
3001 is a character string "Iro a Hani" input at the time of registration,
3002 is a two-character chain “iro” that is registered first, 3
003 is the second character of the three-character chain "roaha" in which the special character next to 3002 is inserted, and the three-character chain "rohaha" obtained by converting the special character "a" to the next third character "ha". , 3004 is a two-character chain "roha" of the first character and the second character of the three-character chain 3003, and 3005 is a first character of the second character and the third character of the three-character chain 3003 corresponding to the special character "a". Is a special two-character chain “Hana”, and 3006 is a two-character chain “Hani” next to 3005. In FIG. 30C, 3
011 is a search character string at the time of search “Iro a Hani”, 3012
Is the first two-character chain "iro" to be searched, and 3013 is 3
012 with the special character next to it inserted
The special character “a” is the second character of “ha” and the next third character is “ha”
The three-letter chain “Rohah” converted to “3,” 3014 is the two-letter chain “Rohah” with the first and second characters of the three-letter chain 3013, and 3015 is the second and third characters of the three-letter chain 3013.
Special 2 in which the first character is the special character "a"
The character chain “Hana” and 3016 are the two-character chain “Hani” next to 3015.
【0174】図30(b)において、2文字連鎖300
2は「いろ」の出現位置nを、2文字連鎖3004は
「ろは」の出現位置n+1を、特殊2文字連鎖3005
は別の領域に「はは」の出現位置n+2を、特殊2文字
連鎖の次の2文字連鎖3006は「はに」の出現位置を
特殊2文字連鎖3005の出現位置と同じ値n+2を記
憶する。In FIG. 30B, a two-character chain 300
2 is the appearance position n of “iro”, the two-character chain 3004 is the appearance position n + 1 of “iroha”, and the special two-character chain 3005
Stores the appearance position n + 2 of “haha” in another area, the next two-character chain 3006 of the special two-character chain stores the appearance position of “hana”, and the same value n + 2 as the appearance position of the special two-character chain 3005. .
【0175】このとき本発明の第13の方法による照合
方法では、2文字連鎖3012の「いろ」に該当する2
文字連鎖3002を検出し、3002の出現位置nに+
1した値と、3012の次の3文字連鎖3013の最初
の2文字連鎖3014の「ろは」に該当する2文字連鎖
3004の出現位置n+1が一致するか否か判断する。
一致したら、次に3004で検出した出現位置n+1に
+1した値と、3014の次の特殊2文字連鎖3015
「はは」に該当する特殊2文字連鎖3005の出現位置
n+2が一致することを検出する。次に3005の出現
位置n+2と、3015の次の2文字連鎖3016の
「はに」に該当する2文字連鎖3006の出現位置が一
致するか否か判断する。一致したら、文字列3011は
3001に一致したと判断する。以上により、文字列の
照合がなされる。At this time, in the collation method according to the thirteenth method of the present invention, 2 characters corresponding to “color” in the two-character chain 3012 are used.
A character chain 3002 is detected, and +
It is determined whether or not the value obtained by 1 and the appearance position n + 1 of the two-character chain 3004 corresponding to “roha” of the first two-character chain 3014 of the three-character chain 3013 following the 3012 match.
If they match, then the value obtained by adding +1 to the appearance position n + 1 detected in 3004 and the special two-character sequence 3015 next to 3014
It detects that the appearance position n + 2 of the special two-character chain 3005 corresponding to “haha” matches. Next, it is determined whether or not the appearance position n + 2 of 3005 and the appearance position of the two-character chain 3006 corresponding to “Hana” in the two-character chain 3016 next to 3015 match. If they match, it is determined that the character string 3011 matches 3001. As described above, the character strings are collated.
【0176】図29は本発明の第13の方法の一実施例
における文字列照合装置の構成を示したものである。FIG. 29 shows the structure of a character string collating apparatus according to an embodiment of the thirteenth method of the present invention.
【0177】図29において、2901は登録する文字
列3001に対して第2文字が特殊文字の3文字連鎖3
003および2文字連鎖3002、3006を識別し、
3文字連鎖3003の場合は第2文字の特殊文字を第3
文字と同じ文字に変換し、且つ、第2文字の文字位置と
第3文字の文字位置を同じにする3文字連鎖検出器、2
902は2901より入力される2文字連鎖3002、
3006の出現位置を検出する2文字連鎖位置検出器、
2903は2901より入力される3文字連鎖3003
の第1文字と第2文字からなる2文字連鎖3004と第
2文字と第3文字からなる特殊2文字連鎖連鎖3005
の2つの2文字連鎖及び各文字連鎖の出現位置を検出す
る特殊2文字連鎖生成器、2904は2文字連鎖300
2、3004、3006およびそれらの文字連鎖の出現
位置を格納する2文字連鎖位置メモリ、2905は特殊
2文字連鎖3005およびその文字連鎖の出現位置を格
納する特殊2文字連鎖位置メモリ、2911は検索する
文字列3011に対して第2文字が特殊文字の3文字連
鎖3013および2文字連鎖3012、3016を識別
し、3文字連鎖3013の場合は第2文字の特殊文字を
第3文字と同じ文字に変換する3文字連鎖検出器、29
12は2911より入力される2文字連鎖3012、3
016を検出する2文字連鎖検出器、2913は291
1より入力される3文字連鎖3013の第1文字と第2
文字からなる2文字連鎖3014と第2文字と第3文字
からなる特殊2文字連鎖連鎖3015の2つの2文字連
鎖を検出する特殊2文字連鎖生成器、2914は2文字
連鎖検出器2912より検出された2文字連鎖301
2、3014、3016を2文字連鎖メモリ2904で
検出するかまたは、特殊2文字連鎖生成器2913より
生成された特殊2文字連鎖3015を2文字連鎖メモリ
2904で検出し、検出したそれぞれの文字連鎖が特殊
2文字連鎖の場合はその出現位置が直前に検出した文字
連鎖の出現位置と一致するか、または特殊2文字連鎖で
ない場合はその出現位置が直前に検出した文字連鎖の出
現位置に+1した値と一致するか否か判断する比較器、
2915は2文字連鎖検出器2912および特殊2文字
連鎖検出器2913から検出される全ての2文字の連鎖
についての一致を比較器2914で判断し、文字列の一
致を判断する制御部である。In FIG. 29, reference numeral 2901 denotes a three-character chain of special characters for the character string 3001 to be registered.
003 and two-character chains 3002, 3006,
In the case of the three-character chain 3003, the special character of the second character is changed to the third character.
A three-character chain detector that converts the character to the same character and makes the character position of the second character the same as the character position of the third character;
902 is a two-character chain 3002 input from 2901;
A two-character chain position detector that detects the appearance position of 3006;
2903 is a three-character chain 3003 input from 2901
Two-character chain 3004 consisting of the first and second characters and special two-character chain 3005 consisting of the second and third characters
Special two-character chain generator 2904 for detecting two character sequences and the appearance position of each character chain.
2, 3004, 3006 and a two-character chain position memory for storing the appearance positions of their character chains, 2905 is a special two-character chain 3005 and a special two-character chain position memory for storing the appearance positions of the character chains, and 2911 is a search. For the character string 3011, the second character identifies a special character three-character chain 3013 and two-character chains 3012 and 3016. In the case of the three-character chain 3013, the special character of the second character is converted to the same character as the third character. Three-letter chain detector, 29
12 is a two-character chain 3012 input from 2911, 3
Two-character chain detector that detects 016, 291 is 291
The first and second characters of the three-character chain 3013 input from
A special two-character chain generator 2914 for detecting two two-character chains, that is, a two-character chain 3014 consisting of characters and a special two-character chain 3015 consisting of a second character and a third character, and 2914 is detected by the two-character chain detector 2912. Two character chain 301
2, 3014, and 3016 are detected by the two-character chain memory 2904, or the special two-character chain 3015 generated by the special two-character chain generator 2913 is detected by the two-character chain memory 2904. In the case of a special two-character chain, its appearance position matches the appearance position of the character chain detected immediately before, or when it is not a special two-character chain, its appearance position is the value obtained by adding +1 to the appearance position of the previously detected character chain. A comparator for determining whether or not
Reference numeral 2915 denotes a control unit which determines whether the two-character chains detected by the two-character chain detector 2912 and the special two-character chain detector 2913 coincide with each other by the comparator 2914, and judges character string coincidence.
【0178】よって、この時特定の特殊文字「a」の出
現に制限を受けること無く文字連鎖による文字列照合を
行うことが可能となる。Therefore, at this time, it is possible to perform character string collation by character chain without being restricted by the appearance of the specific special character “a”.
【0179】また、本実施の形態では図30(b)のよ
うに2文字連鎖と特殊2文字連鎖(特殊文字の挿入)を
区別するために異なる連鎖メモリを設けたが、同一メモ
リに2文字連鎖か特殊文字連鎖かを識別する変位を設け
て、例えば図30(d)のように2文字連鎖と特殊2文
字連鎖を記憶することができる。この場合、文字連鎖3
002、3004、3005、3006の出現位置を
n、n+1、n+2、n+2、変位を1、1、0、1と
して、各文字連鎖の連続性を各文字連鎖の出現位置がそ
の文字連鎖の直前の文字連鎖の出現位置+変位と一致す
るか比較することで、2文字連鎖か特殊2文字連鎖かの
識別が変位により識別され、同一の領域にこれらのデー
タを格納して、本発明の第15の方法により、文字列の
照合を行うことができる。In this embodiment, a different chain memory is provided to distinguish between a two-character chain and a special two-character chain (special character insertion) as shown in FIG. 30B. By providing a displacement for identifying a chain or a special character chain, a two-character chain and a special two-character chain can be stored, for example, as shown in FIG. In this case, character chain 3
The appearance positions of 002, 3004, 3005, and 3006 are n, n + 1, n + 2, n + 2, and the displacement is 1, 1, 0, 1, and the continuity of each character chain is determined by the appearance position of each character chain immediately before the character chain. By comparing with the appearance position of the character chain + displacement, whether the two-character chain or the special two-character chain is identified by the displacement, these data are stored in the same area, and the fifteenth aspect of the present invention is described. By the method described above, character string collation can be performed.
【0180】(実施の形態14)第32図は本発明の文
字列照合の第14の文字列の登録方法の概念を示してい
る。(Embodiment 14) FIG. 32 shows the concept of a fourteenth character string registration method for character string collation according to the present invention.
【0181】第32図(a)において、3201は登録
時に入力される登録文字列「いろaはにbいろaはに」
であり、「a」「b」が特殊文字、文書番号はNとなっ
ている。最初の登録文字列に対して番号付けを行う。3
216は登録文字列3201の文字位置および固有の番
号であり、登録文字列の先頭をnとして特殊文字「a」
「b」を除いて昇順に番号付けし、先頭の文字「い」に
対して文字位置はn、4文字目の「は」はn+2、以下
同様に特殊文字を除いた番号付けがされている。また特
殊文字「a」「b」に対しては固有の番号が付けられ、
「a」にはm、「b」にはlが番号付けされている。次
に2文字連鎖の作成を行う。登録文字列3201におい
て特殊文字「a」「b」を含まない文字連鎖を探し、2
文字連鎖「いろ」3202、2文字連鎖「はに」320
3、2文字連鎖「いろ」3204、2文字連鎖「はに」
3205を作成する。続けて、特殊文字を含む特殊2文
字連鎖「ろa」3206、特殊2文字連鎖「aは」32
07および特殊文字「a」の直前の文字「ろ」と直後の
文字「は」を組合せた特殊2文字連鎖「ろは」3208
を作成する。以下同様にして、登録文字列の6文字目の
特殊文字「b」に対しては特殊2文字連鎖「にb」32
09、「bい」3210、「にい」3210、登録文字
列の9文字目の特殊文字「a」に対しては特殊2文字連
鎖「ろa」3212、「aは」3213、「ろは」32
13を作成する。In FIG. 32 (a), reference numeral 3201 denotes a registered character string "color a wa ni b color a ha ni" inputted at the time of registration.
“A” and “b” are special characters, and the document number is N. Numbers the first registered character string. 3
Reference numeral 216 denotes a character position and a unique number of the registered character string 3201, and the special character “a” is set with n as the head of the registered character string.
Numbering is performed in ascending order excluding "b", the character position is n for the first character "i", the fourth character "ha" is n + 2, and so on, except for special characters. . Also, unique numbers are assigned to the special characters “a” and “b”,
“A” is numbered m, and “b” is numbered l. Next, a two-character chain is created. A character chain that does not include the special characters “a” and “b” in the registered character string 3201 is searched.
Character chain "Iro" 3202, two-character chain "Hani" 320
3 and 2 character chain "Iro" 3204 and 2 character chain "Hani"
3205 is created. Subsequently, a special two-character chain “roa” 3206 including special characters and a special two-character chain “aha” 32
07 and the special character "ro" 3208 combining the character "ro" immediately before the special character "a" and the character "ha" immediately after the special character "a".
Create Similarly, a special two-character chain “nib” 32 is applied to the sixth special character “b” of the registered character string.
09, “b” 3210, “ni” 3210, a special two-character chain “ro a” 3212, “a wa” 3213, “roha” for the ninth special character “a” in the registered character string. "32
13 is created.
【0182】第32 図(b)(c)は、第32図
(a)で作成した2文字連鎖、特殊2文字連鎖から作成
される文字連鎖情報を示している。文字連鎖情報は2文
字連鎖または特殊2文字連鎖、文字位置、文書番号から
構成されており、文字連鎖の第1文字の文字種毎、文書
番号順にならぶ。始めに第32図(b)について説明す
る。2文字連鎖「いろ」に対しては、第32図(a)か
ら3202、3204が並び、各2文字連鎖の文字位置
はn、n+1となる。同様に2文字連鎖「はに」に対し
ては3203、3205が並び文字位置はn+2、n+
6となる。特殊文字「a」を含むか挟む特殊2文字連鎖
に対しては、登録文字列の2番目の文字「ろ」を特殊2
文字連鎖の1番目の文字として特殊2文字連鎖「ろは」
3208、および「ろ」の直後の特殊2文字連鎖320
9を取り出し連続して並べる。この時の文字位置は「ろ
は」にはn+1、「ろa」にはmを付ける。同様にして
登録文字列の8番目の「ろ」に対しては特殊文字連鎖3
214、3212の順番でセットする。また特殊2文字
連鎖の第1文字目が「a」に対しては第2文字の文字位
置を割りあて、「aは」に対しては特殊2文字連鎖32
07、3213の文字位置の順番で割りあてる。続いて
特殊文字「b」に対する文字連鎖情報の作成は第32図
(b)と同様に、「に」を第1文字として特殊2文字連
鎖「にい」3211、「にb]3209の順番でセット
し、さらに「b」を第1文字として特殊2文字連鎖「b
い」3210をセットする。FIGS. 32 (b) and (c) show character chain information created from the two-character chain and the special two-character chain created in FIG. 32 (a). The character chain information includes a two-character chain or a special two-character chain, a character position, and a document number. The character chain information is arranged for each character type of the first character in the character chain and in document number order. First, FIG. 32 (b) will be described. For the two-character chain “Iro”, 3202 and 3204 are arranged from FIG. 32 (a), and the character positions of each two-character chain are n and n + 1. Similarly, for the two-character chain “Hani”, 3203 and 3205 are arranged and the character positions are n + 2 and n +
It becomes 6. For a special two-character chain that includes or sandwiches the special character “a”, the second character “R” in the registered character string
Special two-letter chain "roha" as the first character in the character chain
3208, and special two-character chain 320 immediately after "ro"
9 are taken out and arranged continuously. At this time, the character position is "roha" with n + 1, and "roa" with m. Similarly, the special character chain 3 is applied to the eighth character “R” of the registered character string.
It is set in the order of 214 and 3212. If the first character of the special two-character chain is "a", the character position of the second character is assigned.
Assigned in the order of the character positions of 07 and 3213. Subsequently, the character chain information for the special character "b" is created in the order of the special two-character chain "ni" 3211 and "ni b" 3209 with "ni" as the first character, as in FIG. 32 (b). Set, and use the special two-character chain "b" with "b" as the first character.
“3210” is set.
【0183】このとき本発明の14の方法による照合方
法について第32図(d)を使って説明する。検索文字
列3217「いろaはに」に対して、まず先頭から特殊
文字「a」の有無を調べ、含まれていなければ2文字連
鎖「いろ」3218を作成する。続けて「ろa」「a
は」を作成し特殊2文字連鎖3220、3221として
検出する。このとき文字「ろaは」は特殊文字「a」を
間に含むので特殊2文字連鎖「ろは」3219を検出す
る。続いて2文字連鎖「はに」3222を検出する。At this time, the collating method according to the fourteenth method of the present invention will be described with reference to FIG. With respect to the search character string 3217 "iro a ha ni", first, the presence or absence of the special character "a" is checked from the top, and if it is not included, a two-character chain "iro" 3218 is created. Continue with "ro a" and "a
Is created and detected as special two-character chains 3220 and 3221. At this time, the special character "a" is detected between the special character "a" and the special character "a". Subsequently, a two-character chain “Hani” 3222 is detected.
【0184】次に検出した2文字連鎖と特殊2文字連鎖
に該当する文字連鎖を第32図(b)の文字連鎖情報か
ら取り出す。2文字連鎖「いろ」3218に対応する文
字連鎖は図32図(b)の3202、3204があり、
最初に3202を取り出す。続いて特殊2文字連鎖「ろ
は」3219に対応する文字連鎖は図32(b)の32
08、3214があり、最初に3208を取り出す。3
202と3208の文書番号はともにNとなり一致し、
また2つの文字連鎖の文字位置は各々n、n+1となる
連続した文字位置であることから3202と3208は
連続していると判定する。続いて第32図(b)の文字
連鎖情報において特殊2文字連鎖3208に続く文字連
鎖を調べ、文字連鎖3206「ろa」を取り出す。32
06は、第1文字が「ろ」、第2文字が特殊文字「a」
である、文字位置の値が固有値m、かつ文書番号Mであ
ることから、特殊2文字連鎖「ろは」3208に続く特
殊2文字連鎖と判定する。Next, a character chain corresponding to the detected two-character chain and the special two-character chain is extracted from the character chain information in FIG. 32 (b). The character chain corresponding to the two-character chain “Iro” 3218 includes 3202 and 3204 in FIG.
First, 3202 is taken out. Subsequently, the character chain corresponding to the special two-character chain "roha" 3219 is 32 in FIG.
08, 3214, and first retrieves 3208. 3
The document numbers of 202 and 3208 are both N and match,
Since the character positions of the two character chains are consecutive character positions of n and n + 1, it is determined that 3202 and 3208 are continuous. Subsequently, the character chain following the special two-character chain 3208 is examined in the character chain information of FIG. 32 (b), and the character chain 3206 “a” is extracted. 32
06 is the first character "ro" and the second character is the special character "a"
Since the value of the character position is the unique value m and the document number M, it is determined to be a special two-character chain following the special two-character chain "roha" 3208.
【0185】次に特殊2文字連鎖「aは」3221に該
当する文字連鎖情報を第32図(b)から調べ、特殊2
文字連鎖「aは」3207を取り出す。3207の文書
番号はN、文字位置はn+2であることから特殊2文字
連鎖「ろは」3208の文字位置n+1に続く特殊2文
字連鎖と判定する。Next, the character chain information corresponding to the special two-character chain “a wa” 3221 is checked from FIG.
The character chain “a wa” 3207 is extracted. Since the document number of 3207 is N and the character position is n + 2, it is determined to be a special two-character chain following the character position n + 1 of the special two-character chain "roha" 3208.
【0186】次に2文字連鎖「はに」3222に該当す
る文字連鎖情報を第32図(b)から調べ、2文字連鎖
「はに」3203を取り出す。3203の文書番号は
N、文字位置はn+2であることから特殊2文字連鎖
「ろは」3208の文字位置n+1に続く2文字連鎖と
判定する。以上のようにして検索文字列3217は登録
文字列3201に含まれていると判断する。Next, character chain information corresponding to the two-character chain “Hana” 3222 is examined from FIG. 32 (b), and the two-character chain “Hana” 3203 is extracted. Since the document number of 3203 is N and the character position is n + 2, it is determined that it is a two-character chain following the character position n + 1 of the special two-character chain "roha" 3208. As described above, it is determined that the search character string 3217 is included in the registered character string 3201.
【0187】また、上記照合方法において、2文字連鎖
3218に該当する第32図(b)の文字連鎖情報を取
り出した際、2つの文字連鎖3202、3204のうち
3204についても上記照合方法と同様の方法により、
2文字連鎖「いろ」3204(文字位置n+4、文書番
号N)、特殊2文字連鎖「ろは」3214(文字位置n
+5、文書番号N)、特殊2文字連鎖「ろa」(文字位
置m、文書番号N)、特殊2文字連鎖「aは」(文字位
置n+6、文書番号N)、2文字連鎖「はに」(文字位
置n+6、文書番号N)を検出し文書番号と文字位置の
連続性の比較から一致していると判断することができ
る。以上のことから検索文字列3217は登録文字列3
201の2箇所で含まれていると判断する。In the above collation method, when the character chain information shown in FIG. 32B corresponding to the two character chain 3218 is extracted, 3204 out of the two character chains 3202 and 3204 is the same as the collation method. By the way,
Two-character chain "iro" 3204 (character position n + 4, document number N), special two-character chain "iro" 3214 (character position n
+5, document number N), special two-character chain "ro a" (character position m, document number N), special two-character chain "a" (character position n + 6, document number N), two-character chain "hani" (Character position n + 6, document number N) is detected, and it can be determined from the comparison of continuity between the document number and the character position that they match. From the above, the search character string 3217 is the registered character string 3
201 is determined to be included.
【0188】以下同様の照合方法により検索文字列に特
殊文字「b」を含む検索文字列3223「はにbいろ」
に対して、第32図(b)と第32図(c)から文字連
鎖情報をもとめ、文書番号の一致と文字位置の連続性の
照合を行う。2文字連鎖「はに」3224に対して2文
字連鎖「はに」3203(文字位置n+2、文書番号
N)、特殊2文字連鎖「にい」3225に対して特殊2
文字連鎖「にい」3211(文字位置n+3、文書番号
N)、特殊2文字連鎖「にb」3226に対して特殊2
文字連鎖「にb」(文字位置l、文書番号N)、特殊2
文字連鎖「bい」3227に対して特殊2文字連鎖「b
い」(文字位置n+4、文書番号N)、2文字連鎖「い
ろ」3228に対して2文字連鎖「いろ」(文字位置n
+4、文書番号N)を取り出し検索文字列3223が登
録文字列3201に含まれていると判断する。A search character string 3223 containing a special character "b" in the search character string "Hanib Iro" is then obtained by the same collation method.
Then, character chain information is obtained from FIGS. 32 (b) and 32 (c), and matching of document numbers and collation of continuity of character positions are performed. For the two-character chain "Hani" 3224, the two-character chain "Hani" 3203 (character position n + 2, document number N) and for the special two-character chain "Nii" 3225, the special 2
Character chain "ni" 3211 (character position n + 3, document number N), special 2 character chain "ni b" 3226
Character chain "ni b" (character position 1, document number N), special 2
A special two-character chain "b"
(Character position n + 4, document number N) and two-character chain "iro" (character position n)
(+4, document number N), and determines that the search character string 3223 is included in the registered character string 3201.
【0189】第31図は本発明の第14の方法の一実施
例における文字列照合装置の構成を示したものである。FIG. 31 shows the structure of a character string collating apparatus according to an embodiment of the fourteenth method of the present invention.
【0190】第31図において、3101は登録文字列
3201に対して特定の特殊文字「a」を検出し登録文
字列の文字位置3216を与える特殊文字検出器、31
02は登録文字列3201から2文字連鎖3202、3
203、3204、3205と2文字連鎖の文字位置と
文書番号を作成する2文字連鎖符号器、3103は登録
文字列3201から特殊2文字連鎖3206、320
7、3208、3209、3210、3211、321
2、3213、3214と特殊2文字連鎖の文字位置と
文書番号を作成する特殊2文字連鎖符号器、3104は
2文字連鎖符号器3102と特殊2文字連鎖符号器32
03で作成した2文字連鎖、特殊2文字連鎖、文字位
置、文書番号から第32図(b)(c)の文字連鎖情報
を作成し2文字連鎖メモリ3105に格納する文字連鎖
組合せ判定器である。In FIG. 31, reference numeral 3101 denotes a special character detector which detects a specific special character “a” in the registered character string 3201 and gives the character position 3216 of the registered character string.
02 is a two-character chain 3202, 3 from the registered character string 3201.
203, 3204, and 3205, a two-character chain encoder for creating a character position and a document number of a two-character chain, and 3103 a special two-character chain 3206 and 320 from a registered character string 3201.
7, 3208, 3209, 3210, 3211, 321
2, 3213, 3214, a special two-character chain encoder for creating the character position and the document number of the special two-character chain, and 3104, a two-character chain encoder 3102 and the special two-character chain encoder 32
This is a character chain combination judging unit that generates the character chain information shown in FIGS. 32 (b) and (c) from the two-character chain, special two-character chain, character position, and document number created in step 03 and stores it in the two-character chain memory 3105. .
【0191】3106は検索文字列3217、3223
から特殊文字「a」または「b」を検出する特殊文字検
出器、3107は2文字連鎖3218、3222、32
24、3228を検出する2文字連鎖検出器、3208
は特殊2文字連鎖3219〜3221、3225〜32
27を検出する特殊2文字連鎖検出器、3109は2文
字連鎖および特殊2文字連鎖から照合順番を決め、検索
文字列3217の場合は、3218、3219、322
0、3221、3222の順番で、検索文字列3223
の場合は、3224、3225、3226、3227、
3228も順番で文字連鎖を並べる文字連鎖組合せ判定
器、3210は、3109文字連鎖組合せ判定器から送
られてきた文字連鎖に対応する文字連鎖を2文字連鎖メ
モリ3105から2つづつ順番に取り出し、2つの文字
連鎖の文書番号、文字位置を取り出し3111制御部に
データを送る比較器、3111は比較器3110から送
られてきたデータから文字連鎖の連続性の照合を行い、
連続していれば次の文字連鎖のデータを比較器3110
から取り出し、連続していなければ照合を終了する制御
部である。Reference numeral 3106 denotes search character strings 3217 and 3223
A special character detector 3107 for detecting a special character "a" or "b" from a two-character chain 3218, 3222, 32
Two-character chain detector for detecting 24, 3228, 3208
Is a special two-character chain 3219-3221, 3225-32
The special two-character chain detector 3109 for detecting the character string 27 determines the collation order from the two-character chain and the special two-character chain. In the case of the search character string 3217, 3218, 3219, and 322
0, 3221 and 3222, in order of the search character string 3223
In the case of, 3224, 3225, 3226, 3227,
A character chain combination determiner 3228 also arranges the character chains in order. The character chain 3210 fetches two character chains corresponding to the character chain sent from the 3109 character chain combination determiner from the two-character chain memory 3105 in order, two by two. A comparator that extracts the document number and character position of one character chain and sends the data to the 3111 control unit, 3111 checks the continuity of the character chain from the data sent from the comparator 3110,
If they are consecutive, the data of the next character chain is compared with the data in the comparator 3110.
And ends the collation if they are not continuous.
【0192】よって、この方法では特定の特殊文字
「a」はその出現頻度に関係なく前後の文字と連鎖を生
成することができるため、特殊文字「a」の出現回数に
制限を受けること無く文字連鎖による文字列照合を行う
ことが可能となる。なお、特殊文字を先頭に含む照合、
たとえば「aは」の場合は、特殊文字を無視して「は」
を第1文字とする文字連鎖の照合を行うことで照合を高
速に行うことができることはいうまでもない。Therefore, in this method, a specific special character “a” can be chained with the preceding and following characters irrespective of its appearance frequency, so that the number of appearances of the special character “a” is not restricted. String matching by chaining can be performed. In addition, collation that includes special characters at the beginning,
For example, in the case of "a", ignore special characters and
It is needless to say that the collation can be performed at high speed by performing the collation of the character chain in which is the first character.
【0193】(実施の形態15)第34図は本発明の文
字列照合の第15の文字列の登録方法の概念を示してい
る。(Embodiment 15) FIG. 34 shows the concept of a fifteenth character string registration method for character string collation according to the present invention.
【0194】第34図(a)において、3401は登録
時に入力される登録文字列「いろaはにはに」である。
登録文字列3401において「a」が特殊文字、登録文
字列の文書番号がMである。3402は登録文字列34
01の文字から特殊文字「a」を除去し、特殊文字の直
後の文字「は」を特殊文字の直後の文字である「は*」
としてマークされた登録文字列である。また3409は
登録文字列3401の先頭の文字位置をnとし、特殊文
字「a」を除いて順に番号を付けた登録文字位置を示し
ている。最初に3402において特殊文字の直後の文字
「は*」を除いた2文字連鎖を作成する。3403は
「いろ」の2文字連鎖、「には」の2文字連鎖340
5、「はに」の2文字連鎖3406を作成する。次に特
殊文字「a」の2文字前、すなわち「は*」の2つ前の
文字である「い」と「は*」の2文字連鎖「いは*」3
407、「は*」の1つ前の文字である「ろ」と「は
*」の2文字連鎖「ろは*」3408、「は*」と直後
の文字「に」との特殊2文字連鎖「は*に」を作成す
る。In FIG. 34 (a), reference numeral 3401 denotes a registered character string "iro a wa ni ni" inputted at the time of registration.
In the registered character string 3401, “a” is a special character, and the document number of the registered character string is M. 3402 is the registered character string 34
The special character "a" is removed from the character 01, and the character "ha" immediately after the special character is replaced with the character "ha *" immediately after the special character.
Is a registered character string marked as. Reference numeral 3409 denotes registered character positions in which a character position at the head of the registered character string 3401 is set to n and numbered sequentially except for the special character “a”. First, in step 3402, a two-character chain is created except for the character "ha *" immediately after the special character. 3403 is a two-character chain of “iro” and a two-character chain of “ni” 340
5. A two-character chain 3406 of “Hani” is created. Next, the two-character chain “Iha *” 3 of two characters before the special character “a”, that is, two characters before “ha *” and “ii” and “ha *”.
407, a two-character chain of “ro” and “ha *”, which is the character preceding “ha *”, and a special two-character chain of “roha *” 3408, and “ha *” and the next character “ni” "Ha *" is created.
【0195】第34 図(b)は、第34図(a)で作
成した2文字連鎖、特殊2文字連鎖から作成される文字
連鎖情報の構成図を示している。文字連鎖情報は文書番
号、2文字連鎖、特殊2文字連鎖、文字位置、特殊2文
字連鎖フラグから構成されており、第1文字の文字種毎
に2文字連鎖と特殊文字連鎖が連続してならび、特殊2
文字連鎖の開始位置が特殊2文字連鎖フラグで示されて
いる。第34 図(b)では文字連鎖情報3411は、
文字連鎖の第1文字が「は」および「は」の直後に特殊
文字「a」が入る「は*」に対して、文書番号341
2、「は」を含む2文字連鎖3413、「は」の文字位
置3414となる文字連鎖情報と、文書番号3412、
「は*」を含む特殊2文字連鎖3415、「は*」の文
字位置(n)3416となる文字連鎖情報と、特殊2文
字連鎖3415の位置を示す特殊2文字連鎖フラグ34
17から構成される。なお、ここで「は」を第1文字と
して含む2文字連鎖がN個存在し、2文字連鎖の直後に
特殊2文字連鎖が続くので、特殊2文字連鎖フラグ34
17には「は*」の開始位置であるN+1が格納されて
いる。また、第2文字が特殊文字「a」の直後の文字で
ある場合は2文字連鎖「はX」(Xは第2文字)に含ま
れるものとする。FIG. 34 (b) shows the configuration of character chain information created from the two-character chain and the special two-character chain created in FIG. 34 (a). The character chain information includes a document number, a two-character chain, a special two-character chain, a character position, and a special two-character chain flag. The two-character chain and the special character chain are consecutively arranged for each character type of the first character. Special 2
The starting position of the character chain is indicated by a special two-character chain flag. In FIG. 34 (b), the character chain information 3411 is
For the first character of the character chain "ha" and "ha *" in which the special character "a" is inserted immediately after "ha", the document number 341
2, two-character chain 3413 including "ha", character chain information at character position 3414 of "ha", and document number 3412,
A special two-character chain 3415 including “ha *”, character chain information indicating the character position (n) 3416 of “ha *”, and a special two-character chain flag 34 indicating the position of the special two-character chain 3415
17. Here, there are N two-character chains including "wa" as the first character, and the special two-character chain follows immediately after the two-character chain.
17 stores N + 1 which is the start position of “*”. If the second character is the character immediately after the special character “a”, it is assumed that the character is included in the two-character chain “was X” (X is the second character).
【0196】第34図(c)では、第34図(a)の場
合の文字連鎖情報の格納例を示している。3418は2
文字連鎖の第1文字が「い」の文字連鎖情報3419で
あり、「いろ」の2文字連鎖3419、「い」を第1文
字とする2文字連鎖「いは*」3420に格納されてい
る。この場合、特殊2文字連鎖フラグの値は、第1文字
に特殊文字「a」の直後の文字を含まないので「0」と
なる。以下同様に、「ろ」を第1文字とする文字連鎖情
報3422には2文字連鎖が格納され、かつ特殊2文字
連鎖フラグ3423には値「0」が格納され、「に」を
第1文字とする文字連鎖情報3428には2文字連鎖が
格納され、かつ特殊2文字連鎖フラグ3429には値
「0」が格納される。一方、第1文字を「は」とする文
字連鎖情報3424は、2文字連鎖「はに」34 25
と「は」の文字位置である「n+4」が最初に格納さ
れ、続いて、「は*」を第1文字とする特殊2文字連鎖
3426と「は*」の文字位置である「n+2」が文字
連鎖情報として格納される。また、「は*」の特殊2文
字連鎖フラグは、「は」を第1文字とする文字連鎖情報
の2番目に存在するので値「2」が格納される。FIG. 34 (c) shows an example of storing character chain information in the case of FIG. 34 (a). 3418 is 2
The first character of the character chain is the character chain information 3419 of “I”, which is stored in the two-character chain 3419 of “Iro” and the two-character chain “Iha *” 3420 with “I” as the first character. . In this case, the value of the special two-character chain flag is “0” because the first character does not include the character immediately after the special character “a”. Similarly, a two-character chain is stored in the character chain information 3422 having "ro" as the first character, a value "0" is stored in the special two-character chain flag 3423, and "ni" is the first character. Is stored in the character chain information 3428, and the value “0” is stored in the special two-character chain flag 3429. On the other hand, the character chain information 3424 in which the first character is “Hana” is a two-character chain “Hani” 34 25
And “n + 4”, which is the character position of “ha”, are stored first, followed by a special two-character chain 3426 with “ha *” as the first character and “n + 2”, which is the character position of “ha *”. Stored as character chain information. Further, since the special two-character chain flag of “ha *” is the second character chain information having “ha” as the first character, the value “2” is stored.
【0197】このとき本発明の15の方法による照合方
法について第35図を使って説明する。第35(a)
は、特殊文字「a」を間に含む検索文字列の場合で、先
頭から第2文字目に特殊文字が含まれる場合の照合方法
を示している。検索文字列3501「ろaはに」に対し
て、まず特殊文字「a」の続く文字「は」を「は*」と
して検索文字列3502を作成し、2文字連鎖3503
「ろは*」と特殊文字連鎖3504「は*に」を検出す
る。続いて第34図(c)における文字連鎖情報から第
1文字が「ろ」である2文字連鎖を探し、文字連鎖情報
3422から2文字連鎖「ろは*」を検出する。この
時、「ろは*」の文字位置n+1および文書番号Mを取
り出し記憶しておく。次に特殊2文字連鎖3504「は
*に」を第34図(cの文字連鎖情報から取得する。特
殊2文字連鎖「は*に」の第1文字が「は*」であるか
ら第1文字「は」の文字連鎖情報3424から検出し、
「は*」の位置は特殊2文字連鎖フラグ3427から
「2」であることから特殊2文字連鎖3426を検出す
る。このとき3426の文書番号がM、文字位置がn+
2であることから、先に検出した2文字連鎖「ろは*」
の文書番号と一致し、かつ文字位置n+1の次の文字位
置n+2であることから、文字連鎖「ろは*」と「は*
に」は連続していると判断し、検索文字列「ろaはに」
が登録文字列に含まれていると判断する。以上により文
字列の照合がなされる。The collation method according to the fifteenth method of the present invention will be described with reference to FIG. No. 35 (a)
Indicates a collation method in the case of a search character string including the special character "a" between them, and the second character from the beginning includes the special character. With respect to the search character string 3501 “ro a ha ni”, a character “ha” following the special character “a” is set to “ha *” to create a search character string 3502, and a two-character chain 3503
"Roha *" and special character chain 3504 "Ha * ni" are detected. Subsequently, a two-character chain whose first character is "ro" is searched from the character chain information in FIG. 34 (c), and a two-character chain "roha *" is detected from the character chain information 3422. At this time, the character position n + 1 of "roha *" and the document number M are extracted and stored. Next, the special two-character chain 3504 “Ha * ni” is obtained from the character chain information in FIG. 34 (c. The first character of the special two-character chain “Ha * ni” is “Ha *”, so the first character Detected from the character chain information 3424 of “ha”,
Since the position of "ha *" is "2" from the special two-character chain flag 3427, the special two-character chain 3426 is detected. At this time, the document number of 3426 is M, and the character position is n +
Since it is 2, the two-character chain "roha *" detected earlier
Character number n + 2 and character position n + 2 next to character position n + 1.
”Is determined to be continuous, and the search string“ roa han ”
Is determined to be included in the registered character string. Thus, the character strings are collated.
【0198】次に、第35(b)は、特殊文字「a」を
先頭に含む検索文字列の場合の照合方法を示している。
検索文字列3505「aはに」に対して、まず特殊文字
「a」の続く文字「は」を「は*」として検索文字列3
506を作成し、特殊文字連鎖3507「は*に」を検
出する。続いて第34図(c)における文字連鎖情報か
ら第1文字が「は*」である特殊2文字連鎖を探し、第
35図(a)の特殊2文字連鎖「は*に」の文字列照合
と同じ方法で文字連鎖情報の連続しているかどうかの判
断を行い、文字連鎖情報3424から特殊2文字連鎖3
426を検出する。以上により文字列の照合がなされ
る。なお、検索文字列が「aは」3508の場合は、検
索文字列3509を作成し、かつ特殊2文字連鎖351
0を検出するが、この場合特殊2文字連鎖の2文字目が
存在しないので、文字連鎖情報から文字連鎖を検出する
場合は、1文字目が「は*」である文字連鎖情報があれ
ば検出されたと判断する。Next, FIG. 35 (b) shows a collation method in the case of a search character string including the special character "a" at the head.
For the search character string 3505 “a wa ni”, first, the character “ha” following the special character “a” is set to “ha *” and the search character string 3
506 is created, and the special character chain 3507 "Ha * ni" is detected. Subsequently, a special two-character chain in which the first character is "ha *" is searched from the character chain information in FIG. 34 (c), and the character string collation of the special two-character chain "ha * ni" in FIG. 35 (a) is searched. It is determined whether or not the character chain information is continuous by the same method as that described above.
426 is detected. Thus, the character strings are collated. If the search character string is “a wa” 3508, a search character string 3509 is created and a special two-character
0 is detected. In this case, since the second character of the special two-character chain does not exist, when detecting the character chain from the character chain information, if there is character chain information in which the first character is "ha *", it is detected. Judge that it was done.
【0199】次に、第35(c)は、特殊文字「a」を
間に含む検索文字列の場合で、先頭から3文字目以降に
特殊文字を含む場合の文字列の照合方法を示している。
検索文字列3511「いろaはに」に対して、まず特殊
文字「a」の直後の文字を「は*」として置き換え検索
文字列3512を作成する。次に、特殊文字「a」を含
まない2文字連鎖「いろ」3513、2文字連鎖「いは
*」3514、特殊2文字連鎖3515「は*に」を検
出する。続いて第34図(c)における文字連鎖情報か
ら第1文字が「い」である2文字連鎖「いろ」を探し、
文字連鎖情報3418から2文字連鎖「いろ」3419
を検出する。この時、「いろ」の文字位置nおよび文書
番号Mを取り出し記憶しておく。次に2文字連鎖351
4「いは*」を第34図(c)の文字連鎖情報から取得
する。2文字連鎖「いは*」の第1文字が「い」である
から文字連鎖情報3418から検出し、第2文字が「は
*」の2文字連鎖3420を検出する。このとき342
0の文書番号がM、文字位置がnで一致することから、
先に検出した2文字連鎖「いろ」は連続していると判断
し、「いろaは」までが文書番号Mの登録文字列に含ま
れると判断する。続いて2文字連鎖「いは*」3514
と特殊2文字連鎖「は*に」3515との連続性の照合
を行う。この照合は第35(a)と同様の処理である
が、「い」と「は*」の文字位置の差が2であることに
注意して、「いは*」の2文字連鎖3420の文字位置
n、「は*に」の特殊2文字連鎖3426の文字位置が
n+2であり文字位置の差が2であることから、文字連
鎖「いは*」と「は*に」は連続していると判断し、検
索文字列「いろaはに」が登録文字列に含まれていると
判断する。以上により文字列の照合がなされる。Next, FIG. 35 (c) shows a method of collating a character string in the case of a search character string including the special character “a” between the first and third characters from the beginning. I have.
In response to the search character string 3511 "iroa ha ni", the character immediately after the special character "a" is replaced with "ha *" to create a search character string 3512. Next, the two-letter chain “iro” 3513 that does not include the special character “a”, the two-letter chain “Iha *” 3514, and the special two-letter chain 3515 “Ha * ni” are detected. Subsequently, a two-character chain “IRO” whose first character is “I” is searched from the character chain information in FIG.
From the character chain information 3418, a two-character chain "iro" 3419
Is detected. At this time, the character position n of "iro" and the document number M are extracted and stored. Next, a two-character chain 351
4 "I *" is obtained from the character chain information in FIG. 34 (c). Since the first character of the two-character chain “I *” is “I”, it is detected from the character chain information 3418, and the two-character chain 3420 of the second character “HA *” is detected. At this time, 342
Since the document number of 0 matches M and the character position matches n,
It is determined that the previously detected two-character chain “Iro” is continuous, and that “Iro a” is included in the registered character string of the document number M. Next, the two-character chain "I *" 3514
And the special two-character chain “ha * ni” 3515 are compared. This collation is the same processing as in the 35th (a), but note that the difference between the character positions of “i” and “ha *” is 2, and the two-character chain 3420 of “ii *” Since the character position of the special two-character chain 3426 of the character position n and “ha * ni” is n + 2 and the difference between the character positions is 2, the character chains “ii *” and “ha * ni” are consecutive. It is determined that the search character string is included in the registered character string. Thus, the character strings are collated.
【0200】第33図は本発明の第15の方法の一実施
例における文字列照合装置の構成を示したものである。FIG. 33 shows the structure of a character string collating apparatus according to an embodiment of the fifteenth method of the present invention.
【0201】第33図において、3301は登録する文
字列3401に対して特定の特殊文字「a」を検出し登
録文字位置3409の文字位置3410を与える特殊文
字検出器、3302は登録文字列3401から特殊文字
「a」の直後の文字「は」を特別の文字とした登録文字
列3402から2文字連鎖3403、3405、340
6、3407、3408と特殊文字連鎖3404の組み
合わさせを判定する文字連鎖組合せ判定器、3303は
2文字連鎖と文書番号の組を作成し、文字連鎖情報を2
文字連鎖メモリ3305に格納する2文字連鎖符号器、
3304は特殊文字連鎖と文書番号の組を作成し、文字
連鎖情報と特殊文字連鎖フラグを3305の2文字連鎖
メモリーに格納する特殊2文字連鎖符号器、3306は
検索する文字列3501、3505、3508、351
1から特定の特殊文字「a」を検出し検索文字列350
2、3506、3509、3512を作成する特殊文字
検出器、3307は2文字連鎖3503、3507、3
510、3513、3514および特殊2文字連鎖35
04、3515の組合せを判定する文字連鎖組合せ判定
器、3308は2文字連鎖3503、3507、351
0、3513、3514を作成する2文字連鎖検出器、
3509は特殊2文字連鎖3504、3515を作成す
る特殊2文字連鎖検出器、3510は、3508、09
からの2文字連鎖、特殊2文字連鎖に一致する2文字連
鎖および特殊2文字連鎖を2文字連鎖メモリ3505か
ら取り出し、文字の連続性の照合を行う比較器、351
1は比較器3510で照合した文字連鎖が一致しなけれ
ば照合をやめ、一致すれば次の文字連鎖との照合を比較
器3510に命令し、文字の連続性の照合の判断を行う
制御部である。In FIG. 33, reference numeral 3301 denotes a special character detector that detects a specific special character “a” in a character string 3401 to be registered and gives a character position 3410 of a registered character position 3409; A two-character chain 3403, 3405, 340 from a registered character string 3402 in which the character "ha" immediately after the special character "a" is a special character.
6, 3407, 3408 and a special character chain 3404 determine a character chain combination determining unit 3303, which creates a pair of a two-character chain and a document number, and converts the character chain information into two.
A two-character chain encoder stored in the character chain memory 3305;
Reference numeral 3304 denotes a special two-character chain encoder for creating a set of a special character chain and a document number, and storing character chain information and a special character chain flag in a two-character chain memory 3305. Character strings 3501, 3505, and 3508 to be searched for. , 351
A special character "a" is detected from the search character string 350
2, 3506, 3509, 3512 are special character detectors for generating 3507, and 2307 is a two-character chain 3503, 3507, 3
510, 3513, 3514 and special two-character chain 35
A character chain combination determiner 3308 for determining the combination of 04, 3515 is a two-character chain 3503, 3507, 351
A two-character chain detector that creates 0, 3513, 3514,
Reference numeral 3509 denotes a special two-character chain detector for generating special two-character chains 3504 and 3515, and 3510 denotes 3508 and 09.
351 retrieves a two-character chain and a special two-character chain that match the two-character chain and the special two-character chain from the two-character chain memory 3505, and compares the character continuity.
Reference numeral 1 denotes a control unit that stops collation if the character chains collated by the comparator 3510 do not match, and instructs the comparator 3510 to collate with the next character chain if they match, and determines a collation of character continuity. is there.
【0202】よって、この方法では特定の特殊文字
「a」はその出現頻度に関係なく前後の文字と連鎖を生
成することができるため、特殊文字「a」の出現回数に
制限を受けること無く文字連鎖による文字列照合を行う
ことが可能となる。なお、特殊文字を先頭に含む照合、
たとえば「aは」の場合は、特殊文字を無視して「は」
を第1文字とする文字連鎖の照合を行うことで照合を高
速に行うことができることはいうまでもない。Therefore, in this method, since the specific special character "a" can be linked with the preceding and following characters regardless of the frequency of occurrence, the character can be generated without being limited by the number of appearances of the special character "a". String matching by chaining can be performed. In addition, collation that includes special characters at the beginning,
For example, in the case of "a", ignore special characters and
It is needless to say that the collation can be performed at high speed by performing the collation of the character chain in which is the first character.
【0203】[0203]
【発明の効果】以上のように本発明は、照合を行う文字
列に出現頻度の高い特殊文字が含まれている場合の、特
殊文字を含む文字連鎖で、この特殊文字の出現の頻度を
無視することができるため、このような文字を含む言語
の文字列照合に容易に対応でき、その効果は大きい。As described above, according to the present invention, when a character string to be collated includes a special character having a high appearance frequency, the character chain including the special character ignores the appearance frequency of the special character. Therefore, it is possible to easily cope with character string collation of a language including such characters, and the effect is large.
【図1】本発明の第1の実施の形態における文字列照合
装置の概念図FIG. 1 is a conceptual diagram of a character string collation device according to a first embodiment of the present invention.
【図2】本発明の第1の実施の形態における文字列照合
の方法を示す概念図FIG. 2 is a conceptual diagram showing a character string collation method according to the first embodiment of the present invention.
【図3】本発明の第2の実施の形態における文字列照合
装置のブロック構成図FIG. 3 is a block diagram of a character string collating apparatus according to a second embodiment of the present invention.
【図4】本発明の第2の実施の形態における文字列照合
の方法を示す概念図FIG. 4 is a conceptual diagram showing a character string collation method according to a second embodiment of the present invention.
【図5】本発明の第3の実施の形態における文字列照合
装置のブロック構成図FIG. 5 is a block diagram of a character string collating apparatus according to a third embodiment of the present invention.
【図6】本発明の第3の実施の形態における登録時の文
字列照合方法を示す概念図FIG. 6 is a conceptual diagram showing a character string collation method at the time of registration according to a third embodiment of the present invention.
【図7】本発明の第3の実施の形態における2文字連鎖
の出現回数により文字列照合方法を示す概念図FIG. 7 is a conceptual diagram illustrating a character string matching method based on the number of appearances of a two-character chain according to a third embodiment of the present invention.
【図8】本発明の第3の実施の形態における検索時の文
字列照合の方法を示す概念図FIG. 8 is a conceptual diagram showing a method of collating a character string at the time of retrieval according to a third embodiment of the present invention.
【図9】本発明の第4の方法の実施例における文字列照
合装置のブロック構成図FIG. 9 is a block diagram of a character string collating apparatus according to a fourth embodiment of the present invention;
【図10】本発明の第4の文字列照合の方法を示す概念
図FIG. 10 is a conceptual diagram showing a fourth character string collation method of the present invention.
【図11】本発明の第5の方法の実施例における文字列
照合装置のブロック構成図FIG. 11 is a block diagram of a character string collating apparatus according to a fifth embodiment of the present invention.
【図12】本発明の第5の文字列照合の方法を示す概念
図FIG. 12 is a conceptual diagram showing a fifth character string collation method of the present invention.
【図13】本発明の第6の方法の実施例における文字列
照合装置のブロック構成図FIG. 13 is a block diagram of a character string collating apparatus according to a sixth embodiment of the present invention.
【図14】本発明の第6の文字列照合の方法を示す概念
図FIG. 14 is a conceptual diagram showing a sixth character string collation method of the present invention.
【図15】本発明の第7の文字列照合の方法を示す概念
図FIG. 15 is a conceptual diagram showing a seventh character string collation method of the present invention.
【図16】本発明の第7の方法の実施例における文字列
照合装置のブロック構成図FIG. 16 is a block diagram of a character string collating apparatus according to a seventh embodiment of the present invention;
【図17】本発明の第8の2文字連鎖データ作成の方法
と文字列照合の方法を示す概念図FIG. 17 is a conceptual diagram showing an eighth two-character chain data creation method and a character string collation method according to the present invention.
【図18】本発明の第8の方法の実施例における2文字
連鎖データ作成のフロー図FIG. 18 is a flowchart of creating two-character chain data in an embodiment of the eighth method of the present invention.
【図19】本発明の第8の方法の実施例における検索文
字列照合のフロー図FIG. 19 is a flowchart of search string matching in an embodiment of the eighth method of the present invention.
【図20】本発明の第8の方法の実施例における文字列
照合装置のブロック構成図FIG. 20 is a block diagram of a character string collating apparatus according to an eighth embodiment of the present invention.
【図21】本発明の第9の2文字連鎖データ作成の方法
と文字列照合の方法を示す概念図FIG. 21 is a conceptual diagram showing a ninth two-character chain data creation method and a character string collation method according to the present invention.
【図22】本発明の第9の方法の実施例における文字列
照合装置のブロック構成図FIG. 22 is a block diagram of a character string collating apparatus in a ninth embodiment of the present invention.
【図23】本発明の第10の方法の実施の形態における
文字列照合装置の概念図FIG. 23 is a conceptual diagram of a character string collation device according to a tenth embodiment of the present invention.
【図24】本発明の第10の方法による文字列照合の方
法を示す概念図FIG. 24 is a conceptual diagram showing a character string collation method according to a tenth method of the present invention.
【図25】本発明の第11の方法の実施の形態における
文字列照合装置のブロック構成図FIG. 25 is a block diagram of a character string collating apparatus according to an eleventh embodiment of the present invention.
【図26】本発明の第11の方法による文字列照合の方
法を示す概念図FIG. 26 is a conceptual diagram showing a character string collation method according to an eleventh method of the present invention.
【図27】本発明の第12の方法の実施の形態における
文字列照合装置のブロック構成図FIG. 27 is a block diagram of a character string collating apparatus according to a twelfth embodiment of the present invention.
【図28】本発明の第12の方法による文字列照合の方
法を示す概念図FIG. 28 is a conceptual diagram showing a character string collation method according to a twelfth method of the present invention.
【図29】本発明の第13の方法の実施の形態における
文字列照合装置のブロック構成図FIG. 29 is a block diagram of a character string collation apparatus according to a thirteenth embodiment of the present invention.
【図30】本発明の第13の方法による文字列照合の方
法を示す概念図FIG. 30 is a conceptual diagram showing a character string collation method according to a thirteenth method of the present invention.
【図31】本発明の第14の方法の実施例における文字
列照合装置のブロック構成図FIG. 31 is a block diagram of a character string collating apparatus in a fourteenth embodiment of the present invention.
【図32】本発明の第14の方法の実施例における文字
列照合装置の文字列の登録方法を示す概念図FIG. 32 is a conceptual diagram showing a character string registration method of the character string collation device in the fourteenth embodiment of the present invention.
【図33】本発明の第15の方法の実施例における文字
列照合装置のブロック構成図FIG. 33 is a block diagram showing a character string collating apparatus according to a fifteenth embodiment of the present invention;
【図34】本発明の第15の方法の実施例における文字
列照合装置の文字列の登録方法を示す概念図FIG. 34 is a conceptual diagram showing a method for registering a character string in the character string collating apparatus according to the fifteenth embodiment of the present invention.
【図35】本発明の第15の方法の実施例における文字
列照合装置の文字列照合の方法を示す概念図FIG. 35 is a conceptual diagram showing a character string collation method of the character string collation device in the fifteenth embodiment of the present invention.
【図36】従来の文字列照合装置のブロック構成図FIG. 36 is a block diagram of a conventional character string collation device.
【図37】従来の文字列照合の方法を示す概念図FIG. 37 is a conceptual diagram showing a conventional character string collation method.
30 本体 31 入力手段 39 プリンタ 38 ディスプレイ 40 外部記録手段 101 2文字連鎖検出器 102 3文字連鎖検出器 103 2文字連鎖メモリ 104 3文字連鎖メモリ 111 2文字連鎖検出器 112 3文字連鎖検出器 113 比較器 114 制御部 301 文字列変換器 302 2文字連鎖検出器 303 2文字連鎖メモリ 304 文字列変換器 305 2文字連鎖検出器 306 比較器 307 制御部 501 文字列変換器 502 2文字連鎖検出器 503 2文字連鎖メモリ 504 文字列変換器 505 2文字連鎖検出器 506 比較器 507 制御部 901 特殊文字検出器 902 2文字連鎖検出器 903 特殊文字連鎖検出器 904 2文字連鎖メモリ 911 特殊文字検出器 912 2文字連鎖検出器 913 特殊文字連鎖検出器 914 比較器 915 制御部 1101 2文字連鎖検出器 1102 3文字連鎖検出器 1103 2文字連鎖メモリ 1104 3文字連鎖メモリ 1111 2文字連鎖検出器 1112 3文字連鎖検出器 1113 比較器 1114 制御部 1301 2文字連鎖検出器 1302 3文字連鎖検出器 1303 特殊2文字連鎖生成器 1304 2文字連鎖メモリ 1311 2文字連鎖検出器 1312 3文字連鎖検出器 1313 特殊2文字連鎖生成器 1314 比較器 1315 制御部 1501 登録文字列 1502 2文字連鎖 1503 2文字連鎖 1504 2文字連鎖 1505 2文字連鎖 1506 2文字連鎖 1507 2文字連鎖 1508 2文字連鎖 1509 2文字連鎖 1510 2文字連鎖 1511 2文字連鎖 1512 2文字連鎖 1513 2文字連鎖 1514 2文字連鎖 1515 2文字連鎖 1516 出現重複数 1517 出現重複数 1601 特殊文字検出器 1602 2文字連鎖検出器 1603 特殊文字連鎖検出器 1604 出現重複メモリ 1605 特殊文字連鎖ソート器 1606 2文字連鎖メモリ 1607 特殊文字検出器 1608 2文字連鎖検出器 1609 特殊文字連鎖検出器 1610 比較器 1611 制御器 1612 出現重複カウンタメモリ 1701 文書番号 1702 第1文字の出現回数 1703 第2文字の出現回数 1704 第1文字が特殊文字の出現回数 1705 第2文字の指定数値 1706 第1文字の指定数値 1707 第2文字の特殊文字の出現回数 1708 登録文字列 1709 2文字連鎖 1710 2文字連鎖 1711 2文字連鎖 1712 2文字連鎖 1713 2文字連鎖 1714 2文字連鎖 1717 2文字連鎖 1716 2文字連鎖 1717 2文字連鎖 1718 2文字連鎖 1719 2文字連鎖 1720 2文字連鎖 1721 文字連鎖データ 1722 文字連鎖データ 1723 文字連鎖データ 1724 文字連鎖データ 1725 文字連鎖データ 1726 文字連鎖データ 1727 文字連鎖データ 1728 文字連鎖データ 1729 文字連鎖データ 1730 文字連鎖データ 1731 文字連鎖データ 1732 検索文字列 1733 2文字連鎖 1734 2文字連鎖 1735 2文字連鎖 1736 2文字連鎖 1737 特殊文字出現カウンタ 1738 特殊文字出現カウンタ 1801〜1814 ステップ 1901〜1912 ステップ 2001 2文字連鎖検出器 2002 出現回数算出器 2003 特殊文字連鎖検出器 2004 2文字連鎖メモリ 2005 2文字連鎖検出器 2006 比較器 2007 特殊文字出現カウンタメモリ 2008 制御器 2101 特殊文字検出器 2102 2文字連鎖検出器 2103 特殊2文字連鎖検出器 2104 2文字連鎖メモリ 2105 特殊文字検出器 2106 2文字連鎖検出器 2107 特殊2文字連鎖検出器 2108 比較器 2109 制御器 2201 登録文字列 2202 2文字連鎖 2203 特殊2文字連鎖 2204 2文字連鎖 2205 検索文字列 2206 2文字連鎖 2207 特殊2文字連鎖 2208 2文字連鎖 2301 2文字連鎖位置検出器 2302 3文字連鎖位置検出器 2303 2文字連鎖位置メモリ 2304 3文字連鎖位置メモリ 2311 2文字連鎖検出器 2312 3文字連鎖検出器 2313 比較器 2314 制御部 2501 文字列変換器 2502 2文字連鎖位置検出器 2503 2文字連鎖位置メモリ 2504 文字列変換器 2505 2文字連鎖検出器 2506 比較器 2507 制御部 2701 文字列変換器 2702 2文字連鎖位置検出器 2703 2文字連鎖位置メモリ 2704 文字列変換器 2705 2文字連鎖検出器 2706 比較器 2707 制御部 2901 3文字連鎖検出器 2902 2文字連鎖位置検出器 2903 特殊2文字連鎖生成器 2904 2文字連鎖位置メモリ 2905 特殊2文字連鎖位置メモリ 2911 3文字連鎖検出器 2912 2文字連鎖検出器 2913 特殊2文字連鎖生成器 2914 比較器 2915 制御部 3101 特殊文字検出器 3102 2文字連鎖符号器 3103 特殊2文字連鎖符号器 3104 文字連鎖組合せ判定器 3105 2文字連鎖メモリー 3106 特殊文字検出器 3107 2文字連鎖検出器 3108 特殊2文字連鎖検出器 3109 文字連鎖組合せ判定器 3110 比較器 3111 判定部 3201 登録文字列 3202 2文字連鎖 3203 2文字連鎖 3204 2文字連鎖 3205 2文字連鎖 3206 特殊2文字連鎖 3207 特殊2文字連鎖 3208 特殊2文字連鎖 3209 特殊2文字連鎖 3210 特殊2文字連鎖 3211 特殊2文字連鎖 3212 特殊2文字連鎖 3213 特殊2文字連鎖 3214 特殊2文字連鎖 3215 文書番号 3216 登録文字位置 3217 検索文字列 3218 2文字連鎖 3219 特殊2文字連鎖 3220 特殊2文字連鎖 3221 特殊2文字連鎖 3222 2文字連鎖 3223 検索文字列 3224 2文字連鎖 3225 特殊2文字連鎖 3226 特殊2文字連鎖 3227 特殊2文字連鎖 3228 2文字連鎖 3301 特殊文字検出器 3302 文字連鎖組合せ判定器 3303 2文字連鎖符号器 3304 特殊2文字連鎖符号器 3305 特殊2文字連鎖符号器 3306 2文字連鎖メモリー 3307 文字連鎖組合せ判定器 3308 2文字連鎖検出器 3309 特殊2文字連鎖検出器 3310 比較器 3311 判定部 3401 登録文字列 3402 登録文字列 3403 2文字連鎖 3404 特殊2文字連鎖 3405 2文字連鎖 3406 2文字連鎖 3407 2文字連鎖 3408 2文字連鎖 3409 登録文字位置 3410 文字位置 3411 文字連鎖情報 3412 文書番号 3413 2文字連鎖 3414 文字位置 3415 特殊2文字連鎖 3416 文字位置 3417 特殊2文字連鎖フラグ 3418 文字連鎖情報 3419 2文字連鎖 3420 特殊2文字連鎖 3421 特殊2文字連鎖フラグ 3422 文字連鎖情報 3423 特殊2文字連鎖フラグ 3424 文字連鎖情報 3425 2文字連鎖 3426 特殊2文字連鎖 3427 特殊2文字連鎖フラグ 3428 文字連鎖情報 3429 特殊2文字連鎖フラグ 3501 検索文字列 3502 検索文字列 3503 2文字連鎖 3504 特殊2文字連鎖 3505 検索文字列 3506 検索文字列 3507 特殊2文字連鎖 3508 検索文字列 3509 検索文字列 3510 特殊2文字連鎖 3511 検索文字列 3512 検索文字列 3513 2文字連鎖 3514 2文字連鎖 3515 特殊2文字連鎖 Reference Signs List 30 main body 31 input means 39 printer 38 display 40 external recording means 101 two-character chain detector 102 three-character chain detector 103 two-character chain memory 104 three-character chain memory 111 two-character chain detector 112 three-character chain detector 113 comparator 114 control unit 301 character string converter 302 two-character chain detector 303 two-character chain memory 304 character string converter 305 two-character chain detector 306 comparator 307 control unit 501 character string converter 502 two-character chain detector 503 two-character Chain memory 504 Character string converter 505 Two-character chain detector 506 Comparator 507 Control unit 901 Special character detector 902 Two-character chain detector 903 Special character chain detector 904 Two-character chain memory 911 Special character detector 912 Two-character chain Detector 913 Special character chain detection Output unit 914 Comparator 915 Control unit 1101 Two-character chain detector 1102 Three-character chain detector 1103 Two-character chain memory 1104 Three-character chain memory 1111 Two-character chain detector 1112 Three-character chain detector 1113 Comparator 1114 Control unit 1301 2 Character chain detector 1302 Three character chain detector 1303 Special two character chain generator 1304 Two character chain memory 1311 Two character chain detector 1312 Three character chain detector 1313 Special two character chain generator 1314 Comparator 1315 Control unit 1501 Registered characters Sequence 1502 Two-character chain 1503 Two-character chain 1504 Two-character chain 1505 Two-character chain 1506 Two-character chain 1507 Two-character chain 1508 Two-character chain 1509 Two-character chain 1510 Two-character chain 1511 Two-character chain 1512 Two-character chain 15 3 Two-character chain 1514 Two-character chain 1515 Two-character chain 1516 Occurrence overlap 1517 Occurrence overlap 1601 Special character detector 1602 Two-character chain detector 1603 Special character chain detector 1604 Occurrence overlap memory 1605 Special character chain sorter 1606 Two characters Chain memory 1607 Special character detector 1608 Two-character chain detector 1609 Special character chain detector 1610 Comparator 1611 Controller 1612 Appearance duplicate counter memory 1701 Document number 1702 Number of first character appearances 1703 Number of second character appearances 1704 First Number of occurrences of special characters 1705 Number specified for second character 1706 Number specified for first character 1707 Number of occurrences of special character for second character 1708 Registered character string 1709 Two-character chain 1710 Two-character chain 1711 Two-character chain 17 12 Two-character chain 1713 Two-character chain 1714 Two-character chain 1717 Two-character chain 1716 Two-character chain 1717 Two-character chain 1718 Two-character chain 1719 Two-character chain 1720 Two-character chain 1721 Character-chain data 1722 Character-chain data 1723 Character-chain data 1724 characters Chained data 1725 Character chained data 1726 Character chained data 1727 Character chained data 1728 Character chained data 1729 Character chained data 1730 Character chained data 1731 Character chained data 1732 Search character string 1733 Two character chain 1734 Two character chain 1735 Two character chain 1736 Two character chain 1737 Special character appearance counter 1738 Special character appearance counter 1801 to 1814 Step 1901 to 1912 Step 2001 Two-character chain detector 20 2 Appearance frequency calculator 2003 Special character chain detector 2004 Two-character chain memory 2005 Two-character chain detector 2006 Comparator 2007 Special character appearance counter memory 2008 Controller 2101 Special character detector 2102 Two-character chain detector 2103 Special two-character chain Detector 2104 Two-character chain memory 2105 Special character detector 2106 Two-character chain detector 2107 Special two-character chain detector 2108 Comparator 2109 Controller 2201 Registered character string 2202 Two-character chain 2203 Special two-character chain 2204 Two-character chain 2205 Search Character string 2206 Two-character chain 2207 Special two-character chain 2208 Two-character chain 2301 Two-character chain position detector 2302 Three-character chain position detector 2303 Two-character chain position memory 2304 Three-character chain position memory 2311 2 Character chain detector 2312 3 character chain detector 2313 comparator 2314 control unit 2501 character string converter 2502 2 character chain position detector 2503 2 character chain position memory 2504 character string converter 2505 2 character chain detector 2506 comparator 2507 control Unit 2701 character string converter 2702 two-character chain position detector 2703 two-character chain position memory 2704 character string converter 2705 two-character chain detector 2706 comparator 2707 control unit 2901 three-character chain detector 2902 two-character chain position detector 2903 Special two-character chain generator 2904 Two-character chain position memory 2905 Special two-character chain position memory 2911 Three-character chain detector 2912 Two-character chain detector 2913 Special two-character chain generator 2914 Comparator 2915 Control unit 3101 Special character detector 3 102 Two-character chain encoder 3103 Special two-character chain encoder 3104 Character chain combination determiner 3105 Two-character chain memory 3106 Special character detector 3107 Two-character chain detector 3108 Special two-character chain detector 3109 Character chain combination determiner 3110 Comparison Unit 3111 Judgment unit 3201 Registered character string 3202 Two-character chain 3203 Two-character chain 3204 Two-character chain 3205 Two-character chain 3206 Special two-character chain 3207 Special two-character chain 3208 Special two-character chain 3209 Special two-character chain 3210 Special two-character chain 3211 Special two-character chain 3212 Special two-character chain 3213 Special two-character chain 3214 Special two-character chain 3215 Document number 3216 Registered character position 3217 Search character string 3218 Two-character chain 3219 Special two-character chain 3220 Special Two-character chain 3221 Special two-character chain 3222 Two-character chain 3223 Search character string 3224 Two-character chain 3225 Special two-character chain 3226 Special two-character chain 3227 Special two-character chain 3228 Two-character chain 3301 Special character detector 3302 Character chain combination determiner 3303 two-character chain encoder 3304 special two-character chain encoder 3305 special two-character chain encoder 3306 two-character chain memory 3307 character chain combination determiner 3308 two-character chain detector 3309 special two-character chain detector 3310 comparator 3311 determination unit 3401 Registered character string 3402 Registered character string 3403 Two-character chain 3404 Special two-character chain 3405 Two-character chain 3406 Two-character chain 3407 Two-character chain 3408 Two-character chain 3409 Registered character position 3410 Character position 3411 Character chain information 3412 Document number 3413 Two character chain 3414 Character position 3415 Special two character chain 3416 Character position 3417 Special two character chain flag 3418 Character chain information 3419 Two character chain 3420 Special two character chain 3421 Special two character chain flag 3422 Character chain information 3423 Special two character chain flag 3424 Character chain information 3425 Two character chain 3426 Special two character chain 3427 Special two character chain flag 3428 Character chain information 3429 Special two character chain flag 3501 Search character string 3502 Search character string 3503 Two character chain 3504 Special 2 Character chain 3505 Search character string 3506 Search character string 3507 Special two-character chain 3508 Search character string 3509 Search character string 3510 Special two-character chain 3511 Search character string 3512 Search character 3513 two-character chain 3514 two-character chain 3515 special two-character chain
───────────────────────────────────────────────────── フロントページの続き (72)発明者 藤田 智子 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 (72)発明者 白崎 安代 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 ──────────────────────────────────────────────────の Continued on the front page (72) Tomoko Fujita, Inventor 1006 Kazuma Kadoma, Osaka Prefecture Matsushita Electric Industrial Co., Ltd. (72) Inventor Yasuhiro Shirasaki 1006 Kadoma Kadoma, Kadoma City, Osaka Matsushita Electric Industrial Co.
Claims (30)
コンピュータ読み取り可能な記録媒体であって、 前記検索データは、検索対象文字列に対し、予め指定さ
れた特殊文字以外の文字からなる全ての2文字連鎖を検
出し、2文字連鎖毎に、2文字連鎖を構成する第1文字
と第2文字の検索対象文字列における出現回数を組とし
て記録した第1のデータと、 予め指定された特殊文字が挿入された特殊文字以外の2
文字からなる全ての文字連鎖を検出し、前記文字連鎖毎
に、文字連鎖を構成する第1文字と第2文字の検索対象
文字列における出現回数を組として記録した第2のデー
タを、 第1データと第2データとを区別して記録されているこ
とを特徴とする、全文検索データを記録したコンピュー
タ読み取り可能な記録媒体。1. A computer-readable recording medium in which search data used for full-text search is recorded, wherein the search data includes all characters including characters other than a special character specified in advance for a search target character string. First data in which a character chain is detected, and for each two-character chain, first data that records the number of occurrences of the first character and the second character that form the two-character chain in the search target character string, and a special character specified in advance 2 other than special characters in which is inserted
Detects all character chains composed of characters, and stores, for each character chain, second data in which the number of occurrences of the first character and the second character constituting the character chain in the search target character string is recorded as a first data. A computer-readable recording medium on which full-text search data is recorded, wherein the data and the second data are recorded separately.
ータを記録したコンピュータ読み取り可能な記録媒体
と、 検索文字列から、予め指定された特殊文字以外の文字か
らなる全ての2文字連鎖を検出する第1の文字連鎖検出
手段と、 検索文字列から、予め指定された特殊文字が挿入された
特殊文字以外の2文字からなる全ての文字連鎖を検出す
る第2の文字連鎖検出手段と、 第1の文字連鎖検出手段により検出された2文字連鎖
を、前記記録媒体に記録された第1のデータから検索
し、第2の文字連鎖検出手段により検出された文字連鎖
を検出し、検出された文字連鎖に対応する出現回数の比
較により、検索文字列としての文字連鎖の連続の有無を
判定する比較手段とを備えたことを特徴とする文字列照
合装置。2. A computer-readable recording medium on which search data used for full-text search according to claim 1 is recorded, and all two-character sequences consisting of characters other than special characters specified in advance are detected from a search character string. A first character chain detecting means for detecting all character chains consisting of two characters other than the special character in which a predetermined special character is inserted from a search character string; The two-character chain detected by the first character-chain detecting means is searched from the first data recorded on the recording medium, and the character chain detected by the second character-chain detecting means is detected. A character string collating device comprising: comparing means for judging the presence or absence of a continuation of a character chain as a search character string by comparing the number of appearances corresponding to the character chain.
コンピュータ読み取り可能な記録媒体であって、 前記検索データは、検索対象文字列の予め指定された特
殊文字を隣接する文字に従い検索の対象とならない文字
に変換し、当該変換された文字列に対し、前記検索の対
象とならない文字も含め全ての2文字連鎖を検出し、2
文字連鎖毎に、2文字連鎖を構成する第1文字と第2文
字の検索対象文字列における出現回数を組として記録し
たことを特徴とする、全文検索データを記録したコンピ
ュータ読み取り可能な記録媒体。3. A computer-readable recording medium storing search data used for full-text search, wherein the search data is not a search target according to a character adjacent to a special character designated in advance in a search target character string. Character strings, and detects all two-character chains in the converted character string including the characters not to be searched.
A computer-readable recording medium on which full-text search data is recorded, wherein the number of appearances of a first character and a second character constituting a two-character chain in a character string to be searched is recorded as a set for each character chain.
ータを記録したコンピュータ読み取り可能な記録媒体
と、 検索文字列の予め指定された特殊文字を前記記録媒体に
記録されたデータに対し適用された同一の規則に従い、
隣接する文字に基づき検索の対象とならない文字に変換
する文字列変換手段と、 前記文字列変換手段により変換された文字列に対し、検
索の対象とならない文字も含め全ての2文字連鎖を検出
する2文字連鎖検出手段と、 前記2文字連鎖検出手段により検出された2文字連鎖
を、前記記録媒体から検出し、対応する出現回数の比較
により、検索文字列としての文字連鎖の連続の有無を判
定する比較手段とを備えたことを特徴とする文字列照合
装置。4. A computer-readable recording medium on which search data used for full-text search according to claim 3 is recorded, and a special character specified in a search character string is applied to data recorded on said recording medium. Subject to the same rules,
A character string conversion unit for converting a character string that is not a search target based on adjacent characters; and detecting a two-character chain including a character that is not a search target for the character string converted by the character string conversion unit. A two-character chain detecting unit, and a two-character chain detected by the two-character chain detecting unit is detected from the recording medium, and the presence or absence of the continuation of the character chain as a search character string is determined by comparing the corresponding number of appearances. A character string collating device, comprising:
コンピュータ読み取り可能な記録媒体であって、 前記検索データは、検索対象文字列の予め指定された特
殊文字を隣接する文字に従い検索の対象とならない2文
字に変換し、当該変換された文字列に対し、前記検索の
対象とならない文字も含め全ての2文字連鎖を検出し、
2文字連鎖毎に、2文字連鎖を構成する第1文字と第2
文字の検索対象文字列における出現回数を組として記録
したことを特徴とする、全文検索データを記録したコン
ピュータ読み取り可能な記録媒体。5. A computer-readable recording medium on which search data used for full-text search is recorded, wherein the search data is not a search target according to a character adjacent to a special character specified in advance in a search target character string. Converted to two characters, and detected all two-character chains in the converted character string, including the characters that are not to be searched.
For each two-character chain, the first and second characters that make up the two-character chain
A computer-readable recording medium on which full-text search data is recorded, wherein the number of appearances of a character in a character string to be searched is recorded as a set.
ータを記録したコンピュータ読み取り可能な記録媒体
と、 検索文字列の予め指定された特殊文字を前記記録媒体に
記録されたデータに対し適用された同一の規則に従い、
隣接する文字に基づき検索の対象とならない2文字に変
換する文字列変換手段と、 前記文字列変換手段により変換された文字列に対し、検
索の対象とならない2文字も含め全ての2文字連鎖を検
出する2文字連鎖検出手段と、 前記2文字連鎖検出手段により検出された2文字連鎖
を、前記記録媒体から検出し、対応する出現回数の比較
により、検索文字列としての文字連鎖の連続の有無を判
定する比較手段とを備えたことを特徴とする文字列照合
装置。6. A computer-readable recording medium on which search data used for full-text search according to claim 5 is recorded, and a special character specified in a search character string is applied to data recorded on said recording medium. Subject to the same rules,
A character string conversion means for converting into two characters that are not to be searched based on adjacent characters; and a two-character chain including two characters that are not to be searched for the character string converted by the character string conversion means. A two-character chain detecting means for detecting the two-character chain detected by the two-character chain detecting means from the recording medium, and comparing the corresponding number of appearances to determine whether or not the character string as a search character string is continuous; A character string collating device, comprising: comparing means for judging a character string.
コンピュータ読み取り可能な記録媒体であって、 前記検索データは、 検索対象文字列に対し、全ての文字に対し2文字連鎖を
検出し、2文字連鎖毎に2文字連鎖を構成する、予め指
定された特殊文字以外の文字連鎖を構成する第1文字と
第2文字について、予め指定された特殊文字以外の文字
はその出現回数を、予め指定された特殊文字の場合は一
定の数値を組として記録した第3のデータと、 検索対象文字列に対し、予め指定された特殊文字が間に
挿入された3文字からなる全ての3文字連鎖を検出し、
3文字連鎖毎に、3文字連鎖を構成する第1文字と第3
文字の検索対象文字列における出現回数を組として記録
した第4のデータと、 第3データと第4データとが区別して記録されているこ
とを特徴とする、全文検索データを記録したコンピュー
タ読み取り可能な記録媒体。7. A computer-readable recording medium recording search data used for full-text search, wherein the search data detects a two-character chain for all characters in a search target character string, For each of the first and second characters constituting a character chain other than the special character specified in advance, which constitutes a two-character chain for each chain, the number of appearances of the characters other than the special character specified in advance is specified in advance. In the case of special characters, all three-character sequences consisting of three characters with a special character specified in advance between the third data recorded as a set of certain numerical values and the search target character string are detected. And
For each three-character chain, the first and third characters that make up the three-character chain
A computer-readable recording of full-text search data, characterized in that the fourth data recorded as a set of the number of appearances of the character in the search target character string and the third data and the fourth data are recorded separately. Recording medium.
ータを記録したコンピュータ読み取り可能な記録媒体
と、 検索文字列から、予め指定された特殊文字以外の文字か
らなる全ての2文字連鎖を検出する第1の文字連鎖検出
手段と、 検索文字列から、予め指定された特殊文字が挿入された
3文字からなる全ての文字連鎖を検出する第3の文字連
鎖検出手段と、 第1の文字連鎖検出手段により検出された2文字連鎖
を、前記記録媒体に記録された第1のデータから検索
し、第3の文字連鎖検出手段により検出された文字連鎖
を検出し、検出された文字連鎖に対応する出現回数の比
較により、検索文字列としての文字連鎖の連続の有無を
判定する比較手段とを備えたことを特徴とする文字列照
合装置。8. A computer-readable recording medium on which search data used for full-text search according to claim 7 is recorded, and all two-character sequences consisting of characters other than special characters specified in advance are detected from a search character string. A first character chain detecting means for detecting, from the search character string, all character chains consisting of three characters into which a special character designated in advance has been inserted; and a first character chain detecting means. The two-character chain detected by the detecting means is searched from the first data recorded on the recording medium, the character chain detected by the third character chain detecting means is detected, and the character chain corresponding to the detected character chain is detected. A character string collating device comprising: comparing means for judging the presence or absence of continuation of a character chain as a search character string by comparing the number of appearances.
コンピュータ読み取り可能な記録媒体であって、 前記検索データは、 検索対象文字列に対し、予め指定された特殊文字以外の
文字からなる全ての2文字連鎖を検出し、2文字連鎖毎
に2文字連鎖を構成する第1文字と第2文字の検索対象
文字列における出現回数を組として記録した第5のデー
タと、 検索対象文字列に対し、予め指定された特殊文字が間に
挿入された3文字からなる全ての3文字連鎖を検出し、
3文字連鎖毎に、3文字連鎖を構成する第1文字の出現
回数と値0の組と、値0と第3文字の出現回数を組との
2つの組からなる組として記録した第6のデータと、 第5データと第6データとが区別して記録されているこ
とを特徴とする、全文検索データを記録したコンピュー
タ読み取り可能な記録媒体。9. A computer-readable recording medium on which search data used for full-text search is recorded, wherein the search data includes all two-byte characters other than special characters specified in advance for a character string to be searched. Fifth data in which a character chain is detected and the number of appearances of the first character and the second character constituting the two-character chain in the search target character string are recorded as a set, and for the search target character string, Detects all three-character chains consisting of three characters with special characters specified in advance,
For each three-letter chain, a sixth set in which a set of the number of appearances of the first character and the value 0 constituting the three-letter chain and a value 0 and a set of the number of occurrences of the value 0 and the third character as a set of two sets are recorded. A computer-readable recording medium on which full-text search data is recorded, wherein the data, the fifth data, and the sixth data are recorded separately.
データを記録したコンピュータ読み取り可能な記録媒体
と、 検索文字列から、予め指定された特殊文字以外の文字か
らなる全ての2文字連鎖を検出する第1の文字連鎖検出
手段と、 検索文字列から、予め指定された特殊文字が挿入された
3文字からなる全ての文字連鎖を検出する第3の文字連
鎖検出手段と、 第1の文字連鎖検出手段により検出された2文字連鎖
を、前記記録媒体に記録された第1のデータから検索
し、第3の文字連鎖検出手段により検出された文字連鎖
を検出し、検出された文字連鎖に対応する出現回数の比
較により、検索文字列としての文字連鎖の連続の有無を
判定する比較手段とを備えたことを特徴とする文字列照
合装置。10. A computer-readable recording medium on which search data used for full-text search according to claim 9 is recorded, and all two-character sequences consisting of characters other than special characters specified in advance are detected from a search character string. A first character chain detecting means for detecting, from the search character string, all character chains consisting of three characters into which a special character designated in advance has been inserted; and a first character chain detecting means. The two-character chain detected by the detecting means is searched from the first data recorded on the recording medium, the character chain detected by the third character chain detecting means is detected, and the character chain corresponding to the detected character chain is detected. A character string collating device comprising: comparing means for judging the presence or absence of continuation of a character chain as a search character string by comparing the number of appearances.
たコンピュータ読み取り可能な記録媒体であって、 前記検索データは、 検索対象文字列に対し、予め指定された特殊文字以外の
文字からなる全ての2文字連鎖を検出し、2文字連鎖毎
に2文字連鎖を構成する第1文字と第2文字の検索対象
文字列における出現回数を組として記録した第7のデー
タと、 検索対象文字列に対し、予め指定された特殊文字が間に
挿入された3文字からなる全ての3文字連鎖を検出し、
3文字連鎖毎に、3文字連鎖を構成する第2文字の特殊
文字を第3文字と同じ文字に変換し第2文字の出現回数
を第3文字の出現回数と同じ値としてから第1文字と第
2文字、第2文字と第3文字による2つの2文字連鎖を
生成し、各2文字連鎖毎に2文字連鎖を構成する第1文
字と第2文字の検索対象文字列における出現回数を組と
して記録した第8のデータと、 第7データと第8データとが区別して記録されているこ
とを特徴とする、全文検索データを記録したコンピュー
タ読み取り可能な記録媒体。11. A computer-readable recording medium in which search data used for full-text search is recorded, wherein the search data includes all two-byte characters other than special characters specified in advance for a character string to be searched. Seventh data in which a character chain is detected, and the number of occurrences of the first character and the second character constituting the two-character chain in the character string to be searched for each two-character chain are recorded as a set. Detects all three-character chains consisting of three characters with special characters specified in advance,
For each three-character chain, the special character of the second character constituting the three-character chain is converted into the same character as the third character, and the number of occurrences of the second character is set to the same value as the number of occurrences of the third character, and then the first character A two-character chain consisting of a second character, a second character, and a third character is generated, and for each two-character chain, the number of appearances of the first character and the second character constituting the two-character chain in the search target character string is set. A computer-readable recording medium on which full-text search data is recorded, characterized in that the eighth data recorded as the first data and the seventh data and the eighth data are recorded separately.
索データを記録したコンピュータ読み取り可能な記録媒
体と、 検索文字列から、予め指定された特殊文字以外の文字か
らなる全ての2文字連鎖を検出する第1の文字連鎖検出
手段と、 検索文字列から、予め指定された特殊文字が挿入された
3文字からなる全ての3文字連鎖を検出する第4の文字
連鎖検出手段と、 第1の文字連鎖検出手段により検出された2文字連鎖
を、前記記録媒体に記録された第1のデータから検索
し、第4の文字連鎖検出手段により検出された特殊文字
を変換して2文字連鎖を生成し、各々の2文字連鎖に対
応する出現回数の比較により、検索文字列としての文字
連鎖の連続の有無を判定する比較手段とを備えたことを
特徴とする文字列照合装置。12. A computer-readable recording medium on which search data used for full-text search according to claim 11 is recorded, and all two-character sequences consisting of characters other than special characters specified in advance are detected from a search character string. A first character chain detecting means for detecting all three-character chains consisting of three characters into which a predetermined special character is inserted, from a search character string; and a first character chain detecting means. The two-character chain detected by the chain detecting means is searched from the first data recorded on the recording medium, and the special character detected by the fourth character chain detecting means is converted to generate a two-character chain. A character string collating apparatus, comprising: comparing means for comparing the number of appearances corresponding to each two-character chain to determine whether or not there is a continuation of character chains as a search character string.
たコンピュータ読み取り可能な記憶媒体であって、前記
検索データは検索対象文字列に対し、全ての2文字連鎖
を検出し、2文字連鎖毎に2文字連鎖を構成し、 2文字連鎖が、予め指定された特殊文字以外の文字連鎖
の構成の場合には、第1文字と第2文字について予め指
定された特殊文字以外の文字はその出現回数の組を記録
した第9のデータと、 2文字連鎖が、予め指定された特殊文字を含む文字連鎖
の構成の場合には、特殊文字に該当する第1文字または
第2文字について、その出現回数が予め指定された出現
回数の最大値以下で割った余りと、または余りが0の場
合は最大値、またはその最大値及び余り、または1度目
の出現回数が最大値以下である場合に2度目以降の最大
値以下の値が1度目の値と順番がユニークとなるように
値を持ち、特殊文字でない文字の出現回数とを組として
記憶し、かつ、第1文字が特殊文字の場合、このデータ
組は、第2文字種別毎にソートされる第10のデータ
と、第9データと第10データとを区別して記憶されて
いることを特徴とする、全文検索データを記録したコン
ピュータ読み取り可能な記憶媒体。13. A computer-readable storage medium storing search data used for full-text search, wherein the search data detects all two-character sequences in a search target character string, If the two-character chain is a character chain other than the special character specified in advance, the characters other than the special character specified in advance for the first character and the second character are counted as the number of appearances. In the case where the ninth data that records the set and the two-character chain is a character chain that includes a special character specified in advance, the number of appearances of the first or second character corresponding to the special character is Remainder divided by less than the maximum value of the number of appearances specified in advance, or the maximum value if the remainder is 0, or the maximum value and the remainder, or the second and subsequent times if the first occurrence number is less than the maximum value Maximum value of When the lower value has a value such that the first value and the order are unique, the number of appearances of a character that is not a special character is stored as a set, and when the first character is a special character, this data set is: A computer-readable storage medium storing full-text search data, wherein tenth data sorted for each second character type, and ninth and tenth data are stored separately.
検索データを記録したコンピュータ読み取り可能な記憶
媒体と、 検索文字列から、特殊文字を含まない全ての2文字連鎖
を検出する第5の文字連鎖検出手段と、 検索文字列から、特殊文字を含む全ての文字連鎖を検出
する第6の文字連鎖検出手段と、 検索文字列が、第5の文字連鎖検出手段で検出された2
文字連鎖で構成される場合には、検出された文字連鎖に
対応する出現回数の比較により、検索文字列としての文
字連鎖の連続の有無を判定する比較手段と、 検索文字列が、第6の文字連鎖検出手段で検索された2
文字連鎖で構成される場合には、検出した文字連鎖の出
現回数および特殊文字の出現回数の重複した回数の比較
により、検索文字列としての文字連鎖の連続の有無を判
定する比較手段とを備えたことを特徴とする文字列照合
装置。14. A computer-readable storage medium storing search data used for full-text search according to claim 13, and a fifth character for detecting all two-character sequences that do not include special characters from a search character string. A chain detecting means, a sixth character chain detecting means for detecting all character chains including special characters from the search character string, and a second character chain detecting means for detecting the search character string by the fifth character chain detecting means.
In the case where the character string is composed of character chains, a comparison unit that determines whether or not there is a continuation of character chains as a search character string by comparing the number of appearances corresponding to the detected character chain; 2 searched by character chain detection means
In the case of a character chain, a comparison means is provided for judging whether or not there is a continuation of the character chain as the search character string by comparing the number of occurrences of the detected character chain and the number of times of occurrence of the special character. A character string collating device characterized by the following.
たコンピュータ読み取り可能な記憶媒体であって、前記
検索データは検索対象文字列に対し、全ての2文字連鎖
を検出し、2文字連鎖毎に文書番号、2文字連鎖の文字
種毎の出現回数または任意の値の組からなる文字連鎖デ
ータを構成し、 前記文字連データが、予め指定された特殊文字を含まな
い場合は第1文字の出現回数と第2文字の出現回数を格
納するサイズが等しく、予め指定された特殊文字を含む
場合は特殊文字に該当する出現回数を格納するサイズが
特殊文字を含まない文字に該当する任意の値を格納する
サイズに比べて大きくなるように構成された第1の文字
連鎖データで、 前記第1の文字連鎖データが、第1文字に予め指定され
た特殊文字列を含む場合は、第2文字が指定された値を
格納し、次の連続した文字連鎖データの第1文字が前の
文字連鎖データの第2文字で指定された値に等しくなる
ように構成される第2の文字連鎖データ、となることを
特徴とする、全文検索データを記録したコンピュータ読
み取り可能な記憶媒体。15. A computer-readable storage medium on which search data used for full-text search is recorded, wherein the search data detects all two-character sequences in a search target character string, and outputs a document for each two-character sequence. Numbers, the number of appearances for each character type of the two-character chain, or character chain data composed of a set of arbitrary values. If the character string data does not include a special character specified in advance, the number of appearances of the first character is determined. If the size for storing the number of appearances of the second character is equal and includes a special character specified in advance, the size for storing the number of appearances corresponding to the special character is stored as an arbitrary value corresponding to a character not including the special character. In the first character chain data configured to be larger than the size, if the first character chain data includes a special character string specified in advance as the first character, the second character is a finger. Is stored, and the second character chain data is configured so that the first character of the next continuous character chain data is equal to the value specified by the second character of the previous character chain data. A computer-readable storage medium on which full-text search data is recorded.
検索データを記録したコンピュータ読み取り可能な記憶
媒体と、 検索文字列から、特殊文字を含まない全ての2文字連鎖
を検出する第5の文字連鎖検出手段と、 2文字連鎖が特殊文字を含まない場合は、第5の文字連
鎖検出手段で検出された連続した文字連鎖に該当する文
字連鎖データに対して、検出された文字連鎖データの第
2文字の出現回数と、前記文字連鎖に続く文字連鎖の文
字連鎖データの第1文字の出現回数を比較することによ
り、検索文字列としての文字連鎖の連続の有無を判定す
る比較手段と、 2文字連鎖が特殊文字を含む場合は、文字連鎖検出手段
で検索された連続した文字連鎖に該当する文字連鎖デー
タに対して、比較手段と同様に文字の出現回数と比較
し、比較する際に指定された特殊文字列の出現回数を記
憶し、連続した文字連鎖以外では出現回数が重複しない
ことを基準として比較し、検索文字列としての文字連鎖
の連続の有無を判定する比較手段とを備えたことを特徴
とする文字列照合装置。16. A computer-readable storage medium storing search data used for full-text search according to claim 15, and a fifth character for detecting all two-character sequences that do not include special characters from a search character string. A chain detecting means, and if the two-character chain does not include a special character, the character chain data corresponding to the continuous character chain detected by the fifth character chain detecting means is compared with the character chain data of the detected character chain data. Comparing means for comparing the number of appearances of the two characters with the number of appearances of the first character of the character chain data of the character chain following the character chain to determine whether or not there is continuation of the character chain as a search character string; If the character chain includes special characters, the character chain data corresponding to the continuous character chain searched by the character chain detection unit is compared with the number of occurrences of the character in the same manner as the comparison unit. Means for storing the number of occurrences of a specified special character string at the time of comparison, comparing the character strings on the basis that the number of occurrences does not overlap except for a continuous character chain, and determining whether or not there is a continuation of the character chain as a search character string A character string collating device comprising:
たコンピュータ読み取り可能な記憶媒体であって、前記
検索データは、 検索対象文字列に対し、特殊文字を含まない全ての2文
字連鎖を検出し、2文字連鎖毎を構成する、予め指定さ
れた特殊文字以外の文字連鎖を構成する第1文字と第2
文字について、予め指定された特殊文字以外の文字はそ
の出現回数を組として記録した第11のデータと、 検索対象文字列に対して、予め指定された特殊文字をま
たぐ2文字連鎖について特殊文字の前にある2文字連鎖
の1文字目の文字種の出現回数と、特殊文字の後ろにあ
る2文字連鎖の1文字目の文字種の出現回数を組として
記録した第2のデータ、または特殊文字の前にある2文
字連鎖の1文字目の文字種の出現回数と、特殊文字の直
後の文字の出現回数を組とした第12のデータと、 第11データと第12データとが区別して記録されてい
ることを特徴とする、全文検索データを記録したコンピ
ュータ読み取り可能な記録媒体。17. A computer-readable storage medium storing search data used for full-text search, wherein the search data detects all two-character chains that do not include special characters in a search target character string, The first character and the second character constituting a character chain other than the special character designated in advance, which constitutes every two character chains.
Regarding characters, characters other than the special characters specified in advance are recorded as a set of the eleventh data of the number of appearances of the special characters. Second data recorded as a set of the number of appearances of the first character type in the two-character chain preceding the two-character chain and the number of occurrences of the first character type in the two-character chain following the special character, or before the special character , The twelfth data, which is a combination of the number of appearances of the first character type of the two-character chain and the number of appearances of the character immediately after the special character, and the eleventh data and the twelfth data are recorded separately. A computer-readable recording medium on which full-text search data is recorded.
検索データを記録したコンピュータ読み取り可能な記憶
媒体と、 検索文字列から、予め指定された特殊文字以外の文字か
らなる全ての2文字連鎖を検出する第1の文字連鎖検索
手段と、 特殊文字列から、予め指定された特殊文字をまたぐ前後
の2文字連鎖に対して、特殊文字の前の2文字連鎖の第
1文字と特殊文字の後の2文字連鎖の第1文字とを組に
した文字連鎖を検出するか、または特殊文字の前にある
2文字連鎖の第1文字と特殊文字の直後の文字の文字を
組にした文字連鎖を検出する第7の文字連鎖検出手段
と、 第1の文字連鎖検出手段により検出された2文字連鎖
を、前記記憶媒体に記録された第1のデータから検索ま
たは第12のデータから検索し、第11のデータから検
索した場合は第7の文字連鎖検出手段により検出された
文字連鎖を検索し、また第12のデータから検索した場
合は第1の文字連鎖検出手段により検出された文字連鎖
を検索し、検出された文字連鎖に対応する出現回数の比
較により、検索文字列としても文字連鎖の連続の有無を
判定する比較手段とを備えたことを特徴とする文字列照
合装置。18. A computer-readable storage medium on which search data used for full-text search according to claim 17 is recorded, and a two-character chain consisting of characters other than special characters designated in advance from a search character string. A first character chain search means for detecting, a first character of the two-character chain before the special character, and a second character chain after the special character from the special character string with respect to the two-character chain before and after the special character specified in advance. Or a character chain that combines the first character of the two-character chain preceding the special character and the character that immediately follows the special character. A seventh character chain detecting means to be detected, and a two-character chain detected by the first character chain detecting means are searched from the first data or the twelfth data recorded on the storage medium. Search from 11 data When the character string is searched, the character chain detected by the seventh character chain detecting means is searched. When the character string is searched from the twelfth data, the character chain detected by the first character chain detecting means is searched. A character string collating device comprising: a comparing unit that determines whether or not there is a continuation of a character chain as a search character string by comparing the number of appearances corresponding to the character chain.
たコンピュータ読み取り可能な記録媒体であって、 前記検索データは予め指定された特殊文字を含み予め指
定された特殊文字以外の文字の出現のみを計数して各文
字の出現位置とする文字列で、 検索対象文字列に対し、予め指定された特殊文字以外の
文字からなる全ての2文字の連鎖を検出し、2文字連鎖
毎に、2文字連鎖を構成する第1文字の出現位置を検索
対象文字列における出現位置として記録した第13のデ
ータと、 予め指定された特殊文字が挿入された全ての文字連鎖を
検出し、前記文字連鎖毎に、文字連鎖を構成する第1文
字の出現位置を検索対象文字列における出現位置として
記録した第14のデータを、 第13データと第14データとを区別して記録されてい
ることを特徴とする、全文検索データを記録したコンピ
ュータ読み取り可能な記録媒体。19. A computer-readable recording medium recording search data used for full-text search, wherein the search data includes a special character specified in advance, and counts only occurrences of characters other than the special character specified in advance. Then, in the character string that is the appearance position of each character, a chain of all two characters consisting of characters other than the special character specified in advance is detected from the search target character string, and a two-character chain is detected for each two-character chain. And the thirteenth data in which the appearance position of the first character forming the character string is recorded as the appearance position in the search target character string, and all the character chains in which the special characters specified in advance have been inserted are detected. Fourteenth data, in which the appearance position of the first character constituting the character chain is recorded as the appearance position in the search target character string, is recorded separately from the thirteenth data and the fourteenth data Wherein, the computer-readable recording medium recording a full-text search data.
索データを記録したコンピュータ読み取り可能な記録媒
体と、 検索文字列から、予め指定された特殊文字以外の文字か
らなる全ての2文字連鎖を検出する第1の文字連鎖検出
手段と、 検索文字列から、予め指定された特殊文字が挿入された
全ての文字連鎖を検出する第8の文字連鎖検出手段と、 第1の文字連鎖検出手段により検出された文字連鎖を、
前記記録媒体に記録された第13のデータから検索し、
第8の文字連鎖検出手段により検出された文字連鎖を、
前記記録媒体に記録された第14のデータから検索し、
文字連鎖に対応する出現位置の比較により、検索文字列
としての文字連鎖の連続の有無を判定する比較手段とを
備えたことを特徴とする文字列照合装置。20. A computer-readable recording medium on which search data used for full-text search according to claim 19 is recorded, and all two-character sequences consisting of characters other than special characters specified in advance are detected from a search character string. A first character chain detecting means for detecting all character chains in which a predetermined special character is inserted from a search character string; and a first character chain detecting means for detecting the character string. Character chain
Searching from the thirteenth data recorded on the recording medium,
The character chain detected by the eighth character chain detecting means is
Searching from the fourteenth data recorded on the recording medium,
A character string collating device comprising: comparing means for judging the presence or absence of continuation of character chains as a search character string by comparing appearance positions corresponding to character chains.
たコンピュータ読み取り可能な記録媒体であって、 前記検索データは予め指定された特殊文字を含む文字列
で、 検索対象文字列の予め指定された特殊文字を隣接する文
字に従い検索の対象とならない文字に変換し、当該変換
された文字列に対し、前記検索の対象とならない文字も
含め全ての2文字連鎖を検出し、2文字連鎖毎に、2文
字連鎖を構成する第1文字の出現位置を検索対象文字列
における出現位置として記録することを特徴とする、全
文検索データを記録したコンピュータ読み取り可能な記
録媒体。21. A computer-readable recording medium on which search data used for full-text search is recorded, wherein the search data is a character string containing a special character specified in advance, and a special character string of a character string to be searched is specified. Characters are converted into characters that are not to be searched according to adjacent characters, and all two-character sequences including the characters that are not to be searched are detected from the converted character string. A computer-readable recording medium on which full-text search data is recorded, wherein an appearance position of a first character forming a character chain is recorded as an appearance position in a search target character string.
索データを記録したコンピュータ読み取り可能な記録媒
体と、 検索文字列の予め指定された特殊文字を前記記録媒体に
記録されたデータに対し適用された同一の規則に従い、
隣接する文字に基づき検索の対象とならない文字に変換
する文字列変換手段と、 前記文字列変換手段により変換された文字列に対し、検
索の対象とならない文字も含め全ての2文字連鎖を検出
する2文字連鎖検出手段と、 前記2文字連鎖検出手段により検出された2文字連鎖
を、前記記録媒体から検出し、対応する出現位置の比較
により、検索文字列としての文字連鎖の連続の有無を判
定する比較手段とを備えたことを特徴とする文字列照合
装置。22. A computer-readable recording medium on which search data used for full-text search according to claim 21 is recorded, and a special character specified in a search character string is applied to data recorded on said recording medium. Subject to the same rules,
A character string conversion unit for converting a character string that is not a search target based on adjacent characters; and detecting a two-character chain including a character that is not a search target for the character string converted by the character string conversion unit. A two-character chain detecting unit, and a two-character chain detected by the two-character chain detecting unit is detected from the recording medium, and the presence or absence of the continuation of the character chain as a search character string is determined by comparing corresponding appearance positions. A character string collating device, comprising:
たコンピュータ読み取り可能な記録媒体であって、 前記検索データは予め指定された特殊文字を含む文字列
で、 検索対象文字列の予め指定された特殊文字を隣接する文
字に従い検索の対象とならない2文字に変換し、当該変
換された文字列に対し、前記検索の対象とならない文字
も含め全ての2文字連鎖を検出し、2文字連鎖毎に、2
文字連鎖を構成する第1文字または第2文字の出現位置
を検索対象文字列における出現位置として記録すること
を特徴とする、全文検索データを記録したコンピュータ
読み取り可能な記録媒体。23. A computer-readable recording medium on which search data used for full-text search is recorded, wherein the search data is a character string including a special character specified in advance, and a special character string of a character string to be searched is specified. Characters are converted into two characters that are not to be searched according to adjacent characters, and for the converted character string, all two-character chains including the characters that are not to be searched are detected. 2
A computer-readable recording medium on which full-text search data is recorded, wherein an appearance position of a first character or a second character constituting a character chain is recorded as an appearance position in a search target character string.
索データを記録したコンピュータ読み取り可能な記録媒
体と、 検索文字列の予め指定された特殊文字を前記記録媒体に
記録されたデータに対し適用された同一の規則に従い、
隣接する文字に基づき検索の対象とならない2文字に変
換する文字列変換手段と、 前記文字列変換手段により変換された文字列に対し、検
索の対象とならない2文字も含め全ての2文字連鎖を検
出する2文字連鎖検出手段と、 前記2文字連鎖検出手段により検出された2文字連鎖
を、前記記録媒体から検出し、対応する出現位置の比較
により、検索文字列としての文字連鎖の連続の有無を判
定する比較手段とを備えたことを特徴とする文字列照合
装置。24. A computer-readable recording medium on which search data used for full-text search according to claim 23 is recorded, and a special character specified in a search character string is applied to data recorded on said recording medium. Subject to the same rules,
A character string conversion means for converting into two characters that are not to be searched based on adjacent characters; and a two-character chain including two characters that are not to be searched for the character string converted by the character string conversion means. A two-character chain detecting means for detecting, and a two-character chain detected by the two-character chain detecting means is detected from the recording medium, and a corresponding appearance position is compared to determine whether or not the character chain as a search character string is continuous. A character string collating device, comprising: comparing means for judging a character string.
たコンピュータ読み取り可能な記録媒体であって、 前記検索データは予め指定された特殊文字を含む文字列
で、 検索対象文字列に対し、予め指定された特殊文字以外の
文字からなる文字列で、全ての2文字連鎖を検出し、2
文字連鎖毎に2文字連鎖を構成する第1文字または第2
文字の出現位置を検索対象文字列の出現位置としたデー
タと、検索対象文字列に対し、予め指定された特殊文字
が間に挿入された3文字からなる全ての3文字連鎖を検
出し、3文字連鎖毎に、3文字連鎖を構成する第2文字
の特殊文字を第3文字と同じ文字に変換し、第1文字と
第2文字からなる2文字連鎖を検出し、前記2文字連鎖
を構成する第1文字または第2文字の出現位置を検索対
象文字列の出現位置としたデータとを記録した第15の
データと、 前記3文字連鎖の第2文字と第3文字からなる2文字連
鎖を検出し、この2文字連鎖の第1文字の出現位置が第
2文字の出現位置と同じ値としてから、第1文字または
第2文字の出現位置をこの文字連鎖の検索対象文字列に
おける出現位置として記録した第16のデータと、 第15データと第16データとが区別して記録されてい
ることを特徴とする、全文検索データを記録したコンピ
ュータ読み取り可能な記録媒体。25. A computer-readable recording medium on which search data used for full-text search is recorded, wherein the search data is a character string including a special character specified in advance, and a character string specified in advance for a search target character string. In a character string consisting of characters other than special characters, all two-character
The first or second character that constitutes a two-character chain for each character chain
For the data in which the character appearance position is the appearance position of the search target character string, and for the search target character string, all three-character chains consisting of three characters with special characters specified in advance are detected. For each character chain, the special character of the second character constituting the three-character chain is converted into the same character as the third character, and the two-character chain consisting of the first character and the second character is detected to form the two-character chain. The fifteenth data which records data in which the appearance position of the first character or the second character to be searched is the appearance position of the search target character string, and the two-character sequence consisting of the second character and the third character of the three-character sequence After detecting the occurrence position of the first character in the two-character chain as the same value as the appearance position of the second character, the appearance position of the first character or the second character is determined as the appearance position of the character chain in the search target character string. The recorded 16th data and the 15th data Data and wherein the the first 16 data are recorded in distinction, a computer readable recording medium recording a full-text search data.
索データを記録したコンピュータ読み取り可能な記録媒
体と、 検索文字列から、予め指定された特殊文字以外の文字か
らなる全ての2文字連鎖を検出する第1の文字連鎖検出
手段と、 検索文字列から、予め指定された特殊文字が挿入された
3文字からなる全ての3文字連鎖を検出する第10の文
字連鎖検出手段と、 第1の文字連鎖検出手段により検出された2文字連鎖
を、前記記録媒体に記録された第15のデータから検索
し、第10の文字連鎖検出手段により検出された特殊文
字を変換して2文字連鎖を生成し、各々の2文字連鎖に
対応する出現位置の比較により、検索文字列としての文
字連鎖の連続の有無を判定する比較手段とを備えたこと
を特徴とする文字列照合装置。26. A computer-readable recording medium on which search data used for full-text search according to claim 25 is recorded, and all two-character sequences consisting of characters other than special characters specified in advance are detected from a search character string. A first character chain detecting means for detecting all three-character chains consisting of three characters into which a special character specified in advance has been inserted, from a search character string; and a first character chain detecting means. The two-character chain detected by the chain detecting means is searched from the fifteenth data recorded on the recording medium, and the special character detected by the tenth character chain detecting means is converted to generate a two-character chain. A character string collating apparatus, comprising: comparing means for comparing appearance positions corresponding to each two-character chain to determine whether or not there is a continuation of character chains as a search character string.
たコンピュータ読み取り可能な記憶媒体であって、前記
検索データは検索対象文字列に対し、2文字連鎖と文字
位置を検出し、2文字連鎖毎に検索対象文字列から構成
される文書番号と2文字連鎖と文字位置の組を2文字連
鎖情報として構成し、2文字連鎖情報の文字位置は、検
索対象文字列の先頭を基準として予め指定された特殊文
字の位置は除外して昇順に番号付けをし、さらに文字連
鎖の第1文字毎に文字連鎖情報を格納している記憶媒体
であって、 特殊文字を含まない2文字連鎖で第1文字と第2文字の
組と、特殊文字を除外した文字位置での第1文字の文字
位置、および文書番号を組として記録した第17のデー
タと、 特殊文字の直前の文字と特殊文字を組み合わせた2文字
連鎖、特殊文字の文字種により規定される任意の固定
値、および文書番号の組から構成される第18のデータ
と、 特殊文字と特殊文字の直後の文字を組合わせた2文字連
鎖、特殊文字を除外した文字位置での第2文字の文字位
置、および文書番号から構成される第19のデータと、 特殊文字の直前と直後の文字を組み合わせた2文字連
鎖、特殊文字を除外した文字位置での第1文字の文字位
置、および文書番号から構成される第20のデータと、 第17のデータ、第18のデータ、第19のデータ、第
20のデータの2文字連鎖の第1文字目毎に整列して文
字連鎖情報として格納し、第17のデータ、第18のデ
ータおよび第19のデータに対しては、2つの文字連鎖
の1文字目が同じで2文字目が特殊文字の場合に第17
のデータの直後に第18のデータを格納することを特徴
とする、全文検索データを記録したコンピュータ読み取
り可能な記憶媒体。27. A computer-readable storage medium storing search data used for full-text search, wherein the search data detects a two-character chain and a character position in a search target character string, A set of a document number, a two-character chain, and a character position composed of the search target character string is configured as two-character chain information, and the character position of the two-character chain information is specified in advance based on the beginning of the search target character string. A storage medium storing character chain information for each first character of a character chain, excluding special character positions and numbering in ascending order, wherein the first character is a two-character chain that does not include special characters. The seventeenth data recorded as a set of the first character at the character position excluding the special character and the character position and the document number excluding the special character, and the character immediately before the special character and the special character Two characters The 18th data consisting of a chain, an arbitrary fixed value defined by the character type of the special character, and a document number, a two-character chain combining the special character and the character immediately following the special character, and the special character A two-character chain combining the nineteenth data consisting of the character position of the second character at the excluded character position and the document number and the characters immediately before and after the special character, and the character position at the character position excluding the special character 20th data composed of the character position of the first character and the document number; and 17th data, 18th data, 19th data, and 20th data. It is sorted and stored as character chain information. For the seventeenth data, the eighteenth data, and the nineteenth data, if the first character of the two character chains is the same and the second character is a special character, 17
A computer-readable storage medium on which full-text search data is recorded, wherein the eighteenth data is stored immediately after the data.
検索データを記録したコンピュータ読み取り可能な記憶
媒体と、 検索文字列から、特殊文字とその前後の文字を除く全て
の2文字連鎖を検出する第11の文字連鎖検出手段と、 検索文字列から、特殊文字の直前の文字と直後の文字か
らなる2文字連鎖、特殊文字の直前の文字と特殊文字か
らなる2文字連鎖、特殊文字と特殊文字の直後の文字か
らなる2文字連鎖を検出する第12の文字連鎖検出手段
と、 第1の文字連鎖検出手段で検出された2文字連鎖に対応
する第17のデータと第12の文字連鎖検出手段で検出
された文字連鎖対応する第20のデータ、または第21
のデータと第17のデータから2つのデータの文字位置
の差と文書番号の比較により、検索文字列としての連続
の有無を判断する比較手段と、 第20のデータの直後に第18のデータが続いているこ
とにより特殊文字を含む検索文字列としての連続の有無
を判断する比較手段、とを特徴とする文字列照合装置。28. A computer-readable storage medium storing search data used for full-text search according to claim 27, and detecting all two-character sequences excluding a special character and characters before and after the special character from a search character string. An eleventh character chain detecting means, a two-character chain consisting of a character immediately before and after a special character, a two-character chain consisting of a character immediately before a special character and a special character, a special character and a special character from a search character string A twelfth character chain detecting means for detecting a two-character chain consisting of the character immediately after the character string, a seventeenth data corresponding to the two-character chain detected by the first character chain detecting means, and a twelfth character chain detecting means. 20th data corresponding to the character chain detected in
Comparing means for determining the presence or absence of continuation as a search character string by comparing the character position difference between the two data from the seventeenth data with the document number; and the eighteenth data immediately after the twentieth data. Comparing means for determining the presence or absence of a continuation as a search character string including a special character by being continued.
たコンピュータ読み取り可能な記憶媒体であって、前記
検索データは検索対象文字列に対し、2文字連鎖と文字
位置を検出し、2文字連鎖毎に検索対象文字列から構成
される文書番号と2文字連鎖と文字位置の組を2文字連
鎖情報として構成し、文字連鎖の第1文字毎に文字連鎖
情報を格納している記憶媒体であって、 2文字連鎖情報の文字位置は、検索対象文字列の先頭を
基準として予め指定された特殊文字の位置は除外して昇
順または降順に番号付けをし、特殊文字を含まない文字
種の場合には第1文字と第2文字の組と、第1文字の文
字位置と、文書番号を組として記録した第21のデータ
と、 特殊文字を含む文字連鎖情報は、特殊文字の直前の文字
に対しては、特殊文字の直前の文字と特殊文字の直後の
文字を組み合わせた文字連鎖、特殊文字の直前の文字位
置および文書番号の組から構成され、また該文字連鎖情
報の文字連鎖の第1文字と第2文字が、特殊文字を含ま
ない場合の文字連鎖情報の文字連鎖の第1文字または第
2文字が一致する場合には特殊文字を含まない文字連鎖
情報の後または前に別個に記録されるように構成される
第22のデータと、 特殊文字を含む文字連鎖情報は、特殊文字の直後の文字
に対しては、特殊文字の直後の文字とその文字に続く文
字を組合わせた文字連鎖、特殊文字の直後の文字位置お
よび文書番号から構成され、また該文字連鎖情報の文字
連鎖の第1文字が、特殊文字を含まない場合の2文字連
鎖の第1文字と一致する場合には特殊文字を含まない文
字連鎖情報の後または前に別個に記録されるように構成
される第23のデータと、 特殊文字を含む文字連鎖情報は、特殊文字の2個前の文
字と特殊文字の直後の文字とを組み合わせた文字連鎖、
特殊文字の2個前の文字位置および文書番号から構成さ
れる第24のデータと、 第21データ、第22データ、第23データ、第24デ
ータを区別して記憶されていることを特徴とする、全文
検索データを記録したコンピュータ読み取り可能な記憶
媒体。29. A computer-readable storage medium storing search data used for full-text search, wherein the search data detects a two-character chain and a character position with respect to a character string to be searched. A storage medium comprising a set of a document number composed of a search target character string, a two-character chain, and a character position as two-character chain information, and storing character chain information for each first character of the character chain, The character position of the two-character chain information is numbered in ascending or descending order excluding the position of the special character specified in advance with respect to the beginning of the search target character string. The 21st data recorded as a set of one character and the second character, the character position of the first character, the document number, and the character chain information including the special character are the same as the character just before the special character. , Just before special characters A character chain combining a character and a character immediately following a special character, a set of a character position immediately before the special character and a document number, and the first character and the second character of the character chain of the character chain information are special characters. When the first character or the second character of the character chain of the character chain information of the character chain information that does not include the special character is matched, the 22nd character string is separately recorded after or before the character chain information that does not include the special character. Data and character chain information including special characters, for the character immediately following the special character, the character chain combining the character immediately following the special character and the character that follows that character, the character position immediately following the special character And a document number, and when the first character of the character chain of the character chain information matches the first character of the two-character chain when no special character is included, the character chain information without the special character is included. After or before A second 23 data configured to be recorded in the number, character chain information including special characters, character chain that combines the character after the two previous characters and special characters special characters,
The twenty-fourth data consisting of the character position and the document number two places before the special character, and the twenty-first data, the twenty-second data, the twenty-third data, and the twenty-fourth data are stored separately. Computer-readable storage medium that records full-text search data.
検索データを記録したコンピュータ読み取り可能な記憶
媒体と、 検索文字列から、特殊文字の前後の文字を除く全ての2
文字連鎖を検出する第13の文字連鎖検出手段と、 検索文字列から、特殊文字を間に挟む検索文字列の場合
は特殊文字の直前の文字と直後の文字を文字連鎖として
検出し、かつ該文字連鎖の第2文字は特殊文字の直後の
文字としてマークし、 検索文字列の先頭が特殊文字の場合は特殊文字の直後の
文字とその次の文字を文字連鎖として検出し、かつ該文
字連鎖の第1文字は特殊文字の直後の文字としてマーク
し、 検索文字列の先頭から3番目以降に特殊文字が出現する
場合には、特殊文字の2文字前の文字と特殊文字の直後
の文字を文字連鎖として検出し、かつ該文字連鎖の第2
文字は特殊文字の直後の文字としてマークし、さらに特
殊文字の直後の文字とその次の文字を文字連鎖として検
出し、かつ該文字連鎖の第1文字は特殊文字の直後の文
字としてマークする第14の文字連鎖検出手段と、 検索文字列が、第13の文字連鎖検出手段で検出された
2文字連鎖で構成される場合には、検出された文字連鎖
に対応する文字位置と文書番号の比較により、検索文字
列としての文字連鎖の連続の有無を判定する比較手段
と、 検索文字列が、第14の文字連鎖検出手段で検索された
2文字連鎖で構成される場合には、前記第21データか
ら第24データの文字連鎖情報に一致するかどうかを文
字連鎖と文書番号から検索文字列としての文字連鎖の連
続の有無を判定する比較手段、とを特徴とする文字列照
合装置。30. A computer-readable storage medium storing the search data used in the full-text search according to claim 29, and all the characters other than characters before and after the special character from the search character string.
A thirteenth character chain detecting means for detecting a character chain; and in the case of a search character string sandwiching a special character from the search character string, a character immediately before and after the special character is detected as a character chain; The second character in the character chain is marked as the character immediately following the special character. If the beginning of the search character string is a special character, the character immediately after the special character and the next character are detected as a character chain, and the character chain is detected. Is marked as the character immediately after the special character, and if the special character appears after the third character from the beginning of the search string, the character two characters before the special character and the character immediately after the special character Detected as a character chain and the second of the character chain
The character is marked as the character immediately following the special character, the character immediately following the special character and the next character are detected as a character chain, and the first character of the character chain is marked as the character immediately following the special character. In the case where the fourteenth character chain detecting means and the search character string are composed of two character chains detected by the thirteenth character chain detecting means, a comparison between the character position corresponding to the detected character chain and the document number is performed. The comparison means for judging the presence or absence of continuation of the character chain as the search character string, and the twenty-first character string when the search character string is composed of the two character chain searched by the fourteenth character chain detection means. Comparing means for determining whether or not the data matches the character chain information of the twenty-fourth data based on the character chain and the document number to determine whether or not there is a continuation of character chains as a search character string.
Priority Applications (5)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP00453598A JP3567711B2 (en) | 1997-07-11 | 1998-01-13 | String collation device |
| SG9806377A SG98366A1 (en) | 1997-07-11 | 1998-07-09 | Recording medium of character data of full text and character string collating apparatus |
| EP98112850A EP0890912A3 (en) | 1997-07-11 | 1998-07-10 | Recording medium of character data of full text and character string collating apparatus |
| KR1019980028059A KR100300741B1 (en) | 1997-07-11 | 1998-07-11 | Recording medium and string matching device for character data of whole sentence |
| US09/114,284 US6260051B1 (en) | 1997-07-11 | 1998-07-13 | Recording medium and character string collating apparatus for full-text character data |
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP18632997 | 1997-07-11 | ||
| JP9-186329 | 1997-07-11 | ||
| JP00453598A JP3567711B2 (en) | 1997-07-11 | 1998-01-13 | String collation device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH1185802A true JPH1185802A (en) | 1999-03-30 |
| JP3567711B2 JP3567711B2 (en) | 2004-09-22 |
Family
ID=26338339
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP00453598A Expired - Fee Related JP3567711B2 (en) | 1997-07-11 | 1998-01-13 | String collation device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3567711B2 (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH07105237A (en) * | 1993-10-08 | 1995-04-21 | Matsushita Electric Ind Co Ltd | Index creating method and apparatus and document retrieval apparatus |
| JPH08314975A (en) * | 1995-05-22 | 1996-11-29 | Matsushita Electric Ind Co Ltd | Information retrieval device |
-
1998
- 1998-01-13 JP JP00453598A patent/JP3567711B2/en not_active Expired - Fee Related
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH07105237A (en) * | 1993-10-08 | 1995-04-21 | Matsushita Electric Ind Co Ltd | Index creating method and apparatus and document retrieval apparatus |
| JPH08314975A (en) * | 1995-05-22 | 1996-11-29 | Matsushita Electric Ind Co Ltd | Information retrieval device |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3567711B2 (en) | 2004-09-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2790466B2 (en) | Character string search method and apparatus | |
| JP2726568B2 (en) | Character recognition method and device | |
| US5745745A (en) | Text search method and apparatus for structured documents | |
| JP3160201B2 (en) | Information retrieval method and information retrieval device | |
| JPS63311530A (en) | string search device | |
| JPS61267885A (en) | Word dictionary collating device | |
| KR960018993A (en) | Information retrieval method and system | |
| JPH09288676A (en) | Full sentence index prepration device and full sentence data base retrieval device | |
| JP3022539B1 (en) | Document search device | |
| JP2693914B2 (en) | Search system | |
| JPH0782504B2 (en) | Information retrieval processing method and retrieval file creation device | |
| JP2000231559A (en) | Information processing device | |
| JPH04326164A (en) | Data base retrieval system | |
| JPH1185802A (en) | Computer-readable recording medium recording full-text search data and character string collation device | |
| KR100300741B1 (en) | Recording medium and string matching device for character data of whole sentence | |
| JP2519129B2 (en) | Multi-word information retrieval processing method and retrieval file creation device | |
| WO1996011442A1 (en) | Character information processing method and apparatus for the same | |
| JP2588261B2 (en) | Address database search device by OCR | |
| Gander et al. | Rule based document understanding of historical books using a hybrid fuzzy classification system | |
| JP3924899B2 (en) | Text search apparatus and text search method | |
| JPH10149367A (en) | Text store and retrieval device | |
| JPH10177582A (en) | Longest match search method and apparatus | |
| JPH0342774A (en) | Information processing device | |
| JP2001265762A (en) | Document structure extracting device and document structure information extracting method | |
| JP2000067070A (en) | Information search method, search file creation method, and information search device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040309 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040426 |
|
| 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: 20040525 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040607 |
|
| LAPS | Cancellation because of no payment of annual fees |