I'm looking for a way to call a web service to check for obvious misspellings in names of culturally significant people:
Aberaham Lincoln
Margaret Tatcher
John Lennin
Ideally a JSON-based service that I coul开发者_如何学Cd make a jQuery.getJSON()
call to.
Is there such a thing?
Not aware of such a service, but would seem doable with open source components. For the beef, would need list of names to compare against, then some distance calculation algorithm -- even simple Levenstein algo (which I am sure is available on almost any language) should work -- and that's about it. So; first check that name is not on the list (in-memory hash); and if so, check if distance to one of known names is small (enough), indicate that. Or possible just return list of closest match(es) with score of similarity.
精彩评论