Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sparql DBPedia个人数据集_Sparql_Dbpedia - Fatal编程技术网

Sparql DBPedia个人数据集

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 {

我需要从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
       {
         ?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);