Language formalisms for ontology building
This presentation is the property of its rightful owner.
Sponsored Links
1 / 44

Language (Formalisms) For Ontology Building PowerPoint PPT Presentation


  • 66 Views
  • Uploaded on
  • Presentation posted in: General

Language (Formalisms) For Ontology Building. Neda Alipanah 22 October 2012. Content. Why Ontologies ? Machine Process able Knowledge Knowledge Exchange Big Data Relevant Technologies Layered Architecture Building Tools and Visualization Ontology Application Information Integration

Download Presentation

Language (Formalisms) For Ontology Building

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Language formalisms for ontology building

Language (Formalisms) For Ontology Building

Neda Alipanah

22 October 2012


Content

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


  • Why ontologies

    Why Ontologies?

    • Machine readable and understandable process of data

    • Consistent Knowledge Presentation for Enterprise application integration (Knowledge Exchange)

    • Nodes and links that essentially form a very large database with specific rules


    Why ontologies1

    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.

    Assistant Professor

    University X

    John Smith


    Why ontologies2

    Why Ontologies?

    2. Consistent Knowledge Presentation for Enterprise application integration (Knowledge Exchange)

    Disease

    Symptoms

    Patient

    Address


    Why ontologies3

    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

    Disease

    Symptoms

    Patient

    Address

    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.


    Content1

    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


  • Technologies layered architecture

    Technologies- Layered Architecture

    Tim Berners Lee Architecture

    Logic, Proof and Trust

    TRUST

    P

    R

    I

    V

    A

    C

    Y

    Rules/Query

    Other

    Services

    RDF/Ontologies

    XML/XML Schemas

    URI/UNICODE


    Technologies layered architecture1

    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.ncbi.nlm.nih.gov/gap

    http://www.ucsd.edu

    http://www.semanticweb/JohnSmith


    What is xml about

    What is XML about?

    • XML= eXtensibleMarkup 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)


    Xml example

    XML Example

    Year: 2002

    Asset report

    Name: U. Of X

    Assets

    Patents

    Equipment

    Other assets

    Dept

    Funds

    Patent

    news

    Expenses

    Name:

    BioInformatics

    Contracts

    ID

    Author

    title

    Grants


    Xml file example

    XML File Example

    <Professor credID=“9” subID = “16: CIssuer = “2”>

    <name> Alice Brown </name>

    <university> University of X <university/>

    <department> CS </department>

    <research-group> BioInformatics</research-group>

    </Professor>

    <Secretary credID=“12” subID = “4: CIssuer = “2”>

    <name> John James </name>

    <university> University of X <university/>

    <department> BioInformatics </department>

    <level> Senior </level>

    </Secretary>


    Technologies layered architecture2

    Technologies- Layered Architecture

    Tim Berners Lee Architecture

    Logic, Proof and Trust

    TRUST

    P

    R

    I

    V

    A

    C

    Y

    Rules/Query

    Other

    Services

    RDF/OWL Ontologies

    XML/XML Schemas

    URI/UNICODE


    Language formalisms for ontology building

    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


    Language formalisms for ontology building

    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)

    Works

    School

    Person

    SubClass

    Department


    Rdf vs xml views

    RDF vs. XML Views

    An iPhone is a Product that has a price of $200″

    <product>

    
