
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
geotext
Advanced tools
.. image:: https://img.shields.io/pypi/v/geotext.svg :target: https://pypi.python.org/pypi/geotext
.. image:: https://img.shields.io/pypi/pyversions/geotext.svg :target: https://pypi.python.org/pypi/geotext
.. image:: https://travis-ci.org/elyase/geotext.png?branch=master :target: https://travis-ci.org/elyase/geotext
Geotext extracts country and city mentions from text
.. code-block:: python
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)])
.. code-block:: bash
pip install https://github.com/elyase/geotext/archive/master.zip
geography <https://github.com/ushahidi/geograpy>_: 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.
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) ++++++++++++++++++
FAQs
Geotext extracts countriy and city mentions from text
We found that geotext demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.