0

i am new to android development,so dint get me wrong. I am developing an application in which a text is generated.which is normally a word. The word is checked in a database for is corresponding value pair. Here the word is the key and its corresponding value is the value . Since the text is auto generated it sometimes goes wrong(mis spelled). How do i perform a check of auto generated word to match with the mostly matched letters in the database of key word.

example: auto-generated word(key) - value americ: america : a country Here the auto generatd word is americ(key) is not matched since it only contains america in its pair set.it need to be corrected as america.

raj
  • 13
  • 4

1 Answers1

0

You are probably using SQLite. Your best bet is soundex, which is desribed here.

Soundex has many shortcomings, but it might get you started. If you want a real measure, then go with Levenshtein distance, which is not built into the database (as far as I know).

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786