Semantic NW
Frames
Scripts
Dr. Puneet Singh Lamba
Assistant Prof.
CSE
Semantic NW
• Graphical notation for representing knowledge in interconnected
nodes pattern
• Popular in AI and NLP (represents knowledge/support reasoning)
• Alternative for predicate logic
• Nodes represent objects
• Arcs represent relation among objects
• Link labels (specify relationship)
• Also known as Associative NW
Components
• Lexical:- Nodes, link, labels
• Structural:- Directed links
• Semantic:- Definition related to
link/nodes (Facts)
• Procedural:- Constructors (creation of
link) /Destructors(removal of links)
Need of NW?
• The entries in the KB of Figure have no particular order or grouping associated
with them. Furthermore, in representing various facts about Bob, it was
necessary to repeat Bob's name for each association given.
• All facts appear independently, without any linkage to other facts, even
though they may be closely related conceptually (Bob is married, owns a
house, has children, drives a Buick. and so forth).
• For small KB, the representation used in Figure presents no problem.
• Adding, or otherwise changing facts in the KB is easy enough, and a search of
all clauses in the KB can be made if necessary when performing inferences.
• When the quantity of information becomes large and more complex,
however, the acquisition, comprehension, use, and maintenance of the
knowledge can become difficult or even intractible.
• In such cases, sonic form of knowledge structuring and organization becomes
a necessity.
Example
Associative NW
and Arc type
•A number of arc relations have become
common among users.
•They include such predicates as ISA,
MEMBER-OF, SUBSET-OF, AKO (a-kind-of). HAS
PARTS, INSTANCE-OF, AGENT. ATTRIBUTES,
SHAPED-LIKE, and so forth.
•One particular arc or link, the ISA (is a) link,
has taken on a special meaning. It signifies
that Bob is a professor and that the state
university system is an institute of higher
learning.
IS A
Property
Inheritance
Frames
Collection of attributes or slots and
associated values
Describes some real world entity
Uses DS (record) to represent knowledge
represented in semantic nw.
Each frame represents the node in semantic n/w
as a class or an instance and each relation as
slot.
More about
frames
• Frames were first introduced by Marvin Minsky
(1975) as 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.
• Knowledge about an object or event is stored
together in memory as a unit.
• Then, 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.
• The slots may be of any size and type.
• Slots typically have names and values or subfields
called facets.
• Facets may also have names and any number of
values
Frame Structure
Why Slot??
• The slots in a frame specify general or
specific characteristics of the entity for
which the frame represents, and
sometimes they include instructions on
how to apply or use the slot values.
• Typically, a slot Contains information
such as attribute value pairs, default
values, conditions for filling a slot,
pointers to other related frames, and
procedures that are activated when
needed for different purposes
Example
Attributes
Frame-Based Representation Languages
• Frame representations have become popular enough that special high level frame based
representation languages have been developed.
• Most of these languages use LISP as the host language.
• They typically have functions to create, access, modify, update, and display frames.
• For example, a function which defines a frame might be called with
(fdefine f-name <parents><slots>)
where fdefine is a frame definition function, f-name is the name assigned to the new frame, <parents>
is a list of all parent frames to which the new frame is linked, and <slots> is a list of slot names and
initial values.
Using the function fdefine to create a train frame we might provide the following details.
Implementation
of frame
Structures
• One way to implement frames is with property lists.
• An atom is used as the frame name and slots are given as properties.
Facets and values within slots become lists of lists for the slot
property.
• For example. to represent a train frame we define the above putprop.
Another way
CONCEPTUAL
DEPENDENCIES
AND SCRIPTS
• Scripts are another structured representation scheme introduced
by Roger Schank (1977).
• They are used to represent sequences of commonly occurring
events.
• They were originally developed to capture the meanings of stories
or to "understand“ natural language text.
• In that respect they are like a script for a play.
• A script is a predefined frame-like structure which contains
expectations, inferences, and other knowledge that is relevant to a
stereotypical situation.
• Scripts are constructed using basic primitive concepts and rules of
formation somewhat like the conceptual graphs.
• Before proceeding with a description of the script, we describe the
primitives and related rules used in building them. They are known
as conceptual dependencies (not to be confused with
conceptualgraphs).
Conceptual
Dependencies
• The theory states that
different sentences which have the same
meaning should have the same unique CD
representation.
• Furthermore, representations for any sentence
should be unambiguous as the speaker intends,
even though it may have syntactic ambiguity, as
in ''I saw the Golden Gate Bridge eying into San
Francisco this afternoon."
• It is the contention that any concept, like
dreaming. thinking, bellowing, or scheming can
he described in terms of these primitives.
In CD theory five different types of ontological (state of being)
building blocks are distinguished. Each of these types, in turn,
has several subtypes. The types are made up of entities, actions,
conceptual cases, conceptual dependencies, and conceptual
tenses.
ENTITIES
• Picture producers (PP) are actors or physical objects (including human memory)
that perform different acts.
• Picture aiders (PA) are supporting properties or attributes of producers.
ACTIONS
•Primitive actions (ACTs) as listed
in Figure.
•Action aiders (AA) are properties
or attributes of primitive actions.
CONCEPTUAL CASES (ALL
ACTIONS INVOLVE ONE OR
MORE OF THESE)
• Objective Case
• Directive Case
• Instrumental Case
• Recipient Case
CONCEPTUAL DEPENDENCIES
•Semantic rules for the formation of
dependency structures such as the
relationship
•between an actor and an event or
between a primitive action and an
instrument.
Conceptual Tenses
Scripts
Used for know. representation
Is a structure that prescribes a set
of circumstances which could be
expected to flow on from one
another
Considered to consist of a no. of
slots or frames but with more
specialized roles
Components
Roles: person involved in event. Ex Student
Props: object involved in event. Ex pen, i_card, sheets.
Entry Condition: conditions that needs to be satisfied before
event occur in script. {I card must be present with student}
Results: Condition that will be true after event in script. Ex
filled ans sheet
Track: variations on the script. Ex CAT, Aieee(exam centre)
Scenes: seq. of events that ocuurs
Pros and cons
A supermarket script structure

