ushahidi / geograpy

Extract countries, regions and cities from a URL or text
220 stars 132 forks source link

All examples return empty result #18

Open PokerChang opened 7 years ago

PokerChang commented 7 years ago
import geograpy
from geograpy import places
from pprint import pprint

# address = geograpy.get_place_context(text='United States')
# pprint (vars(address))
from geograpy import extraction

e = extraction.Extractor(url='http://www.bbc.com/news/world-europe-26919928')
e.find_entities()

# You can now access all of the places found by the Extractor
pprint (e.places)
pprint (vars(e.places))

Results:

{'address_strings': [],
 'cities': [],
 'city_mentions': [],
 'conn': <sqlite3.Connection object at 0x110769858>,
 'countries': [],
 'country_cities': {},
 'country_mentions': [],
 'country_regions': {},
 'other': [],
 'places': [],
 'region_mentions': [],
 'regions': []}
[]
iShekhar commented 7 years ago

Good for nothing after installing so many libraries and downgrading python from 3.6 to 2.7

MrJarnould commented 7 years ago

Same here :(

WolfgangFahl commented 4 years ago

you might want to use the more recent https://github.com/somnathrakshit/geograpy3