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

[BUG]Country by name disambiguation #19

Closed WolfgangFahl closed 4 years ago

WolfgangFahl commented 4 years ago

examples for wrong location lookups:

San Juan, Puerto Rico -> San Juan (J(San Juan) - AR(Argentina))
Puebla, Mexico -> Mexico (MO(Missouri) - US(United States))
Newcastle, UK  -> Newcastle (NSW(New South Wales) - AU(Australia))
WolfgangFahl commented 4 years ago

https://www.wikidata.org/wiki/Q79923 Puebla is a region! UK is an alias for ISO code GB https://www.wikidata.org/wiki/Q1183 Puerto Rico is an unincorporated territory of the U.S.

select * from regions 
where regionLabel="Puerto Rico"
country countryLabel    countryIsoCode  region  regionIsoCode   regionLabel regionPopulation    location
http://www.wikidata.org/entity/Q30  United States of America    US  http://www.wikidata.org/entity/Q1183    US-PR   Puerto Rico 3615086.0   Point(-66.5 18.25)