JP2820183B2 - String comparison method - Google Patents
String comparison methodInfo
- Publication number
- JP2820183B2 JP2820183B2 JP4230516A JP23051692A JP2820183B2 JP 2820183 B2 JP2820183 B2 JP 2820183B2 JP 4230516 A JP4230516 A JP 4230516A JP 23051692 A JP23051692 A JP 23051692A JP 2820183 B2 JP2820183 B2 JP 2820183B2
- Authority
- JP
- Japan
- Prior art keywords
- character string
- cost
- value
- array
- character
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
【0001】[0001]
【産業上の利用分野】本発明は、2つの文字列の近似度
を判定する文字列比較方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a character string comparing method for determining the degree of similarity between two character strings.
【0002】[0002]
【従来の技術】従来、長さmの被比較文字列aと、長さ
nの比較文字列bの近似度を判定する方法として、文字
列bを文字列aに変換するのに必要なLevenste
in距離と呼ばれる、コスト(以下、距離と称する)を
求める方法が知られている。2. Description of the Related Art Conventionally, as a method of judging the degree of approximation between a compared character string a having a length m and a comparison character string b having a length n, Levenste required for converting a character string b into a character string a is used.
There is known a method of calculating a cost (hereinafter, referred to as a distance) called an in-distance.
【0003】この方法の概要を説明すると、文字列の変
換には、文字の追加、削除、変更の3つのタイプがあ
る。これらの変換タイプに、それぞれ変換のコストを割
り当てる。そして、必要とされる変換のコストの合計が
文字列aと文字列bの距離となる。To explain the outline of this method, there are three types of character string conversions: addition, deletion, and modification of characters. Each of these conversion types is assigned a conversion cost. Then, the total required conversion cost is the distance between the character strings a and b.
【0004】この距離の値が0の場合は、2つの文字列
が等しいことになり、値が大きいほど2つの文字列はよ
り異なっているとされる。When the value of the distance is 0, the two character strings are equal, and the larger the value, the more the two character strings are different.
【0005】以下、この方法について、被比較文字列
「aXbYc]と比較文字列「abc」の近似度を求め
る場合を例にとって、図を参照しながら説明する。な
お、説明を簡単にするために追加、削除、変更のコスト
をそれぞれ1、2、3とする。Hereinafter, this method will be described with reference to the drawings, taking as an example the case where the degree of approximation between the compared character string "aXbYc" and the compared character string "abc" is obtained. For the sake of simplicity, the costs of addition, deletion, and change are 1, 2, and 3, respectively.
【0006】図6は従来の方法を示すフローチャートで
あり、コスト配列初期化ステップでは行の大きさとして
被比較文字列「aXbYc」の長さ+1、即ち、6をも
ち、列の大きさとして比較文字列「abc」の長さ+
1、即ち、4を持つ配列Mの配列要素M〔0,0〕の値
を0とした後、第0行目の配列要素M〔0,j〕(0<
j<6)についてそれぞれM〔0,j−1〕の値に追加
のコスト1を加算した値とする。FIG. 6 is a flowchart showing a conventional method. In the cost array initialization step, the length of the line to be compared has the length of the character string to be compared "aXbYc" +1, that is, 6, and the comparison is made as the column size. Length of character string "abc" +
After the value of the array element M [0,0] of the array M having 1, ie, 4, is set to 0, the array element M [0, j] (0 <
j <6) is a value obtained by adding an additional cost 1 to the value of M [0, j-1].
【0007】その後、第0列目の配列要素M〔i,0〕
(0<i<4)についてM〔i−1,0〕の値に削除の
コスト2を加算した値とする。初期化ステップ後の配列
Mは図8に示すように初期化される。Then, the array element M [i, 0] in the 0th column
For (0 <i <4), a value obtained by adding a deletion cost 2 to the value of M [i-1, 0] is used. The array M after the initialization step is initialized as shown in FIG.
【0008】その後、図6において、コスト配列演算ス
テップが実行される。このコスト配列演算ステップのフ
ローチャートを図7に示す。このコスト配列演算ステッ
プでは図7のフローチャートの行及び列制御変数初期化
ステップS8 ,行制御判定ステップS9 ,列制御判
定ステップS10の各ステップで制御される繰返しの中
で配列要素M〔i,j〕(0<i<4<0<j<6)の
それぞれについて配列の順位の小さい順に値を求めてい
く。Thereafter, in FIG. 6, a cost array operation step is executed. FIG. 7 shows a flowchart of the cost array calculation step. In this cost array calculation step, the array element M [i, j] in the repetition controlled by the row and column control variable initialization step S8, row control determination step S9, and column control determination step S10 in the flowchart of FIG. For each of (0 <i <4 <0 <j <6), values are obtained in ascending order of the array.
【0009】比較文字列「aXbYc」の第i番目の文
字と比較文字列「abc」の第j番目の文字とが等しい
か否かが文字比較ステップS11で判定され、等しい場
合は、コスト演算1(ステップS12)で配列要素M
〔i,j〕に、配列要素M〔i−1,j−1〕の値、配
列要素M〔i,j−1〕の値に追加のコスト1を加算し
た値、配列要素M〔i−1,j〕の値に削除のコスト2
を加算した値の3つの値の中の最小値が格納される。Whether or not the i-th character of the comparison character string "aXbYc" is equal to the j-th character of the comparison character string "abc" is determined in a character comparison step S11. (Step S12) Array element M
[I, j], the value of the array element M [i-1, j-1], the value obtained by adding an additional cost 1 to the value of the array element M [i, j-1], the array element M [i- [J] cost 2
Is stored as the minimum value among the three values obtained by adding.
【0010】異なる場合は、コスト演算2(ステップS
13)で配列要素M〔i,j〕に、配列要素M〔i−
1,j−1〕の値に変更のコスト3を加算した値、配列
要素M〔i,j−1〕の値に追加のコスト1を加算した
値、配列要素M〔i−1,j〕の値に削除のコスト2を
加算した値の3つの値の中の最小値が格納される。この
ようにして配列要素の値をそれぞれ求めた後の配列コス
ト配列Mを図9に示す。If they are different, cost calculation 2 (step S
13), the array element M [i, j] is added to the array element M [i−
[1, j-1]], the value obtained by adding the change cost 3 to the value of the array element M [i, j-1], and the value obtained by adding the additional cost 1 to the value of the array element M [i-1, j]. Is stored as the minimum value among the three values obtained by adding the deletion cost 2 to the value. FIG. 9 shows an array cost array M after the values of the array elements have been obtained in this manner.
【0011】図9の距離L2が被比較文字列「aXbY
c」と比較文字列「abc」の近似度であり、この場合
は4になる。The distance L2 in FIG. 9 is the character string to be compared "aXbY
c "and the degree of approximation of the comparison character string" abc ". In this case, it is 4.
【0012】[0012]
【発明が解決しようとする課題】従来の文字列の比較方
法では、文字列内の文字の連続性が無視されるために、
例えば、被比較文字列「aXbYc」と比較文字列「a
bc」の近似度と、被比較文字列「abcXY」と比較
文字列「abc」の近似度が等しくなってしまい、文字
a,b,cの連続性が近似度の判定に反映されないとい
う問題があった。In the conventional character string comparison method, the continuity of characters in the character string is ignored.
For example, the compared character string “aXbYc” and the comparison character string “a
bc "and the compared character string" abcXY "and the compared character string" abc "become equal, and the continuity of the characters a, b, and c is not reflected in the determination of the similarity. there were.
【0013】従って本発明の目的は、文字列の近似度を
より正確に判定することのできる文字列の比較方法を提
供することを目的とする。Accordingly, it is an object of the present invention to provide a character string comparison method capable of more accurately determining the degree of approximation of a character string.
【0014】[0014]
【課題を解決するための手段】本発明によれば、長さm
の被比較文字列aと、長さnの比較文字列bの近似度
を、文字の追加、削除、変更のそれぞれに対しコストを
設定し、行の大きさがm+1、列の大きさがn+1であ
るコスト配列Mを用意した後、第0列目の配列要素M
〔i,0〕(0≦i≦m)の値をそれぞれi×削除、の
コストとし、配列要素M〔0,j〕(0≦j≦n)の値
をそれぞれj×追加、のコストとするコスト配列初期化
ステップと、配列要素M〔i,j〕(0<i≦m,0<
j≦n)の値を配列要素M〔i−1,j−1〕の値に、
被比較文字列aの第i番目の文字と比較文字列bの第j
番目の文字が等しい場合は0、異なる場合は変更のコス
トを加算した値、配列要素M〔i,j−1〕の値に追加
のコストを加算した値、配列要素M〔i−1,j〕の値
に削除のコストを加算した値、の3つの値のうちの最小
値となるように順に求めていくコスト演算ステップとを
有し、このコスト演算ステップによって求められた文字
列bを文字列aに変換するコストを以って文字列aと文
字列bの近似度とする文字列の比較方法において、さら
に、前記コスト配列Mと同じ大きさの部分一致配列M’
を用意し、部分一致配列M’の配列要素全てを0で初期
化する部分一致配列初期化ステップと、配列要素M’
〔i,j〕(0<i≦m,0<j≦n)の値を被比較文
字列aのi番目の文字と比較文字列bのj番目の文字が
等しい場合には配列要素M’〔i−1,j−1〕の値に
1を加算した値とする部分一致演算ステップとを備え、
この部分一致演算ステップによって求められた部分一致
の最大長を、文字列bを文字列aに変換するコストと併
せ、文字列の近似度とすることを特徴とする文字列比較
方法が得られる。According to the invention, the length m
The similarity between the compared character string a and the comparison character string b having the length n is set as a cost for each of addition, deletion, and change of characters, and the row size is m + 1 and the column size is n + 1. Is prepared, the array element M in the 0th column is prepared.
The value of [i, 0] (0 ≦ i ≦ m) is the cost of i × deletion, and the value of the array element M [0, j] (0 ≦ j ≦ n) is j × addition. And an array element M [i, j] (0 <i ≦ m, 0 <
j ≦ n) to the value of array element M [i−1, j−1],
The i-th character of the compared character string a and the j-th character of the compared character string b
If the second character is equal, 0; otherwise, the value obtained by adding the cost of the change, the value obtained by adding the additional cost to the value of the array element M [i, j-1], the array element M [i-1, j] And a value obtained by adding the cost of the deletion to the value of the cost calculation step. In the character string comparison method in which the character string a and the character string b are approximated by the cost of conversion into the string a, the partial matching array M ′ having the same size as the cost array M is further provided.
And a partial matching sequence initialization step of initializing all the array elements of the partial matching sequence M ′ to 0, and an array element M ′
If the value of [i, j] (0 <i ≦ m, 0 <j ≦ n) is equal to the j-th character of the compared character string b and the j-th character of the compared character string b, the array element M ′ A partial match operation step of adding 1 to the value of [i-1, j-1].
The character string comparison method is characterized in that the maximum length of the partial match obtained in the partial match calculation step is used as the degree of approximation of the character string, together with the cost of converting the character string b into the character string a.
【0015】[0015]
【作用】このように本発明の文字列の比較方法では、文
字の連続性を測定するために、中間結果を格納する部分
一致配列M´を初期化する部分一致配列初期化ステップ
と配列要素M’〔i,j〕の値を被比較文字列aのi番
目の文字と比較文字列bのj番目の文字が等しい場合に
は配列要素M’〔i−1,j−1〕の値に1を加算した
値とする部分一致演算ステップとを備え、この部分一致
演算ステップによって求められた部分一致配列M’の配
列要素の中の最大の値が、被比較文字列aと比較文字列
bの一致する部分文字列の最大長となる。As described above, according to the character string comparison method of the present invention, in order to measure the continuity of characters, the partial matching array initializing step of initializing the partial matching array M 'storing the intermediate result and the array element M If the value of [i, j] is the same as the i-th character of the compared character string a and the j-th character of the comparison character string b, the value of the array element M '[i-1, j-1] A partial matching operation step of adding 1 to the comparison string, and the largest value among the array elements of the partial matching array M ′ obtained by the partial matching operation step is the compared character string a and the comparison character string b. Is the maximum length of the substring that matches
【0016】[0016]
【実施例】本発明について図面を参照して、説明する。
図1は本発明のフローチャートであり、図2は図1の演
算ステップのフローチャートである。DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described with reference to the drawings.
FIG. 1 is a flowchart of the present invention, and FIG. 2 is a flowchart of the calculation steps of FIG.
【0017】被比較文字列「abcXY」と比較文字列
「abc」を比較する場合を例にとって説明する。な
お、説明を簡単にするために追加、削除、変更のコスト
をそれぞれ1,2,3とする。A case will be described as an example where the character string to be compared "abcXY" is compared with the character string to be compared "abc". For simplicity of description, the costs of addition, deletion, and change are 1, 2, and 3, respectively.
【0018】図1に示す初期化ステップでは行の大きさ
として被比較文字列「aXbYc」の長さ+1、即ち、
6をもち、列の大きさとして比較文字列「abc」の長
さ+1、即ち、4をもつコスト配列M及びコスト配列M
と同じ大きさの部分一致配列M’がコスト配列初期化ス
テップ1、部分一致配列初期化ステップ2にて、以下の
ように初期化される。In the initialization step shown in FIG. 1, the length of the line to be compared "aXbYc" is +1 as the line size, that is,
6, the cost array M and the cost array M having the length of the comparison character string “abc” +1 as the column size, ie, 4.
In the cost array initializing step 1 and the partially identical array initializing step 2, the partial coincidence array M ′ having the same size as is initialized as follows.
【0019】配列要素M〔0,0〕の値を0とした後、
第0行目の配列要素M〔0,j〕(0<j<6)につい
て、それぞれM〔0,j−1〕の値に追加のコスト1を
加算した値とする。After setting the value of array element M [0,0] to 0,
For the array element M [0, j] (0 <j <6) on the 0th row, a value obtained by adding an additional cost 1 to the value of M [0, j-1] is used.
【0020】その後、第0列目の配列要素M〔i,0〕
(0<i<4)についてM〔i−1,0〕の値に削除の
コスト2を加算した値とする。配列M’の全ての配列要
素は0で初期化される。初期化ステップ実行後のコスト
配列Mは図3に示すように初期化される。Then, the array element M [i, 0] in the 0th column
For (0 <i <4), a value obtained by adding a deletion cost 2 to the value of M [i-1, 0] is used. All array elements of array M 'are initialized to zero. The cost array M after the execution of the initialization step is initialized as shown in FIG.
【0021】その後、図1に示す演算ステップが実行さ
れる。この演算ステップは、コスト演算ステップ3と部
分一致演算ステップ4とからなり、図2に示すフローチ
ャートの行及び列制御変数初期化のステップS1 ,行
制御判定ステップS2 ,列制御判定ステップS3 の
各ステップで制御される繰返しの中で配列要素M〔i,
j〕(0<i<4,0<j<6)及び配列要素M’
〔i,j〕(0<i<4,0<j<6)のそれぞれにつ
いて配列の添字の小さい順に値を求めていく。Thereafter, the calculation step shown in FIG. 1 is executed. This calculation step includes a cost calculation step 3 and a partial match calculation step 4. Each step of the row and column control variable initialization step S1, the row control determination step S2, and the column control determination step S3 in the flowchart shown in FIG. Array element M [i,
j] (0 <i <4, 0 <j <6) and array element M ′
For each of [i, j] (0 <i <4, 0 <j <6), values are obtained in ascending order of the array subscript.
【0022】次に、被比較文字列「abcXY」の第i
番目の文字と比較文字列「abc」の第j番目の文字が
等しいか否かが文字比較ステップS4 で判定され、等
しい場合はコスト演算1(ステップS5 )で配列要素
M〔i,j〕に配列要素M〔i−1,j−1〕の値、配
列要素M〔i,j−1〕の値に追加のコスト1を加算し
た値、配列要素M〔i−1,j〕の値に削除のコスト2
を加算した値の3つの値の中の最小値が格納され、さら
に、部分一致演算(ステップS4 )で配列要素M’
〔i,j〕に配列要素M’〔i−1,j−1〕に1を加
算した値が格納される。Next, the i-th character string of the compared character string "abcXY"
It is determined in a character comparison step S4 whether or not the jth character of the comparison character string "abc" is equal to the jth character. If the jth character is equal, the cost operation 1 (step S5) sets the array element M [i, j] The value of the array element M [i-1, j-1], the value obtained by adding an additional cost 1 to the value of the array element M [i, j-1], and the value of the array element M [i-1, j] Removal cost 2
Is stored, and the minimum value among the three values of the array element M ′ is stored in the partial match operation (step S4).
A value obtained by adding 1 to the array element M '[i-1, j-1] is stored in [i, j].
【0023】異なる場合は、コスト演算2(ステップS
6 )で配列要素M〔i,j〕に、配列要素M〔i−
1,j−1〕の値に変更のコスト3を加算した値、配列
要素M〔i,j−1〕の値に追加のコスト1を加算した
値、配列要素M〔i−1,j〕の値に削除のコスト2を
加算した値の3つの値の中の最小値が格納される。If different, cost calculation 2 (step S
6), the array element M [i, j] is added to the array element M [i−
[1, j-1]], the value obtained by adding the change cost 3 to the value of the array element M [i, j-1], and the value obtained by adding the additional cost 1 to the value of the array element M [i-1, j]. Is stored as the minimum value among the three values obtained by adding the deletion cost 2 to the value.
【0024】このようにして、配列要素0の値をそれぞ
れ求めた後のコスト配列Mを図4に、部分一致配列M’
を図5に示す。FIG. 4 shows the cost array M after the values of the array element 0 have been obtained in this manner.
Is shown in FIG.
【0025】図4に示す距離D1が被比較文字列「ab
cYX」と比較文字列「abc」の変換コストであり、
図5に示す一致最大長L1が、被比較文字列と比較文字
列の一致する部分文字列の最大長である。The distance D1 shown in FIG.
cYX ”and the conversion cost of the comparison character string“ abc ”.
The maximum matching length L1 shown in FIG. 5 is the maximum length of the matching partial character string between the compared character string and the compared character string.
【0026】ここで求められた距離D1及び一致最大長
L1をもって文字列の近似度とする。The distance D1 and the maximum matching length L1 obtained here are used as the degree of approximation of the character string.
【0027】[0027]
【発明の効果】以上説明したように、本発明は、文字列
の近似度を判定する際、文字の連続性を考慮したため、
被比較文字列と比較文字列の一致する部分文字列の最大
長を同じに求めることができ、文字列の近似度を、より
正確に判定することができる。As described above, the present invention considers the continuity of characters when determining the degree of approximation of a character string.
The maximum length of the partial character string that matches the compared character string and the comparison character string can be obtained in the same manner, and the degree of approximation of the character string can be determined more accurately.
【図1】本発明にかかる文字列比較方法のフローチャー
トである。FIG. 1 is a flowchart of a character string comparison method according to the present invention.
【図2】図1の演算ステップのフローチャートである。FIG. 2 is a flowchart of a calculation step of FIG. 1;
【図3】図1の初期化ステップ実行後のコスト配列Mを
示した図である。FIG. 3 is a diagram showing a cost array M after execution of an initialization step in FIG. 1;
【図4】図1の演算ステップ実行後のコスト配列Mをを
示した図である。FIG. 4 is a diagram showing a cost array M after execution of the calculation step of FIG. 1;
【図5】図1の演算ステップ実行後の部分一致配列M’
を示した図である。FIG. 5 is a partial coincidence array M ′ after execution of the calculation step of FIG. 1;
FIG.
【図6】従来の文字列比較方法のフローチャートであ
る。FIG. 6 is a flowchart of a conventional character string comparison method.
【図7】図6のコスト配列演算ステップのフローチャー
トである。FIG. 7 is a flowchart of a cost array calculation step in FIG. 6;
【図8】図6の初期化ステップ実行後のコスト配列Mを
示した図である。FIG. 8 is a diagram showing a cost array M after execution of an initialization step in FIG. 6;
【図9】図6の演算ステップ実行後のコスト配列Mを示
した図である。FIG. 9 is a diagram showing a cost array M after execution of the calculation step of FIG. 6;
1 コスト配列初期化ステップ 2 部分一致配列初期化ステップ 3 コスト演算ステップ 4 部分一致演算ステップ 1 Cost array initialization step 2 Partial match array initialization step 3 Cost calculation step 4 Partial match calculation step
フロントページの続き (56)参考文献 特開 昭62−89134(JP,A) 特開 平1−181124(JP,A) 特開 昭60−27938(JP,A) 特開 平2−108157(JP,A) 特開 昭63−233427(JP,A) 特開 平2−232768(JP,A) 特開 平3−100865(JP,A) R.L.Kashyap and B.J.Oommen,”A UNIF IED THEORY FOR ORD ER PRESERVING PROP E RTIES INVOLVING TWO STRINGS”,Proce edings of the 1980 C onference on Info rmation sciences a nd systems pp193−198 (昭和56年8月21日jicst 受入 M.W.Du and S.C.Ch ang,”A model and a fast algorithm fo r multiple errors spelling correctio n”,Acta Informatic a 29,281−302(平成4年7月8日j icst 受入 (58)調査した分野(Int.Cl.6,DB名) G06F 17/30Continuation of the front page (56) References JP-A-62-89134 (JP, A) JP-A-1-181124 (JP, A) JP-A-60-27938 (JP, A) JP-A-2-108157 (JP) JP-A-63-233427 (JP, A) JP-A-2-232768 (JP, A) JP-A-3-100865 (JP, A) L. Kashiap and B.K. J. Ommen, "A UNIF IED THEORY FOR ORDER PRESERVING PROPERTIES INVOLVING TWO STRINGS", Proceedings of the 1980 Conference on Information Services. Du and SC Chang, "A model and a fast algorithm for multiple errors spelling corrections", Acta Informatica 29, 281-28, Acta Informatic, 29, 281-28 (Int.Cl. 6 , DB name) G06F 17/30
Claims (1)
較文字列bの近似度を、文字の追加、削除、変更のそれ
ぞれに対しコストを設定し、行の大きさがm+1、列の
大きさがn+1であるコスト配列Mを用意した後、第0
列目の配列要素M〔i,0〕(0≦i≦m)の値をそれ
ぞれi×削除、のコストとし、配列要素M〔0,j〕
(0≦j≦n)の値をそれぞれj×追加、のコストとす
るコスト配列初期化ステップと、 配列要素M〔i,j〕(0<i≦m,0<j≦n)の値
を配列要素M〔i−1,j−1〕の値に、 被比較文字列aの第i番目の文字と比較文字列bの第j
番目の文字が等しい場合は0、 異なる場合は変更のコストを加算した値、配列要素M
〔i,j−1〕の値に追加のコストを加算した値、配列
要素M〔i−1,j〕の値に削除のコストを加算した
値、の3つの値のうちの最小値となるように順に求めて
いくコスト演算ステップとを有し、このコスト演算ステ
ップによって求められた文字列bを文字列aに変換する
コストを以って文字列aと文字列bの近似度とする文字
列の比較方法において、 さらに、前記コスト配列Mと同じ大きさの部分一致配列
M’を用意し、部分一致配列M’の配列要素全てを0で
初期化する部分一致配列初期化ステップと、 配列要素M’〔i,j〕(0<i≦m,0<j≦n)の
値を被比較文字列aのi番目の文字と比較文字列bのj
番目の文字が等しい場合には配列要素M’〔i−1,j
−1〕の値に1を加算した値とする部分一致演算ステッ
プとを備え、この部分一致演算ステップによって求めら
れた部分一致の最大長を、文字列bを文字列aに変換す
るコストと併せ、文字列の近似度とすることを特徴とす
る文字列比較方法。1. A degree of approximation between a compared character string a having a length m and a comparison character string b having a length n is set to a cost for each of addition, deletion, and change of a character. After preparing a cost array M with m + 1 and a column size of n + 1,
The value of the array element M [i, 0] (0 ≦ i ≦ m) in the column is the cost of i × deletion, and the array element M [0, j]
A cost array initialization step in which the value of (0 ≦ j ≦ n) is added by j ×, and the value of an array element M [i, j] (0 <i ≦ m, 0 <j ≦ n) The value of the array element M [i-1, j-1] is added to the i-th character of the compared character string a and the j-th character of the compared character string b.
0 if the 2nd character is equal, otherwise the sum of the costs of change, array element M
It is the minimum value of three values: a value obtained by adding an additional cost to the value of [i, j-1], and a value obtained by adding a deletion cost to the value of the array element M [i-1, j]. And a cost calculation step of sequentially calculating the character string b obtained by the cost calculation step and converting the character string b into the character string a by using the character string a and the character string b as an approximation degree. In the column comparison method, further, a partial matching array M ′ having the same size as the cost array M is prepared, and all array elements of the partial matching array M ′ are initialized to 0. The value of element M ′ [i, j] (0 <i ≦ m, 0 <j ≦ n) is calculated by comparing the i-th character of the compared character string a with the j-th character of the compared character string b.
If the second character is equal, the array element M '[i-1, j
-1], which is a value obtained by adding 1 to the value of [-1]. The maximum length of the partial match obtained in the partial match calculation step is combined with the cost of converting the character string b into the character string a. A character string comparison method, wherein the degree of approximation of the character string is used.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4230516A JP2820183B2 (en) | 1992-08-28 | 1992-08-28 | String comparison method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4230516A JP2820183B2 (en) | 1992-08-28 | 1992-08-28 | String comparison method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0683871A JPH0683871A (en) | 1994-03-25 |
| JP2820183B2 true JP2820183B2 (en) | 1998-11-05 |
Family
ID=16908977
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP4230516A Expired - Fee Related JP2820183B2 (en) | 1992-08-28 | 1992-08-28 | String comparison method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2820183B2 (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3275816B2 (en) | 1998-01-14 | 2002-04-22 | 日本電気株式会社 | Symbol string search method, symbol string search device, and recording medium recording symbol string search program |
| JP4872079B2 (en) | 2006-05-19 | 2012-02-08 | 国立大学法人長岡技術科学大学 | Sentence update amount evaluation program |
| JP2011248622A (en) * | 2010-05-27 | 2011-12-08 | Hitachi Ltd | Similar model searching system and work instruction reuse system |
| JP6348787B2 (en) * | 2014-07-02 | 2018-06-27 | 株式会社日立ソリューションズ東日本 | Data processing apparatus and data processing method |
-
1992
- 1992-08-28 JP JP4230516A patent/JP2820183B2/en not_active Expired - Fee Related
Non-Patent Citations (2)
| Title |
|---|
| M.W.Du and S.C.Chang,"A model and a fast algorithm for multiple errors spelling correction",Acta Informatica 29,281−302(平成4年7月8日jicst 受入 |
| R.L.Kashyap and B.J.Oommen,"A UNIFIED THEORY FOR ORDER PRESERVING PROPE RTIES INVOLVING TWO STRINGS",Proceedings of the 1980 Conference on Info rmation sciences and systems pp193−198(昭和56年8月21日jicst 受入 |
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0683871A (en) | 1994-03-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Mehta et al. | ALGORITHM 643: FEXACT: a FORTRAN subroutine for Fisher's exact test on unordered r× c contingency tables | |
| JP2832988B2 (en) | Data retrieval system | |
| JPH08255176A (en) | Method and system for comparison of table of database | |
| JP2820183B2 (en) | String comparison method | |
| CN116130001A (en) | Third-generation sequence comparison algorithm based on k-mer positioning | |
| US7689543B2 (en) | Search engine providing match and alternative answers using cumulative probability values | |
| JPH10232877A (en) | String collator and database system | |
| CN113449076A (en) | Code searching and embedding method and device based on global information and local information | |
| JP2824741B2 (en) | ATM cell detector | |
| CN118674049A (en) | Large model reasoning method and device based on decoding structure | |
| JP3080066B2 (en) | Character recognition device, method and storage medium | |
| JPH05257982A (en) | Character string recognizing method | |
| JP2951486B2 (en) | Kanji conversion device | |
| JP3071745B2 (en) | Post-processing method of character recognition result | |
| JP3264961B2 (en) | Character recognition device | |
| JPH07182358A (en) | Database access processing method | |
| JPH05274482A (en) | Postprocessing method for character recognition of number string mixed document | |
| Runciman | FUNCTIONAL PEARL Lazy wheel sieves and spirals of primes | |
| JP2001117929A (en) | Data search method, data alignment method, and data search device | |
| JP3386147B2 (en) | Roman character converter | |
| JP2835065B2 (en) | String search method | |
| JP2847985B2 (en) | Kana-Kanji conversion system for phrase segmentation learning information retrieval | |
| JPH0612539B2 (en) | Kanji / Kana conversion device | |
| JPH07121665A (en) | Compiling method and retrieving method for character recognition dictionary | |
| JPH0765018A (en) | Keyword extraction device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 19980729 |
|
| LAPS | Cancellation because of no payment of annual fees |