• Non ci sono risultati.

KR & R © Brachman & Levesque 2005 34

N/A
N/A
Protected

Academic year: 2021

Condividi "KR & R © Brachman & Levesque 2005 34"

Copied!
6
0
0

Testo completo

(1)

KR & R © Brachman & Levesque 2005 34

3.

Expressing Knowledge

Knowledge engineering

KR is first and foremost about knowledge

meaning and entailment

find individuals and properties, then encode facts sufficient for entailments

Before implementing, need to understand clearly

• what is to be computed?

• why and where inference is necessary?

Example domain: soap-opera world

people, places, companies, marriages, divorces, hanky-panky, deaths, kidnappings, crimes, ...

Task: KB with appropriate entailments

• what vocabulary?

• what facts to represent?

(2)

KR & R © Brachman & Levesque 2005 36

Vocabulary

Domain-dependent predicates and functions

main question: what are the individuals?

here: people, places, companies, ...

named individuals

john, sleezyTown, faultyInsuranceCorp, fic, johnQsmith, ...

basic types

Person, Place, Man, Woman, ...

attributes

Rich, Beautiful, Unscrupulous, ...

relationships

LivesAt, MarriedTo, DaughterOf, HadAnAffairWith, Blackmails, ...

functions

fatherOf, ceoOf, bestFriendOf, ...

Basic facts

Usually atomic sentences and negations type facts

Man(john), Woman(jane),

Company(faultyInsuranceCorp)

property facts

Rich(john),

¬HappilyMarried(jim), WorksFor(jim,fic)

equality facts

john = ceoOf(fic),

fic = faultyInsuranceCorp, bestFriendOf(jim) = john

Like a simple database (can store in a table)

(3)

KR & R © Brachman & Levesque 2005 38

Complex facts

Universal abbreviations

∀y[Woman(y) ∧ y ≠ jane ⊃ Loves(y,john)]

∀y[Rich(y) ∧ Man(y) ⊃ Loves(y,jane)]

∀x∀y[Loves(x,y) ⊃ ¬Blackmails(x,y)]

Incomplete knowledge

Loves(jane,john) ∨ Loves(jane,jim)

which?

∃x[Adult(x) ∧ Blackmails(x,john)]

who?

Closure axioms

∀x[Person(x) ⊃ x=jane ∨ x=john ∨ x=jim ...]

∀x∀y[MarriedTo(x,y) ⊃ ... ]

∀x[ x=fic ∨ x=jane ∨ x=john ∨ x=jim ...]

also useful to have jane ≠ john ...

possible to express without quantifiers

cannot write down a more complete version

limit the domain of discourse

Terminological facts

General relationships among predicates. For example:

disjoint x[Man(x) ⊃ ¬Woman(x)]

subtype x[Senator(x) ⊃ Legislator(x)]

exhaustive x[Adult(x) Man(x)Woman(x)]

symmetry xy [MarriedTo(x,y) MarriedTo(y,x)]

inverse xy [ChildOf(x,y) ⊃ ParentOf(y,x)]

type restriction xy [MarriedTo(x,y)

Person(x) Person(y) OppSex(x,y)]

Usually universally quantified conditionals or biconditionals

sometimes

(4)

KR & R © Brachman & Levesque 2005 40

Entailments: 1

Is there a company whose CEO loves Jane?

x [Company(x) Loves(ceoOf(x),jane)] ??

Suppose ℑ |= KB.

Then |= Rich(john), Man(john),

and |= ∀y[Rich(y) ∧ Man(y) ⊃ Loves(y,jane)]

so |= Loves(john,jane).

Also |= john = ceoOf(fic),

so |= Loves( ceoOf(fic),jane).

Finally |= Company(faultyInsuranceCorp), and |= fic = faultyInsuranceCorp, so |= Company(fic).

Thus, |= Company(fic) ∧ Loves( ceoOf(fic),jane), and so

|= ∃x [Company(x) Loves(ceoOf(x),jane)].

Can extract identity of company from this proof

Entailments: 2

If no man is blackmailing John, then is he being blackmailed by somebody he loves?

∀x[Man(x) ⊃ ¬Blackmails(x,john)] ⊃

∃y[Loves(john,y) ∧ Blackmails(y,john)] ??

