### Knowledge Representation

 Reference: Chapter 13 of Allen Aim: To outline a representation of the facts conveyed by NL text, based on first-order predicate calculus, and to describe how quantifiers can be avoided in this notation by replacing existentially quantified variables by Skolem constants and Skolem functions, and then assuming all remaining variables are universally quantified. Keywords: KB, knowledge base, knowledge representation, knowledge representation language, KRL, Skolem functions, skolemization Plan: Knowledge Representation Languages Representing quantification in a KRL Free variables for "forall" Skolem constants and Skolem functions for "exists"

### Knowledge Representation Languages

• KR issues of concern to NLP systems include those relating to:

• general knowledge about the world needed for language understanding, and

• specific knowledge relating to the domain handled by the particular NLP system.

• The term knowledge representation language (KRL) is used to refer to the language used by a particular system to encode the knowledge.

• The collection of knowledge used by the system is referred to as a knowledge base (KB).

### 13.2 A Representation based on FOPC

• The KR language used has much in common with the logical form language.

• The terms of the language include

• constants, like John1,
• function applications, like father(John1), and
• variables, like x and y.

• Note that the logical form language did not use constants - everything was expressed in terms of discourse variables to keep the representation context-independent.

### Representation based on FOPC 2

• For example, the logical form term (NAME j1"John"), in a specific context, might be represented by the constant John1 in the KB - the variable j1 is resolved to the constant John1.

• Restricted quantification makes sense in KRL, as in logical form language.

• Restrictions follow the quantified variable, with semicolon separator:

∃ x : Person(x) Happy(x) ..... There is a happy person
∀ x : Person(x) Happy(x) ..... All people are happy

• The second of these is equivalent to ∀ x Person(x) ⇒ Happy(x).

### Free Variables Can Be Used to Handle "forall"

• Many KR systems do not explicitly use quantifiers.

• Their variables are all tacitly universally quantified, as in Prolog.

• Thus `eats(john1, X) :- fried(X).` means John eats anything if it's fried.

• This means literally anything, of course - if `fried(cartyres1)` is stored in the KB, then `eats(john1, cartyres1)` follows.

### Skolem Constants and Functions Can Handle "exists"

• Existentially quantified variables are handled by a technique called skolemization, which replaces the variable with a new constant.

• For example, the formula ∃ yx . `loves`(x, y) would be encoded as a formula such as `loves(X, sk1)`, where `sk1` is a new constant that stands for the object that is asserted to exist.

• `sk1` is called a Skolem constant.

### Skolem Constants and Functions Can Handle "exists" 2

• Quantifier scoping dependencies are shown using new functions called Skolem functions.

• For example, the formula ∀ yx . `loves`(x,y) would be encoded as a formula such as `loves(sk2(Y), Y)`, where `sk2` is a new function that produces a potentially new object for each value of `Y`.

• yx . `loves`(x,y) means "for everybody (y), there is somebody (x) that loves them." So `sk2(Y)` is the somebody that loves `Y`.

 Summary: Knowledge Representation A taste of knowledge representation has been presented, with emphasis on the use of Skolem functions and constants

CRICOS Provider Code No. 00098G
Copyright (C) Bill Wilson, 2003, except where another source is acknowledged.