Link to home
Start Free TrialLog in
Avatar of jeaney
jeaney

asked on

Comparing String

Hi all

I need to write some code to get a probability that two strings are matching. A bit of fuzzy logic needed here. Can anyone give me some tips on the best way to do this. I do not want to use a simple compareTo(string) as this will only compare the strings lexicographically. Need to have a probabilistic result. E.g. probability that "Joe E. Bloggs" equals "Joseph Edward Bloggs" or "Joe Bloggs" or "Joe Bloggs Bloggs".

Did consider getting bit distance between the two??? Whats the best approach? Advice is greatly appreciated! (Java)

ASKER CERTIFIED SOLUTION
Avatar of aozarov
aozarov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jeaney
jeaney

ASKER

Hi All

Thanks for your comments. FYI, I have used the Levenshtein distance between two strings to compare them. It is similar to the Hamming distance (number of different chars) but it allows comparison between strings of arbitrary length.

See: http://www-igm.univ-mlv.fr/~lecroq/seqcomp/node2.html

and: http://www.merriampark.com/ld.htm

J :)
Avatar of jeaney

ASKER

Lowering points and splitting equally. Thanks for your input.
OK
;JOOP!