1. Trang chủ
  2. » Luận Văn - Báo Cáo

Báo cáo khoa học: "A KNOWLEDGE ENGINEERING APPROACH TO NATURAL LANGUAGE UNDERSTANDING" pot

9 428 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 9
Dung lượng 772,44 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

VI INPUT AND PROCESSING OF THE USER'S RULES A f t e r having entered a lexicon into the system as described above, the user will enter his natural language rules.. A sample rule that the

Trang 1

TO NATURAL LANGUAGE UNDERSTANDING Stuart C Shapiro & Jeannette G Neal Department of Computer Science State University of New York at Buffalo

Amherst, New York 14226

ABSTRACT

T h i s p a p e r d e s c r i b e s the r e s u l t s of a

p r e l i m i n a r y study of a K n o w l e d g e E n g i n e e r i n g

a p p r o a c h to N a t u r a l L a n g u a g e U n d e r s t a n d i n g A

computer system is being developed to handle the

acquisition, representation, and use of linguistic

knowledge The computer system is rule-based and

utilizes a semantic network for knowledge storage

and representation In order to f a c i l i t a t e the

i n t e r a c t i o n b e t w e e n user and system, input of

linguistic knowledge and computer responses are in

natural language Knowledge of various types can

be entered and utilized: syntactic and semantic;

assertions and rules The inference tracing

facility is also being developed as a part of the

rule-based system with output in natural language

A detailed example is presented to illustrate the

current capabilities and features of the system

I INTRODUCTION

T h i s p a p e r d e s c r i b e s the r e s u l t s of a

• preliminary study of a Knowledge Engineering (KE)

approach to Natural Language U n d e r s t a n d i n g (NLU)

The KE approach to an Artificial Intelligence task

involves a close association with an expert in the

task domain This requires making it easy for the

expert to add new k n o w l e d g e to the c o m p u t e r

system, to u n d e r s t a n d what k n o w l e d g e is in the

system, and to u n d e r s t a n d how the s y s t e m is

accomplishing the task so that needed changes and

corrections are easy to recognize and to make It

should be noted that our task domain is NLU That

is, the knowledge in the system is knowledge about

NLU and the intended expert is an expert in NLU

The KE s y s t e m we are using is the SNePS

s e m a n t i c n e t w o r k p r o c e s s i n g s y s t e m [ii] This

system inci~ ~es a semantic network system in which

** This work was supported in part by the National

Science F o u n d a t i o n under Grants M C S 8 0 - 0 6 3 1 4 and

SPI-8019895

all knowledge, including rules, is represented as nodes in a semantic network, an inference system that p e r f o r m s r e a s o n i n g a c c o r d i n g to the rules stored in the network, and a tracing package that allows the user to follow the system's reasoning

A major portion of this study involves the design and implementation of a SNePS-based system, called the N L - s y s t e m , to enable the NLU expert to enter linguistic knowledge into the network in natural language, to have this k n o w l e d g e a v a i l a b l e to query and reason about, and to use this knowledge for p r o c e s s i n g text i n c l u d i n g a d d i t i o n a l NLU knowledge These features distinguish our system from other rule-based natural language processing systems such as that of Pereira and Warren [9] and Robinson [i0]

One of the major concerns of our study is the acquisition of knowledge, both factual assertions and rules of inference Since both types of

k n o w l e d g e are stored in s i m i l a r f o r m in the semantic network, our NL-system is being developed with the ability to handle the input of both types

of knowledge, with this new knowledge immediately

a v a i l a b l e f o r use O u r c o n c e r n w i t h the

a c q u i s i t i o n of both types of k n o w l e d g e differ~ from the approach of Haas and Hendrix [i], who a~e

p u r s u i n g o n l y t h e a c q u i s i t i o n of l a r g e aggregations of individual facts

The benefit of our KE approach may be seen by considering the work of Lehnert [5] She compiled

an e x t e n s i v e list of r u l e s c o n c e r n i n g h o w questions should he answered For example, when asked, "Do you k n o w w h a t time it is?", one should instead a n s w e r the q u e s t i o n "What time is it?" Lehnert only i m p l e m e n t e d and tested some of her rules, and those r e q u i r e d a p r o g r a m m i n g effort

If a s y s t e m like the one being p r o p o s e d here had been available to her, L e h n e r t could have tested all her rules with relative ease

Our ultimate goal is a KE system with all its linguistic knowledge as available to the language expert as d o m a i n k n o w l e d g e is in other expert systems In this preliminary study we explore the feasibility of our approach as implemented in our representations and N-L-system

Trang 2

A m a j o r goal of this study is the d e s i g n and

i m p l e m e n t a t i o n of a u s e r - f r i e n d l y s y s t e m for

experimentation in KE applied to Natural Language

Understanding

The NL-system consists of two logical components:

a) A f a c i l i t y f o r the i n p u t of l i n g u i s t i c

knowledge into the semantic network in natural

language., This linguistic knowledge primarily

consists of rules about NLU and a lexicon The

N L - s y s t e m contains a core of n e t w o r k rules

which parse a user's natural language rule a n d

build the corresponding structure in the f o r m

of a n e t w o r k rule This N L - s y s t e m f a c i l i t y

e n a b l e s the u s e r to m a n i p u l a t e b o t h t h e

syntactic and s e m a n t i c aspects of surface

strings

b) A facility f o r phrase/sentence generation and

q u e s t i o n a n s w e r i n g via rules in the network