Note: KB |= (α ⊃ β) iff KB ∪ {α} |= β

Let: ℑ |= KB ∪ {∀x[Man(x) ⊃¬Blackmails(x,john)]}

Show: ℑ |= ∃y[Loves(john,y) Blackmails(y,john)

Have: ∃x[Adult(x) Blackmails(x,john)] and ∀x[Adult(x) ⊃ Man(x) ∨ Woman(x)]

so x[Woman(x) Blackmails(x,john)].

Then: ∀y[Rich(y) ∧ Man(y) ⊃ Loves(y,jane)] and Rich(john) Man(john) so Loves(john,jane)!

But: ∀y[Woman(y) ∧ y ≠ jane ⊃ Loves(y,john)]

and ∀x∀y[Loves(x,y) ⊃ ¬Blackmails(x,y)]

so ∀y[Woman(y) ∧ y ≠ jane ⊃ ¬Blackmails(y,john)] and Blackmails(jane,john)!!

Finally: Loves(john,jane) ∧ Blackmails(jane,john) so: y[Loves(john,y) Blackmails(y,john)]

(5)

KR & R © Brachman & Levesque 2005 42

What individuals?

Sometimes useful to reduce n-ary predicates to 1-place predicates and 1-place functions

• involves reifying properties: new individuals

• typical of description logics / frame languages (later)

Flexibility in terms of arity:

Purchases(john,sears,bike) or Purchases(john,sears,bike,feb14) or Purchases(john,sears,bike,feb14,$100) Instead: introduce purchase objects

Purchase(p) ∧ agent(p)=john ∧ obj(p)=bike ∧ source(p)=sears ∧ ...

allows purchase to be described at various levels of detail

Complex relationships: MarriedTo(x,y) vs. ReMarriedTo(x,y) vs. ...

Instead define marital status in terms of existence of marriage and divorce events.

Marriage(m) ∧ husband(m)=x ∧ wife(m)=y ∧ date(m)=... ∧...

Abstract individuals

Also need individuals for numbers, dates, times, addresses, etc.

objects about which we ask wh-questions

Quantities as individuals

age(suzy) = 14

age-in-years(suzy) = 14 age-in-months(suzy) = 168

perhaps better to have an object for “the age of Suzy”, whose value in years is 14 years(age(suzy)) = 14

months(x) = 12*years(x) centimeters(x) = 100*meters(x)

Similarly with locations and times

instead of

time(m)="Jan 5 2006 4:47:03EST"

can use

time(m)=t ∧ year(t)=2006 ∧ ...

(6)

KR & R © Brachman & Levesque 2005 44

Other sorts of facts

Statistical / probabilistic facts

• Half of the companies are located on the East Side.

• Most of the employees are restless.

• Almost none of the employees are completely trustworthy,

Default / prototypical facts

• Company presidents typically have secretaries intercepting their phone calls.

• Cars have four wheels.

• Companies generally do not allow employees that work together to be married.

Intentional facts

• John believes that Henry is trying to blackmail him.

• Jane does not want Jim to think that she loves John.

Others ...

Riferimenti

Documenti correlati

The dominant medical model employed in contemporary medical research and clinical practice is grounded an empiricist theory of language. Disea- ses are conceived as

Methods Five hundred sixty-four cisgender heterosexual and sexual and gender minority individuals, ranging from 18 to 77 years of age (M = 34.66, SD = 11.13), were recruited in 2020

heat equation, Cauchy problem, Euclidean 3-space, stationary isothermic surface, uni- formly dense domain, transnormal function, constant mean curvature surface, plane,

Nell’Azienda Alfa una volta che sono state evidenziate le disfunzioni del sistema di controllo interno i dipendenti ne daranno in modo semplice, vista la struttura snella che

Artists like Yan Jun (an electronic musician, improviser, and au- thor born in 1973 in Lanzhou), Bun–Ching Lam (a composer, pia- nist, and conductor born in 1954 in Macao), Wang Fan

This latter has quickly become one of the most used software for aircraft preliminary design phases thanks to a very smart software architecture, the possibility to

“Any mechanically embodied intelligent process will be comprised of structural ingredients that a) we as external observers naturally take to represent a propositional account of

cannot fully specify interpretation of sentences because non-logical symbols reach outside the