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:

http://tinyurl.com/yahwql2n

"""
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/",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
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Wikidata mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata

Reply via email to