The user can pose a limited number of types of

queries to the system in natural language, and

the s y s t e m utilizes rules to parse the query

and generate a reply A n inference tracing

f a c i l i t y is also being d e v e l o p e d w h i c h uses

this p h r a s e / s e n t e n c e g e n e r a t i o n capability

T h i s w i l l e n a b l e the u s e r to t r a c e the ~

inference processes, w h i c h result from the

activation of his rules, in natural language

W h e n a p e r s o n u s e s t h i s N L - s y s t e m f o r

e x p e r i m e n t a t i o n , there are two task d o m a i n s co-

resident in the semantic network These domains

are: (I) The N L U - d o m a i n w h i c h consists of the

c o l l e c t i o n of p r o p o s i t i o n s and rules c o n c e r n i n g

Natural Language Understanding, including both the

N'L-system core rules and assertions and the user-

specified rules and assertions; and (2) the domain

of knowledge which the user enters and interacts

with via the NLU domain For this study, a limited

'~Bottle Domain" is used as the domain of type (2)

This domain was chosen to let us experiment with

the use of semantic knowledge to clarify, during

parsing, the w a y one noun m a d i f i e s a n o t h e r in a

n o u n - n o u n construction, viz "milk bottle" vs

"glass bottle"

In a sense, the task d o m a i n (2) is a sub-

domain of the NLU-domain since task domain (2) is

built and used via the NLU-domain However, the

two domains interact when, for example, knowledge

from both d o m a i n s is used in u n d e r s t a n d i n g a

sentence being "read" by the system

The s y s t e m is d y n a m i c and new k n o w l e d g e ,

relevant to either or both domains, can be a d d e d

at any time

The basic tools that the language expert will need to enter into the s y s t e m are a l e x i c o n of words and a set of processing rules This system enables them to be input in natural language The s y s t e m initially uses five "undefined terms": L-CAT, S-CAT, L-REL, S-REL, and VARIABLE L-CAT is a t e r m w h i c h r e p r e s e n t s the c a t e g o r y of all lexical categories such as VERB and NOUN S-

C A T r e p r e s e n t s the c a t e g o r y of all s t r i n g categories such as NOUN PHRASE or VERB PHRASE L- REL is a t e r m w h i c h r e p r e s e n t s the category of relations b e t w e e n a string and its lexical constituents E x a m p l e s of L-RELs might be M O D NOUN and HEAD NOUN (of a NOUN NOUN PHRASE) S-REL represents the c a t e g o r y of relations b e t w e e n a string and its s u b - s t r i n g constituents, such as FIRST NP and SECOND NP (to distinguish between two NPs w i t h i n one sentence) VARIABLE is a t e r m

w h i c h r e p r e s e n t s the class of identifiers w h i c h the user w i l l use as variables in his n a t u r a l language rules

Before e n t e r i n g his rules into the system, the user must inform the system of all members of the L-CAT and V A R I A B L E categories w h i c h he w i l l use W o r d s in the S - C A T , L - R E L and S - R E L categories are introduced by the context of their use in u s e r - s p e c i f i e d rules The choice of all linguistic names is totally at the discretion of the user

A list of the initial entries for the example

of this paper are given below The single quote

m a r k i n d i c a t e s t h a t the f o l l o w i n g w o r d i s

m e n t i o n e d rather than used T h r o u g h o u t this paper, lines b e g i n n i n g w i t h the s y m b o l ** are entered by the user and the following line(s) are the c o m p u t e r r e s p o n s e In r e s p o n s e to a

d e c l a r a t i v e input statement, if the s y s t e m has been able to parse the s t a t e m e n t and build a structure in the semantic network to represent the input statement, then the computer replies with

an echo of the user's s t a t e m e n t p r e f a c e d by the phrase "I U N D E R S T A N D THAT" In other words, the building of a n e t w o r k structure is the system's

"representation" of understanding

** 'NOUN IS AN L-CAT

I UNDERSTAND THAT ' NOUN IS AN L-CAT

** 'G-DETERMINER IS AN L-CAT

(NOTE: C o m p u t e r responses are o m i t t e d for

t h e s e i n p u t s t a t e m e n t s due to s p a c e constraints of this paper Responses are all similar to the one shown above°)

** 'RELATION IS AN L-CAT

** I E IS A VARIABLE

** 'X IS A VARIABLE

137

Trang 3

** 'ON IS A RELATION

** 'A IS A G-DETERMINER

** 'BOTTLE IS A NOUN

** 'CONTAINER IS A NOUN

** 'TABLE IS A NOUN

** 'DESK IS A NOUN

** 'BAR IS A NOUN

*~ 'FLUID IS A MASS-NOUN

** 'MATERIAL IS A MASS-NOUN

** 'MILK IS A MASS-NOUN

** 'WATER IS A MASS-NOUN

** 'GLASS IS A MASS-NOUN

IV THE CORE OF THE NL-SYSTEM

T h e c o r e o f t h e N L - s y s t e m c o n t a i n s a

c o l l e c t i o n o f r u l e s w h i c h a c c e p t s t h e l a n g u a g e

d e f i n e d by t h e g r a m m a r l i s t e d i n t h e A p p e n d i x

The c o r e i s r e s p o n s i b l e f o r p a r s i n g t h e u s e r ' s

n a t u r a l l a n g u a g e i n p u t s t a t e m e n t s and b u i l d i n g t h e

