Dua Ontology - Sample Queries

  • July 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Dua Ontology - Sample Queries as PDF for free.

More details

  • Words: 750
  • Pages: 23
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

Related Documents

Ontology
April 2020 14
Queries
April 2020 7
Ontology
June 2020 13
Queries
May 2020 14
Queries
October 2019 20