954,506 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Distance between words

Hi,

There are certain spell-correcting features in search engines like google...

What I want to do is this: If the word entered by the user doesn't match with any of the words in the databases, the program should try to find the word in the database that is closest to the input. How should I calculate the similarity between any two words?

I'm sure there'll be standard algorithms for it... But I don't know the exact names of any of them. Please post the names of the algorithms by which the above task can be accomplished.

Jishnu.

Jishnu
Posting Pro
518 posts since Oct 2006
Reputation Points: 193
Solved Threads: 25
 

> How should I calculate the similarity between any two words?
The Levenshtein distance algorithm is a good place to start.

Radical Edward
Posting Pro
545 posts since May 2008
Reputation Points: 361
Solved Threads: 97
 

Thank you Ed. The link you gave was very helpful :)

Jishnu
Posting Pro
518 posts since Oct 2006
Reputation Points: 193
Solved Threads: 25
 

Stemming is another algorithm I found to be of interest for similiar purposes.

Jishnu
Posting Pro
518 posts since Oct 2006
Reputation Points: 193
Solved Threads: 25
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You