Questions tagged [geograpy]

For question about geograpy - a python library that extracts place names from a URL or text, and adds context to those names: for example, distinguishing between a country, region or city.

see also https://stackoverflow.com/questions/tagged/geotext for an alternative python library

Links

pypi

20 questions
9
votes
3 answers

"NotImplementedError: Use label() to access a node label"

I need to extract all the city names from a website. I've used beautifulSoup with RE in previous projects but on this website the city names are part of regular text and do not have a specific format. I found geograpy package…
Faisal
  • 447
  • 2
  • 6
  • 15
4
votes
1 answer

Unable to extract countries/cities name from text file using geograpy

I am trying to extract countries/cities name from text file using geograpy (https://pypi.python.org/pypi/geograpy/0.3.7), but It's returning a empty list. My code is: import geograpy text = 'I am from Delhi' places =…
neha
  • 335
  • 3
  • 5
  • 19
3
votes
1 answer

How to normalize location names in Python?

I am working on a dataset of user comments in which they mention locations. I am using nltk (StanfordNERTagger) and spacy to pull out the locations. The problem is that they are in many different forms. Ex: (nyc vs New York City, ga vs Georgia,…
Big_Mac
  • 2,975
  • 4
  • 20
  • 36
3
votes
1 answer

Geograpy3 library is not working properly and give traceback error

I just try to extract location from a text using the geograpy3 library. But it throws an error. for content in feedContent: if content != "": place = geograpy.get_place_context(text=content) placesInFeed.append(place.places) …
2
votes
2 answers

Installing geograpy3 on windows

I cannot manage to get the geograpy3 module running in my PC because I could not successfully install it as detailed in the "Install & Setup" section of the project description website (https://pypi.org/project/geograpy3/) I am guessing the problem…
Emilia
  • 21
  • 1
2
votes
3 answers

geograpy3 library for extracting the locations in the text, gives UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 276

I am trying to extract location from the text using the geography3 library in python. import geograpy address = 'Jersey City New Jersey 07306' places = geograpy.get_place_context(text = address) To which i get the below error UnicodeDecodeError: …
2
votes
3 answers

Python Geograpy is not finding Cities In USA

I'm trying to find Countries/Cities on the webpage. So I used Geograpy. but it is Not working properly. Note: given website contains All the States in United States Website = http://state.1keydata.com/ import…
1
vote
1 answer

How to separate a set of geographical regions to multiple groups that are similar to each other but also maintains geographic contiguity?

I have recently attempted to do a regionalization analysis with a group of geographic regions, each contains multiple attributes (A1, A2, A3, ...). The goal is not like a regular regionalization problem (such as K-means) in which you define groups…
1
vote
1 answer

geograpy3: sqlite3.OperationalError: no such table

I would like to use the geograpy3 package for a city & country mapping of string values, related to locations (like 'Roma, Italy' or just 'Timișoara'). It runs on my venv under OpenSuse 15.3. Unfortunately, I can't get along with the SQLite DB. My…
axle
  • 11
  • 1
1
vote
1 answer

Geograpy - two sentences with same province name return different results

May anyone help me to explain the reason of these two text with same information but geograpy3 can only detect province name in 1 sentence? a = geograpy.get_geoPlace_context(text='I live in Gauteng South Africa') a.other --> ['Gauteng'] b =…
Cassie
  • 33
  • 4
1
vote
1 answer

Unable to extract country name 'UK' from text using geograpy

I am trying to extract the UK as a country name from text file using geograpy, but It's returning an empty list. My code is: import geograpy text = 'I am from the UK' places = geograpy.get_place_context(text=text) print…
perde
  • 35
  • 4
1
vote
1 answer

Problem retrieving region in US with geograpy3

Using geograpy3 (https://pypi.org/project/geograpy3/): > import geograpy > text = "Welcome to beautiful Seattle" > p = geograpy.get_geoPlace_context(text=text) > p.cities ['Seattle'] > p.countries ['United States'] > p.regions [] Is there a package…
Matt Simmons
  • 678
  • 1
  • 8
  • 13
1
vote
1 answer

obtain confidence/distance on country extracted by geograpy3

I tried a simple demo to check if geograpy can do what i'm looking for: trying to find the country name and iso code in denormalized addresses (which is basically what geograpy is written for!). The problem is that, in the test i made, geograpy is…
blkid
  • 21
  • 6
1
vote
1 answer

Getting wrong results for country names using geograpy3

I tried running the example code as given in the readme file for geograpy3. However, I am getting answers like this. What can be done about it?
Somnath Rakshit
  • 555
  • 1
  • 6
  • 17
1
vote
1 answer

Extracting country information from description using geograpy

PROBLEM: I want to extract country information from a user description. So far, I'm giving a try with the geograpy package. I like the behavior when the input is not very clear for example in Evesham or Rochdale, however, the package interprets some…
Tito Sanz
  • 1,280
  • 1
  • 16
  • 33
1
2