Presentation is loading. Please wait.

Presentation is loading. Please wait.

Language (Formalisms) For Ontology Building Neda Alipanah 22 October 2012.

Similar presentations


Presentation on theme: "Language (Formalisms) For Ontology Building Neda Alipanah 22 October 2012."— Presentation transcript:

1 Language (Formalisms) For Ontology Building Neda Alipanah 22 October 2012

2 Content Why Ontologies?  Machine Process able Knowledge  Knowledge Exchange  Big Data Relevant Technologies  Layered Architecture  Building Tools and Visualization Ontology Application  Information Integration  Web Database Management  Web Services

3 Why Ontologies? 1. Machine readable and understandable process of data 2. Consistent Knowledge Presentation for Enterprise application integration (Knowledge Exchange) 3. Nodes and links that essentially form a very large database with specific rules

4 Why Ontologies? 1.Machine readable and understandable process of data John Smith is Assistant Professor of Computer Science in University of X. He is teaching several courses including Course A, B, C. John Smith is Assistant Professor of Computer Science in University of X. He is teaching several courses including Course A, B, C. Assistant Professor John Smith University X

5 Why Ontologies? 2. Consistent Knowledge Presentation for Enterprise application integration (Knowledge Exchange) Disease Patient Symptoms Address

6 Why Ontologies? 3. Nodes and links that essentially form a very large database with specific rules. Database capture the data and relations (Entity Relations) but not the semantic and rules Concept 1 is reverse of Concept 2. Concept 2 is subclass of Concept 3. Concept 100 has isA relation with Concept 2000 and is reverse of Concept 500. Disease Patient Symptoms Address

7 Content Why Ontologies?  Machine Process able Knowledge  Knowledge Exchange  Big Data Relevant Technologies  Layered Architecture  Building Tools and Visualization Ontology Application  Information Integration  Web Database Management  Web Services

8 Technologies- Layered Architecture Tim Berners Lee Architecture XML/XML Schemas RDF/Ontologies Rules/Query Logic, Proof and Trust TRUSTTRUST Other Services URI/UNICODE PRIVACYPRIVACY

9 Technologies- Layered Architecture URI (Uniform Resource Identifiers): ◦ Simple and Extensible means for Identifying a Resource ◦ Universal Resource Identifiers in WWW ◦ Example http://www.nih.gov/http://www.nih.gov/ http://www.ncbi.nlm.nih.gov/gap http://www.ucsd.edu http://www.semantic web/JohnSmith

10 What is XML about? XML= eXtensible Markup Language by the W3C (World Wide Web Consortium) Transport and Store Data (Structured Knowledge) Key to XML is Document Type Definitions (DTDs) ◦ Defines the role of each element of text in a formal model Compound Documents(Multiple files)

11 XML Example Patents Funds Year: 2002 Name: U. Of X Expenses Name: BioInformatics titleAuthor ID Asset report Assets Dept Equipment news Patent Other assets Grants Contracts

12 XML File Example Alice Brown University of X CS BioInformatics John James University of X BioInformatics Senior Alice Brown University of X CS BioInformatics John James University of X BioInformatics Senior

13 Technologies- Layered Architecture Tim Berners Lee Architecture XML/XML Schemas RDF/OWL Ontologies Rules/Query Logic, Proof and Trust TRUSTTRUST Other Services URI/UNICODE PRIVACYPRIVACY

14 RDF RDF = Resource Description Framework Adds semantics with the use of ontologies, XML syntax RDF Concepts ◦ Basic Model  Resources, Properties and Statements ◦ Container Model  Bag, Sequence and Alternative

15 RDF RDF/RDFS Elements ◦ Class (School, Department, Person)  Rdfs:SubClassOf ◦ Properties (Works)  Rdfs:SubPropertiesOf ◦ Domain and Range of Property  Rdfs: domain (School)  Rdfs: range (Person) School Department SubClass Person Works

16 RDF vs. XML Views iPhone $200 iPhone $200 $200 $200 An iPhone is a Product that has a price of $200 ″ XML Views iPhone 200 OntTeaching:product1 rdf:type OntTeaching:Product OntTeaching:product1 OntTeaching:title “iPhone” OntTeaching:product1 price “200 ″ iPhone 200 OntTeaching:product1 rdf:type OntTeaching:Product OntTeaching:product1 OntTeaching:title “iPhone” OntTeaching:product1 price “200 ″ RDF View

