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


-- 

-- 
- Scott MacLeod - Founder & President
- World University and School
- http://worlduniversityandschool.org

- 415 480 4577
- http://scottmacleod.com


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


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.

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.
_______________________________________________
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata

Reply via email to