Skip to main content

Geotext extracts countriy 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.2.0 (2017-07-01)

  • Python 3 support (credit to @freezer9)

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.2.0.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geotext-0.2.0-py2.py3-none-any.whl (2.0 MB view details)

Uploaded Python 2Python 3

File details

Details for the file geotext-0.2.0.tar.gz.

File metadata

  • Download URL: geotext-0.2.0.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for geotext-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3fca4850cdeaf476bd827e3f7cddc2198b7b0e1ba2156975a381d5960f6a2cce
MD5 63fc037f03db08b1a1801075ab203800
BLAKE2b-256 9b6b0d17a1af3ad77182465a1bdad911b669e9c4f4ca5a5ed035f90ad51bbc4e

See more details on using hashes here.

File details

Details for the file geotext-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for geotext-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bc2c12ceee72bf22558359102abb0345cc043675157ab7448912ae93b672c969
MD5 ea9aed81b3365ea61580878afd26455f
BLAKE2b-256 9d96e026d0a46c515c05df6ea4827571b4f316d4d169a61a866c6cf106213e5d

See more details on using hashes here.

Supported by

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