of 26
8/18/2019 02 Semantic Nets - Semanticnetjg1
1/26
Objects
• Objects are at the heart of the Object
Oriented Paradigm
•What is an object?
8/18/2019 02 Semantic Nets - Semanticnetjg1
2/26
Objects
• We are surrounded by objects.
• In this class room there are desks,
blackboards, lights , chairs and so on.• Each object has specific attributes
• he desk is made of !ood. he seat has a
blue co"er and so on.
8/18/2019 02 Semantic Nets - Semanticnetjg1
3/26
Objects ha"e associations and
relationships !ith each other .
• Objects ha"e associations and
relationships !ith each other .
•#eats ha"e desktops attached.
• $ll are attached to the floor
• #eats are adjacent to other seats.
• hey are oriented in the same !ay.• %ights are controlled by s!itches
8/18/2019 02 Semantic Nets - Semanticnetjg1
4/26
Object &oles and 'unctions
• Each Object in the room has a specific
role or function or beha"iour.
•#eats are to be sat on.
• (oard is to be !ritten on.
• %ights can be turned on and off
• (oards can be mo"ed up and do!n andseats can be put up and do!n.
8/18/2019 02 Semantic Nets - Semanticnetjg1
5/26
Objects can be classified
• Within the room objects can be grouped
into different classes
•'or e)ample !e could ha"e the furnitureobjects e.g. chairs, tables, !orktop
• We could also ha"e the electrical objects.
• %ights, projector, laptop and so on.
8/18/2019 02 Semantic Nets - Semanticnetjg1
6/26
he nature of Objects
• *learly Objects constitute a comple) multifaceted concept.
• heir definition is dependent on many elements+their attributes , their beha"iour, theirclassification and as !e !ill see much , muchmore
• o in"estigate the nature of objects , it is helpfulto consider an important kno!ledge
representation scheme !hich is the basis fortheoretical frame!orks of the object orientedparadigm
• his frame!ork is kno!n as semantic net!orks
8/18/2019 02 Semantic Nets - Semanticnetjg1
7/26
#emantic ets
• #emantic net!orks are a popular scheme
!hich elegantly reflect these ideas.
• $ net!ork consists of nodes repesentingobjects, concepts and e"ents and links
bet!een the nodes representing their
interrelations.
8/18/2019 02 Semantic Nets - Semanticnetjg1
8/26
E)ample
• -sing the e)ample Birds have wings
• a typical semantic net !ould be
8/18/2019 02 Semantic Nets - Semanticnetjg1
9/26
Origin
• he de"elopment of semantic net!orks had itsorigins in psychology. &oss uillian in /012designed t!o semantic net!ork based systemsthat !ere intended primariliy as psychological
models of associatei"e memory.• #emantic et!orks 3uickly found application in
$I. (. &aphaels #I& system, also /012, !as oneof the first programs to use this type of
representation scheme.• #I& !as a 3uestion $ns!ering system and couldans!er 3uestions re3uiring a "ariety of simplereasoning tasks and relationships
8/18/2019 02 Semantic Nets - Semanticnetjg1
10/26
4eaning of #emantic ets
• he semantics of net structures ho!e"er
depends solely on the program that
manipulates them and there are no fi)ed
con"entions about their meaning.
• $ !ide "ariety of net!ork based systems
ha"e been implemented that use totally
different procedures for makinginferences.
8/18/2019 02 Semantic Nets - Semanticnetjg1
11/26
$nother E)ample
Dog bone
likes
8/18/2019 02 Semantic Nets - Semanticnetjg1
12/26
E"ol"ing 'eatures
• While there are no fi)ed con"entions, a
number of important features of #emantic
nets ha"e emerged , that are !idely used.
• hese ha"e largely emerged because of
the application of #emantic ets to Object
Oriented heory.
8/18/2019 02 Semantic Nets - Semanticnetjg1
13/26
Object 5efinitions
• he central aspect of the object paradigm
is ho! it defines objects.
• he basic mechanism of representation is
the articulation of class hierarchies.
• Instances of Objects e)ist. In turn Objectsbelong to classes and these in turn can
belong to other classes
8/18/2019 02 Semantic Nets - Semanticnetjg1
14/26
E)ample
• *onsider 'ido 6 !ho is a dog7
• 'ido is instance of the object 8dog9.
• 5ogs belong to the class pets, !hich fore)ample could also include other classes
such as cats.
• Pets in turn belong to a class animals andso on
8/18/2019 02 Semantic Nets - Semanticnetjg1
15/26
'ido
5ogs
Pets
$nimals
*ats
8/18/2019 02 Semantic Nets - Semanticnetjg1
16/26
%abels used in #emantic ets
• Objects and Instances
• (oth &epresented by odes linked by an
• I#:$ link
'ido 5ogI#:$
InstanceObject
8/18/2019 02 Semantic Nets - Semanticnetjg1
17/26
%abels used in #emantic ets
• Objects and *lasses
• (oth &epresented by odes linked by an
• #ubset or a #uper#et link
5og Pets#ubset
Object*lass
8/18/2019 02 Semantic Nets - Semanticnetjg1
18/26
#uper#et links
• Objects and *lasses
• (oth &epresented by odes linked by an
• #uper#et link
5og Pets#ubset
Object*lass#uperset
8/18/2019 02 Semantic Nets - Semanticnetjg1
19/26
&elationships, attributes and
associations
&elationships, attributes and associations
&epresented by a labelled link bet!een
objects etc
'ido(lack and
!hite
colour
8/18/2019 02 Semantic Nets - Semanticnetjg1
20/26
*omponent Parts
• Object components
• (oth &epresented by odes linked by an
• ;$P 6has as part7 link• $ dog has a tail
5og ail;$P
ObjectObject
8/18/2019 02 Semantic Nets - Semanticnetjg1
21/26
Inheritance
• $ttributes of classes are inherited by
subclasses and instances of objects
• (ecause !e kno! dogs ha"e tails and
'ido is a dog !e kno! 'ido has a tail
since this is inherited from the parent class
8/18/2019 02 Semantic Nets - Semanticnetjg1
22/26
Inheritance
• $ dog has a tail and 'ido is a dog
5og ail;$P
ObjectObject
'ido
I#$
8/18/2019 02 Semantic Nets - Semanticnetjg1
23/26
(igger E)ample
• E)ercise
• What does the follo!ing #emantic net
represent
8/18/2019 02 Semantic Nets - Semanticnetjg1
24/26
4y ;ouse
(ungalo!
;ouse
(uilding
&oof
/
brick
!alls&ed
;abitation
o. Of
#toreys
Purpose
*olour ;$P ;$P
subset
subset
I#$4ade:of
8/18/2019 02 Semantic Nets - Semanticnetjg1
25/26
Advantages of Semantic Nets
• Easy to "isualiraphical in nature = easy for humans tointerpret
• E)pressi"e po!er e3ual to or e)ceeding that of 'irst OrderPredicate %ogic
• 'ormal definitions of semantic net!orks ha"e been de"eloped for
use• &elated kno!ledge is easily clustered = logically and physicallyclose
• Efficient in space re3uirements = Objects represented only once = &elationships handled by pointers
• Other schemes are limited to rue or 'alse ans!ers !here as#emantic ets are more informati"e and fle)ible
• ot limited to only binary representation can also represent actionconcepts
8/18/2019 02 Semantic Nets - Semanticnetjg1
26/26
Disadvantages of Semantic Nets
• Inheritance 6particularly from multiplesources and !hen e)ceptions in
inheritance are !anted7 can causeproblems such as conflicts
• 'acts placed inappropriately cause
problems• o standards about node and arc "alues =
in spite of the generic formal definitions