c o r r e s p o n d i n g n e t w o r k s t r u c t u r e

It is also n e c e s s a r y to start w i t h a set of

semantic network structures representing the basic

r e l a t i o n s the s y s t e m c a n use f o r k n o w l e d g e

representation Currently these relations are:

a) Word W is preceded by "connector point" P in

a surface string; e.g node M3 of figure I

r e p r e s e n t s that w o r d IS is p r e c e d e d by

connector point M2 in the string;

b9 Lexeme L is a member of category C; e.g this

is used to represent the concept that 'BOTTLE

IS A NOUN, which was input in Section 3;

c) The string b e g i n n i n g at point Pl and e n d i n g

at p o i n t P2 in a s u r f a c e s t r i n g is in

category C; e.g node M53 of figure 3 repre-

sents the concept that '~ bottle" is a GNP;

d) Item X has the r e l a t i o n R to item Y; e.g

node M75 of figure 1 represents the concept

that the class of bottles is a subset of the

class of containers;

e) A class is c h a r a c t e r i z e d by its m e m b e r s

p a r t i c i p a t i n g in some relation; e.g the

class of glass bottles is c h a r a c t e r i z e d by

its members being made of glass;

f) The rule structures of SNePS

V SENTENTIAL COMPONENT REPRESENTATION

T h e r e p r e s e n t a t i o n of a s u r f a c e s t r i n g

u t i l i z e d in this study consists of a n e t w o r k version of the list structure used by Pereira and

W a r r e n [I0] w h i c h e l i m i n a t e s the e x p l i c i t

"connecting" tags or m a r k e r s of their a l t e r n a t e representation T h i s r e p r e s e n t a t i o n is a l s o

s i m i l a r to Kay's charts [4] in that several structures may be built as alternative analyses of

a single substring The network structure built

up by our top-level "reading" function, w i t h o u t any of the a d d i t i o n a l structure that w o u l d be added as a result of p r o c e s s i n g via rules of the network, is illustrated in figure I

As each w o r d of an input string is read by the system, the n e t w o r k r e p r e s e n t a t i o n of the string is e x t e n d e d and r e l e v a n t rules stored in the SNePS n e t w o r k are triggered All applicable rules are started in parallel by Processes of our MULTI package [8], are suspended if not all their antecedents are satisfied, and are resumed if more antecedents are satisfied as the string proceeds The SNePS bidirectional inference c a p a b i l i t y [6] focuses a t t e n t i o n t o w a r d s the active p a r s i n g

p r o c e s s e s and cuts d o w n the fan out of pure forward or backward chaining The system has many

of the a t t r i b u t e s and b e n e f i t s of K a p l a n ' s producer-consumer model [3] which influenced the design of the inference system The two SNePS subsystems, the M U L T I inference s y s t e m and the MATCH subsystem, provide the user with the pattern

m a t c h i n g and parse s u s p e n s i o n and c o n t i n u a t i o n capability enjoyed by the Flexible Parser of Hayes

& M o u r a d i a n [2]

VI INPUT AND PROCESSING OF THE USER'S RULES

A f t e r having entered a lexicon into the system as described above, the user will enter his natural language rules These rules m u s t be in the IF-THEN conditional form A sample rule that the user might enter is:

IF A STRING CONSISTS OF A G-DETERMINER FOLLOWED BY

A NOUN CALLED THE MOD-NOUN FOLLOWED BY ANOTHER NOUN CALLED THE HEAD-NOUN

THEN THE STRING IS AN NNP

®<

o

\ PRED

/

~o~ <

PRED

Figure i Network representation of a sentence

Trang 4

r u l e are t e r m s s e l e c t e d by the u s e r for c e r t a i n

l i n g u i s t i c e n t i t i e s The lexical category names

s u c h as G - D E T E R M I N E R and N O U N m u s t be e n t e r e d

previously as discussed above The words M O D - N O U N

and H E A D - N O U N s p e c i f y l e x i c a l c o n s t i t u e n t s of a

s t r i n g and t h e r e f o r e t h e s y s t e m adds t h e m to the

L - R E L c a t e g o r y T h e s t r i n g n a m e N N P is a d d e d to

the S-CAT category by the system

T h e user's r u l e - s t a t e m e n t is r e a d by the

s y s t e m a n d p r o c e s s e d by e x i s t i n g r u l e s as

d e s c r i b e d a b o v e W h e n it has b e e n c o m p l e t e l y

analyzed, a translation of the rule-statement is

asserted in the form of a n e t w o r k rule structure

T h i s r u l e is t h e n a v a i l a b l e to a n a l y z e f u r t h e r

user inputs

The form of these user rules is d e t e r m i n e d by the d e s i g n of our i n i t i a l core of r u l e s W e could, of course, have w r i t t e n rules w h i c h accept user rules of the form

NNP -> G - D E T E R M I N E R NOUN NOUN

N o t i c e , h o w e v e r , that m o s t of the u s e r r u l e s of this s e c t i o n c o n t a i n m o r e i n f o r m a t i o n t h a n s u c h simple phrase-structure rules

F i g u r e 2 c o n t a i n s t h e l i s t of t h e u s e r natural language rules w h i c h are used as input to the N L - s y s t e m in the e x a m p l e d e v e l o p e d for t h i s paper T h e s e r u l e s i l l u s t r a t e the t y p e s of r u l e s

w h i c h the system can handle

B y a d d i n g t h e r u l e s o f f i g u r e 2 to t h e

