Sunteți pe pagina 1din 39

KNOWLWDGE REPRESENTATION

By
Anurag Andhare
3
rd
Semester
M. Tech (CSE)
1
MEANING/KNOWLEDGE
Language is useful and amazing because it allows us to
encode/decode
Descriptions of the world
What were thinking
What we think about what other people think
Dont be fooled by how natural and easy it is In particular, you
never really
Utter word strings that match the world
Say what youre thinking
Say what you think about what other people think

2
MEANING/KNOWLEDGE
Youre simply uttering linear sequences of words
such that when other people read/hear and
understand them, they come to know what you
think of the world.

3
KNOWLWDGE REPRESENTATION
Meaning representation languages: capturing the meaning of
linguistic utterances using formal notation so that they make
semantic processing possible
Example: deciding what to order at a restaurant by reading a
menu, giving advice about where to go for dinner
Requires knowledge about food, its preparation, what
people like to eat and what restaurants are like
Example: answering a question on an exam
Requires background knowledge about the topic of the
question
Example: Learning to use a software by reading a manual
Requires knowledge about current computers, the specific
software, similar software applications, knowledge about
users in general.

4
SEMANTIC ANALYSIS
Semantic analysis: mapping between language and real life
I have a car:
1. First Order Logic
x,y: Having(x) ^ Haver(speaker,x) ^ HadThing(y,x) ^ Car(y)

2. Semantic Network
Speaker
Car
Having
Haver Had-thing
Speaker Car
3. Conceptual
Dependency
Diagram
POSS-BY
4. Frame Based
Representation

Having
Haver: Speaker
HadThing: Car
5
KNOWLWDGE REPRESENTATION
Requirements
Verifiability
Unambiguous representations
Canonical form
Inference
Expressiveness

6
VERIFIABILITY
A system's ability to compare the state of affairs
described by a representation to the state of affairs
in some world as modeled in a knowledge base

Example:
Sent: Maharani serves vegetarian dishes.
Question: Is the statement true?
7
UNAMBIGUOUS REPRESENTATION
Representations should have a single unambiguous
interpretation.

Example:
Mary and John bought a book
Two students met three teachers
A German teacher
A Chinese restaurant
A Canadian restaurant

8
CANONICAL FORM
Sentences with the same thing should have the
same meaning representation

Example:
Alternations: active/passive, dative shift
Does Maharani have vegetarian dishes?
Do they serve vegetarian food at Maharani?
9
INFERENCE
a system's ability to draw valid conclusions based
on the meaning representation of inputs and its
store of background knowledge.

Example:
Sent: Maharani serves vegetarian dishes
Question: can vegetarians eat at Maharani?
10
EXPRESSIVENESS
A system should be expressive enough to
handle an extremely wide range of subject
matter.

Example:
Belief: I think that he is smart.
Hypothetical statement: If I were you, I would buy
that book.
Former president, fake ID, allegedly, apprarently

11
TYPES OF KNOWLWDGE REPRESENTATION
First-order predicate calculus
Semantic networks
Conceptual dependency
Frame-based representations

12
FIRST ORDER PREDICATE CALCULUS
Not ideal as a meaning representation and doesn't
do everything we want -- but a useful start
Supports the determination of truth
Supports compositionality of meaning
Supports question-answering (via variables)
Supports inference
13
FOPC
Elements of FOPC
Representing
Categories
Events
Time (including tense)
Aspect
Belief
14
ELEMENTS OF FOPC
Terms:
Constant: specific objects in the world: e.g., Maharani
Variable: a particular unknown object or an arbitrary
object: e.g., a restaurant
Function: concepts: e.g., LocationOf(Maharani)

Predicates: referring to relations that hold among
objects:
Ex: Serve(Maharani, food)
Arguments of predicates must be terms.
15
NL MAPPING TO FOPC
Terms: constants, functions, variables
Constants: objects in the world, e.g. John
Functions: concepts, e.g. sisterof(John)
Variables: x, e.g. sisterof(x)
Predicates: symbols that refer to relations that hold
among objects in some domain or properties that
hold of some object in a domain
likes(Sue, pasta)
female(Sue) person(Sue)
16
Logical connectives permit compositionality of meaning
pasta(x) likes(Sue,x) Sue likes pasta
cat(Vera) ^ odd(Vera) Vera is an odd cat
sleeping(Huey) v eating(Huey) Huey either is sleeping or
eating or both
Sentences in FOPC can be assigned truth values
Atomic formulae are T or F based on their presence or
absence in a DB (Closed World Assumption)
Composed meanings are inferred from DB and meaning of
logical connectives
17
cat(Huey)
sibling(Huey,Vera)
cat(Huey) ^ sibling(Huey,Vera) cat(Vera)
Limitations:
Do and and or in natural language really mean ^ and
v?
Mary got married and had a baby. And then
Your money or your life!
Does mean if?
If you go, Ill meet you there. If it rains, well get wet.
How do we represent other connectives?
She was happy but ignorant.
18
Quantifiers:
Existential quantification: There is a unicorn in my garden.
Some unicorn is in my garden.
Universal quantification: The unicorn is a mythical beast.
Unicorns are mythical beasts.
How do we represent:
Many? A few? Several? A couple?
,
19
SEMANTIC NETWORKS
Define objects in terms of their association with
other objects
e.g. snow, white, snowman, ice, slippery.
Represent knowledge as a graph:






