Download Wikidata single entity - truthy

半世苍凉 提交于 2019-11-28 14:23:59

.ttl?flavor=simple produces also many sitelinks which look like this:

<https://ru.wikipedia.org/wiki/Адамс,_Дуглас> a schema:Article ;
    schema:about wd:Q42 ;
    schema:inLanguage "ru" ;
    schema:isPartOf <https://ru.wikipedia.org/> ;
    schema:name "Адамс, Дуглас"@ru .

<https://ru.wikipedia.org/> wikibase:wikiGroup "wikipedia" .

If you want to get rid of them, you can manually CONSTRUCT what you want as described below.

Do not forget to send Accept: text/turtle.

Truthy statements, without properties from external vocabularies

CONSTRUCT {?s ?p ?o} WHERE {
  VALUES (?s) {(wd:Q42)}
  ?s ?p ?o . 
  [] wikibase:directClaim ?p 
}

Try it!

Truthy statements, with properties from external vocabularies

CONSTRUCT {?s ?p ?o} WHERE {
  VALUES (?s) {(wd:Q42)}
  ?s ?p ?o . 
  FILTER NOT EXISTS { [] wikibase:claim|wikibase:directClaimNormalized ?p }
}

Try it!


Documentation

Vijay Chavda

As suggested in comments, we can use the ?flavor=simple like so:

https://www.wikidata.org/wiki/Special:EntityData/Q42.rdf?flavor=simple

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!