s y s t e m , w e h a v e e n h a n c e d the a b i l i t y of the N L -

i ** IF A STRING CONSISTS OF A M A S S - N O U N

* THEN THE STRING IS A GNP

* A N D THE GNP EXPRESSES THE CONCEPT NAMED BY THE MASS-NOUN

I UNDERSTAND THAT IF A STRING CONSISTS OF A MASS-NOUN THEN THE STRING

IS A GNP AND THE GNP EXPRESSES THE CONCEPT NAMED BY THE MASS-NOUN

2 ** IF A STRING CONSISTS OF A G-DETERMINER FOLLOWED BY A NOUN

* THEN THE STRING IS A GNP

* AND THE GNP EXPRESSES THE CONCEPT NAMED BY THE NOUN

(NOTE: C o m p u t e r r e s p o n s e s o m i t t e d for t h e s e r u l e s due to s p a c e c o n s t r a i n t s of this paper Responses are e x e m p l i f i e d by the response to first rule above.)

3 ** IF A STRING CONSISTS OF A G - D E T E R M I N E R F O L L O W E D BY A NOUN CALLED

* THE MOD-NOUN FOLLOWED BY ANOTHER NOUN CALLED THE H E A D - N O U N

* THEN THE STRING IS AN NNP

4 ** IF A STRING CONSISTS OF A N NNP

* THEN THERE EXISTS A CLASS E SUCH THAT

* THE CLASS E IS A SUBSET OF THE CLASS NAMED BY THE HEAD-NOUN

* AND THE NNP EXPRESSES THE CLASS E

5 ** IF A STRING CONSISTS OF A N NNP

* AND THE NNP EXPRESSES THE CLASS E

* AND THE CLASS NAMED BY THE MOD-NOUN IS A SUBSET OF M A T E R I A L

* AND THE CLASS N A M E D BY THE HEAD-NOUN IS A SUBSET OF C O N T A I N E R

* THEN THE CHARACTERISTIC OF E IS TO BE MADE-OF THE ITEM NAMED

* BY THE MOD-NOUN

6 ** IF A STRING CONSISTS OF A N NNP

* AND THE NNP EXPRESSES THE CLASS E

* AND THE CLASS NAMED BY THE MOD-NOUN IS A SUBSET OF FLUID

* AND THE CLASS N A M E D BY THE HEAD-NOUN IS A SUBSET OF CONTAINER

* THEN THE FUNCTION OF E IS TO BE CONTAINING THE ITEM NAMED BY THE

* MOD-NOUN

7 ** IF A S T R I N G C O N S I S T S OF A G N P C A L L E D T H E F I R S T - G N P F O L L O W E D BY

* THE W O R D 'IS FOLLOWED BY A GNP CALLED THE SECOND-GNP

* THEN THE STRING IS A DGNP-SNTC

8 ** IF A STRING CONSISTS OF A DGNP-SNTC

* THEN THE CLASS NAMED BY THE FIRST-GNP IS A SUBSET OF THE CLASS

* NAMED BY THE SECOND-GNP

* AND THE DGNP-SNTC EXPRESSES THIS LAST PROPOSITION

9 ** IF A STRING CONSISTS OF AN NNP FOLLOWED BY THE WORD 'IS

* FOLLOWED BY A RELATION FOLLOWED BY A GNP

* THEN THE STRING IS A SENTENCE

* AND THERE EXISTS AN ITEM X AND THERE EXISTS A N ITEM Y

* SUCH THAT THE ITEM X IS A MEMBER OF THE CLASS NAMED BY THE NNP

* AND THE ITEM Y IS A MEMBER OF THE CLASS NAMED BY THE GNP

* AND THE ITEM X HAS THE RELATION TO THE ITEM Y

* AND THE SENTENCE EXPRESSES THIS LAST PROPOSITION

I0.** IF THE FUNCTION OF E IS TO BE CONTAINING THE ITEM X

* AND Y IS A MEMBER OF E

* THEN THE FUNCTION OF Y IS TO BE CONTAINING THE ITEM X

ii.** IF THE CHARACTERISTIC OF E IS TO BE MADE OF THE ITEM X

* AND Y IS A MEMBER OF E

* THEN THE CHARACTERISTIC OF Y IS TO BE MADE OF THE ITEM X

Figure 2 The rules used as input to the system

Trang 5

system to '%nderstand" surface strings when '~ead"

into the network If we e x a m i n e rules 1 and 2,

for example, we find they define a GNP (a generic

noun phrase) Rules 4, 8, and 9 stipulate that a

relationship exists between a surface string and

the concept or proposition which is its intension

This relationship we denoted by "expresses" When

these rules a r e triggered, they w i l l not only

build s y n t a c t i c i n f o r m a t i o n into the n e t w o r k

categorizing the particular string that is being

"read" in, but w i l l also build a s e m a n t i c node

representing the relationship '~xpresses" between

the s t r i n g and the n o d e r e p r e s e n t i n g its

intension Thus, both s e m a n t i c and syntactic

concepts are built and linked in the network

In contrast to rules i - 9, rules I0 and II

are purely semantic, not syntactic The user's

rules may deal with syntax alone, semantics alone,

or a combination of both

All knowledge possessed by the system resides

in the same semantic network and, therefore, both

t h e rules of the N L - s y s t e m core and the user's

rules can be triggered if their a n t e c e d e n t s are

satisfied Thus the user's rules can be used not

