0% found this document useful (0 votes)
9 views

Lecture 05 An Introduction To Ontology Engineering - Compressed

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Lecture 05 An Introduction To Ontology Engineering - Compressed

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Important Terms in an Ontology

(Part 4/6)
Dr. Yongxin Liao
Course Outlines
• Important Terms in an Ontology (4/6)
– Data Ranges
• Data Types
• Enumera@on of Data Values (Literals)
• Data Range Connec@ves
– Complex Class Expressions (2/2)
• Data Property Restric@ons
• Protégé Prac@ces
Important Terms in an Ontology
• Several Important Terms
– Axioms
– Concepts (Individuals and Classes)
– Rela@onships (Class Asser@ons, Subclasses
Disjoint/Equivalent Classes, Individual Equality/Inequality
Proper@es, Property Asser@ons, Property Characteris@cs,
and Property Descrip@ons)
– Complex Class Expressions (Enumera@on of Individuals,
Proposi@onal Connec@ves, Object Property Restric@ons,
Necessary and Sufficient Condi@ons,
Data Property Restric;ons)
– Data Ranges (Data Types and Data Type Restric;ons)
– Reasoning Rules
– Knowledge Base (T-box and A-box)
– SPARQL Query
Data Ranges
• Data Type
– Each kind of data values is called a data type.
– Data Types for Numbers
nega@veInteger posi@veInteger

25
-25 0
250
-250
-0.25 0.25

-2.5 2.5
integer
decimal
Data Ranges
• Data Type
– Data Types for Strings
• string character strings
E.g. “A pizza that only has Mozzarella and Tomato Sauce Toppings.”^^string
“Harry James Poaer”^^string

– Data Types for Time Instants


• dateTime instances of @me “YYYY-MM-DDThh:mm:ss”
E.g. “2015-10-30T14:00:00”^^dateTime
“2015-10-30T14:00:00-03:00”^^dateTime
“2015-10-30T14:00:00+08:00”^^dateTime

– Data Types for Boolean Values


• boolean the values of two-valued logic
E.g. “true”^^boolean “false”^^boolean
Data Ranges
• Enumera@on of Data Values
– An enumera@on of data values contains exactly the
explicitly specified data values
– In protégé, it is described by
• Precisely lis@ng all data values
• Separa@ng them by “,”
• Inside curly brackets (“{” and “}” )
E.g. Bitmaps can require a color-depth of up to 24 bits per pixel (1,4,8,16,24 bits)

Bitmap
Examples

(1 bits/pixel) (8 bits/pixel) (24 bits/pixel)

The range of the data property hasBits is {1, 4, 8, 16, 24}


{“1”^^integer, “4”^^integer, “8”^^integer, “16”^^integer, “24”^^integer}
{“1”^^xsd:integer, “4”^^xsd:integer, “8”^^xsd:integer, “16”^^xsd:integer, “24”^^xsd:integer}
Data Ranges
• Datatype Restric@ons
– A datatype restric@on contains a data type and its
value space restric/ons
– In protégé, it is described by giving a data type and
its value space restric@ons inside square brackets (“[”
and “]” ).
• A data type + “[” + value space restric@ons + ”]”
– Restric@ons on Data types for numbers
e.g. integer[>1, <5]

– Restric@ons on Data types for strings


e.g. string[ length 5]
– Restric@ons on Data types for @me instances
e.g. dateTime[ > 1991-09-10T00:00:00]
Data Ranges
• Datatype Restric@ons
– Restric@ons on Data types for numbers
A data type + “[” + value space restric@ons + ”]”
“decimal”,
“integer”, • Each value space restric@on is composed of:
“nega/veInteger”, a restric/on symbol + a number
“posi/veInteger” • It is possible to have mul@ple restric@ons that
are separated by “,”.
The rela@on among those
restric@ons is intersec@on. • The restric@on symbol can be “<=“, “>=”, “<”, “>”

E.g. decimal[< -12]

integer[> 1, < 5]
Data Ranges
• Datatype Restric@ons
– Restric@ons on Data types for strings
A data type + “[” + value space restric@ons + ”]”
Zero or a posi@ve integer
“string” • Each value space restric@on is composed of:
a restric/on symbol + a number
• It is possible to have mul@ple restric@ons that are
The rela@on among those
separated by “,”.
restric@ons is intersec@on. • The restric@on symbol can be “length”, “minLength”,
or “maxLength”