17 OWL Web Ontology Language OWL: Semantic Markup Language for Publishing/Sharing Ontologies  Enumeration on Classes

18 OWL Web Ontology Language OWL ◦ Value Constraints  OWL : ALL V ALUES F ROM  OWL : SOME V ALUES F ROM  OWL : HAS V ALUE

19 OWL Web Ontology Language OWL: Cardinality constraints  OWL : MAX C ARDINALITY  OWL : MIN C ARDINALITY  OWL : CARDINALITY 2 2

20 OWL Web Ontology Language OWL: Intersection, union and complement  OWL : INTERSECTION O F  OWL : UNION O F  O WL : COMPLEMENT O F Not Meat Not Meat

21 OWL Web Ontology Language OWL: Equivalent Class, Disjoint Class

22 How to Build OWL/RDF files? Do we need to remember all the OWL language syntax? How to do it easy to use and remember?

23 Content Why Ontologies?  Machine Process able Knowledge  Knowledge Exchange  Big Data Relevant Technologies  Layered Architecture  Building Tools and Visualization Ontology Application  Information Integration  Web Database Management  Web Services

24 How to Build RDF/OWL files? Different Building and Visualization Tools ◦ Protégé, http://protege.stanford.edu/http://protege.stanford.edu/ ◦ Gruff, http://www.franz.com/agraph/gruff/http://www.franz.com/agraph/gruff/ (Download version 3.3) Using Programming Languages ◦ Java and Jena API ◦ http://jena.apache.org/ http://jena.apache.org/ ◦ http://jena.sourceforge.net/tutorial/RDF_API/ http://jena.sourceforge.net/tutorial/RDF_API/

25 Protégé Tool- Open Source Ontology Editor Class Creation

26 Protégé Tool- Open Source Ontology Editor Property (Object/Data properties)

27 Protégé Tool- Open Source Ontology Editor Individual Creation

28 Gruff Tool- A Grapher-Based Triple- Store Browser for AllegroGraph 1.What is triple Store? iPhone 200 Subject Predicate Object OntTeaching:product1 rdf:type OntTeaching:Product OntTeaching:product1 OntTeaching:title “iPhone” OntTeaching:product1 price “200 ″ iPhone 200 Subject Predicate Object OntTeaching:product1 rdf:type OntTeaching:Product OntTeaching:product1 OntTeaching:title “iPhone” OntTeaching:product1 price “200 ″ Product Product1 iPhone 200 type title price

29 Gruff Tool- A Grapher-Based Triple- Store Browser for AllegroGraph 1.Create a New Triple Store 2.Choose a Path for the Ontology 3.Load Ontology 4.Present the Ontology Triples 5.Query the Triples

30 Gruff Tool- A Grapher-Based Triple- Store Browser for AllegroGraph

31

32

33 Programming with Ontologies Java + Jena API Collection of Tools and Java Libraries For Developing Linked-data Apps, Tools and Servers Store Information in RDF Triples in Directed Graphs An Ontology API for Handling OWL and RDFS Ontologies A Rule-based Inference Engine for Reasoning with RDF and OWL data sources Efficient Storage of Triples on Disk A query engine compliant with the latest SPARQL

34 Ontology Building using Jena http://www.semanticweb.org/ontologies/2012/9/OntTeaching.owl#Product1 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.semanticweb.org/ontologies/2012/9/OntTeaching.owl#Product Product1 http://www.semanticweb.org/ontologies/2012/9/OntTeaching.owl#title “iPhone”http://www.semanticweb.org/ontologies/2012/9/OntTeaching.owl#title Product1 http://www.semanticweb.org/ontologies/iPhone.Owl#price “200”http://www.semanticweb.org/ontologies/iPhone.Owl# http://www.semanticweb.org/ontologies/2012/9/OntTeaching.owl#Product1 http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.semanticweb.org/ontologies/2012/9/OntTeaching.owl#Product Product1 http://www.semanticweb.org/ontologies/2012/9/OntTeaching.owl#title “iPhone”http://www.semanticweb.org/ontologies/2012/9/OntTeaching.owl#title Product1 http://www.semanticweb.org/ontologies/iPhone.Owl#price “200”http://www.semanticweb.org/ontologies/iPhone.Owl# Triples Ontology: iPhone.owl Subject Predicate Object Product Product1 iPhone 200 type title price