"only for the input of surface strings c o n c e r n i n g

the task d o m a i n (2) d i s c u s s e d in S e c t i o n 2, but

also for enhancing the NL-system's c a p a b i l i t y of

'%nderstanding" input information relative to the

NLU domain

VII PROCESSING ILLUSTRATION

Assuming that we have entered the lexicon via

the rules listed in S e c t i o n 6, we can input a

s e n t e n c e s u c h as "A b o t t l e is a c o n t a i n e r " Figure 3 illustrates the network representation of the surface string "A bottle is a container" after

h a v i n g been p r o c e s s e d by the user's rules listed

in Section 6 Rule 2 would be triggered and would identify "a bottle" and "a container" as GNPs, building nodes M53, M55, M61, and M63 of figure 3

T h e n the antecedent of rule 7 w o u l d be s a t i s f i e d

by the sentence, since it consists of a GNP,

n a m e l y "a bottle", f o l l o w e d by the w o r d "is",

f o l l o w e d by a GNP, n a m e l y "a c o n t a i n e r " Therefore the node Mg0 of figure 3 would be built

i d e n t i f y i n g the sentence as a DGNP-SNTC The

a d d i t i o n of this k n o w l e d g e w o u l d trigger rule 8 and node M75 of figure 3 would be built asserting that the class n a m e d "bottle" is a subset of the class n a m e d "container" F u r t h e r m o r e , node M91

w o u l d be b u i l t a s s e r t i n g that the s e n t e n c e EXPRESSES the above stated subset proposition Let us now input additional statements to the

s y s t e m As e a c h s e n t e n c e is a d d e d , n o d e structures are built in the n e t w o r k c o n c e r n i n g both the syntactic properties of the sentence and the underlying semantics of the sentence Each of these structures is built into the s y s t e m only,

h o w e v e r , if it is the c o n s e q u e n c e of the triggering of one of the expert's rules

W e n o w add three sentences (preceded by the

**) and the program response is shown for each

**A BOTTLE IS A CONTAINER

I UNDERSTAND THAT A BOTTLE IS A CONTAINER

ARG2

Figure 3 Network representation of processed surface string

Trang 6

I UNDERSTAND THAT MILK IS A FLUID

**GLASS IS A MATERIAL

I UNDERSTAND THAT GLASS IS A MATERIAL

Each of the above input sentences is parsed

by the rules of Section 6 identifying the various

noun phrases and sentence structures, and a

p a r t i c u l a r semantic subset r e l a t i o n s h i p is built

corresponding to each sentence

We can n o w query the s y s t e m c o n c e r n i n g the

i n f o r m a t i o n just added and the core rules w i l l

process the query The query is parsed, an answer

is deduced from the information now stored in the

s e m a n t i c network, and a reply is g e n e r a t e d from

the n e t w o r k s t r u c t u r e w h i c h r e p r e s e n t s the

a s s e r t i o n of the s u b s e t r e l a t i o n s h i p b u i l t

c o r r e s p o n d i n g to e a c h of the a b o v e i n p u t

statements The next s e c t i o n d i s c u s s e s the

q u e s t i o n - a n s w e r i n g / g e n e r a t i o n f a c i l i t y in m o r e

detail

** WHAT IS A BOTTLE?

A BOTTLE IS A CONTAINER

Now we input the sentence "A milk bottle is

on a table" The rules involved are rules 2, 3,

4, 6, 9, and 10 The phrase "a m i l k bottle"

triggers rule 3 w h i c h identifies it as a NNP

(noun-noun phrase) Then since the string has

been identified as an NNP, rule 4 is triggered and

a n e w class is created and the new class is a

subset of the class representing bottles Rule 6

is also triggered by the addition of the instances

of the consequents of rules 3 and 4 and by our

previous input sentences asserting that "A bottle

is a container" and "Milk is a fluid" As a

result, a d d i t i o n a l k n o w l e d g e is built into the

network concerning the new sub-class of bottles:

the function of this new class is to contain milk

Then since "a table" satisfies the conditions for

rule 2, it is i d e n t i f i e d as a GNP, rule 9 is

finally triggered, and a s t r u c t u r e is built into

the network representing the concept that a member

of the set of bottles for c o n t a i n i n g m i l k is on a

m e m b e r of the set of tables The a n t e c e d e n t s of

rule i0 are satisfied by this member of the set of

bottles for c o n t a i n i n g milk, and an a s s e r t i o n is

added to the effect that the f u n c t i o n of this

m e m b e r is also to contain milk The c o m p u t e r

responds "I U N D E R S T A N D THAT " only w h e n a

s r u c t u r e has b e e n b u i l t w h i c h the s e n t e n c e

EXPRESSES

** A MILK BOTTLE IS ON A TABLE

I UNDERSTAND THAT A MILK BOTTLE IS ON A TABLE

In order to further a s c e r t a i n w h e t h e r the

system has understood the input sentence, we can

query the system as follows The system's core

and generate a phrase to express the answer

** WHAT IS ON A TABLE?

A BOTTLE FOR CONTAINING MILK

We now input the sentence '~ glass bottle is

on a desk" to be parsed and processed by the rules

of S e c t i o n 6 P r o c e s s i n g of this sentence is

s i m i l a r to that of the previous sentence, except that rule 5 will be t r i g g e r e d instead of rule 6 since the system has been informed that glass is a material Since the string "a glass b o t t l e " i s a

