29
AI – CS289 AI – CS289 Knowledge Representation Knowledge Representation Conceptual Graphs Conceptual Graphs 25 th September 2006 Dr Bogdan L. Vrusias [email protected]

AI – CS289 Knowledge Representation Conceptual Graphs 25 th September 2006 Dr Bogdan L. Vrusias [email protected]

Embed Size (px)

Citation preview

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Conceptual GraphsConceptual Graphs

25th September 2006

Dr Bogdan L. [email protected]

25th September 2006 Bogdan L. Vrusias © 2006 2

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

ContentsContents• CG Arrow Rules

• Generalisation and Specialisation

• Nested Concepts

• CG Schemas

• Exercises

25th September 2006 Bogdan L. Vrusias © 2006 3

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

CG Arrow RulesCG Arrow Rules• An arc is said to belong to a relation but to be attached to a concept.

• As we mentioned previously a conceptual graph is a bipartite. This simply means that:– there are no arcs between a concept and another concept,

– there are no arcs between a relation and another relation.

– all arcs either go from a concept to a relation or from a relation to a concept.

• A conceptual graph may have concepts that are not linked to any relation, but analogically this is not possible for relations.

• For a conceptual relation with n arcs, the first n-1 arcs have arrows that point toward the circle, and the n-th or last arc (if any!) points away.

25th September 2006 Bogdan L. Vrusias © 2006 4

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

CG Arrow RulesCG Arrow Rules• There is also special standard language associated with the direction of

an arrow. This language can be divided into two groups:– When reading in the direction of the arrows,– When reading against the direction of the arrows.

• For each group, it also matters whether we are reading an arrow that points towards or away from a relation.

• When reading in the direction of the arrows:– If the arrow points towards the relation, we often say "has a".– If the arrow points away from the relation, we often say "which is".

• When reading against the direction of the arrows:– If the arrow points away from the relation, we often say "is a".– If the arrow points towards the relation, we often say "of".

25th September 2006 Bogdan L. Vrusias © 2006 5

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Generalisation and SpecialisationGeneralisation and Specialisation• New conceptual graphs may be derived from other canonical graphs

either by generalising or specialising by the rules:– copy, restrict, join, and simplify

• Formation rules are the (generative) grammar of conceptual structures. All deductions and computations on canonical graphs involve some combination of them.

• Formation rules are not rules of inference; rather templates which are manipulated in order to incorporate new knowledge.

25th September 2006 Bogdan L. Vrusias © 2006 6

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Generalisation and SpecialisationGeneralisation and Specialisation

dog

agent object boneeat

colour brown

location porchanimal: "Emma"

colour brown

Consider the following graphs:

g1:

g2:

25th September 2006 Bogdan L. Vrusias © 2006 7

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Generalisation and SpecialisationGeneralisation and Specialisation

location porchdog: "Emma"

colour brown

The restriction of g2 (based on g1) is:

g3:

25th September 2006 Bogdan L. Vrusias © 2006 8

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Generalisation and SpecialisationGeneralisation and Specialisation

location porchdog: "Emma"

colour brown

The join of g1 and g3 is:

g4:

agent object boneeat

colour

25th September 2006 Bogdan L. Vrusias © 2006 9

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Generalisation and SpecialisationGeneralisation and Specialisation

location porchdog: "Emma"

colour brown

The simplification of g4 is:

g5:

agent object boneeat

25th September 2006 Bogdan L. Vrusias © 2006 10

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Propositional ConceptsPropositional Concepts• Conceptual graphs may include a concept type, proposition, that takes

a set of conceptual graphs as its referent.

• This allows definitions that involve propositions.

• Propositional concepts are indicated as a box that contains another conceptual graph.

• The conceptual graphs nested inside a context are the referent of that concept.

25th September 2006 Bogdan L. Vrusias © 2006 11

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Propositional ConceptsPropositional Concepts• Consider the example: "Tom believes that Jane likes

pizza"

experiencer believeperson: "Tom"

experiencer likesperson: "Jane"

object

objectpizza

proposition