35 Ontology Building using Jena The code to create this graph, or model, is simple: // some definitions static String productURI = "http://www.semanticweb.org/ontologies/Product"; // create an empty Model Model model = ModelFactory.createDefaultModel(); // create the resource Resource product = model.createResource(productURI); // add the property product.addProperty(title, ”iPhone”); product.addProperty(price, ”200”);

36 Jena How to read Ontology? // list the statements in the Model StmtIterator iter = model.listStatements(); // print out the predicate, subject and object of each statement while (iter.hasNext()) { Statement stmt = iter.nextStatement(); // get next statement Resource subject = stmt.getSubject(); // get the subject Property predicate = stmt.getPredicate(); // get the predicate RDFNode object = stmt.getObject(); // get the object System.out.print(subject.toString()); System.out.print(" " + predicate.toString() + " "); if (object instanceof Resource) { System.out.print(object.toString()); } else { // object is a literal System.out.print(" \"" + object.toString() + "\""); } System.out.println("."); } // list the statements in the Model StmtIterator iter = model.listStatements(); // print out the predicate, subject and object of each statement while (iter.hasNext()) { Statement stmt = iter.nextStatement(); // get next statement Resource subject = stmt.getSubject(); // get the subject Property predicate = stmt.getPredicate(); // get the predicate RDFNode object = stmt.getObject(); // get the object System.out.print(subject.toString()); System.out.print(" " + predicate.toString() + " "); if (object instanceof Resource) { System.out.print(object.toString()); } else { // object is a literal System.out.print(" \"" + object.toString() + "\""); } System.out.println("."); }

37 SPARQL Query Query on Triples with Exact Pattern Matching (Subject of query is Product1) SELECT ?b ?c Where { ?b ?c } Result

38 Content Why Ontologies?  Machine Process able Knowledge  Knowledge Exchange  Big Data Relevant Technologies  Layered Architecture  Building Tools and Visualization Ontology Application  Information Integration  Web Database Management  Web Services

39 Ontology Applications The database of Genotypes and Phenotypes (dbGaP) is archiving the results of different Genome Wide Association Studies (GWAS). Phenotype variables are not harmonized across studies. Redundent phenotype identifiers for the same phenotype. dbGaP lacks semantic relations among its variables. Search on phenotypes is inefficient and inaccurate. Goal is to standardize dbGaP information to allow accurate, reusable and quick retrieval of information

40 Ontology Applications Several Available dbGAP Studies id=”phv00122015”, Description=”Age at time of Study”, name=”age”, version=“1”, Logical Max=”65”, Logical Minimum=”18”, unit=”Years”, type=”decimal” id=”phv00122015”, Description=”Age at time of Study”, name=”age”, version=“1”, Logical Max=”65”, Logical Minimum=”18”, unit=”Years”, type=”decimal” id=”phv00122058”, Description=”Age of patient at the time of Study”, name=”age”, version=“1”, Logical Max=”90”, Logical Minimum=”20”, unit=”Years”, type=”decimal” id=”phv00122058”, Description=”Age of patient at the time of Study”, name=”age”, version=“1”, Logical Max=”90”, Logical Minimum=”20”, unit=”Years”, type=”decimal” phs000284.v1.pht001901.v1.CFS_CARe_Sample.data_dict_2011_02_07 phs000284.v1.pht001903.v1.CFS_CARe_ECG.data_dict_2011_02_07

41 Ontology Applications Building Information Model (Ontology) Individual Age id=”phv00122058” id=”phv00122015”

42 Ontology Applications Information Retrieval and Ranking Phenotypes Query={Age of Subject} StudyPhenotype Variable phs000284.v1.pht001901.v1.C FS_CARe_Sample.data_dict_2 011_02_07 id=”phv00122058 phs000284.v1.pht001903.v1.C FS_CARe_ECG.data_dict_201 1_02_07 id=”phv00122015”

43 Conclusion Benefits of Structured Data (XML, OWL) Tools to Create and Visualize Ontologies Jena API for Building Ontologies Sparql Queries on Ontologies Applications uses Ontologies

44 Contacts Neda Alipanah Division of Biomedical Informatics 9500 Gilman Dr., Bldg 2 #0203E Email: nalipanah@ucsd.edunalipanah@ucsd.edu


Download ppt "Language (Formalisms) For Ontology Building Neda Alipanah 22 October 2012."

Similar presentations


Ads by Google