Code Monkey home page Code Monkey logo

Comments (11)

cordovapolymer avatar cordovapolymer commented on May 27, 2024

It would be great to have this feature!

from gazetteer.

kiselev-dv avatar kiselev-dv commented on May 27, 2024

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.

from gazetteer.

d1g avatar d1g commented on May 27, 2024

to have local dump of wikidata

@kiselev-dv

a SPARQL query to fetch labels

44791 Results in 452 ms thanks to WDQS

from gazetteer.

kiselev-dv avatar kiselev-dv commented on May 27, 2024

@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.

from gazetteer.

d1g avatar d1g commented on May 27, 2024

@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?

from gazetteer.

kiselev-dv avatar kiselev-dv commented on May 27, 2024

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 

from gazetteer.

d1g avatar d1g commented on May 27, 2024

from gazetteer.

kiselev-dv avatar kiselev-dv commented on May 27, 2024

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

from gazetteer.

d1g avatar d1g commented on May 27, 2024

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

from gazetteer.

d1g avatar d1g commented on May 27, 2024

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

from gazetteer.

kiselev-dv avatar kiselev-dv commented on May 27, 2024

from gazetteer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.