E.g. string[length “5"^^integer]

string[minLength "4"^^integer, maxLength "6"^^integer]


Data Ranges
• Datatype Restric@ons
– Restric@ons on Data types for Time Instances
A data type + “[” + value space restric@ons + ”]”

“dateTime” • Each value space restric@on is composed of:


a restric/on symbol + a date /me
• It is possible to have mul@ple restric@ons that
are separated by “,”.
The rela@on among those
restric@ons is intersec@on. • The restric@on symbol can be “<=“, “>=”, “<”, “>”

E.g. dateTime[> 1991-09-10T00:00:00]

dateTime[> 1980-10-10T00:00:00 , < 1990-10-10T00:00:00]


Data Ranges
• Data Range Connec@ves
– Intersec@on of Data Ranges
• An intersec@on data range contains all the data values that are
shared (co-owned) by all the data ranges in this expression
• In protégé, it is described by combining two or more data
ranges using the “and” operator.
posi@veInteger and nega@veInteger = ∅

posi@veInteger nega@veInteger

integer
Data Ranges
• Data Range Connec@ves
– Union of Data Ranges
• A union data range contains all the data values that are
contained in at least one data range in this expression
• In protégé, it is described by combining two or more data
ranges using the “or” operator.
posi@veInteger or nega@veInteger

posi@veInteger nega@veInteger

integer
Data Ranges
• Data Range Connec@ves
– Complement of Data Ranges
• The complement of the data range x contains all the data
values that are not contained in the data range x.
• In protégé, it is described by placing a “not” operator at the
beginning of that data range.
not posi@veInteger

posi@veInteger nega@veInteger

integer
p Value n

Class Expressions p
p Value x
Value y
p
Value z

• Quan@fier Restric@ons Existen@al Quan@fica@on on p and dr


dr

– Data Property Existen@al Quan@fica@on


• A data property existen@al restric@on expression consists
of a data property p and a data range dr
• It contains all those individuals that are connected, at least
once, by p to the data values that are in the range of dr.
• In Protégé, it is described as
a data property + “some” + a data range
hasBirthday “April 13 1968”
hasBirthday some dateTime ^^string

hasBirthday “1968-04-13T00:00:00”
^^dateTime
All its Individuals should JamesBond
have at least one birthday hasBirthday
HarryPoaer “1980-07-31T00:00:00”
which is in the range of ^^dateTime
dateTime dateTime
p

Class Expressions
Value n

p
p Value x
p Value y
Value z

• Quan@fier Restric@ons Universal Quan@fica@on on p and dr


dr

– Data Property Universal Quan@fica@on


• A data property universal restric@on expression consists of
a data property p and a data range dr
• it contains all those individuals that are only connected by
p to the data values that are in the range of dr.
• In Protégé, it is described as
a data property + “only” + a data range
hasBirthday “April 13 1968”
hasBirthday only dateTime ^^string

hasBirthday
“1968-04-13T00:00:00”
All it Individuals should have JamesBond ^^dateTime

their birthdays only in the


HarryPoaer hasBirthday “1980-07-31T00:00:00”
range of dateTime ^^dateTime
dateTime
Class Expressions p
p Value n

p Value x

• Value Restric@ons
Data value Restric@on on p and x
– Data Value Restric@on
• A data value restric@on expression consists of a data
property p and a data value x
• It contains all those individuals that are connected by p to x.
• In Protégé, it is described as
a data property + “value” + a data value

hasTitle value “double-O agents”^^xsd:string


hasTitle “Royal Navy Commander”
^^xsd:string
hasTitle
All its Individuals should have JamesBond “double-O agents”
hasTitle
the “double-O agents” as ^^xsd:string
JackMason
their @tles
if n+1 p

Class Expressions p Value n+1


Value y

Up to n Other Values

• Cardinality Restric@ons
Maximum cardinality
Value x
restric@on on p, n and dr p
dr

– Data Property Maximum Cardinality


• A data property maximum cardinality expression consists of a
data property p, a nonnega@ve integer n, and a data range dr
• It contains all those individuals that are connected by p to at
most n different data values that are in the range of dr.
• In protégé, it is described as
a data property + “max” + a nonnega@ve integer + a data range

hasAlias “The Chosen One”


^^xsd:string

hasAlias max 2 string hasAlias “Undesirable No. 1”


^^xsd:string

HarryPoaer “The Boy Who Lived”


^^xsd:string
hasAlias string
Class Expressions p
Value y

At least n Other Values

• Cardinality Restric@ons Minimum cardinality


restric@on on p, n and dr p Value x
dr
– Data Property Minimum Cardinality
• A data property minimum cardinality restric@on is consist of a
data property p, a nonnega@ve integer n, and a data range dr
• It contains all those individuals that are connected by p to at
least n different data values that are in the range of dr.
• In protégé, it is described as
a data property + “min” + a nonnega@ve integer+ a data range

hasAlias “The Chosen One”


^^xsd:string
hasAlias min 2 string
hasAlias “Undesirable No. 1”
^^xsd:string

HarryPoaer “The Boy Who Lived”


hasAlias ^^xsd:string
hasAlias “Mr. Fisher”^^xsd:string

JamesBond hasAlias
string
if n+1 p

Class Expressions Value n+1


Value y

Exactly n Other Values

• Cardinality Restric@ons Exact cardinality


restric@on on p, n and dr p Value x
dr
– Data Property Exact Cardinality
• A data property exact cardinality restric@on is consist of a
data property p, a nonnega@ve integer n, and a data range dr
• It contains all those individuals that are connected by p to
exactly n different data values that are in the range of dr.
• In protégé, it is described as
a data property + “exactly” + a nonnega@ve integer + a data range
hasAlias “The Chosen One”
^^xsd:string
hasAlias exactly 2 string
hasAlias “Undesirable No. 1”
^^xsd:string

HarryPoaer “The Boy Who Lived”


hasAlias ^^xsd:string

hasAlias
“Mr. Fisher”^^xsd:string

JamesBond hasAlias
string
Protégé Prac@ces
• The “Classes” Tab
– Complex Class Expressions (via Data Proper@es)
• Equivalent Classes Axioms
• Subclass Axioms

• The “Data Proper@es” Tab


– Data Property Ranges
• Data Range Expressions
Protégé Prac@ces
• The “SubClass Of”
– “SubClass Of” => necessary condi@ons
• Let class C be a subclass of some necessary
condi@ons
• All the individuals and subclasses of C are necessary to
fulfill those condi@ons.
Protégé Prac@ces
• Pizzas
– All pizza should fulfill the following necessary condi@ons:
a) Each pizza contains exactly one weight in grams (decimal);
b) Each pizza contains exactly one size in inches (integer);
c) Each pizza contains exactly one produc@on date (dateTime);
d) Each Pizza might have zero or more history backgrounds
(string).
hasProduc@onDate exactly 1
hasSizeInInches exactly 1
dateTime
“2015-10-01T00:00:00” hasP
rodu Pizza
^^dateTime c@on
D ate hasSizeInInches “9”
^^integer integer

