Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Использовать названия из Wikidata для wikipedia-затегированных объектов #43

Open
d1g opened this issue Jun 9, 2016 · 11 comments

Comments

@d1g
Copy link

d1g commented Jun 9, 2016

Раз в OSM не обозначается old_name, alt_name, то хоть при геокодинге должно учитываться:
http://www.openstreetmap.org/relation/337422

  • Питер
  • Петербург
  • СПб
  • etc

https://www.wikidata.org/wiki/Q656

@cordovapolymer
Copy link

It would be great to have this feature!

@kiselev-dv
Copy link
Owner

To have that data in gazetteer out, I have to have local dump of wikidata, If I'll query wikidata duiring data processing it will take forever to generate data. So I'll probabbly implement that, if it's possible to get wikidata subset.

@d1g
Copy link
Author

d1g commented Mar 8, 2017

to have local dump of wikidata

@kiselev-dv

a SPARQL query to fetch labels

44791 Results in 452 ms thanks to WDQS

@kiselev-dv
Copy link
Owner

kiselev-dv commented Mar 8, 2017

@d1g, cool, few more things:

  1. How to get language code for label?
  2. How to get type-codes? wikidata as I think could be binded not only to localities but also to streets and boundaries.

As an option, I can get a full list of wikidata identifiers during first pass and make a batch query to download all the wikidata in few calls to API, and join that data later, but it's easier and faster to have that data downloaded before gazetteer run.

@d1g
Copy link
Author

d1g commented Mar 8, 2017

@kiselev-dv

  1. simply add a (LANG(?l) as ?lang) after ?l
  2. I'm not exactly sure what codes do you mean. Could you please give an example for SPB or other item?

@kiselev-dv
Copy link
Owner

Here is the code for cities:

 ?item wdt:P31 wd:Q515; # cities

How could i get something like:

?item wdt:P31 wd:Q515; # cities
or ?item wdt:P31 wd:Q123; # states
or ?item wdt:P31 wd:Q1234; # streets 

@d1g
Copy link
Author

d1g commented Mar 8, 2017

@kiselev-dv
Copy link
Owner

Heh, that's what I've been afraid of. Are there any analogs of rdbs joins and subqueries or recursive queries in wikidata?

@d1g
Copy link
Author

d1g commented Mar 8, 2017

I prefer to load data using SPARQL, but perform really complex precessing using regular tools e.g. Python

@d1g
Copy link
Author

d1g commented Mar 8, 2017

@kiselev-dv, it is possible to fetch any division using Q10864048 item: 3623 Results in 6046 ms

@kiselev-dv
Copy link
Owner

kiselev-dv commented Mar 8, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants