DUA ONTOLOGY
By Amna Basharat
Taxonomy Dua
Qurani Duas
Duas To Seek K Knowledge l d
DuasToSeekParadise
FAST – NU, Islamabad, Fall 2008
Masnoon Duas
….
RDF Model of Duas containsDua Surah
isRelatedTo Dua
isContainedIn
hasRelatedDua
hasTheme
Theme
FAST – NU, Islamabad, Fall 2008
Prophet
SAMPLE SPARQL QUERIES
Search Dua with a Particular Theme PREFIX dua: SELECT ?D ?theme WHERE { ?D dua:hasTheme ?theme.}
FAST – NU, Islamabad, Fall 2008
SAMPLE SPARQL QUERIES
é é Tested with Protégé 3.3.1
PizzaOntology Querying for Classes
FAST – NU, Islamabad, Fall 2008
SELECT ?subject ?object WHERE { ?subject rdfs:subClassOf ?object }
FAST – NU, Islamabad, Fall 2008
PREFIX p:
ode.org/ontologies/pizza/2005/10/18/pizza.o d / t l i / i / / / 8/ i wl#> SELECT ?subject ?object SELECT ? bj t ? bj t WHERE { ?subject rdfs:subClassOf ?object }
FAST – NU, Islamabad, Fall 2008
PREFIX p:
ode.org/ontologies/pizza/2005/10/18/pizza.o d / t l i / i / / / 8/ i wl#> SELECT ?subject ?object SELECT ? bj t ? bj t WHERE { ?subject rdfs:subClassOf p:Pizza}
FAST – NU, Islamabad, Fall 2008
PREFIX p:
ode.org/ontologies/pizza/2005/10/18/pizza.o d / t l i / i / / / 8/ i wl#> SELECT ?subject ?object SELECT ? bj t ? bj t WHERE { ?subject rdfs:subClassOf p:PizzaTopping. Pi T i }
FAST – NU, Islamabad, Fall 2008
PREFIX p:
ode.org/ontologies/pizza/2005/10/18/pizza.o ode org/ontologies/pizza/2005/10/18/pizza o wl#> SELECT ?subject ?object WHERE { ?subject rdfs:subClassOf p p:DomainConcept. p ?subject owl:disjointWith ?object. }
FAST – NU, Islamabad, Fall 2008
Dua Ontology Querying on Instance Data
FAST – NU, Islamabad, Fall 2008
List all Duas with Corresponding themes PREFIX dua: SELECT ?D ?theme WHERE { ?D dua:hasTheme ?theme.}
FAST – NU, Islamabad, Fall 2008
Example: List of Duas, their Themes which are contained in Surah Taha PREFIX dua:
SELECT ?D ?theme WHERE { ?D dua:hasTheme ?theme. ?D dua:hasSourceSurah dua:Taha.
FAST – NU, Islamabad, Fall 2008
}
List of All Dua’s which have some Theme and have some source Surah PREFIX dua:
SELECT ?D ?theme ?surah WHERE { ?D dua:hasTheme ?theme.
?D dua:hasSourceSurah ?surah.}
FAST – NU, Islamabad, Fall 2008
PREFIX dua:
SELECT ?D ?theme ?surah ?no
WHERE { ?D dua:hasTheme ?theme. WHERE { ?D dua:hasTheme ?theme ?D dua:hasSourceSurah ?surah .
} ORDER BY ?no
?surah dua:hasSurahNo ?no ?surah dua:hasSurahNo ?no.
FAST – NU, Islamabad, Fall 2008
PREFIX dua:
SELECT ?D ?theme ?surah ?no ?ayah
WHERE { ?D dua:hasTheme ?theme. WHERE { ?D dua:hasTheme ?theme ?D dua:hasSourceSurah ?surah ; dua:hasSourceAyah ?ayah. ?surah dua:hasSurahNo ?no ?surah dua:hasSurahNo ?no.
} ORDER BY ?no
FAST – NU, Islamabad, Fall 2008
Notice the change in results with the use of OPTIONAL
PREFIX dua:
SELECT ?D ?theme ?surah ?no ?ayah
WHERE{ ?D dua:hasTheme ?theme. ?D dua:hasSourceSurah ?surah.
OPTIONAL{ ?D dua:hasSourceAyah ?ayah.
}} ORDER BY ?no
?surah dua:hasSurahNo ?no.
FAST – NU, Islamabad, Fall 2008
Use of Regular Expression to retrieve duas that contain the word Rabbi PREFIX dua:
l SELECT ?D ?surah ?no ?text WHERE{ ?D dua:hasSourceSurah ?surah ?D dua:hasSourceSurah ?surah. ?D dua:hasTextAyah ?text.
FILTER regex(?text, "Rabbi") .
?surah dua:hasSurahNo ?no. } FAST – NU, Islamabad, Fall 2008
Use of Regular Expression to retrieve duas that contain the word Rabbana
PREFIX dua:
SELECT ?D ?surah ?no ?text
WHERE{ ?D dua:hasSourceSurah ?surah. ?D dua:hasTextAyah ?text. FILTER regex(?text "Rabbana") FILTER regex(?text, Rabbana ) .
?surah dua:hasSurahNo ?no.
}
FAST – NU, Islamabad, Fall 2008
AN interesting Query!. …Think about what it does!
PREFIX dua:
SELECT ?Dua ?DuaOther ?surah2
WHERE{ ?Dua dua:hasSourceSurah dua:Taha. ?Dua dua:isRelatedTo ?p. ?DuaOther dua:isRelatedTo ?p ?DuaOther dua:isRelatedTo ?p. ?DuaOther dua:hasSourceSurah ?surah2.
}
FAST – NU, Islamabad, Fall 2008
Find other Duas related to the same prophet in a given Surah “Find other duas related with the prophet of a given surah. given surah ”
FAST – NU, Islamabad, Fall 2008