somnathrakshit / geograpy3

Extract place names from a URL or text, and add context to those names -- for example distinguishing between a country, region or city.
https://geograpy3.readthedocs.io
Apache License 2.0
124 stars 12 forks source link

API for lookup #52

Open WolfgangFahl opened 3 years ago

WolfgangFahl commented 3 years ago

Given a set of 1 to 3 (maybe 4) words return a map/dict of tuples with city,region and country information (each with label and Wikidata-Q ID) and the probability of matching (ordering is good enough for a start). For the time being the probability may be calculated by the population later we'll use the probability distribution of conference corpus entries that have been successfully matched.

Comparison of population is done on the "lowest" level. E.g. Athens, Greece is preferred to Athens, Georgia, USA since Athens, Greece has a pop of 600 thousand while Athens Georgia population is 5 times lower.