“Pizza Margherita, was invented in 1889,


story
when the Royal Palace of Capodimonte hasHi hasWeightInGrams “365.3”
commissioned the Neapolitan ^^decimal
ry min 0
pizzaiolo (pizza maker)….”
hasHisto hasWeightInGrams exactly 1 decimal
^^string string
Protégé Prac@ces
• Four Kinds of Pizzas
– Margherita Pizza
• Its size is 9 inches
• Its weight is from 360 to 380 grams
• It has one history background “Pizza Margherita, was invented in
1889, when the Royal Palace of Capodimonte commissioned the
Neapolitan pizzaiolo (pizza maker) Raffaele Esposito to create a pizza in
honor of the visi@ng Queen Margherita.”
– American Pizza
• Its size is 9 inches
• Its weight is from 400 to 420 grams
– American Hot Pizza
• Its size is either 6 or 9 inches
• Its weight is from 150 to 450 grams
– Soho Pizza
• Its size is 12 inches.
• Its weight is from 550 to 580 grams
Protégé Prac@ces
• The “Equivalent To”
– “Equivalent To” => necessary & sufficient condi@ons
• Let class C be a equivalent class of some necessary
&sufficient condi@ons
• All the individuals and subclasses of C are necessary to
fulfill those condi@ons.
• Meanwhile, an individual (a class) that sa@sfy those
condi@ons is sufficient to be a member (a subclass) of C.
Protégé Prac@ces
• Data Type: string
• Historical Pizzas (Data Type: string)
– All Historical Pizzas (all the individuals and subclasses of class:
HistoricalPizza) should contains at least one historical
background (a historical background in the data type of string).

– A pizza (a collec@on of pizzas) that contains at least


one historical background (a historical background in the
data type of string) is sufficient to be a member (a
subset) of Historical Pizzas
Protégé Prac@ces
• Data Type: integer
• Six or Nine Inches Pizzas (Data Type: integer)
– All Six or Nine Inches Pizzas (all the individuals of class:
NineInchesPizza) should be in the size of six or nine
inches.

– A pizza (a collec@on of pizzas) that in the size of six


or nine inches is sufficient to be a member (a
subset) of Six or Nine Inches Pizzas.
Protégé Prac@ces
• Data Type: decimal
• Big Pizzas (Data Type: decimal)
– All Big Pizzas (all the individuals and subclasses of class: BigPizza)
should have a weight more than half a kilogram.

– A pizza (a collec@on of pizzas) that have a weight


more than half a kilogram is sufficient to be a
member (a subset) of Big Pizzas
Protégé Prac@ces
• Data Type: dateTime
• Pizzas Produced In July 2015 (Data Type: dateTime)
– All Pizzas in the class PizzaProducedInJuly2015
should be produced during the July of 2015.

– A pizza (a collec@on of pizzas) that is produced


during the July of 2015 is sufficient to be a member
(a subset) of PizzaProducedInJuly2015
Protégé Prac@ces
• Data Type: boolean
• The Expired Pizzas (Data Type: boolean)
– Create an new data property named isExpired.

– Specify the ExamplePizzaX is in the expired state.

– A Class named ExpiredPizza to classify all pizzas that


are expired.
Protégé Prac@ces
• Complete the Addi@onal Protégé Prac@ces
• Answer the corresponding ques@ons.
Thank you
for your aaen@on!

Any Ques@ons?

You might also like