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
122 stars 12 forks source link

Update Database #32

Closed am2222 closed 3 years ago

am2222 commented 3 years ago

Hi, I was thinking to the ways to update the csv database or even use some other datasources like osm names and etc. Is there any way to modify the datasource which is used in this library? I know it reads data from csv files, but what is the standard for making those CSV files? thanks

WolfgangFahl commented 3 years ago

@am2222 thank you for your question. The default lookup database is created by a SPARQL query on Wikidata. See https://github.com/somnathrakshit/geograpy3/blob/master/geograpy/wikidata.py. The result is cached in a SQLite database that is downloaded. If you'd like to have a more configurable solution just let us know via a specific issue.