Skip to main content

geotext

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"

# filter by country code
result = geotext.GeoText('I loved Rio de Janeiro and Havana', 'BR').cities
# 'Rio de Janeiro'

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

Installation

pip install https://github.com/elyase/geotext/archive/master.zip

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.4.0 (2018-07-30)

Fix unicode errors

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.

Metadata

Release files for geotext 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geotext 0.4.0
File Size Uploaded Provenance Actions
geotext-0.4.0.tar.gz 2.0 MB Without provenance Details for geotext-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for geotext 0.4.0
File Interpreter ABI Platform Actions
geotext-0.4.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for geotext-0.4.0-py2.py3-none-any.whl

Total release size: 3.9 MB

Release files / geotext-0.4.0.tar.gz

Download URL geotext-0.4.0.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
0ba5aa03db8246a8f77f9a334e79bc1f5875b38fd63589f0be4c83c1d94c52fd
BLAKE2b-256 checksum
How to use checksums
6d3e25ecf87381f0f042a528714fa0a12987d8d5842e35b2ceb212c2119aa877
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.3

Release files / geotext-0.4.0-py2.py3-none-any.whl

Download URL geotext-0.4.0-py2.py3-none-any.whl
Size 2.0 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
afc17c170337195b0fc9990ff2dec822bb4eb548c0541f5b7c853ff06ae164dc
BLAKE2b-256 checksum
How to use checksums
25c536351193092cb4c1d7002d2a3babe5e72ae377868473933d6f63b41e5454
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.3

Security for geotext 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page