对于给定的Dbpedia资源,我希望获得它的Rdfs: label。例如,在http://fr.dbpedia.org/resource/Automobile中,我应该获取Automobile,
我尝试使用简单的RDF:
$label= new \EasyRdf\Graph;
$re= $label->label('http://fr.dbpedia.org/resource/Automobile');
var_dump($re)但是它给我的结果是null
我也尝试了这个Sparql请求,但它也给了我null:
SELECT ?label WHERE
{
<http://fr.dbpedia.org/resource/Automobile> rdfs:label ?label.
}发布于 2016-11-25 15:19:41
只需消除(fr.)从您的查询中:
SELECT ?label WHERE
{
<http://dbpedia.org/resource/Automobile> rdfs:label ?label.
}https://stackoverflow.com/questions/38697481
复制相似问题