locationExtractor

Searches location info from source. Tokenizes source and finds appropriate country


License
MIT
Install
pip install locationExtractor==0.1.2.3

Documentation

Location Extractor

This module extracts country from states in text content. It requires pycountry for analysis.

##Examples:

from locationExtractor import locationExtractor

print locationExtractor.detect("I live in New York")
>>> {'city': 'new york', 'code': u'US', 'country': u'United States'}
 
 
print locationExtractor.detect("ankara")
>>> {'city': 'ankara', 'code': u'TR', 'country': u'Turkey'}

If you want to change memcache host;

locationExtractor.Locations.memcacheHost = "Your Host"

But when you did this changes for memcachehost, You must init manually for this condition.

locationEXtractor.Location.init()