incomplete result? Querying DBpedia

33 views
Skip to first unread message

Ramona Ottow

unread,
Dec 1, 2015, 8:49:41 AM12/1/15
to rm...@googlegroups.com
Hi all!
 
I am wondering why there are different results while using the Data Importer and the SPARQL Explorer! Do I have to change some settings?
 
Thanks in advance!
 
My query:
 
select distinct ?subcategory
where {
  {?subcategory dct:subject dbc:Electronic_waste_in_Europe .
  FILTER (NOT EXISTS {?subcategory rdf:type ?v} )}
UNION
  {?subcategory rdf:type dbo:Company .
   ?subcategory dct:subject dbc:Electronic_waste_in_Europe .}
UNION
  {?subcategory rdf:type yago:Abstraction100002137 .
   ?subcategory dct:subject dbc:Electronic_waste_in_Europe .}
}
 
The output of SPARQL Explorer:
:Waste_Electrical_and_Electronic_Equipment_Directive
:Battery_Directive
:Restriction_of_Hazardous_Substances_Directive
The output of the Data Importer:
:Waste_Electrical_and_Electronic_Equipment_Directive
 
 
 

Petar Ristoski

unread,
Dec 3, 2015, 5:33:15 AM12/3/15
to RapidMiner Linked Open Data Extension, ramon...@gmx.de
Hi Ramona,

The problem is in the last "UNION" clause, where you use the prefix "yago" in "yago:Abstraction100002137". This prefix is automatically resolved in our extension to "http://yago-knowledge.org/resource/Abstraction100002137", where it should be "http://dbpedia.org/class/yago/Abstraction100002137. The simple solution is to use "<http://dbpedia.org/class/yago/Abstraction100002137>" instead of "yago:Abstraction100002137".
The complete query should look like this:
select distinct ?subcategory
where {
  {?subcategory dct:subject dbc:Electronic_waste_in_Europe .
  FILTER (NOT EXISTS {?subcategory rdf:type ?v} )}
UNION
  {?subcategory rdf:type dbo:Company .
   ?subcategory dct:subject dbc:Electronic_waste_in_Europe .}
UNION
   ?subcategory dct:subject dbc:Electronic_waste_in_Europe .}
}

Regards,

Petar
Reply all
Reply to author
Forward
0 new messages