l20 semantic net

Semantic Networks

Upload: ashish-kumar

Post on 21-Nov-2014




2 download


Page 1: L20 Semantic Net

Semantic Networks

Page 2: L20 Semantic Net


Semantic Networks

• Semantic networks are knowledge representation schemes involving nodes and links (arcs or arrows) between nodes.

• The nodes represent objects or concepts and the links represent relations between nodes.

• The links are directed and labeled; thus, a semantic network is a directed graph.

Page 3: L20 Semantic Net


Semantic Networks

• In practice, the nodes are usually represented by circles or boxes and the links are drawn as arrows between the circles as shown.

• a collection of undifferentiated objects and arrows

Page 4: L20 Semantic Net


Semantic Networks

• The structure of the network defines its meaning.

• The meanings are merely which node has a pointer to which other node.

• The network defines a set of binary relations on a set of nodes.

Page 5: L20 Semantic Net


Semantic Networks• To move semantic nets from this abstract realm to something more concrete, let us consider an example from the

structure of marketing.

• To begin simply, let us introduce two nodes and a link.

• Quad Cities is an example of a market. • The diagram, represents the fact that there is a binary relation between a market, Quad Cities, and the concept of a


Page 6: L20 Semantic Net


Semantic Networks

• Another node with the label "Los Angeles" and a "is-a" link from this node to the "Market" node could be added, again representing that "Los Angeles" is a type of "Market".

Page 7: L20 Semantic Net


Semantic Networks• Markets generally contain retailing entities.

• To add an example of a retailer, add a node labeled "Chain56" and two links - one from the retailer "Chain56" to "Quad Cities" labeled "is-a-retailer-in" and one from the node "Chain56" to the node "Retailer" labeled "is-a".

• This illustrates that Chain 56 is a retailer in the Quad Cities market.

Page 8: L20 Semantic Net


Semantic Networks

• It is now important to note some of possible semantic confusion.

• Notice that the nodes in this small network are not all of the same "type".

• The node labeled "Market" represents the generic or class or abstract concept of a market.

• It can be thought of as possessing properties common to all markets.

• The node "Quad Cities" represents a particular instance of a market.

Page 9: L20 Semantic Net


Semantic Networks

• The same is true of the relation between the node labeled "Retailer" and the node labeled "Chain56“.

• In order to distinguish between these two types of nodes, the class nodes become boxes and the instance nodes become ellipses.

Page 10: L20 Semantic Net


• Another class node, labeled "Item", that represents the abstraction of items in a category, can now be added. Along with that, an instance of an item, labeled "87481", is added.

• There is a strong relationship between the class nodes and the column entities in relational database.

• The information now being represented is that Chain56 is a retailer in the Quad Cities market and that Chain56 carries the item 87481.

Page 11: L20 Semantic Net


Semantic Networks

• The "is-a" links in the above Figure are "structural" links in that they convey "type" information about the node.

• For instance, the node labeled "87481" is an instantiation of the class node labeled "Item".

Page 12: L20 Semantic Net

"Brand" class node with an instance

node "Ivory".

The link "is-brand" conveys the

information that the item 87481 is the

Ivory brand.

Page 13: L20 Semantic Net


Semantic Networks

• Our network in above figure now has a representation for

information about the item node “87481”.

• For instance, it is a form of Ivory which is manufactured by

Procter & Gamble; it is the 22 ounce size, white in color

and competes in the Mildness market segment of the liquid

light-duty detergent category.

• This is one item in one chain in one market.

Page 14: L20 Semantic Net


– The physical attributes of a person can be represented as

– These values can also be represented in logic as: isa(person,

mammal), instance(Mike-Hall, person) team(Mike-Hall, Cardiff)

Semantic Networks

Page 15: L20 Semantic Net


Semantic Networks• How we can have more than 2 place predicates in semantic nets? E.g. score(Cardiff, Llanelli, 23-6).• So, for that • Create new nodes to represent new objects contained in the knowledge, game and fixture in the current example. • Relate information to nodes and fill up slots

A Semantic Network for n-Place Predicate

Page 16: L20 Semantic Net


• As a more complex example consider the sentence: John gave Mary the book. • Here we have several aspects of an event.

A Semantic Network for a Sentence

Semantic Networks

Page 17: L20 Semantic Net



• Frames can also be regarded as an extension to Semantic nets.

• Semantic nets initially used to represent labelled connections between objects.

• As tasks became more complex the representation needs to be more structured.

• The more structured the system it becomes more beneficial to use frames.

Page 18: L20 Semantic Net



• A frame is a collection of attributes or slots and associated values that describe some real world entity.

• Frame systems are a powerful way of encoding information to support reasoning.

• Set theory provides a good basis for understanding frame systems.

Page 19: L20 Semantic Net



• Each frame represents: – a class (set), or – an instance (an element of a class).

• A data structure to represent a mental model of a stereotypical situation such as – driving a car, – attending a meeting or – eating in a restaurant. etc.

Page 20: L20 Semantic Net



• Knowledge about an object or event is stored together in memory as a unit.

• When a new situation is encountered, an appropriate frame is selected from memory for use in reasoning about the situation.

• Frames are general record-like structures which consist of a collection of slots and slot values, that may be any size and type.

