I have a bunch of words (mostly locations, like Stockholm and London) and a bunch of strings. like "I want to go from stockholm to london". I want to find out what words are in what strings.
I currently use .indexOf to perform this task.
Is there a library, method, function etc, in javascript that identifies misspelled versions of words?
https://github.com/epeli/underscore.string#readme
Check out the levenshtein _.levenshtein(string1, string2)
distance function. It can be used to calculate the distance between too strings.
I found this JS library http://www.javascriptspellcheck.com/ that is supposed to check spelling in several languages
After reading the above I'm not sure if I'm exactly clear on what you are trying to do... but regarding your final question about identifying words which are incorrectly spelled -- I'd take a look at java script spell check. And as a side note.. Often people try and use soundex when they want to count words which are spelled both correctly and incorrectly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With