Git Product home page Git Product logo

geotext's Introduction

geotext

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.

geotext's People

Contributors

elyase avatar iamnottheway avatar joseluizcoe avatar

Watchers

James Cloos avatar khaled Al Refai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.