How to get only Wikidata wdt (or other) predicates for an item via SPARQL?

旧巷老猫 提交于 2019-12-11 16:57:51

问题


Very new to this, so might have some terms wrong. I want to get a subset of triples for an entity (or entities). For example, this gives me 856 (as of now) triples for these two entities, including some labels and also /prop/direct/, /prop/direct-normalized/, and /prop/ predicates:

CONSTRUCT {?s ?p ?o.}
WHERE {
VALUES ?s {wd:Q937 wd:Q670439}
{?s ?p ?o.}
}

Try it

But what if I only want the /prop/direct/ (wdt) triples? Would I use FILTER in some way? I suspect I'm missing the correct way to specify these in the first place. I'd like to stick with the CONSTRUCT verb. Thanks.

来源:https://stackoverflow.com/questions/54432109/how-to-get-only-wikidata-wdt-or-other-predicates-for-an-item-via-sparql

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