Concepts at lower levels inherit characteristics from
their parent concepts.

Concepts
Relations
20
SEMANTIC NETWORKS
Well designed semantic networks are a form of
logic.





memberOf(femalePersons, mary)

female
Person
s
memberOf
mary
21
Network representation of properties of snow and ice
22
Semantic Networks
Example
SEMANTIC NETWORKS
EXAMPLE
female
Person
s
memberOf
mary
male
Person
s
memberOf
john
mammals
subsetOf
Persons
subsetOf
subsetOf
sisterOf
legs
2
hasMother
legs
1
23
SEMANTIC NETWORKS
INFERENCE MECHANISM
Inheritance
e.g. Persons by default have 2 legs. How many legs
does Mary have? John?
Use of Inverse Links (through reification)
e.g. hasSister(p, s) and sisterOf(s, p)
hasSister
inverseOf
sisterOf
24
SEMANTIC NETWORKS
EXAMPLE
female
Person
s
memberOf
mary
male
Person
s
memberOf
john
mammals
subsetOf
Persons
subsetOf
subsetOf
sisterOf
legs
2
hasMother
legs
1
hasSister
25
SEMANTIC NETWORKS
ADVANTAGES
Simple and transparent inference processes.
Ability to assign default values for categories.
Ability to include procedural attachment.
26
SEMANTIC NETWORKS
DISADVANTAGES
Simple query language may be too limiting to
express complex queries.
Does not represent full FOL since it does not
provide means to use negation, disjunction, and
existential quantification.
n-ary functions must be mapped onto binary
functions.

27
SEMANTIC NETWORKS
WHAT RELATIONSHIPS DO WE NEED?
Conceptual Dependency theory:
primitives of meaning
1. Actions
2. Objects
3. modifiers of actions
4. modifiers of objects
28
SEMANTIC NETWORKS
WHAT RELATIONSHIPS DO WE NEED?
Conceptual Dependency theory:
primitives of meaning
1. Actions
2. Objects
3. modifiers of actions
4. modifiers of objects
conceptual syntax rules
built using these primitives
constitute a grammar of meaningful semantic relationships.
conceptual dependency relationships
are defined using the conceptual syntax rules
can be used to construct an internal representation of an English
sentence.
29
SEMANTIC NETWORKS
WHAT RELATIONSHIPS DO WE NEED?
Conceptual Dependency theory:
conceptual dependency relationships
are defined using the conceptual syntax rules
can be used to construct an internal representation of an English
sentence.
Tense and mode are added.
Example:
past
future
transition
etc.
30
Conceptual dependency theory of four primitive conceptualizations
Luger: Artificial Intelligence, 6th edition. Pearson Education Limited, 2009
31
Fig 7.6 Conceptual dependencies (Schank and Rieger, 1974). (From: Luger: Artificial Intelligence, 6th
edition. Pearson Education Limited, 2009)
32
Semantic Networks

Fig 7.9 Conceptual dependency representing John ate the egg
(Schank and Rieger 1974).
Fig 7.10 Conceptual dependency representation of the sentence John prevented
Mary from giving a book to Bill (Schank and Rieger 1974).
33
Fig 7.16 Conceptual graph indicating that the dog named Emma is brown.
Fig 7.17 Conceptual graph indicating that a particular (but unnamed) dog is brown.
Fig 7.18 Conceptual graph indicating that a dog named Emma is brown.
34
SEMANTIC NETWORKS
Conceptual Dependency theory
Advantages
Provides a formal theory of natural language semantics
reduces problems of ambiguity.
representation directly captures much of the natural language
semantics
sentences with similar meaning will have similar
representations (canonical form).
Disadvantages:
No program exists that can reliably reduce sentences to
canonical form.
Primitives not sufficient to represent more subtle concepts.
35
36
FRAMES
Frame: Data structure that includes all the knowledge
about a particular object
Knowledge organized in a hierarchy for diagnosis of
knowledge independence
Form of object-oriented programming
Each Frame Describes One Object
support the organization of knowledge into more
complex units reflecting the organization of objects in
the domain.

Decision Support Systems and Intelligent Systems, Efraim Turban and Jay E. Aronson
6th ed, Copyright 2001, Prentice Hall, Upper Saddle River, NJ
Fig 7.12 Part of a frame description of a hotel room. Specialization indicates a pointer
to a superclass.(Luger: Artificial Intelligence, 6th edition. Pearson Education Limited, 2009)
37
Frames Example
FRAMES
ADVANTAGES
Frames add power and clarity to semantic nets by allowing
complex objects to be represented as a single frame.





Frames provide an easier framework to organize information
hierarchically than semantic nets.
Frames allow for procedural attachment which runs a demon
(piece of code) as a result of another action in the KB (this has
also been done to some semantic nets).
Both frames and semantic nets support class inheritance.
38
THANK YOU!
39

S-ar putea să vă placă și