12-05-2023, 06:04 PM
(This post was last modified: 12-05-2023, 06:32 PM by Mark Knowles.)
I am not sure if Gestalt pattern matching or Ratcliff/Obershelp Similarity would be a better measure of similarity/difference of two string than Levenshtein distance for my purposes.
I think the longest common sequence of letters is significant. So:
abcdefgh
And
adcfgeeh
have the long common sequence as
adfgh
Or
acfgh
(there is also aeh)
So the length of the longest common sequence is 5.
This number alone might be a better measure than the Levenshtein distance.
Although one may want to compensate for string length. The longer the two strings that we are comparing the longer the common sequence. So maybe one should divide this figure by the length of the shorter string.
I think this is called the longest common subsequence (LCS).
I think the longest common sequence of letters is significant. So:
abcdefgh
And
adcfgeeh
have the long common sequence as
adfgh
Or
acfgh
(there is also aeh)
So the length of the longest common sequence is 5.
This number alone might be a better measure than the Levenshtein distance.
Although one may want to compensate for string length. The longer the two strings that we are comparing the longer the common sequence. So maybe one should divide this figure by the length of the shorter string.
I think this is called the longest common subsequence (LCS).

