3

How could I extract a location from a string like San Francisco 49ers and get San Francisco from it? The only way I can is by training a neural-network, but training with every city, state, country, location is expensive isn't it? Wouldn't it be?

Is there another way to approach this?

1
  • I'm voting to close this question as off-topic because it is about choosing the software library, not about the NLP algorithms.
    – bytebuster
    Jun 17 '15 at 18:26
3

You can parse the string with a regular expression. You can use the Google Geocoding API to enter a location like San Francisco and get data related to that location, like latitude, longitude, etc.

Yes, building your own geolocation service would be very costly - let Google's API do the work for you!

1
  • I forgot that I am already using the geocoding api! Thank you. I'll see if it works!
    – wordSmith
    Jun 17 '15 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.