I am planning to do some data tuning on my data.
Situation-I have a data which has a field country
. It contains user input country names( It might contain spelling mistakes or different country names for same country like US/U.S.A/United States for USA). I have a list of correct country names.
What I want- To predict which closest country it is referring to. For example- If U.S.
is given then it will change to USA
(correct country name in our list).
Is there any way I can do it using Java or opennlp or any other method?
Common Themes. There's a fascinating trend in country names – countries are almost always named after one of four things: a directional description of the country, a feature of the land, a tribe name or an important person, usually male.
You can use Getty API . It will give you abbreviations of country name. Just play on this API.
OR
You can also use Levenshtein Distance to get most closest country name.
Try this out. Will help you.
You can try Google's auto complete location api to your text box or select. if you will use this api then you will get google like auto complete intellisence while typing. visit link
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