in reply to Re^6: Fuzzy Searching:Alg.Sel. (Why tries won't work for this application.)(Sigh)
in thread Fuzzy Searching: Optimizing Algorithm Selection
...the list you built meant my code was trying to match all _4_ digit fuzzy strings, and not the _2_ digits we were originally discussing...
01234567890 AAAAAAAAAA AAAAAAAAAAA ========== Offset 0 -- 0 mismatches. 01234567890 AAAAAAAAAA AAAAAAAAAAA ========== Offset 1 -- 0 mismatches. 01234567890 CCAAAAAAAA AAAAAAAAAAA xx======== Offset 0 -- 2 mismatches. 12345678901 CCAAAAAAAA AAAAAAAAAAA xx======== Offset 1 -- 2 mismatches. ## 806 other 2-mismatch matches your code fails to find 12345678901 AAAAAAAATT AAAAAAAAAAA ========xx Offset 0 -- 2 mismatches. 12345678901 AAAAAAAATT AAAAAAAAAAA ========xx Offset 1 -- 2 mismatches.
QED. 2 not 4.
Perhaps you should try this
Update: And don't you realise that the list of 4 character mismatches would include all of the 2-char mismatches? And the 1-char mismatches? And the 3-char mismatches? And you code found what? Just TWO exact matches...pull the other one.
|
|---|