<title>iPhone</title>

    
<price>$200</price>

    
</product>

    <product title=”iPhone”>


    <price>$200</price>


    </product>

    XML Views

    <owl:Classrdf:about="&OntTeaching;Product"/>

    <owl:NamedIndividualrdf:about="&OntTeaching;Product1">

    <rdf:typerdf:resource="&OntTeaching;Product"/>

    <rdfs:labelrdf:datatype="&xsd;Name">iPhone</rdfs:label>

    <price rdf:datatype="&xsd;decimal">200</price> </owl:NamedIndividual>

    OntTeaching:product1 rdf:type OntTeaching:Product OntTeaching:product1 OntTeaching:title “iPhone” OntTeaching:product1 price “200″

    RDF View


    Owl web ontology language

    OWL Web Ontology Language

    • OWL: Semantic Markup Language for Publishing/Sharing Ontologies

      • Enumeration on Classes

        <owl:Class>

        <owl:oneOfrdf:parseType="Collection">

        <owl:Thingrdf:about="#Europe"/>

        <owl:Thingrdf:about="#Africa"/>

        <owl:Thingrdf:about="#NorthAmerica"/>

        <owl:Thingrdf:about="#SouthAmerica"/>

        <owl:Thingrdf:about="#Australia"/>

        <owl:Thingrdf:about="#Antarctica"/>

        </owl:oneOf>

        </owl:Class>


    Owl web ontology language1

    OWL Web Ontology Language

    • OWL

      • Value Constraints

        • owl:allValuesFrom

        • owl:someValuesFrom

        • owl:hasValue

    <owl:Restriction>

    <owl:onPropertyrdf:resource="#hasParent" />

    <owl:someValuesFromrdf:resource="#Physician" />

    </owl:Restriction>

    • <owl:Restriction>

    • <owl:onPropertyrdf:resource="#hasParent" />

    • <owl:hasValuerdf:resource="#Clinton" />

    • </owl:Restriction>


    Owl web ontology language2

    OWL Web Ontology Language

    • OWL: Cardinality constraints

      • owl:maxCardinality

      • owl:minCardinality

      • owl:cardinality

    <owl:Restriction>

    <owl:onPropertyrdf:resource="#hasParent" />

    <owl:cardinalityrdf:datatype="&xsd;nonNegativeInteger">2</owl:cardinality>

    </owl:Restriction>


    Owl web ontology language3

    OWL Web Ontology Language

    • OWL: Intersection, union and complement

    • owl:intersectionOf

    • owl:unionOf

    • Owl:complementOf

    <owl:Class>

    <owl:unionOfrdf:parseType="Collection"> <owl:Class>

    <owl:oneOfrdf:parseType="Collection"> <owl:Thingrdf:about="#Tosca" />

    <owl:Thingrdf:about="#Salome" /> </owl:oneOf>

    </owl:Class>

    <owl:Class>

    <owl:oneOfrdf:parseType="Collection"> <owl:Thingrdf:about="#Turandot" /> <owl:Thingrdf:about="#Tosca" /> </owl:oneOf>

    </owl:Class>

    </owl:unionOf>

    </owl:Class>

    Not Meat

    <owl:Class>

    <owl:complementOf>

    <owl:Classrdf:about="#Meat"/>

    </owl:complementOf>

    </owl:Class>


    Owl web ontology language4

    OWL Web Ontology Language

    • OWL: Equivalent Class, Disjoint Class

    <owl:Classrdf:about="#DaPonteOperaOfMozart"> <owl:equivalentClass>

    <owl:Class>

    <owl:intersectionOfrdf:parseType="Collection"> <owl:Restriction>

    <owl:onPropertyrdf:resource="#hasComposer"/> <owl:hasValuerdf:resource="#Wolfgang_Amadeus_Mozart"/>

    </owl:Restriction>

    <owl:Restriction>

    <owl:onPropertyrdf:resource="#hasLibrettist"/>

    <owl:hasValuerdf:resource="#Lorenzo_Da_Ponte"/> </owl:Restriction>

    </owl:intersectionOf>

    </owl:Class> </owl:equivalentClass> </owl:Class>

    <owl:Classrdf:about="#Man"> <owl:disjointWithrdf:resource="#Woman"/> </owl:Class>


    How to build owl rdf files

    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?


    Content2

    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


  • How to build rdf owl files

    How to Build RDF/OWL files?

    • Different Building and Visualization Tools

      • Protégé, http://protege.stanford.edu/

      • Gruff, http://www.franz.com/agraph/gruff/

        (Download version 3.3)

    • Using Programming Languages

      • Java and Jena API

      • http://jena.apache.org/

      • http://jena.sourceforge.net/tutorial/RDF_API/


    Prot g tool open source ontology editor

    Protégé Tool- Open Source Ontology Editor

    • Class Creation


    Prot g tool open source ontology editor1

    Protégé Tool- Open Source Ontology Editor

    • Property (Object/Data properties)


    Prot g tool open source ontology editor2

    Protégé Tool- Open Source Ontology Editor

    • Individual Creation


    Gruff tool a grapher based triple store browser for allegrograph

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

    What is triple Store?

    Product1

    200

    type

    Product

    price

    iPhone

    title

    <owl:Classrdf:about="&OntTeaching;Product"/>

    <owl:NamedIndividualrdf:about="&OntTeaching;Product1">

    <rdf:typerdf:resource="&OntTeaching;Product"/>

    <rdfs:labelrdf:datatype="&xsd;Name">iPhone</rdfs:label>

    <price rdf:datatype="&xsd;decimal">200</price> </owl:NamedIndividual>

    Subject Predicate Object

    OntTeaching:product1 rdf:type OntTeaching:Product OntTeaching:product1 OntTeaching:title “iPhone” OntTeaching:product1 price “200″


    Gruff tool a grapher based triple store browser for allegrograph1

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

    Create a New Triple Store

    Choose a Path for the Ontology

    Load Ontology

    Present the Ontology Triples

    Query the Triples


    Gruff tool a grapher based triple store browser for allegrograph2

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


    Gruff tool a grapher based triple store browser for allegrograph3

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


    Gruff tool a grapher based triple store browser for allegrograph4

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


    Programming with ontologies java jena api

    Programming with OntologiesJava + 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

    • ARule-based Inference Engine for Reasoning with RDF and OWL data sources

    • Efficient Storage of Triples on Disk

    • Aquery engine compliant with the latest SPARQL


    Ontology building using jena

    Ontology Building using Jena

    Ontology: iPhone.owl

    Product1

    200

    price

    type

    Product

    iPhone

    title

    Subject Predicate Object

    Triples

    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”

    Product1 http://www.semanticweb.org/ontologies/iPhone.Owl#price “200”


    Ontology building using jena1

    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”);


    Language formalisms for ontology building

    Jena

    • How to read Ontology?

    // list the statements in the Model

    StmtIteratoriter = 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(" .");

    }


    Sparql query

    SPARQL Query

    • Query on Triples with Exact Pattern Matching (Subject of query is Product1)

      SELECT ?b ?c Where {

      <http://www.semanticweb.org/ontologies/2012/9/OntTeaching.owl#Product1> ?b ?c

      }

    • Result


    Content3

    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


  • Ontology applications

    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


    Ontology applications1

    Ontology Applications

    • Several Available dbGAP Studies

    phs000284.v1.pht001901.v1.CFS_CARe_Sample.data_dict_2011_02_07

    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”

    phs000284.v1.pht001903.v1.CFS_CARe_ECG.data_dict_2011_02_07


    Ontology applications2

    Ontology Applications

    • Building Information Model (Ontology)

    Individual

    id=”phv00122058”

    Age

    id=”phv00122015”


    Ontology applications3

    Ontology Applications

    • Information Retrieval and Ranking Phenotypes

      Query={Age of Subject}


    Conclusion

    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


    Contacts

    Contacts

    • NedaAlipanah

    • Division of Biomedical Informatics9500 Gilman Dr., Bldg 2 #0203E

    • Email: [email protected]


  • Login