Introduction to Ontology Part 2 Design and Building
Introduction to Ontology Part 2 Design and Building Ontology Using Protege Umi Laili Yuhana December, 24 2007 Context Aware Group - Intelligent Agent Laboratory Computer Science and Information Engineering National Taiwan University (NTU)
Outline � Last Week – 12/17/2007 �Idea of Ontology �Semantic Web Vision �From Today’s Web to The Semantic Web �The advantage of Ontology �Ontology in a glance � Tonight -- 12/24/2007 �Review (last week) �Create and Build Ontology ○ Step by Step ○ Using Protégé
Ontology Definition � Explicit and formal specification of a conceptualization � Consist of finite list of terms and the relationships between these terms � Consist of concepts (also known as classes), relations (properties), instances and axioms -- (CRIA) Review (Last Week)
Step by Step Build Ontology Determine Scope Check for Anomalies Consider Reuse Define Instances Enumerate Terms Define Facets Define Taxonomy Define Properties Step by Step Build Ontology
Study Case: Location Ontology Modeling Based on CSIE Building Step by Step Build Ontology
Determine Scope Domain : Indoor Location 1 st floor map Step by Step Build Ontology
Determine Scope What is the domain that the ontology will cover ? Location ontology for indoor location (CSIE building) For what we are going to use the ontology ? ○ ○ Get knowledge about CSIE building location Find place / room in CSIE building ○ ○ Where is Professor Jane’s Room ? What is Professor Jane’s Lab ? ○ Anyone who want to find the location in CSIE building For what types question should the ontology provide answer ? Who will use and maintain the ontology ? Step by Step Build Ontology
Consider Reuse � We can reuse ontology in the same domain knowledge if it exists � If no ontology exists, create new one Step by Step Build Ontology
Create New Ontology In Protege Protégé � Open Protégé � Create New OWL/RDF Project � Given “location. owl” as name Using Protégé
Enumerate Terms � Identify relevant terms � Write down in an unstructured list all the relevant terms � Noun -> basis for class names � Verbs -> basis for property names �has room number �owned by �etc Step by Step Build Ontology
Description about CSIE Building Enumerate Terms Has 1 basement and 5 floors Each floor has many rooms, passage, stairs and elevators There are several types of rooms: 1. Laboratory. These rooms are provided for students to explore and practice their knowledge, do research, assignment from teacher or supervisor, or the project. Each laboratory has name, room number, door way, spread on 5 floors, and supervised by teacher as supervisor. 2. Seminar rooms are provided for students and teacher to discuss their field, project, or discuss the paper. 3. Classrooms are provided to support academic activity such teaching process. 4. Rest room. Each floor has rest room as service room for people. 5. Staff’s office is office for teacher or CSIE staff. Step by Step Build Ontology
Description about CSIE Building � Enumerate Terms 2 types of passages: corridor and door way. � Corridor connect one room with another room or another place � door way is way out from room. � Stairs and Elevators connected one floor with another. � There are 3 stairs in CSIE building, ○ 2 stairs in east side (stair in south east building and stair in north east building) ○ one stair in west side. � There are 2 elevators in east side, ○ elevator in south east building ○ elevator in north east building Step by Step Build Ontology
Enumerate Terms in CSIE Building Ontology � � � � Room Corridor Classroom Door way Floor Passage Noun Stair Elevator Laboratory Restroom Office Seminar room Kitchen Place indoor connect with Noun -> basis for class names Verbs -> basis for property names room name room’s number passage at floor room at floor consist of room has door stair at floor elevator at floor Verb floor number laboratory’s name has room number lab supervised by office owned by Step Build Ontology
Define Taxonomy � Organize relevance terms in taxonomic (subclass) hierarchy � Noun as class : �Room, Corridor, Classroom, Door way, Floor, Passage , Stair, Elevator, Laboratory, Restroom , Office, Seminar room, Kitchen, Place indoor Step by Step Build Ontology
Define Taxonomy Define Class (Class: provide an abstraction mechanism for grouping resources with similar characteristics) Room Corridor Classroom Door way Floor Passage Stair Elevator Laboratory Restroom Office Seminar room Kitchen Place indoor Room Classroom Laboratory Restroom Office Seminar room Kitchen Passage Corridor Door way Stair Elevator Floor Step by Step Build Ontology
Define Taxonomy Class Hierarchy Organize class in taxonomic (subclass) hierarchy Step by Step Build Ontology
Create Class and Class Hierarchy Protégé � Choose “OWLClasses” Tab � Create New Class and subclass based on previous analysis � First letter in class name is capital case Using Protégé
Define Properties Property = Slot � Represent relationships between two individual � Link individual from the domain and individual from the range � There are 3 type of property: �Object Property �Data Type Property �Annotation Property Room at_floor Range Floor Domain Step by Step Build Ontology
Object Property (domain: class, range: class) Define Properties Link an individual to an individual � Types of object property � �Inverse property ○ e. g. : has_parent inverse of has_child, room. At. Floor inverse of consist. Of. Room �Functional property ○ e. g. : has_birth_mother �Transitive property ○ e, g. : has_anchestor, under_of �Symmetric property ○ e. g. : has_sibling, connect with Step by Step Build Ontology
Define Object Property domain: class connect. With room name passage at floor room’s number stair at floor number elevator at floor consist of room laboratory’s name room has door has room number lab supervised by office owned by Place_indoor Passage Room Stair Elevator Floor Room connect. With passage. At. Floor room. At. Floor stair. At. Floor elevator. At. Floor consist. Of. Room has. Door Define Properties range: class Place_indoor Floor Room Door. Way Step by Step Build Ontology
Define Properties Object Property No. Property’s Name 1. 2. 3. 4. 5. 6. 7. 8. 9. Domain passage_at_floor Passage (corridor & doorway) room_at_floor Room consist_of_room Floor room_has_door Room stair_at_floor Stair elevator_at_floor Elevator under_of Floor above_of Floor Connect_with Place_indoor Range Floor Room Door Floor Place_indoor Inverse Property, Transitive property Symetric Property Step by Step Build Ontology
Create Object Property Protégé � Choose “Properties” Tab � In Property Browser choose “Object” Tab � First letter in property name is lower case � Create New Property, given name and choose domain and range for each property � Set property type Using Protégé
Data Type Property (domain: class, range: data Define Properties type) Link an individual to an XML schema data type value or an rdf literal e. g. : room. Name Room String Step by Step Build Ontology
Define Data Type Property Define Properties Data Type Properties (domain: class, range: data type) No. Property’s Name 1. 2. 3. 4. 5. 6. floor. Number lab. Name room. Name has. Room. Number lab. Supervised. By Office. Ownedby Domain Floor Laboratory Room Laboratorium Office Range Integer String String Step by Step Build Ontology
Create Data Type Property Protégé � Choose “Properties” Tab � In Property Browser choose “Datatype” Tab � First letter in property name is lower case � Create New Property, given name and choose domain and range for each property � Set property type Using Protégé
Define Facets � Facet is used to represent information about properties (slots), sometimes called role restrictions / axiom � Kind of facets : �Cardinality �Value Type Step by Step Build Ontology
Cardinality Define Facets � Cardinality represents the exact number of values that may be asserted for the slot for that class �Single cardinality �Multiple cardinality ○ Minimum cardinality ○ Maximum cardinality Step by Step Build Ontology
Define Facets Value Type � Value-type facet describes what type of values can fill in the slot �String �Number �Boolean �Enumerated Step by Step Build Ontology
Instances: Individual of the class � Example Define Instances : �Lab 336 : Instance of Laboratory ○ has_room. Number: 336 ○ lab_name: Intelligent Agent Laboratory ○ connect. With: door 336, lab 338 ○ lab_supervised. By: Jane Yung-Jen Hsu ○ room_at_floor: floor 3 ○ in. Region: csie. Building Step by Step Build Ontology
Next Week � Create Instance Using Protégé � Checking Consistency / anomalies � Read OWL document
Reference � N. F Noy, and D. L. Mc. Guinnes, Ontology Development 101 : A Guide to Creating Your First Ontology, 2001 � Horridge, Mattahew, A Practical Guide to Building OWL Ontologies Using The Protege-OWL plugin and CO-ODE Tool, The University of Manchester, 2004 � Protege-OWL tutorial http: //protege. stanford. edu/overview/prot ege-owl. html
Install Protégé 3. 4 � Open http: //protege. stanford. edu/download/reg istered. html � Choose Download 3. 4 beta � Choose Full Protégé, download And Install Backup Slide
- Slides: 33