Skip to main content

Geotext extracts country and city mentions from text

Project description

https://travis-ci.org/elyase/geotext.png?branch=master https://pypip.in/d/geotext/badge.png

Geotext extracts country and city mentions from text

Usage

from geotext import GeoText

places = GeoText("London is a great city")
places.cities
# "London"

GeoText('New York, Texas, and also China').country_mentions
# OrderedDict([(u'US', 2), (u'CN', 1)])

Features

  • No external dependencies

  • Fast

  • Data from http://www.geonames.org licensed under the Creative Commons Attribution 3.0 License.

Similar projects

geography: geography is more advanced and bigger in scope compared to geotext and can do everything geotext does. On the other hand geotext is leaner: has no external dependencies, is faster (re vs nltk) and also depends on libraries and data covered with more permissive licenses.

History

0.1.0 (2014-01-11)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geotext-0.1.0.tar.gz (2.0 MB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page