25th September 2006 Bogdan L. Vrusias © 2006 12

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Propositional ConceptsPropositional Concepts• Modal auxiliaries, for instance can or must, map onto conceptual

relations of possibility (PSBL) and obligation (OBLG):

• The CG for "Tom can go" is:

• The CG for "Tom must go" is:

agent goperson: "Tom"PSBL

proposition

agent goperson: "Tom"OBLG

proposition

25th September 2006 Bogdan L. Vrusias © 2006 13

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Propositional ConceptsPropositional Concepts• Verb tense and aspect, map to relation nodes like past (PAST) or

PROGressive (defined in terms of DURations, SUCCessor or Point-in-TIMe).

• The CG for "Tom went" is:

agent goperson: "Tom"PAST

proposition

25th September 2006 Bogdan L. Vrusias © 2006 14

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Nested ConceptsNested Concepts• A context is represented by a concept with one or more conceptual

graphs inside the referent field.

• A context can have attached conceptual relations, and they also have their own type label. The conceptual graphs nested inside a context are the referent of that concept.

• There are three types of nested concepts: graph, proposition, and situation:– When a conceptual graph is a referent of a concept of the type GRAPH, it

is merely being mentioned;– When a conceptual graph is a referent of concept of type PROPOSITION

or SITUATION, it is being used to state a proposition or to describe a situation respectively.

25th September 2006 Bogdan L. Vrusias © 2006 15

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Nested ConceptsNested Concepts• E.g.: "Tom believes that Mary wants to marry a footballer"

person: "Tom" PTNTEXPR believe

proposition

person: "Mary" PTNTEXPR want

"Mary" PTNT FootballerAGNT marry

situation

: co-reference link

25th September 2006 Bogdan L. Vrusias © 2006 16

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Plural ConceptsPlural Concepts• Plural nouns are represented by the plural referent {*} followed by an optional

count @.

• For example the CG for "Birds singing in a sycamore tree" is:

• or for "Happy Birthday To You lasts 18 seconds" is:

("for all" or "every")– E.g. "All living fish are wet"

duration interval: @18 sectheme: "Happy Birthday To You"

agent Bird: {*}sing inproposition

Sycamore Tree

attribute wetLivingFish:

25th September 2006 Bogdan L. Vrusias © 2006 17

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

CG and LogicCG and Logic• ¬ (Negation "not"): E.g. "The sun is not shining"

