690 likes | 893 Views
Process to create a. “Think Ontologically”. A Crash Course in Ontology Modelling for Archaeologists. Yi Hong Department of Computer Sciences University of Leicester. How we describe knowledge? … as archaeologists . Unstructured free-form text natural language
E N D
Process to create a “Think Ontologically” A Crash Course in Ontology Modelling for Archaeologists Yi Hong Department of Computer Sciences University of Leicester
How we describe knowledge? …as archaeologists • Unstructured free-form text • natural language • human readable, highly expressive • no universally-agreed terminology • reflect individual interpretations and explanations of archaeological evidence “Archaeology is the search for fact... not truth. If it's truth you're looking for, Dr. Tyree's philosophy class is right down the hall.” Indiana Jones
How we describe knowledge? …as computer scientists • Formal Specification • programming language, metadata • machine readable and executable • controlled vocabulary, Limited expressivity • well-defined, highly uniform mathematical symbols and notations “Computer language design is just like a stroll in the park. Jurassic Park, that is.”-Larry Wall inventor of “Perl”
Traditional Relational Database approach Table values row Fields Record Identified/linked by Primary/Foreign Keys
Process to create a database Relational Database approach Form Step 1. paper-based or electronic form List fields (columns) Group fields Create tables & columns Link tables(foreign keys) Add records
Process to create a database Relational Database approach Form Step 2. List all fields List fields (columns) • Inventory Number, • Excavation Date, • Site name, • Site description, • Material, • Weight, • Catalog, • Images, • Object Description Group fields Create tables & columns Link tables(foreign keys) Add records
Process to create a database Relational Database approach Form Step 3. Group fields, give a group name List fields (columns) • Object • Inventory Number • Excavation Date • Material • Weight • Catalog • Images • Object description • Site • Site name • Site description • …. Group fields Create tables & columns Link tables(foreign keys) Add records
Process to create a database Relational Database approach Form Step 4. create tables, columns List fields (columns) Group fields Create tables & columns Link tables(foreign keys) Add records
Process to create a database Relational Database approach Form Step 4. create tables, columns with MS Access List fields (columns) tables, fields (columns) Group fields primary-foreign key pairs Create tables & columns Link tables(foreign keys) Add records
Process to create a database Relational Database approach Form Step 4. Data entry List fields (columns) Group fields Create tables & columns Link tables(foreign keys) Add records
Example Scenario : Design a data structure for Course Modules Selection Relational Database Design Ontology Modeling • Requirement: • Every course module can only be taught by one Lecturer • A Lecturer can teach many courses.. • An student must enrol in at least 3 courses. • Max enrolment number for a course is 100. * Everystudent has a unique student ID * Everystaff has a unique staff ID
Relational Database Approach * Many to many relation Tables Student Form 1 Course List Form 2 (Lecturer) Form 3 (Student) Student ID Name …. Lecturer Staff ID Name …. Course Course ID Course Name …. ModuleSelection Course ID Staff ID Student ID
Ontology • “An ontology is a formal specification of a conceptualization” • Thomas Gruber
Relational Database vs Ontological Database Schema (SQL) (table, field) Ontology (RDF/OWL) (class, property) DefineStructure Records Triples/ axioms Basic elements Products/ Editor Relational DB OntoDB (Triple store) Virtuoso , Jena SDB, TDB etc. Microsoft Access, FileMaker, Oracle, MySQL etc Protége, SWOOP
Assume knowledge is completed everything we don’t know is false Web Ontology Language Open World Assumption (OWA) We know Closed world assumption Assume knowledge is incompleted everything we don’t know is undefined OWA Data No Vegetarian? Yi Alessandro Closed world assumption No Yes Open world assumption No Undefined Question: Can vegetarian eat Tofu? Vegetarian: someone who does not eat meat.
“Think Ontologically” Outside the box Ontology Class restrict Instance of Individual Property has value for Identified/linked by (URI) Uniform Resource Identifier
“Think Ontologically” Class (Concept) Identify domain concepts Class (Concept) A template of definition of a particular kind of object Organise classes into hierarchies Identify properties Object properties Data type properties Add triples
“Think Ontologically” • Class (Concept) Identify domain concepts Class (Concept) A template of definition of a particular kind of object Organise classes into hierarchies e.g. Person, Ceramic Pot , Excavation Site, Color Identify properties Object properties Data type properties Add triples
“Think Ontologically” • Describe Class with Description Logic Examples “Circular terracotta loom weight” “Excavation site” “Settlement” Description Logic
“Think Ontologically” Individual Identify domain concepts Individual (object) Individuals are instance of class Organise classes into hierarchies Example: Identify properties Red is an instance of Color Object properties Data type properties Instance of Red Color Add triples
“Think Ontologically” • Individual Identify domain concepts Individual (object) Individuals are instance of class Organise classes into hierarchies Example: Identify properties Alessandro is an instance Person Object properties Data type properties Instance of Alessandro Person Add triples
“Think Ontologically” • Individual Identify domain concepts Individual (object) Individuals are instance of class Organise classes into hierarchies Example: Identify properties “A two holes disc loom weight found at Satriano” is an instance of loom weight Object properties Data type properties Instance of Add triples
Vessel(Bowl) • Ceramic vessel • wooden vessel “Think Ontologically” • Class Hierarchy Identify domain concepts Class hierarchy (subclass: “IS A” relationship) Organise classes into hierarchies Vessel(Bowl) Ceramic vessel supercalss Identify properties Wooden vessel Vessel(Bowl) Object properties Data type properties sub class of sub class of subclass wooden vessel Ceramic vessel Add triples
“Think Ontologically” Class Hierarchy Identify domain concepts Class hierarchy multiple inheritance Organise classes into hierarchies Craft worker Woman Identify properties sub class of sub class of Female Craft worker Object properties Data type properties Add triples
“Think Ontologically” • Class Hierarchy Identify domain concepts Class hierarchy multiple inheritance Organise classes into hierarchies Man Woman Identify properties sub class of sub class of Object properties Data type properties ?? Add triples Disjoined class
Common mistakes in organising class hierarchy “Think Ontologically” Example: Ontology for Education (1) (2) University University University National University Staff University of Leicester Student University of Glasgow Private University ….. ….. ….. Person Staff Student “Sub class ”relationship must be “is a” relationship UoL is an indiviual of class University , nota class
“Think Ontologically” Property e.g. Person, Excavation Site, Ceramic Pot, Color Identify domain concepts Property an element that takes a value and is associated with an object. It defines attributes of a concept and relations between concepts. Data type property Object property Organise classes into hierarchies Class hierarchy (sub class) Identify properties • Vessel(Bowl) • Ceramic vessel • wooden vessel Object properties Data type properties Add triples
“Think Ontologically” • Data Type Property e.g. Person, Excavation Site, Ceramic Pot, Color Identify domain concepts Data type property (attribute) A Data type property is an element that takes a value and is associated with an object (properties for which the value is a data literal) Organise classes into hierarchies Class hierarchy (sub class) Identify properties • Vessel(Bowl) • Ceramic vessel • wooden vessel String Number Date … Object properties Data type properties Add triples
“Think Ontologically” • Data Type Property e.g. Person, Excavation Site, Ceramic Pot, Color Identify domain concepts Data type property (attribute) A Data type property is an element that takes a value and is associated with an object (properties for which the value is a data literal) Organise classes into hierarchies Class hierarchy (sub class) Identify properties • Vessel(Bowl) • Ceramic vessel • wooden vessel e.g. Ceramic Pot Object properties Data type properties Weight: 1.4kg Description: “Beautiful” Year of Excavation: 1980 Add triples
“Think Ontologically” • Object Property e.g. Person, Excavation Site, Ceramic Pot, Color Identify domain concepts Object Property (relation) An Object property is a direct binary relation between two classes Organise classes into hierarchies Class hierarchy (sub class) Identify properties • Vessel(Bowl) • Ceramic vessel • wooden vessel was found at Object properties Data type properties Pot Site owned by Person Add triples
“Think Ontologically” Property e.g. Person, Excavation Site, Ceramic Pot, Color Identify domain concepts Property hierarchy Organise classes into hierarchies has parent Class hierarchy (sub class) Identify properties has mother • Vessel(Bowl) • Ceramic vessel • wooden vessel has father Object properties Data type properties Add triples
“Think Ontologically” Domain & Range e.g. Person, Excavation Site, Ceramic Pot, Color Identify domain concepts Property Domain: A domain of a property limits the individuals to which the property can be applied. Range: The range of a property limits the individuals that the property may have as its value Organise classes into hierarchies Class hierarchy (sub class) Identify properties • Vessel(Bowl) • Ceramic vessel • wooden vessel Object properties Data type properties Add triples
“Think Ontologically” Domain & Range Property Domain: A domain of a property limits the individuals to which the property can be applied. Range: The range of a property limits the individuals that the property may have as its value owned by teaches teaches Artefact Person • Teacher • Student range domain
“Think Ontologically” Domain & Range Domain & range can be the same class Property Domain: A domain of a property limits the individuals to which the property can be applied. Range: The range of a property limits the individuals that the property may have as its value Is a friend of Class Person Is a friend of Is a friend of
“Think Ontologically” Cardinality Cardinality cardinality specifies the occurances of a relationship A property can have: Exact cardinality Min cardinality Max cardinality has_CFS _Id yh37@le.ac.uk exactly 1 Univ Staff has_child min 1 child Mother has_passenger Bus max 60
“Think Ontologically” Inverse Property Property Inverse Property One property may be stated to be the inverse of another property. If the property P1 is stated to be the inverse of the property P2, then if X is related to Y by the P2 property, then Y is related to X by the P1 property (P1) owned by Person Pot (P2) has_personal_belongings (p1)hasParent • Child • Parent (p2) hasChild
Characteristics of a property Data Type Property Transitive Property Property Symmetric Property Object Property Functional Property InverseFunctional Property …………
Characteristics of a property Functional Property has husband Inverse Functional Property If John has a driving licence (No.) biologicalMotherOf
Characteristics of a property Transitive Property is part of is part of EBA 1 Early Bronze Age Bronze Age 3300 – 3000 BC 3300 - 1200 BC 3300 - 2100 BC is part of Symmetric Property overlaps with Iron Age Roman period overlaps with
Many other properties …. http://www.w3.org/TR/owl-ref/
Triple e.g. Person, Excavation Site, Ceramic Pot, Color Identify domain concepts Triple (RDF triple) A Triple is conventionally written in the order subject, predicate, object. The predicate is also known as the property of the triple. Organise classes into hierarchies Class hierarchy (sub class) Identify properties • Vessel(Bowl) • Ceramic vessel • wooden vessel Object properties Data type properties Add triples
Triple Outside the box • Basic element • contains three parts: subject, predicate and object. e.g. Person, Excavation Site, Ceramic Pot, Color Property Class hierarchy (sub class) Predicate • Vessel(Bowl) • Ceramic vessel • wooden vessel Subject Object Individual Individual
Triple Populating ontology Triple Graph A set of triples become a graph An ontology-based database is a graph was destroyed by • house fire
Example Scenario : Design a data structure for Course Modules Selection • Requirement: • Every course module can only be taught by one Lecturer • A Lecturer can teach many courses.. • An student must enrol in at least 3 courses. • Max enrolment number for a course is 100. * Everystudent has a unique student ID * Everystaff has a unique staff ID
Ontological approach Identify concepts Student Course Lecturer
Ontological approach Organise classes into hierarchies Student Lecturer Course
Making relationships explicit and clear Organise classes into hierarchies Person Lecturer Student Course Enable reuse of domain knowledge
Ontological approach Can be taken from other ontology Ontological Approach Person Lecturer Student Course Enable reuse of domain knowledge