n o u n - n o u n phrase, glass is a subset of m a t e r i a l , and bottle is a subset of container, a new class

is created w h i c h is a subset of bottles and the

c h a r a c t e r i s t i c of this class is to be made of glass The remainder of the sentence is processed

in the same w a y as the previous input sentence, until finally a s t r u c t u r e is built to r e p r e s e n t the p r o p o s i t i o n that a m e m b e r of the set of bottles made of glass is on a member of the set of desks Again, this p r o p o s i t i o n is linked to the input sentence by an EXPRESSES relation

When we input the sentence (again preceded by the **) to the system, it responds w i t h its conclusion as shown here

** A GLASS BOTTLE IS ON A DESK

I UNDERSTAND THAT A GLASS BOTTLE IS ON A DESK

To make sure that the system understands the

d i f f e r e n c e b e t w e e n " g l a s s b o t t l e " a n d " m i l k bottle", we query the system relative to the item

on the desk:

** WHAT IS ON A DESK?

A BOTTLE MADE OF GLASS

W e now try "A w a t e r bottle is on a bar", but the system cannot fully understand this sentence since it has no k n o w l e d g e about water W e have not t01d the system whether water is a fluid or a material Therefore, rules 3 and 4 are triggered and a node is built to represent this new class of bottles, but no assertion is built concerning the properties of these bottles Since only three of the four a n t e c e d e n t s of rule 6 are satisfied,

p r o c e s s i n g of this rule is suspended Rule 9 is triggered, however, since all of its antecedents are satisfied, and therefore an assertion is built into the network representing the proposition that

a member of a subset of bottles is on a member of the class of bars Thus the system replies that

it has u n d e r s t o o d the input sentence, but really has not fully u n d e r s t o o d the phrase "a w a t e r bottle" as we can see w h e n we query the system

It does not respond that it is "a bottle for containing water"

Trang 7

** A WATER BOTTLE IS ON A BAR

I UNDERSTAND THAT A WATER BOTTLE IS ON A BAR

* * W H A T IS ON A BAR?

A BOTTLE

Essentially, the phrase "water bottle" is

ambiguous for the system It might mean '%ottle

for containing water", 'bottle made of water", or

something else The system's '~epresentation" of

this a m b i g u i t y is the suspended rule processing

M e a n w h i l e the parts of the sentence w h i c h are

"comprehensible" to the system have been processed

and stored After we tell the system '~ater is a

fluid", the system resumes its processing of rule

6 and an a s s e r t i o n is e s t a b l i s h e d in the n e t w o r k

representing the concept that the function of this

latest class of bottles is to c o n t a i n water The

a m b i g u i t y is r e s o l v e d by rule p r o c e s s i n g b e i n g

completed in one of the ways which were previously

possible We can then query the s y s t e m to s h o w

its understanding of what type of bottle is on the

bar

** WATER IS A FLUID

I UNDERSTAND THAT WATER IS A FLUID

* * W H A T IS ON A BAR?

A BOTTLE FOR CONTAINING WATER

This example demonstrates two features of the

system: I) The c o m b i n e d use of syntactic and

semantic information in the processing of surface

strings This feature is one of the p r i m a r y

b e n e f i t s of h a v i n g not o n l y s y n t a c t i c and

semantic, but also hybrid rules 2) The use of

bi-directional inference to use later information

to process or disambiguate earlier strings, even

across sentence boundaries

Vlll QUESTION-ANSWERING/GENERATION

The question-answering/generation facility of

the NL-system, mentioned briefly in Section 2, is

is a bottle?" is entered into the system, the

s e n t e n c e is p a r s e d by r u l e s of the c o r e in

c o n j u n c t i o n w i t h u s e r - d e f i n e d rules That is, rule 2 of Section 6 would identify "a bottle" as a GNP, but the top level parse of the input string

is a c c o m p l i s h e d by a core rule The syntax and corresponding semantics designated by rules 7 and

8 of S e c t i o n 6 f o r m the basis of the core rule Our current s y s t e m does not e n a b l e the user to specify the syntax and semantics of questions, so

consequents of a question were coded specifically for the e x a m p l e of this paper, we intend to pursue this issue in the future Currently, the two types of questions that our system can process are:

WHAT IS <NP> ? WHAT IS <RELATION> <NP> ?

U p o n successful parse of the query, the s y s t e m engages in a deduction process to determine w h i c h set is a superset of the set of bottles This process can either find an a s s e r t i o n in the network answering the query or, if necessary, the process can utilize b i - d i r e c t i o n a l inference, initiated in backword-chaining mode, to deduce an answer In this instance, the network structure dominated by node M75 of figure 3 is found as the answer to the query This structure asserts that the set of bottles is a subset of the set of containers

Another deduction process is now initiated to

g e n e r a t e a s u r f a c e s t r i n g to e x p r e s s t h i s structure For the purpose of generation, we have

d e l i b e r a t e l y not used the input strings w h i c h caused the s e m a n t i c n e t w o r k structures to be built If we had deduced a string which EXPRESSES node M75, the system would simply have found and repeated the sentence represented by node M90 of figure 3 We plan to m a k e use of these surface strings in future work, but for this study, we have employed a second "expresses" relation, which

we call EXPRESS-2, and rules of the core to

Figure 4 Network representation of a generated surface string

Trang 8

structures

F i g u r e 4 i l l u s t r a t e s t h e n e t w o r k

representation of the surface string generated for

node M75 The string "A bottle", d o m i n a t e d by