Page 21: L20 Semantic Net



• Slots typically have names and values or subfields called facets.

• Facets may also have names and any number of values.

Page 22: L20 Semantic Net


FRAMES• A general frame structure

(<frame name>

(<slot1 (<facet1><value1>….<valuek1>)


(<slot2 (<facet1><value1>….<valuek1>)

.. )

Page 23: L20 Semantic Net


FRAMES• A simple instantiated person frame


(PROFESSION (VALUE professor))

(AGE (VALUE 42))

(WIFE (VALUE sandy))

(CHILDERN (VALUE sue joe))


(CITY (VALUE dallas))


(ZIP (VALUE 75000)))

Page 24: L20 Semantic Net



• From the general frame structure, it will be seen that a frame may have any number of slots.

• A slot may have any number of facets, each with any number of values.

• This will give a general framework to build Knowledge structure.

Page 25: L20 Semantic Net



• The slots in a frame specify general or specific characteristics of the entity for which the frame represents, sometimes it may also a instructions.

• Typically, slot contains information such as – attributes value pairs, – default values, – conditions for filling a lot, – pointers to the related frames, and – procedures that are activated when needed.

Page 26: L20 Semantic Net


FRAMESA ford frame with various slot types.

(ford (AKO(VALUE car))

(COLOR (VALUE silver))

(MODEL (VALUE 4-door))


(RANGE (VALUE if-needed))

(WEIGHT (VALUE 26000))


Page 27: L20 Semantic Net



• Slots with attached procedures such as fget and if-needed are called procedural attachments or demons.

• They are get done automatically when a value is needed.

Page 28: L20 Semantic Net



• Frame representations have become popular enough that special high level frame based representation languages have been developed.

• LISP is the most widely used host language, they typically have functions to – create,

– access,

– modify,

– update and

– display frames.

Page 29: L20 Semantic Net



For example: to define frame..

(fdefine f-name <parents><slots>)


fdefine – is frame definition function

f-name - is the name assigned to the new frame

<parents> - is the list of all parent frames to which the new frame is linked and

<slots> - is a list of slot names and initial values.

Page 30: L20 Semantic Net



• For example, using the function fdefine to create a train frame we might provide the following details:

(fdefine general-train land-transport

(type (VALUE passenger))

(class (VALUE first-class second-class sleeper))

(food ( restaurant (VALUE hot meals))


Page 31: L20 Semantic Net



• Several frame languages have now been developed to aid in building frame based systems.

• They include the Frame Representation Language(FRL), Knowledge Representation Language(KRL), which served as a base language for a scheduling system called NUDGE etc.

Page 32: L20 Semantic Net

Frames = Semantic Networks + Meta-structured nodes + Procedural Attachment


[PC [isa [value COMPUTER]][manufacturer [type-r COMPANY]][retail-price [puller (* &markup &wholesale)]

[range-min 500][range-max 10000][unit USD]]

[markup [value 1.5]][owner [type-r LEGAL-ANIMATE]]]

[DELL-150/L[isa [value PC]][manufacturer [value DELL]][processor [value pentium-4L]][wholesale [value 1400]]]

Page 33: L20 Semantic Net



• Scripts are another structured representation scheme introduced by Roger(1977)

• They are used to represent sequences of commonly occurring events.

• They were used to capture the meaning of stories or to understand natural language text.

• Like a script for a play.

Page 34: L20 Semantic Net



• A script is a predefined frame-like structure which contains – expectations, – inferences, and – other knowledge that is relevant to a stereotypical


Page 35: L20 Semantic Net



• Scripts are frame-like structures used to represent commonly occurring experiences such as – going to the movies, – shopping in a supermarket, – eating in a restaurant, or – visiting a dentist.

• Like a script for a play, the script structure is described in terms of actors, roles, props, and scenes.

Page 36: L20 Semantic Net



SCRIPT-NAME Food marketTRACK SupermarketROLES




Deli attendant

Seafoor attendant

Checkout clerk

Sacking clerk

Other shoppers

Shopper needs groceries

Food market open

Shopping cart

Display aisles

Market items

Checkout stands



An example of a supermarket script is shown below:

Page 37: L20 Semantic Net


Reasoning with scripts

• Scripts contain knowledge that people use for common every day activities.

• They can be used to provide an expected scenario for a given situation.

• Reasoning in a script begins with the creation of a partially filled script named to meet the current situation.

• Next, a know script which matches the current situation is recalled from memory.

Page 38: L20 Semantic Net


• The index values such as script name, preconditions, or other key words will help to search for the appropriate script.

• Scripts have now been used in a number of language understanding systems.

Reasoning with scripts

Page 39: L20 Semantic Net

• Design a Semantic Net of a Baseball Player having following properties– Fielder is a person, belongs Brooklyn Dodgers team

of Pee-wee-Reese unit, Adult male with batting average is 0.262, Right handed with height 178, default height 195 and default batting average is 0.252.

Page 40: L20 Semantic Net
Page 41: L20 Semantic Net

• Design a Frame Description of a Hotel Room

Page 42: L20 Semantic Net
Page 43: L20 Semantic Net

• Design a Frame Description of a Birthday Party.

Page 44: L20 Semantic Net