440 likes | 889 Views
Introduction to Ontology. Liqin Wang, MS SWE Workshop 2011 Aug 10 th , 2011. Outline. What is ontology Ontology Language How to create an ontology Ontology Reasoning Evaluation of Ontology Application of Ontology Institutes & People Processing Tools & Triple Store Resources Practice.
E N D
Introduction to Ontology Liqin Wang, MS SWE Workshop 2011 Aug 10th, 2011
Outline • What is ontology • Ontology Language • How to create an ontology • Ontology Reasoning • Evaluation of Ontology • Application of Ontology • Institutes & People • Processing Tools & Triple Store • Resources • Practice
What is ontology? • Def. in Philosophy • A foundational discipline of philosophy, which has its origins in ancient Greece. • About “existence”
What is ontology? (Cont.) • Def. in Information Science • A formal, explicit specification of a conceptualization. • A model for describing the world • Concepts • Properties • Constraints • Individuals • Also as a domain-specific knowledge base that is machine interpretable, reusableand sharable T. R. Gruber. A translation approach to portable ontologies. Knowledge Acquisition, 5(2):199-220, 1993.
With ontology, we are able… • To share common understanding of the structure of information among people or software agents • To enable reuse of domain knowledge • To make domain assumptions explicit • To analyze domain knowledge • To separate domain knowledge from the operational knowledge Natalya F. Noy, Deborah McGuinness. Ontology Development 101: A Guide to Creating Your First Ontology
Ontology Language Semantic Web Stack by Tim Berners-Lee • In order to facilitate the create, reading, writing, query and sharing of the ontology, it is a necessary to have ontology language(s).
Ontology Language (Cont.) • By syntax: • RDF/XML • Interchange (can be written and read by all conformant OWL 2 software) • OWL/XML • Easier to process using XML tools • Functional Syntax • Easier to see the formal structure of ontologies • Manchester syntax • Easier to read/write DL ontologies • Turtle • Easier to read/write RDF triples Go to protégé and Notepad++
OWL • OWL (Web Ontology Language) • W3C standard • OWL is built on top of RDF, and written in XML • OWL has three sublanguages • DL, Lite, Full • Hard to read by people • Interpretable by computers
Three Variants of OWL • OWL Full • an extension of RDF • allows for classes as instances, modification of RDF and OWL vocabularies • OWL DL • the part of OWL Full that fits in the Description Logic framework • known to have decidable reasoning • OWL Lite • a subset of OWL DL • easier for frame-based tools to transition to • easier reasoning
OWL Example <owl:Class rdf:about=''firstYearCourse''> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource=''isTaughtBy''/> <owl:allValuesFrom rdf:resource=''#Professor''/> </owl:Restriction> </rdfs:subClassOf> </owl:Class>
Manchester OWL syntax • Restrictions
Manchester OWL syntax • Boolean Class Constructors
Example Person and hasChild some (Person and (hasChild only Man) and (hasChild some Person)) Describes the set of people who have at least one child that has some children that are only men (i.e. grandparents that only have grandsons)
OWL vs. RDF • OWL and RDF are much of the same thing, but OWL is a stronger language with greater machine interpretability than RDF. • OWL comes with a larger vocabulary and stronger syntax than RDF. • OWL supports the identification of inconsistencies (e.g. disjoint classes man & woman, instances and classes cannot be both)
How to create an ontology? • Determine the scope of the ontology • Consider reusing existing ontologies • Enumerate important terms in the ontology • Define the classes and the class hierarchy • Define the properties of classes-slots • Define the constraints of the slots • Create instances • In reality, there is no order for these process…
Determine the scope • What is the domain that the ontology will cover? • For what we are going to use the ontology? • For what types of questions the information in the ontology should provide answers?
Determine the scope • What is the domain that the ontology will cover? • e.g. Cardiology, food… • For what we are going to use the ontology? • e.g. Question answering, information extraction • For what types of questions the information in the ontology should provide answers? • e.g. what is the treatment for patient of cognitive heart failure?
What to reuse? • Domain specific ontologies • UMLS Semantic Network • Semantic type and Relationship • SNOMED CT • National Drug File – Reference Term • IEEE Upper Ontology • Suggested Upper Merged Ontology
Where to get important terms? • From • your mind if you are domain experts • Other persons • From • Books • Guidelines • Literatures • etc.
Classes • Classes usually constitute a taxonomic hierarchy (a subclass-superclass hierarchy) • A class hierarchy is usually an IS-A hierarchy • an instance of a subclass is an instance of a superclass • If you think of a class as a set of elements a subclass is a subset • Multiple inheritance, (A is a B), (A is a C)
Properties • rdf:Property • owl:ObjectProperty • Link individuals to individuals • hasParent • owl:DatatypeProperty • Link individuals to data values Go to protégé, see NDF-RT.owl
Property restrictions • Value constraints • Put constraints on value range for a particular property • Cardinality constraints • Constraints on the number of values for a particular property • e.g. hasParent • Value constraints: allValuesFrom “Human” • Cardinality constraints: maxCardinality “2”
Ontology Reasoning • Determine the consistency of ontology • Identify subsumption relationships between classes • Reasoners: • RacerPro • FaCT++ • C++-based reasoner • Pellet • HermiT
Evaluation of Ontology • Assessment by human against a set of criteria • Natural language evaluation techniques • Evaluate use of ontology in an application • Comparison of ontology against a source of domain data • Using reality as benchmark • Ontology accreditation, certification, maturity model
Applications of Ontology • Global Health Monitor • BioCaster • Question answering • QALL-ME • NLP/IE • Extended Syndrome Surveillance Ontology
Institutes & People • W3C web ontology • ONTOLOG • Stanford • Thomas R. Gruber • Mark A. Musen, M.D., Ph.D • Buffalo ontology site • Barry Smith • University of Manchester • e.g. Alan Rector
Processing Tools & Triple Store • Ontology Engineering Environments • Ontolingua • Protégé • Altova SemanticWorks (Commercial) • Parser/Serializer • Rapper: Raptor RDF parsing and serializing utility • SPARQL Query • Jena ARQ • Triple Store • Jena SDB • http://www.w3.org/wiki/LargeTripleStores
Resources all about OWL • OWL Web Ontology Language Overview • OWL Web Ontology Language Guide • OWL Web Ontology Language Reference • OWL Web Ontology Language Semantics and Abstract Syntax • OWL Web Ontology Language Test Cases • OWL Web Ontology Language Use Cases and Requirements • OWL Web Ontology Language XML Presentation Syntax • OWL Web Ontology Language Parsing OWL in RDF/XML
Practice • Protégé • How to work with Protégé • Jena SDB Triple Store • Load the RDF file into triple store
Protégé - Windows • Ontology metrics • Preference Render • Show the classes in different way
Inverse Properties • Each object property may have a corresponding inverse property. • If some property links individual a to individual b, then its inverse property will link individual b to individual a.
Functional Properties • If a property is functional, for a given individual, there can only be at most one individual to be related via this property. • For a given domain, range must be unique • Functional properties are also known as single valued properties.
Inverse Functional Properties • If a property is inverse functional, then its inverse property is functional. • For a given range, domain must be unique.
Functional vs. inverse functional properties • FunctionalProperty vs InverseFunctionalProperty
Transitive Properties • If a property is transitive, and the property related individual a to individual b, and also individual b to individual c, then we can infer that individual a is related to individual c via property P.
Protégé – DL Query • Quickly test definitions of classes to see that they subsume the appropriate subclasses. • Or check for class membership of arbitrary descriptions without having to create named class placeholders. • Follow Manchester OWL Syntax • http://protegewiki.stanford.edu/wiki/DLQueryTab • Example • For pizza.owl • Pizza and hasTopping only VegetarianTopping
Protégé - OWLViz • http://protegewiki.stanford.edu/wiki/OWLViz • Graphviz • Installation • Set path
Install • Mysql server • Latest mysql connector jar file • Jena SDB • Cygwin