node M221, is generated for node M54 of figure 3,

e x p r e s s i n g an a r b i t r a r y m e m b e r of the set of

bottles The string "a container", d o m i n a t e d by

node M223, is g e n e r a t e d to express the set of

containers, r e p r e s e n t e d by node M62 of figure 3

F i n a l l y , the s u r f a c e s t r i n g "A b o t t l e is a

c o n t a i n e r " , r e p r e s e n t e d by n o d e M 2 2 6 , is

established to express node M75 and the answer to

the query In general, a surface sentence is

generated to EXPRESS-2 a given semantic structure

by first generating strings to EXPRESS-2 the sub-

structures of the s e m a n t i c structure and by

assembling these strings into a network version of

a l i s t Thus the semantic structure is processed

in a bottom-up fashion

The structure of the g e n e r a t e d string is a

phrase-structured representation u t i l i z i n g FIRST

and REST pointers to the sub-phrases of a string

This r e p r e s e n t a t i o n reflects the subordinate

r e l a t i o n of a phrase to its " p a r e n t " p h r a s e The

structures pointed to by the FIRST and REST arcs

can be a) another list structure w i t h FIRST and

REST pointers; b) a string r e p r e s e n t e d by a node

such as Mg0 of figure 3 w i t h BEG, END, and CAT

arcs; or c) a node w i t h W O R D arc to a w o r d and an

optional PRED arc to another node w i t h PRED and

WORD arcs After the s t r u c t u r e r e p r e s e n t i n g the

surface string has been generated, the resulting

list or tree is traversed and the leaf nodes

printed as response

IX CONCLUSIONS Our goal is to design a NLU s y s t e m for a

l i n g u i s t i c t h e o r i s t to use for l a n g u a g e

processing The system's linguistic k n o w l e d g e

should be a v a i l a b l e to the theorist as d o m a i n

knowledge As a result of our p r e l i m i n a r y study

of a K E a p p r o a c h to N a t u r a l L a n g u a g e

Understanding, we have gained valuable experience

with the basic tools and concepts of such a

system All aspects of our N L - s y s t e m have, of

course, undergone many revisions and refinements

during development and will most likely continue

to do so

During the course of our study, we have

a) d e v e l o p e d two r e p r e s e n t a t i o n s of a surface

string: I) a linear representation appropriate

for input strings as s h o w n in figure i; and 2)

a phrase-structured representation appropriate

for generation, shown in figure 4;

b) designed a set of SNePS rules which are capable

of analyzing the user's natural language input

rules and b u i l d i n g the c o r r e s p o n d i n g n e t w o r k rules;

c ) i d e n t i f i e d b a s i c c o n c e p t s e s s e n t i a l for linguistic analysis: lexical category, phrase category, relation between a string and lexical constituent, relation between a string and sub-

s t r i m g , the e x p r e s s e s r e l a t i o n s b e t w e e n syntactic structures and a semantic structures, and the concept of a variable that the user may wish to use in input rules;

d) designed a set of SNePS rules which can analyze some simple queries and generate a response

X FUTURE DIRECTION

As our system has evolved, we have striven to reduce the a m o u n t of core k n o w l e d g e w h i c h is essential for the system to function We want to enable the user to define the language processing

c a p a b i l i t i e s of the system~ but a basic core of rules is essential to process the user's initial

l e x i c o n entries and rules One of our high priority items for the i m m e d i a t e future is to pursue this issue Our o b j e c t i v e is to d e v e l o p the N L - s y s t e m into a b o o t - s t r a p s y s t e m to the

g r e a t e s t degree possible That is, with a minimal core of p r e - p r o g r a m m e d k n o w l e d g e , the user w i l l input rules and assertions to enhance the system's

c a p a b i l i t y to acquire both l i n g u i s t i c and non- linguistic knowledge In other words, the user will define his o w n input language for e n t e r i n g knowledge into the system and conversing with the system

Another topic of future investigation will be the f e a s i b i l i t y of e x t e n d i n g the user's control over the system's basic tools by enabling the user

to define the n e t w o r k Case frames for syntactic and semantic knowledge representation

We also intend to extend the c a p a b i l i t y of the system so as to enable the user to define the syntax of questions and the nature of response

XI SUMMARY This study explores the realm of a Knowledge

E n g i n e e r i n g a p p r o a c h to N a t u r a l L a n g u a g e

U n d e r s t a n d i n g A basic core of NL rules enable the NLU expert to input his natural language rules and his l e x i c o n i n t o the s e m a n t i c n e t w o r k

k n o w l e d g e base in natural lan~uame In this system, the rules and assertions concerning both semantic and syntactic knowledge are stored in the

n e t w o r k and u n d e r g o i n t e r a c t i o n d u r i n g the deduction processes

A n e x a m p l e was p r e s e n t e d to illustrate: entry of the user's lexicon into the system; entry

of the user's natural language rule s t a t e m e n t s

Trang 9

w h i c h the user can utilize; h o w rules build

conceptual structures from surface strings; the

use of k n o w l e d g e for d i s a m b i g u a t i n g surface

structure; the use of later i n f o r m a t i o n for

d i s a m h i g u a t i n g an earlier, p a r t i a l l y u n d e r s t o o d

sentence; the question-answering~generation

facility of the NL-system

R E F E R E N C E S

I H a a s , N & H e n d r i x , G G , "An A p p r o a c h to

Acquiring and Applying Knowledge", Proceedings

