Skip to main content

Geotext extracts countriy and city mentions from text

Project description

https://img.shields.io/pypi/v/geotext.svg https://img.shields.io/pypi/pyversions/geotext.svg https://travis-ci.org/elyase/geotext.png?branch=master

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.3.0 (2017-12-03)

Support for Brazilian cities (credit to @joseluizcoe)

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.3.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.3.0-py2.py3-none-any.whl (2.0 MB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for geotext-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3f7ca079d052ac9861354cfa9d72fe8aaa98025b440bc45baa47c862198aa25f
MD5 a185dbcbef5ff88a704c120ea6937812
BLAKE2b-256 61f1b5b42591156f5fb96d16f06ae27def6bfca87498ad41214d6c608770a8a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for geotext-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 af285de90fcdd2533617116af0f89aca0acda2995a16d49471fcd4caf349843f
MD5 e34c6209b752d83665fbc7fa273e0735
BLAKE2b-256 51e4c60f33edd6d5938758feeda7e52b524263d138c6e264bd04e80c63756f2c

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