DBpedia 中的 Wikidata 查询等效项
Wikidata query equivalent in DBpedia
我正在尝试将我的 SPARQL 查询从 Wikidata 转换为 DBpedia(仅用于教育目的),但它不起作用。有人可以帮助我并告诉我我做错了什么吗?谢谢!
SELECT ?musician ?musicianLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?musician wdt:P31 wd:Q5 .
?musician wdt:P136 ?genre .
FILTER(?genre IN (wd:Q383982, wd:Q206159))
}
GROUP BY ?musician ?musicianLabel
ORDER BY ASC(?musicianLabel)
工作
... 在 http://lod.openlinksw.com/sparql
SELECT ?musician WHERE {
?musician a <http://dbpedia.org/resource/Person> .
?musician <http://dbpedia.org/resource/Genre> <http://dbpedia.org/resource/Genre> .
FILTER(<http://dbpedia.org/resource/Genre> IN (<http://dbpedia.org/resource/Psychedelic_Pop>, <http://dbpedia.org/resource/Psychedelic_Rock>))
}
GROUP BY ?musician
ORDER BY ASC(?musician)
不工作
我不确定你为什么从调整后的查询中删除标签...尝试 this (results)
SELECT DISTINCT ?musician ?musicianlabel
WHERE
{ ?musician a <http://dbpedia.org/ontology/Person> .
?musician <http://dbpedia.org/ontology/genre> ?genre .
OPTIONAL { ?musician <http://www.w3.org/2000/01/rdf-schema#label> ?musicianlabel .
FILTER ( LANGMATCHES ( LANG ( ?musicianlabel ), 'en' ) )
}
FILTER (?genre IN ( <http://dbpedia.org/resource/Psychedelic_pop> ,
<http://dbpedia.org/resource/Psychedelic_rock>
)
)
}
ORDER BY ASC ( ?musician )
我正在尝试将我的 SPARQL 查询从 Wikidata 转换为 DBpedia(仅用于教育目的),但它不起作用。有人可以帮助我并告诉我我做错了什么吗?谢谢!
SELECT ?musician ?musicianLabel WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
?musician wdt:P31 wd:Q5 .
?musician wdt:P136 ?genre .
FILTER(?genre IN (wd:Q383982, wd:Q206159))
}
GROUP BY ?musician ?musicianLabel
ORDER BY ASC(?musicianLabel)
工作
... 在 http://lod.openlinksw.com/sparql
SELECT ?musician WHERE {
?musician a <http://dbpedia.org/resource/Person> .
?musician <http://dbpedia.org/resource/Genre> <http://dbpedia.org/resource/Genre> .
FILTER(<http://dbpedia.org/resource/Genre> IN (<http://dbpedia.org/resource/Psychedelic_Pop>, <http://dbpedia.org/resource/Psychedelic_Rock>))
}
GROUP BY ?musician
ORDER BY ASC(?musician)
不工作
我不确定你为什么从调整后的查询中删除标签...尝试 this (results)
SELECT DISTINCT ?musician ?musicianlabel
WHERE
{ ?musician a <http://dbpedia.org/ontology/Person> .
?musician <http://dbpedia.org/ontology/genre> ?genre .
OPTIONAL { ?musician <http://www.w3.org/2000/01/rdf-schema#label> ?musicianlabel .
FILTER ( LANGMATCHES ( LANG ( ?musicianlabel ), 'en' ) )
}
FILTER (?genre IN ( <http://dbpedia.org/resource/Psychedelic_pop> ,
<http://dbpedia.org/resource/Psychedelic_rock>
)
)
}
ORDER BY ASC ( ?musician )