of the AliA%, pp 235-239, 1980

2 Hayes, P & M o u r a d i a n , G., "Flexible Parsing",

P r o c e e d i n g s of the iSth A n n u a l M e e t i n ~ of the

Association for Computational Linguistics , pp

97-103, 1980

3 Kaplan, R.M., "A M u l t i - p r o c e s s i n g A p p r o a c h to

Natural Language", Proceedings of the National

Computer Conference, AFIPS Press, Montvale, NJ)

pp 435-440,1973

4 Kay, M., "The M i n d System", In R Rustin, ed

Natural L a n g u a g e P r o c e s s i n g , A l g o r i t h m i c s

Press, New York, pp 153-188, 1973

5 L e h n e r t , W G., T h e p r o c e s s of Q u e s t i o n

A n s w e r i n g , L a w r e n c e Erlbaum, Hillsdale, NJ,

1978

6 Martins, J., McKay, D.P., & Shapiro, S.C., Bi-

d i r e c t i o n a l Inference, T e c h n i c a l Report No

174, D e p a r t m e n t of C o m p u t e r Science, SUNY at

Buffalo, 1981

7 McCord, M.C., Usin K Slots and M o d i f i e r s in

Logic Grammars for Natural LanKuaKe , Technical

R e p o r t No 69A-80, Univ of Kentucky, rev

October, 1980,

8 McKay, D.P & Shapiro, S.Co, "MULTI - A LISP

Based M u l t i p r o c e s s i n g S y s t e m " , C o n f e r e n c e

Record of the 1980 LISP Conference, Stanford

Univ., pp 29-37, 1980

9 Pereira, F.C.N & Warren, D.H.D., "Definite

Clause G r a m m a r s for Language A n a l y s i s - A

Survey of the Formalism and a Comparison with

A u g m e n t e d T r a n s i t i o n Networks", A r t i f i c i a l

IntelliKence) pp 231-278, 1980

1 0 R o b i n s o n ) J.J., " D I A G R A M , A G r a m m a r f o r

Dialogues", CACM, pp 27-47, January, 1982

ll.Shapiro, S.C., "The SNePS S e m a n t i c N e t w o r k

P r o c e s s i n g S y s t e m " In N F i n d l e r , ed

Associative Networks - The R e p r e s e n t a t i o n and

Use of Knowledge by Computers, Academic Press,

New York, pp 179a-203, 1979

1 2 S h a p i r o , S.C., " G e n e r a l i z e d A u g m e n t e d

Transition Network Grammars for Generation ~,~pu~

S e m a n t i c Networks", P r o c e e d i n g s of the 17th

A n n u a l M e e t i y _ ~ of the A s s o c i a t i o n for

Computational Linguistics, pp 25-29, 1979

Xll APPENDIX - NL CORE GRAMMAR

T h e following grammar is a definitive description

of the language in w h i c h the user can enter linguistic statements into the s e m a n t i c network The Backus-Naur Form (BNF) grammar is used in this language definition

Notational conventions:

- Phrase in lower case letters explains the word required by the user

- Standard grammar metasymbols:

<> enclose nonterminal items

| for alternation [] enclose optional items () for grouping

Space represents concatenation

- Concatenation has priority over alternation

<LEX-STMT> : :=

'<WORD> IS (AJAN) (L-CAT|<L-CAT-MEMBER>)

<RULE> ::= IF <ANT-STMT> THEN <CQ-STMT>

<ANT-STMT> : := <ANT-STMT> AND <ANT-STMT>

I <STMT >

<CQ-STMT> : := <CQ-STMT> AND <CQ-STMT>

| THE STRING IS <G-DET> <STRING-NAME>

I THERE EXISTS A <CONCEPT-WORD> <VAR>

I <STMT>

<STMT> : := <CL-REF> <REL-REF> <CL-REF>

! THE <STRING-NAME> EXPRESSES <CL-REF>

I THE <STRING-NAME> EXPRESSES THIS LAST PROPOS ITION

I THE <FUN-CHAR-WORD> OF <CL-REF> IS TO

BE <FUN-CHAR-VERB> <CL-REF>

<STR-DESCRIPTION> : :=

<STR-DESCRIPTION> FOLLOWED BY <STR-DESCRIPTION>

| <G-DET> <LEX-NAME> [<LABEL-PHRASE>]

| THE WORD ' <LITERAL>

<LABEL-PHRASE> :: CALLED <DET> <LABEL>

<LEX-NAME> ::= any lexical category name

<LABEL> ::= any name or label

<STRING-NAME> ::= any string category name

<REL-REF> ::= IS A (SUBSET|MEMBER) OF

| HAS THE <REL-WORD> TO

<CL-REF> ::= THE <CONCEPT-WORD> <VAR>

| THE CLASS NAMED BY THE <NAME>

I a member of an L-CAT category

<FUN-CHAR-WORD> : := (FUNCTION |CHARACTERISTIC)

<FUN-CHAR-VERB> : := any verb

<NAME> ::= n a m e of a s t r i n g p h r a s e or the

constituent of a string phrase

<VAR> ::= any member of the category VARIABLE

<G-DET> : : A I AN l ANOTHER

<DET> : := <G-DET> I THE

<REL-WORD> ::~ a member of L-CAT which should

denote "relation"

< W O R D > ::= any word

Ngày đăng: 17/03/2014, 19:21

TỪ KHÓA LIÊN QUAN