If one knows the Q code (or URI) for an entity on Wikidata, how can one find the Dbpedia Id and the information linked to it? Thank you.
Sent from my iPad
DBpedia contains these links. You can use the DBpedia SPARQL endpoint to get the DBpedia URI with a simple query.
SELECT ?s { ?s owl:sameAs http://www.wikidata.org/entity/Q465 } [1]
[1] http://dbpedia.org/sparql?default-graph-uri=http%3A%2F%2Fdbpedia.org&que...
Am 23.04.2018 um 06:41 schrieb PWN pariswritersnews@gmail.com:
If one knows the Q code (or URI) for an entity on Wikidata, how can one find the Dbpedia Id and the information linked to it? Thank you.
Sent from my iPad _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Hi,
(English) DBpedia URIs are basically just (English) Wikipedia URIs with the first part exchanged. So one can compute them from the names of the articles. Example: a query for DBpedia URIs for all countries:
""" SELECT ?dbpediaId WHERE { ?item wdt:P31 wd:Q6256 . # for the example: get IDs for all countries ?sitelink schema:about ?item ; schema:isPartOf https://en.wikipedia.org/ .
BIND(URI(CONCAT("http://dbpedia.org/resource/%22,SUBSTR(STR(?sitelink),31))) as ?dbpediaId) } """
Of course, depending on your use case, you can do the same offline (without requiring SPARQL to rewrite the id strings for you).
In theory, one could use federation to pull in data from the DBpedia endpoint, but in practice I could not find an interesting query that completes within the timeout (but I did not try for very long to debug this).
Best regards,
Markus
On 23/04/18 06:41, PWN wrote:
If one knows the Q code (or URI) for an entity on Wikidata, how can one find the Dbpedia Id and the information linked to it? Thank you.
Sent from my iPad _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Hi Paris Writers' News/PWN, Markus, and Wikidatans,
Based on your example (http://tinyurl.com/yahwql2n), Markus, I'm seeking to learn how to do a similar query for all languages.
In Wikidata I found a Q item # for "language" - Q34770 ( https://www.wikidata.org/wiki/Q34770) - and plugged this into your query, replaced the word "countries" with "languages," etc. but didn't get a result, where your query yields 209 countries, Markus.
In a parallel way, how would one compute them from the names of the articles in Wikipedia?
Thanks, Scott
On Fri, Apr 27, 2018 at 2:31 PM, Markus Kroetzsch < markus.kroetzsch@tu-dresden.de> wrote:
Hi,
(English) DBpedia URIs are basically just (English) Wikipedia URIs with the first part exchanged. So one can compute them from the names of the articles. Example: a query for DBpedia URIs for all countries:
""" SELECT ?dbpediaId WHERE { ?item wdt:P31 wd:Q6256 . # for the example: get IDs for all countries ?sitelink schema:about ?item ; schema:isPartOf https://en.wikipedia.org/ .
BIND(URI(CONCAT("http://dbpedia.org/resource/%22,SUBSTR(STR(?sitelink),31))) as ?dbpediaId) } """
Of course, depending on your use case, you can do the same offline (without requiring SPARQL to rewrite the id strings for you).
In theory, one could use federation to pull in data from the DBpedia endpoint, but in practice I could not find an interesting query that completes within the timeout (but I did not try for very long to debug this).
Best regards,
Markus
On 23/04/18 06:41, PWN wrote:
If one knows the Q code (or URI) for an entity on Wikidata, how can one find the Dbpedia Id and the information linked to it? Thank you.
Sent from my iPad _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Hi PWN,
On 23.04.2018 06:41, PWN wrote:
If one knows the Q code (or URI) for an entity on Wikidata, how can one find the Dbpedia Id and the information linked to it? Thank you.
sorry to come late to this. You can find the new dataset here that kind of clusters all DBpedia URIs and the Wikidata ID around the new DBpedia Identifiers:
http://downloads.dbpedia.org/databus/global/persistence-core/cluster-iri-pro...
There is also a version with some external datasets: http://downloads.dbpedia.org/databus/global/persistence-all/cluster-iri-prov...
Both are not complete yet, but will soon be.
All the best, Sebastian
Sent from my iPad _______________________________________________ Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata