Is this possible, like the wikidata autocomplete combo works, in a speedy way, with a filter of "itemlabel strings start with..." ?

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT ?item ?itemLabel ?fecha_de_nacimiento  WHERE {

  ?item wdt:P31 wd:Q5.
  ?item schema:dateModified ?modified
  SERVICE wikibase:label { bd:serviceParam wikibase:language "es,en,it,fr,de,cs,[AUTO_LANGUAGE]". }
  OPTIONAL { ?item wdt:P569 ?fecha_de_nacimiento. }

  FILTER(?fecha_de_nacimiento > "1900-01-01T00:00:00Z"^^xsd:dateTime)

}
LIMIT 100
up vote 3 down vote accepted

I suppose the problem is not that you're not familiar with STRSTARTS, but rather performance.


This page contains some introductory remarks.

Search in multiple languages

If you really want to search in multiple languages, then, I'm afraid, the only option is to use wikidata.dbpedia.org as described in this answer on Stack Overflow.

Search in single language

If you want to search in a single language (according to your own question on Stack Overflow ), you can use Suggest API or call Mediawiki API from SPARQL.

Update

The Wikibase Mediawiki API extension allows to use some special keywords on Wikidata, e. g. haswbstatement:P31=Q5.

  • Thanks. Actually Im looking for: github.com/maxlath/wikidata-filter/blob/master/docs/… and get these information in an elasticsearch on my own side. But option 1 has some interesting information – Leandro Tupone Mar 10 at 14:57
  • 1
    @LeandroTupone, I'm not sure I understand what you are looking for. Are you looking for local solution? Then probably you just need to enable full-text index in Blazegraph. – Stanislav Kralin Mar 10 at 16:01
  • Not actually, but I found this query is really impossible to make work with sparql and with mediawiki api. I was trying with dbpedia without success and now im reading suggest api. – Leandro Tupone Mar 10 at 16:09
  • im getting close with: tools.wmflabs.org/openrefine-wikidata/en/api?query={%22query%22:%22arturo%22,%22type%22:%22Q5%22} – Leandro Tupone Mar 10 at 16:15

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.