semantic frames scripts artificial intelligence

  • 1.
    Semantic NW Frames Scripts Dr. PuneetSingh Lamba Assistant Prof. CSE
  • 2.
    Semantic NW • Graphicalnotation for representing knowledge in interconnected nodes pattern • Popular in AI and NLP (represents knowledge/support reasoning) • Alternative for predicate logic • Nodes represent objects • Arcs represent relation among objects • Link labels (specify relationship) • Also known as Associative NW
  • 3.
    Components • Lexical:- Nodes,link, labels • Structural:- Directed links • Semantic:- Definition related to link/nodes (Facts) • Procedural:- Constructors (creation of link) /Destructors(removal of links)
  • 4.
    Need of NW? •The entries in the KB of Figure have no particular order or grouping associated with them. Furthermore, in representing various facts about Bob, it was necessary to repeat Bob's name for each association given. • All facts appear independently, without any linkage to other facts, even though they may be closely related conceptually (Bob is married, owns a house, has children, drives a Buick. and so forth). • For small KB, the representation used in Figure presents no problem. • Adding, or otherwise changing facts in the KB is easy enough, and a search of all clauses in the KB can be made if necessary when performing inferences. • When the quantity of information becomes large and more complex, however, the acquisition, comprehension, use, and maintenance of the knowledge can become difficult or even intractible. • In such cases, sonic form of knowledge structuring and organization becomes a necessity.
  • 5.
  • 6.
    Associative NW and Arctype •A number of arc relations have become common among users. •They include such predicates as ISA, MEMBER-OF, SUBSET-OF, AKO (a-kind-of). HAS PARTS, INSTANCE-OF, AGENT. ATTRIBUTES, SHAPED-LIKE, and so forth. •One particular arc or link, the ISA (is a) link, has taken on a special meaning. It signifies that Bob is a professor and that the state university system is an institute of higher learning.
  • 7.
  • 8.
  • 9.
    Frames Collection of attributesor slots and associated values Describes some real world entity Uses DS (record) to represent knowledge represented in semantic nw. Each frame represents the node in semantic n/w as a class or an instance and each relation as slot.
  • 10.
    More about frames • Frameswere first introduced by Marvin Minsky (1975) as 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. • Knowledge about an object or event is stored together in memory as a unit. • Then, 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. • The slots may be of any size and type. • Slots typically have names and values or subfields called facets. • Facets may also have names and any number of values
  • 11.
  • 12.
    Why Slot?? • Theslots in a frame specify general or specific characteristics of the entity for which the frame represents, and sometimes they include instructions on how to apply or use the slot values. • Typically, a slot Contains information such as attribute value pairs, default values, conditions for filling a slot, pointers to other related frames, and procedures that are activated when needed for different purposes
  • 13.
  • 14.
  • 16.
    Frame-Based Representation Languages •Frame representations have become popular enough that special high level frame based representation languages have been developed. • Most of these languages use LISP as the host language. • They typically have functions to create, access, modify, update, and display frames. • For example, a function which defines a frame might be called with (fdefine f-name <parents><slots>) where fdefine is a frame definition function, f-name is the name assigned to the new frame, <parents> is a list of all parent frames to which the new frame is linked, and <slots> is a list of slot names and initial values.
  • 17.
    Using the functionfdefine to create a train frame we might provide the following details.
  • 19.
    Implementation of frame Structures • Oneway to implement frames is with property lists. • An atom is used as the frame name and slots are given as properties. Facets and values within slots become lists of lists for the slot property. • For example. to represent a train frame we define the above putprop.
  • 20.
  • 21.
    CONCEPTUAL DEPENDENCIES AND SCRIPTS • Scriptsare another structured representation scheme introduced by Roger Schank (1977). • They are used to represent sequences of commonly occurring events. • They were originally developed to capture the meanings of stories or to "understand“ natural language text. • In that respect they are like a script for a play. • A script is a predefined frame-like structure which contains expectations, inferences, and other knowledge that is relevant to a stereotypical situation. • Scripts are constructed using basic primitive concepts and rules of formation somewhat like the conceptual graphs. • Before proceeding with a description of the script, we describe the primitives and related rules used in building them. They are known as conceptual dependencies (not to be confused with conceptualgraphs).
  • 22.
    Conceptual Dependencies • The theorystates that different sentences which have the same meaning should have the same unique CD representation. • Furthermore, representations for any sentence should be unambiguous as the speaker intends, even though it may have syntactic ambiguity, as in ''I saw the Golden Gate Bridge eying into San Francisco this afternoon." • It is the contention that any concept, like dreaming. thinking, bellowing, or scheming can he described in terms of these primitives.
  • 23.
    In CD theoryfive different types of ontological (state of being) building blocks are distinguished. Each of these types, in turn, has several subtypes. The types are made up of entities, actions, conceptual cases, conceptual dependencies, and conceptual tenses.
  • 24.
    ENTITIES • Picture producers(PP) are actors or physical objects (including human memory) that perform different acts. • Picture aiders (PA) are supporting properties or attributes of producers.
  • 25.
    ACTIONS •Primitive actions (ACTs)as listed in Figure. •Action aiders (AA) are properties or attributes of primitive actions.
  • 26.
    CONCEPTUAL CASES (ALL ACTIONSINVOLVE ONE OR MORE OF THESE) • Objective Case • Directive Case • Instrumental Case • Recipient Case
  • 28.
    CONCEPTUAL DEPENDENCIES •Semantic rulesfor the formation of dependency structures such as the relationship •between an actor and an event or between a primitive action and an instrument.
  • 29.
  • 30.
    Scripts Used for know.representation Is a structure that prescribes a set of circumstances which could be expected to flow on from one another Considered to consist of a no. of slots or frames but with more specialized roles
  • 31.
    Components Roles: person involvedin event. Ex Student Props: object involved in event. Ex pen, i_card, sheets. Entry Condition: conditions that needs to be satisfied before event occur in script. {I card must be present with student} Results: Condition that will be true after event in script. Ex filled ans sheet Track: variations on the script. Ex CAT, Aieee(exam centre) Scenes: seq. of events that ocuurs
  • 32.
  • 33.