¬ [Situation: [Sun: #] <- (Agnt) <- [Shine] ]

(Conjunction "and"): E.g. "There exists a woman who is both beautiful and dangerous" [Proposition: [Woman: *x] -> (Attr) -> [Beautiful] [Woman: *x] -> (Attr) -> [Dangerous] ]

(Disjunction "or"): E.g. "John is either a fool or very clever"¬ [Situation: ¬ [Situation: [Person: John] -> (Attr) -> [Fool] ] ¬ [Situation: [Person: John]->(Attr)->[Clever]->(Meas)->[Degree: #very] ] ]

25th September 2006 Bogdan L. Vrusias © 2006 18

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

CG ResourcesCG Resources• http://www.huminf.aau.dk/cg/index.html

• http://www.cs.uah.edu/~delugach/CG/

• http://users.bestweb.net/~sowa/

25th September 2006 Bogdan L. Vrusias © 2006 19

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Building CG SchemasBuilding CG Schemas• The basic structure for representing background knowledge for human-like

inference is called the schema.

• Schema is a pattern derived from past experience that is used for interpreting, planning, and imagining other experiences.

• A schema for a bus that should not exceed 55km/h and should be limited to carry about 50 passengers:

inst rate speed: 55Km/htravelbus: *X

obj agent

drive

agent driver

passenger: {*}@50

cont

25th September 2006 Bogdan L. Vrusias © 2006 20

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

CG Schemas ExampleCG Schemas Example• Consider the type definition graph for BUY shown below:

Example from: http://pages.cpsc.ucalgary.ca/~kremer/courses/CG/

ENTITY TRANSACTION MONEY

GIVECUSTOMERGIVE

SELLER

OBJ

OBJ OBJ

INST

PART PARTAGNT SRCE

RCPT

RCPT

AGNT

AGNT

25th September 2006 Bogdan L. Vrusias © 2006 21

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

CG Schemas ExampleCG Schemas Example• Consider the graph "Joe buying a necktie from Hal for $10":

Person: Joe BUY Necktie

Money: @ $10Person: Hal

OBJ

INSTSRCE

AGNT

25th September 2006 Bogdan L. Vrusias © 2006 22

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

CG Schemas ExampleCG Schemas Example• The type expansion of the graph based on the concept type BUY is shown

below:

NECTIE TRANSACTION MONEY: @ $10

GIVECUSTOMER: JoeGIVE

SELLER: Hal

OBJ

OBJ OBJ

INST

PART PARTAGNT SRCE

RCPT

RCPT

AGNT

AGNT

25th September 2006 Bogdan L. Vrusias © 2006 23

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

ExercisesExercises• Say in your own words what the following CGs means:

– [Person]<-(Agnt)<-[Run]

– [Person: Peter]->(Poss)->[Car]->(Attr)->[Blue]

– [Rhino: Otto]->(Chrc)->[Colour: Orange]

– [Girl: Silde]<-(Agnt)<-[Ride]->(Thme)->[Bike]->(Chrc)->[Color: Yellow]

25th September 2006 Bogdan L. Vrusias © 2006 24

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

SolutionsSolutions• [Person]<-(Agnt)<-[Run]

– A Person is the agent of an Act, which is Run.

– Running has an agent which is a Person.

– A Person is Running.

• [Person: Peter]->(Poss)->[Car]->(Attr)->[Blue]– Peter has a possession which is a car. This car has an attribute, which is

blue.

– Blue is an attribute of a Car, which is a possession of a Person, who is Peter.

– Peter's car is blue.

25th September 2006 Bogdan L. Vrusias © 2006 25

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

SolutionsSolutions• [Rhino: Otto]->(Chrc)->[Colour: Orange]

– Otto the Rhino has a characteristic which is a Colour, Orange.

– The Colour Orange is a characteristic of a Rhino, Otto.

• [Girl: Silde]<-(Agnt)<-[Ride]->(Thme)->[Bike]->(Chrc)->[Color: Yellow]– A girl, Silde, is the agent of Ride, and the theme of Ride is a Bike, and

the Bike has a Characteristic which is a Colour which is Yellow.

– A girl, Silde, is riding a yellow bike.

– Silde is riding a yellow bike.

25th September 2006 Bogdan L. Vrusias © 2006 26

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

ExercisesExercises• Please create the conceptual graph of the following sentences:

– "A person is singing a song"

– "John is singing"

– "Bus number 9 is going to Copenhagen"

– "John was singing"

– "Romeo marries Juliet"

25th September 2006 Bogdan L. Vrusias © 2006 27

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

SolutionsSolutions• "A person is singing a song"

[Person]<-(Agnt)<-[Sing]->(Thme)->[Song]

• "John is singing"[Person: John]<-(Agnt)<-[Sing]

• "Bus number 9 is going to Copenhagen"[Bus: #9]<-(Agnt)<-[Go]->(Dest)->[City: Copenhagen]

• "John was singing"(Past)->[Situation: [Person: John]<-(Agnt)<-[Sing] ]

25th September 2006 Bogdan L. Vrusias © 2006 28

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

SolutionsSolutions• "Romeo marries Juliet"

[Person: Romeo]<-(Agnt)<-[Marry]->(Benf)->[Person: Juliet]

[Lover: Romeo]<-(Agnt)<-[Marry]->(Benf)->[Lover: Juliet]

[Man: Romeo]<-(Agnt)<-[Marry]->(Benf)->[Woman: Juliet]

but not

[Monkey: Romeo]<-(Agnt)<-[Marry]->(Benf)->[Gorilla: Juliet]

25th September 2006 Bogdan L. Vrusias © 2006 29

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

ClosingClosing

• Questions???

• Remarks???

• Comments!!!

• Evaluation!