Skip to content

fatihsucu/locationExtractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors