<div dir="ltr"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Hi Paris Writers' News/PWN, Markus, and Wikidatans, </span><div><br></div><div>Based on your example (<a href="http://tinyurl.com/yahwql2n" rel="noreferrer" target="_blank" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)">http://tinyurl.com/yahwql2n</a>), Markus, I'm seeking to learn how to do a similar query for all languages. </div><div><br></div><div>In Wikidata I found a Q item # for "language" - Q34770 (<a href="https://www.wikidata.org/wiki/Q34770">https://www.wikidata.org/wiki/Q34770</a>) - 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. </div><div><br></div><div>In a parallel way, how would one compute them from the names of the articles in Wikipedia?</div><div><br></div><div>Thanks, </div><div>Scott</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br style="color:rgb(34,34,34);font-family:arial,sans-serif;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 27, 2018 at 2:31 PM, Markus Kroetzsch <span dir="ltr"><<a href="mailto:markus.kroetzsch@tu-dresden.de" target="_blank">markus.kroetzsch@tu-dresden.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
(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:<br>
<br>
<a href="http://tinyurl.com/yahwql2n" rel="noreferrer" target="_blank">http://tinyurl.com/yahwql2n</a><br>
<br>
"""<br>
SELECT ?dbpediaId<br>
WHERE<br>
{<br>
  ?item wdt:P31 wd:Q6256 . # for the example: get IDs for all countries<br>
  ?sitelink schema:about ?item ;<br>
            schema:isPartOf <<a href="https://en.wikipedia.org/" rel="noreferrer" target="_blank">https://en.wikipedia.org/</a>> .<br>
<br>
BIND(URI(CONCAT("<a href="http://dbpedia.org/resource/" rel="noreferrer" target="_blank">http://dbpedi<wbr>a.org/resource/</a>",SUBSTR(STR(?<wbr>sitelink),31))) as ?dbpediaId)<br>
}<br>
"""<br>
<br>
Of course, depending on your use case, you can do the same offline (without requiring SPARQL to rewrite the id strings for you).<br>
<br>
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).<br>
<br>
Best regards,<br>
<br>
Markus<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
On 23/04/18 06:41, PWN wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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?<br>
Thank you.<br>
<br>
Sent from my iPad<br>
______________________________<wbr>_________________<br>
Wikidata mailing list<br>
<a href="mailto:Wikidata@lists.wikimedia.org" target="_blank">Wikidata@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/wikidata" rel="noreferrer" target="_blank">https://lists.wikimedia.org/ma<wbr>ilman/listinfo/wikidata</a><br>
<br>
</blockquote>
<br>
</div></div><br>______________________________<wbr>_________________<br>
Wikidata mailing list<br>
<a href="mailto:Wikidata@lists.wikimedia.org">Wikidata@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/wikidata" rel="noreferrer" target="_blank">https://lists.wikimedia.org/<wbr>mailman/listinfo/wikidata</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr" style="font-family:arial;font-size:small"><br><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="font-family:arial,sans-serif"><span style="font-size:12.8px">-- </span><br></div><div style="font-family:arial,sans-serif">- Scott MacLeod - Founder & President  </div><div style="font-family:arial,sans-serif"><div>- World University and School</div><div>- <a href="http://worlduniversityandschool.org/" style="color:rgb(17,85,204)" target="_blank">http://worlduniversityandschool.org</a> </div><div><br></div></div><div style="font-family:arial,sans-serif">- 415 480 4577</div><div style="font-family:arial,sans-serif">- <a href="http://scottmacleod.com/" style="color:rgb(17,85,204)" target="_blank">http://scottmacleod.com</a> </div><div style="font-family:arial,sans-serif"><br></div><div style="font-family:arial,sans-serif"><br></div><div style="font-family:arial,sans-serif">- CC World University and School - like CC Wikipedia with best STEM-centric CC OpenCourseWare - incorporated as a nonprofit university and school in California, and is a U.S. 501 (c) (3) tax-exempt educational organization. </div><div style="font-family:arial,sans-serif"><br></div><div style="font-family:arial,sans-serif"><br></div><div style="font-family:arial,sans-serif">IMPORTANT NOTICE: This transmission and any attachments are intended only for the use of the individual or entity to which they are addressed and may contain information that is privileged, confidential, or exempt from disclosure under applicable federal or state laws.  If the reader of this transmission is not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited.  If you have received this transmission in error, please notify me immediately by email or telephone.</div><div><br></div></div></div></div></div></div></div></div></div><div dir="ltr"><div><font face="arial" size="2">World University and School is sending you this because of your interest in free, online, higher education. If you don't want to receive these, please reply with 'unsubscribe' in the body of the email, leaving the subject line intact. Thank you. </font><br></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>