Query Samples and Explanations

SPARQL query Why-not Question Explanation
PREFIX dbpprop:<http://dbpedia.org/property/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX category: <http://dbpedia.org/resource/Category:>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT ?actorname{
?actor dcterms:subject category:Best_Actor_Academy_Award_winners.
?actor dbpprop:name ?actorname.
?actor dc:description ?country.
FILTER regex(str(?country), "American")}
var:actorname
value:Leonardo DiCaprio
A modify why-not BGP:
{?actor dcterms:subject category:Silver_Bear_for_Best_Actor_winners.
?actor dbpprop:name ?actorname.
?actor dc:description ?country.
FILTER regex(str(?country), "American")}
(Best_Actor_Academy_Award_winners is modified to Silver_Bear_for_Best_Actor_winners. Leonardo DiCaprio has never won the Academy Award for Best Actor)
var:actorname
value:Colin Firth
Operator:FILTER
filter out:{?country="British actor"@en
?actor=http://dbpedia.org/resource/Colin_Firth}
PREFIX dbpprop:<http://dbpedia.org/property/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX category: <http://dbpedia.org/resource/Category:>
SELECT ?filmname{
?film dcterms:subject category:Romantic_epic_films.
?film dcterms:subject category:American_disaster_films.
?film dbpprop:name ?filmname.
MINUS{?film dbpprop:released ?date.
FILTER (?date < 2000 )}
}
var:filmname
value:The English Patient
A modify why-not BGP:
{?film dcterms:subject category:Romantic_epic_films.
?film dcterms:subject category:American_disaster_films.
?film dbpprop:name ?filmname.}
(American_disaster_films is modified to American_war_films. The English Patient is a War romance film)
var:filmname
value:Titanic
Operator:MINUS
filter out:{?released=1997 ?film=http://dbpedia.org/page/Titanic_(1997_film)}
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX category: <http://dbpedia.org/resource/Category:>
SELECT ?person{
?film dcterms:subject category:Best_Picture_Academy_Award_winners.
?film dbpedia-owl:director ?person.
?film dbpedia-owl:starring ?person.
?film dbpedia-owl:writer ?person.
?person dcterms:subject category:Best_Actress_Academy_Award_winners.
}
var:person
value:∅
A modified why-not BGP: {?film dcterms:subject category:Best_Picture_Academy_Award_winners.
?film dbpedia-owl:director ?person.
?film dbpedia-owl:starring ?person.
?film dbpedia-owl:writer ?person.
?person dcterms:subject ?award.}
(category:Best_Actress_Academy_Award_winners is modified to a variable, several persons will show up but they all aren't females)

To demo: ANNA.      To more details: APPENDIX A.pdf