Sparql DBPedia个人数据集
我需要从DBPEdia中提取带有变体的人名。 我的SPARQL请求:Sparql DBPedia个人数据集,sparql,dbpedia,Sparql,Dbpedia,我需要从DBPEdia中提取带有变体的人名。 我的SPARQL请求: select distinct ?o where { { ?instance <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>; <http://xmlns.com/foaf/0.1/name> ?o } union {
select distinct ?o where {
{ ?instance <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>;
<http://xmlns.com/foaf/0.1/name> ?o }
union
{
?instance <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>;
rdfs:label
}
FILTER (langMatches(lang(?o),"en"))}
选择distinct?o其中{
{例;
?o}
联盟
{
?实例;
rdfs:标签
}
过滤器(langMatches(lang(?o),“en”)}
DBPedia通过SRARQL请求仅返回50000个名称
是否存在具有所有姓名的人员的数据集
现有persons_en.nt数据集只包含foaf:name,但我需要其他名称的变体。有时他们会在rdfs:label中列出(例如,为玛丽亚·莎拉波娃列出)。在另一篇文章中找到答案。运行以下SPARQL:
SELECT ?o WHERE {
{
select distinct ?o
where {
?instance <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>;
rdfs:label ?o
FILTER (langMatches(lang(?o),"en"))
}
ORDER BY ASC(?o)
}
} OFFSET 800000 LIMIT 50000
Query query = QueryFactory.create(queryString);
QueryExecution qexec = QueryExecutionFactory.sparqlService("http://dbpedia.org/sparql", query);