• No results found

Relaxation Techniques for Parsing Grammatically Ill Formed Input in Natural Language Understanding Systems

N/A
N/A
Protected

Academic year: 2020

Share "Relaxation Techniques for Parsing Grammatically Ill Formed Input in Natural Language Understanding Systems"

Copied!
10
0
0

Loading.... (view fulltext now)

Full text

(1)

Relaxation Techniques for Parsing

Grammatically Ill-Formed Input in

Natural Language Understanding Systems 1

Stan C. K w a s n y

Computer Science Department

Indiana University

Bloomington, Indiana 47401

Norman K. Sondheimer

Sperry Univac

Blue Bell, Pennsylvania 19424

This paper investigates several language phenomena either considered deviant by linguistic standards or insufficiently addressed by existing approaches. These include co-occurrence violations, some forms of ellipsis and extraneous forms, and conjunction. Relaxation techniques for their treatment in Natural Language Understanding Systems are discussed. These techniques, developed within the Augmented Transition Network (ATN) model, are shown to be adequate to handle many of these cases.

1. Introduction

A m o n g the c o m p o n e n t s included in a Natural Lan- guage U n d e r s t a n d i n g ( N L U ) system is a g r a m m a r which specifies much of the linguistic structure of the utterances that can be expected. H o w e v e r , it is cer- tain that inputs that are ill-formed with respect to the grammar will be received, b o t h because people regu- larly form ungrammatical utterances and because there are a variety of forms that c a n n o t be readily included in current grammatical models and are hence " e x t r a - grammatical". These might be rejected, but as Wilks ( 1 9 7 6 ) stresses, "... u n d e r s t a n d i n g requires, at the very least, ... some a t t e m p t to interpret, rather than merely reject, what seem to be ill-formed u t t e r a n c e s . "

This paper investigates several language p h e n o m e n a c o m m o n l y c o n s i d e r e d ungrammatical or extra- grammatical and discusses techniques directed at inte- grating them as much as possible into the conventional f r a m e w o r k of grammatical processing p e r f o r m e d by N L U systems. A " n o r m a t i v e " grammar is assumed

l This p a p e r is a revised and e x t e n d e d version of a paper " U n g r a m m a t i c a l i t y a n d E x t r a - G r a m m a t i c a l i t y in 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 S y s t e m s " p r e s e n t e d at the 17th A n n u a l M e e t i n g of the A s s o c i a t i o n for C o m p u t a t i o n a l Linguistics, San Diego, Califor- nia, A u g u s t , 1979.

which specifies the structure of w e l l - f o r m e d inputs. Rules that are b o t h manually a d d e d to the original grammar and, by relaxing the constraints of the gram- mar, automatically constructed during parsing analyze the ill-formed input. The ill-formedness is shown at the completion of a parse by an indication of its devi- ance f r o m a fully grammatical structure. We have b e e n able to accomplish this while preserving the structural characteristics of the original grammar and its inherent efficiency.

The A u g m e n t e d Transition N e t w o r k ( A T N ) model was chosen as the tool in which to express our ideas, and a basic u n d e r s t a n d i n g of this m o d e l is assumed t h r o u g h o u t the paper. 2 H o w e v e r , we believe our ideas are more general in scope than the A T N implementa- tion may suggest. Similar ideas have recently b e e n integrated into the A u g m e n t e d Phrase Structure G r a m - mar model by Miller, Heidorn, and Jensen (1981).

Some of the p h e n o m e n a discussed have been con- sidered previously in particular N L U systems, as, for example, the ellipsis handling in L I F E R described in H e n d r i x , Sacerdoti, Sagalowicz, and Slocum (1978). Similar methods for processing c o n j u n c t i o n have b e e n

2 F o r a t h o r o u g h i n t r o d u c t i o n to t h e A T N f o r m a l i s m , see B a t e s ( 1 9 7 8 ) .

Copyright 1981 by the A s s o c i a t i o n for C o m p u t a t i o n a l Linguistics. P e r m i s s i o n to copy w i t h o u t fee all or part of this material is g r a n t e d provided that the copies are n o t m a d e for direct c o m m e r c i a l a d v a n t a g e a n d the Journal r e f e r e n c e a n d this c o p y r i g h t notice are included o n the first page. To copy otherwise, or to republish, requires a fee a n d / o r specific permission.

0 3 6 2 - 6 1 3 X / 8 1 / 0 2 0 0 9 9 - 1 0 5 0 1 . 0 0

(2)

Stan C. Kwasny and Norman K. Sondheimer Relaxation Techniques for Parsing Ill-Formed Input

used in the L U N A R s y s t e m as discussed in W o o d s ( 1 9 7 3 ) . In linguistic studies, C h o m s k y ( 1 9 6 4 ) a n d K a t z (1964), a m o n g others, have considered the treat- m e n t of u n g r a m m a t i c a l i t y within the T r a n s f o r m a t i o n a l G e n e r a t i v e model. C o n t e m p o r a r y studies closest to ours are those of Weischedel and Black (1980) and H a y e s and M o u r a d i a n ( 1 9 8 0 ) . Similarities will be p o i n t e d out as o u r t e c h n i q u e s are p r e s e n t e d . T h e p r e s e n t study is distinguished b y the range of p h e n o m - e n a considered, structural and efficiency goals, and the inclusion of techniques in one u n i f o r m f r a m e w o r k .

This p a p e r surveys these p r o b l e m s , discusses m e c h - anisms aimed at solving them, and discusses h o w these m e c h a n i s m s are used. A t the end, s o m e limitations are discussed and extensions suggested. Unless otherwise noted, all ideas h a v e b e e n tested t h r o u g h i m p l e m e n t a - tion. A m o r e detailed discussion of all points m a y be f o u n d in K w a s n y (1980).

2. L a n g u a g e P h e n o m e n a

T h r o u g h o u t this p a p e r we will argue that success in handling u n g r a m m a t i c a l and e x t r a - g r a m m a t i c a l input d e p e n d s on two factors. T h e first is the identification of types of ill-formedness and the p a t t e r n s that t h e y follow. T h e second is the relating of ill-formed input to the parsing p a t h of a g r a m m a t i c a l input the user intends. This s e c t i o n i n t r o d u c e s the t y p e s of ill- f o r m e d n e s s we h a v e studied and discusses their rela- tionship to g r a m m a t i c a l s t r u c t u r e s in t e r m s of A T N g r a m m a r s .

2.1 C o - O c c u r r e n c e V i o l a t i o n s

O u r first class of errors is c o n n e c t e d to co- o c c u r r e n c e restrictions within a sentence. T h e r e are m a n y occasions in a s e n t e n c e where two or m o r e parts m u s t agree, as in the following e x a m p l e s (an asterisk " * " indicates an i l l - f o r m e d or u n g r a m m a t i c a l sen- tence):

*Draw a circles.

*I, along with m a n y o t h e r G e r m a n s , are c o n c e r n e d a b o u t the Russian threat.

*I will stay f r o m n o w under midnight.

T h e errors in the a b o v e involve c o o r d i n a t i o n b e t w e e n the italicized words. T h e first and s e c o n d e x a m p l e s illustrate simple a g r e e m e n t p r o b l e m s . T h e third in- volves a c o m p l i c a t e d relation a m o n g at least the three italicized terms.

Such p h e n o m e n a do occur naturally. F o r e x a m p l e , Shores ( 1 9 7 7 ) a n a l y z e s fifty-six f r e s h m a n English p a p e r s written b y black college students and reveals p a t t e r n s of n o n s t a n d a r d usage ranging f r o m uninflect- ed plurals, possessives, and third p e r s o n singulars to overinflection (use of i n a p p r o p r i a t e endings).

In A T N terms, the significant blocks t h a t k e e p inputs with c o - o c c u r r e n c e violations f r o m being p a r s e d as t~ae user i n t e n d e d arise f r o m a failure of a test on an arc or the failure to satisfy an arc type restriction, e.g., the failure of a w o r d to be in the c o r r e c t c a t e g o - ry. T h e essential b l o c k in the first e x a m p l e a b o v e would likely o c c u r on an a g r e e m e n t t e s t on an arc accepting a noun. T h e essential b l o c k a g e s in the sec- o n d and third e x a m p l e s are likely to c o m e f r o m failure of the arcs testing the v e r b a n d final preposition, re- spectively.

2.2 Ellipsis a n d E x t r a n e o u s T e r m s

In handling ellipsis, the m o s t r e l e v a n t distinction to m a k e is b e t w e e n contextual a n d telegraphic ellipsis. C o n t e x t u a l ellipsis o c c u r s w h e n a f o r m m a k e s sense only in the c o n t e x t of o t h e r sentences. F o r e x a m p l e , the f o r m

*President R e a g a n has.

seems u n g r a m m a t i c a l without the p r e c e d i n g question

W h o has a wife n a m e d N a n c y ?

T e l e g r a p h i c ellipsis, on the o t h e r hand, occurs w h e n a f o r m only m a k e s p r o p e r sense in a particular situation. F o r e x a m p l e , the f o r m s

*3 chairs no waiting (sign in b a r b e r shop)

*Yanks split (headline in sports section)

*Profit margins for e a c h p r o d u c t

(query s u b m i t t e d to a N L U s y s t e m )

are cases of telegraphic ellipsis with a p p r o p r i a t e situa- tions for their use n o t e d in p a r e n t h e s e s . T h e third one is f r o m an e x p e r i m e n t a l s t u d y of N L U f o r m a n a g e - m e n t i n f o r m a t i o n by M a l h o t r a ( 1 9 7 5 ) which indicated that such f o r m s m u s t be considered.

F u r t h e r e v i d e n c e to justify a s t u d y of ellipsis is given b y T h o m p s o n (1980) w h o analyzes several m o d - es of c o m m u n i c a t i o n a n d concludes that an i m p o r t a n t subset of u t t e r a n c e s used in c o m m u n i c a t i o n are frag- m e n t s , n o t s e n t e n c e s . O f p a r t i c u l a r i n t e r e s t in the analysis is the n o t i o n of a terse question, which is a t y p e of telegraphic ellipsis, a n d a terse reply, which is a t y p e of c o n t e x t u a l ellipsis. In her h u m a n - t o - c o m p u t e r e x p e r i m e n t s , she f o u n d 7 . 6 % terse questions and 1 0 . 3 % terse replies out of 882 p a r s e d messages.

A n o t h e r t y p e of u n g r a m m a t i c a l i t y c o m p l e m e n t a r y to ellipsis occurs w h e n the user puts u n n e c e s s a r y words or phrases in an utterance. T h e r e a s o n for an extra w o r d m a y be a change of intention in the middle of an u t t e r a n c e , an oversight, or simply f o r emphasis. F o r e x a m p l e ,

*Did y o u ... did I erase any files?

*List prices of single unit prices f o r 72 and 73:

T h e s e c o n d e x a m p l e again c o m e s f r o m M a l h o t r a (1975).

(3)

Stan C. Kwasny and Norman K. Sondheimer Relaxation Techniques for Parsing Ill-Formed Input

T h e best w a y to view ill-formedness in terms of the A T N is to think of the user as trying to c o m p l e t e a p a t h t h r o u g h the g r a m m a r , b u t having p r o d u c e d an input that has too m a n y or too few f o r m s n e c e s s a r y to t r a v e r s e all arcs. F o r contextual ellipsis, g r a m m a t i c a l processing can be guided, in part, by e x p e c t a t i o n s of w h a t the f o r m of the input will be.

F o r telegraphic ellipsis, it might be a r g u e d that the f o r m s could be placed i n d e p e n d e n t l y in the g r a m m a r , but since they allow so m u c h variation c o m p a r e d to g r a m m a t i c a l forms, including t h e m with existing tech- niques would d r a m a t i c a l l y increase the size of the g r a m m a r . F u r t h e r m o r e , there is a real distinction in terms of c o m p l e t e n e s s and clarity of intent b e t w e e n g r a m m a t i c a l and u n g r a m m a t i c a l forms. H e n c e we feel justified in suggesting special t e c h n i q u e s f o r their t r e a t m e n t which will relate their structure to the nor- mative g r a m m a r .

2.3 C o n j u n c t i o n

C o n j u n c t i o n is an e x t r e m e l y c o m m o n p h e n o m e n o n , but it is seldom directly t r e a t e d in a g r a m m a r . We h a v e considered several types of conjunction. Simple f o r m s of conjunction occur m o s t frequently, as in

J o h n loves M a r y and hates Sue.

G a p p i n g occurs w h e n internal s e g m e n t s of the second conjunct are missing, as in

J o h n loves M a r y and M a r y John.

T h e list f o r m of c o n j u n c t i o n occurs w h e n m o r e t h a n two elements are joined in a single phrase, as in

J o h n loves Mary, Sue, N a n c y , and Bill.

Correlative conjunction occurs in sentences to coordi- nate the joining of constituents, as in

J o h n b o t h loves and hates Sue.

C o n j u n c t i o n s are generally not included in g r a m - mars because, similarly to u n g r a m m a t i c a l forms, they c a n a p p e a r in so m a n y places t h a t their inclusion would dramatically increase the size of the g r a m m a r .

We see c o n j u n c t i o n as similar to ellipsis. F o r ex- ample, we see s o m e of t h e . a b o v e as resulting f r o m sentence-joining with elided forms:

J o h n loves M a r y and John hates Sue. J o h n loves M a r y and M a r y loves John. J o h n loves Mary, John loves Sue,

John loves N a n c y , and John loves Bill.

This view of c o n j u n c t i o n is consistent with views ex- pressed by Halliday and H a s a n (1976) and b y Quirk, G r e e n b a u m , Leech, and Svartik (1972).

3. The M e c h a n i s m s and H o w T h e y Apply

In this section, t e c h n i q u e s are d e s c r i b e d f o r ad- dressing the p h e n o m e n a i n t r o d u c e d in the p r e v i o u s section. All of the techniques follow a general p a r a -

digm of r e l a x a t i o n w h e r e i n a n o r m a t i v e g r a m m a r is assumed which describes the set of a c c e p t a b l e inputs to the system. During parsing, w h e n e v e r a relaxable arc c a n n o t be traversed, a b a c k t r a c k point is c r e a t e d which includes the relaxed version of the arc. T h e s e alternatives are not considered until a f t e r all possible g r a m m a t i c a l paths have b e e n a t t e m p t e d , t h e r e b y insur- ing that g r a m m a t i c a l inputs will be h a n d l e d correctly. R e l a x a t i o n of previously relaxed arcs is also possible. W h e n p r o c e s s i n g is c o m p l e t e d , a " d e v i a n c e n o t e " which describes h o w the input deviated f r o m the ex- p e c t e d g r a m m a t i c a l f o r m is passed along to other p r o c - essing c o m p o n e n t s of the system.

3.1 Feature R e l a x a t i o n T e c h n i q u e s

T h e m o s t s t r a i g h t f o r w a r d m e t h o d s of relaxation are those that o p e r a t e at the lexical level. T h e principle involved is to permit a w o r d which is slightly i n a p p r o - priate to stand in place of the c o r r e c t word. Slight f e a t u r e variations are p r e s e n t in the lexical entry for the w o r d f o u n d in the input w h e n c o m p a r e d to the e x p e c t e d word. T w o m e t h o d s of f e a t u r e r e l a x a t i o n h a v e b e e n investigated.

O u r first m e t h o d involves relaxing a test on an arc. Test relaxation occurs w h e n the test p o r t i o n of an arc contains a relaxable predicate and the test fails. T w o m e t h o d s of test relaxation have b e e n devised and im- p l e m e n t e d b a s e d on predicate type. Predicates can be designated b y the g r a m m a r writer as either absolutely violable in which case the o p p o s i t e value of the predi- cate is substituted for the predicate during relaxation

or conditionally violable in which case a substitute

predicate is provided. F o r example, consider the fol- lowing to be a test that fails

(AND

(NUMBER-AGREE SUBJ V) (INTRANS V))

If the predicate N U M B E R - A G R E E was declared ab- solutely violable and its use in this test r e t u r n e d the value N I L , then the n e g a t i o n of ( N U M B E R - A G R E E SUBJ V) would replace it in the test creating a new arc with the test:

(AND T

(INTRANS V))

If I N T R A N S were c o n d i t i o n a l l y violable with the sub- stitute p r e d i c a t e T R A N S , t h e n the following test would a p p e a r on the new arc:

(AND

(NUMBER-AGREE SUBJ V) (TRANS V))

(4)

Stan C. Kwasny and Norman K. Sondheimer Relaxation Techniques for Parsing I l l - F o r m e d I n p u t

W h e n e v e r m o r e t h a n one test in a failing arc is viola- ble, all possible single relaxations are a t t e m p t e d inde- pendently. This is similar to a m e t h o d of Weischedel and Black (1980).

C h o m s k y ( 1 9 6 4 ) , in d e v e l o p i n g his ideas on de- grees of g r a m m a t i c a l n e s s , discusses the notion of or- ganizing w o r d categories hierarchically. We have ap- plied and e x t e n d e d these ideas in our second m e t h o d of relaxation called category relaxation. In this m e - t h o d , the g r a m m a r w r i t e r p r o d u c e s , along with the g r a m m a r , a h i e r a r c h y d e s c r i b i n g the r e l a t i o n s h i p a m o n g words, c a t e g o r i e s , a n d p h r a s e t y p e s which is used by the relaxation m e c h a n i s m to c o n s t r u c t relaxed versions of arcs that h a v e failed. W h e n an arc fails b e c a u s e of an arc type failure, i.e., b e c a u s e a p a r t i c u - lar word, c a t e g o r y , or phrase was not f o u n d , a n e w arc (or arcs) m a y be c r e a t e d according to the description of the word, c a t e g o r y , or phrase in the hierarchy. T y p - ically, P U S H arcs will relax to P U S H arcs, C A T arcs to C A T or P U S H arcs, a n d W R D or M E M arcs to C A T arcs. Consider, f o r e x a m p l e , the syntactic c a t e - gory hierarchy for p r o n o u n s shown in Figure 1. F o r this example, the c a t e g o r y relaxation m e c h a n i s m would allow the relaxation o f a C A T arc identifying P E R - S O N A L p r o n o u n s to include the entire P R O N O U N c a t e g o r y , including the s u b c a t e g o r i e s R E F L E X I V E and D E M O N S T R A T I V E . As with test r e l a x a t i o n , successive relaxations could occur.

F o r b o t h m e t h o d s of relaxation, " d e v i a n c e n o t e s " are g e n e r a t e d which describe the nature of the r e l a x a - tion in each case. F o r example, in the first relaxation e x a m p l e given above, T h e deviance n o t e p r o d u c e d by our i m p l e m e n t a t i o n would look like:

( R E L A X E D - T E S T (FROM

(AND

(TO ( AND

( N U M B E R - A G R E E SUBJ V) (INTRANS V)))

T

(INTRANS V) ) ) )

W h e r e multiple types or multiple levels of relaxation occur, a note is g e n e r a t e d for each. T h e entire list of d e v i a n c e notes a c c o m p a n i e s the final structure p r o d - uced b y the parser. In this way, the final structure is m a r k e d as deviant and the nature of the deviance is available for use b y o t h e r c o m p o n e n t s of the u n d e r - standing system.

In o u r i m p l e m e n t a t i o n , test r e l a x a t i o n has b e e n fully i m p l e m e n t e d , while c a t e g o r y relaxation has b e e n i m p l e m e n t e d f o r all cases except those involving P U S H arcs. In general, the C A T to P U S H c a t e g o r y relaxa- tion should involve no special p r o b l e m s in i m p l e m e n t a -

PRONOUNS

DEMONSTRATIVE PERSONAL REFLEXIVE

o o

THIS

/ /

ooo

[image:4.612.324.572.58.221.2]

HE SHE ME THEM

Figure 1. Category hierarchy.

6 Q

YOURSELF

tion, while the P U S H to P U S H r e l a x a t i o n i n v o l v e s identifying the failure of a P U S H arc, which involves k e e p i n g t r a c k of w e l l - f o r m e d substrings.

3.2 C o - O c c u r r e n c e a n d F e a t u r e R e l a x a t i o n

H a n d l i n g f o r m s t h a t are d e v i a n t b e c a u s e of co- o c c u r r e n c e violations involves using the a b o v e f e a t u r e relaxation m e t h o d s . W h e r e simple tests exist within a g r a m m a r to filter out u n a c c e p t a b l e forms, these tests m a y be relaxed to allow the a c c e p t a n c e of these forms.

F o r c o - o c c u r r e n c e violations, the points in the g r a m m a r where parsing b e c o m e s b l o c k e d are useful in d e t e r m i n i n g exactly where the test or c a t e g o r y viola- tions occur. Arcs at those points are being a t t e m p t e d a n d fail due to the failure of a c o - o c c u r r e n c e test or c a t e g o r i z a t i o n r e q u i r e m e n t . R e l a x a t i o n is t h e n applied and alternatives g e n e r a t e d which m a y be e x p l o r e d at a later point via b a c k t r a c k i n g . F o r e x a m p l e , the sen- tence:

*John love M a r y

shows a n u m b e r d i s a g r e e m e n t b e t w e e n the subject and the verb. M o s t p r o b a b l y this would show up during parsing in a test on an arc w h e n the v e r b of the sen- tence is being considered. T h a t test could in fact be the one c o n s i d e r e d in o u r example. T h e test would fail a n d the traversal would not be allowed. A t that point, an u n g r a m m a t i c a l alternative similar to the o n e we described would be c r e a t e d f o r later b a c k t r a c k i n g c o n s i d e r a t i o n , a n d p r o c e s s i n g would p r o c e e d as dis- cussed.

A b s o l u t e l y violable p r e d i c a t e s can be p e r m i t t e d in cases where the test describes s o m e superficial consist- e n c y c h e c k i n g or w h e r e the t e s t ' s failure or success does not h a v e a direct e f f e c t on m e a n i n g , while condi- tionally violable predicates a p p l y to p r e d i c a t e s which m u s t be relaxed cautiously to avoid loss of meaning.

(5)

Stan C. Kwasny and Norman K. Sondheimer Relaxation Techniques for Parsing: Ill-Formed Input

A n example of the application of c a t e g o r y relaxa- tion can be seen utilizing the c a t e g o r y h i e r a r c h y in Figure 1 :

Draw me a circle.

The normative g r a m m a r m a y be written so that a W R D arc is used to specify the processing of the w o r d " m e " . Subsequent relaxation of that arc, following Figure 1, w o u l d permit a n y personal pronoun. This would specify a m e t h o d of processing sentences such as the following:

*Draw he a circle.

A second level of relaxation would permit f o r m s like:

*Draw this a circle.

The t e c h n i q u e of c a t e g o r y relaxation is certainly not limited merely to syntactic categories. The Burton (1976) semantic grammar a p p r o a c h to language p r o c - essing makes exclusive use of categories which distin- guish semantic entities rather than the traditional s y n - tactic ones. A c a t e g o r y hierarchy can easily be c o n - structed which describes h o w these categories relate in the system without extending the mechanism described here.

3 . 3 P a t t e r n s a n d t h e P a t t e r n A r c

In this section, relaxation techniques are applied to the g r a m m a r itself t h r o u g h the use of p a t t e r n s and p a t t e r n - m a t c h i n g algorithms. O t h e r researchers have used patterns for parsing, such as Parkison, Colby, and F a u g h t ( t 9 7 7 ) , Wilks ( t 9 7 8 ) , a n d H a y e s and M o u r a - dian (1980), but we have devised a m e t h o d of inte- grating p a t t e r n s within the A T N formalism f o r the p u r p o s e of improving the g r a m m a r ' s responsiveness t o ungrammatical and extra-grammatical inputs.

In o u r current formulation, a p a t t e r n is a linear sequence of A T N arcs which is m a t c h e d against the input string. A pattern arc ( P A T ) has been added to the A T N formalism with a f o r m similar to that of o t h - er arcs:

( P A T < p a t s p e c > < t e s t > < a c t > * < t e r m > )

The pattern specification ( < p a t s p e c > ) is described in Figure 2 t h r o u g h a modified B N F g r a m m a r , where an asterisk indicates zero or more o c c u r r e n c e s of the preceding non-terminal. The pattern ( < p a t t > ) is ei- ther a user-assigned pattern name, a " > " , or a list of A T N arcs, each of which may be p r e c e d e d by the sym- bol " > " to indicate a potentially optional arc, while the pattern mode ( < m o d e > ) can be any of the key- words, U N A N C H O R , O P T I O N A L , o r SKIP. These are discussed below.

A n index of patterns is supported in our implemen- tation, to permit naming and referencing of patterns. Also supported is an index of arcs, allowing the nam- ing and referencing of arcs as well. Further, n a m e d patterns and named arcs are defined as LISP macros,.

which e x p a n d into arcs a c c o r d i n g to h o w t h e y are referenced. This allows the two indexes and the gram- m a r to be substantially reduced in size.

C o n s i d e r the following e x a m p l e o f a p a t t e r n arc. Suppose the sentence:

M a r y d r o v e the car.

was p r o c e s s e d b y art A T N p a t h t h r o u g h a s e n t e n c e n e t w o r k of t h r e e arcs, namely P E R S O N , T R A N S - A C T , and O B J which processed "Mary'", " d r o v e " , a n d " t h e c a r " respectively. T h e n a p a t t e r n of the sentence could be specified as:

( P E R S O N T R A N S - A C T O B J )

This, then, could be included in a p a t t e r n arc, where the " . . . " is realized b y t h e a p p r o p r i a t e tests a n d actions, as:

( P A T ( ( P E R S O N T R A N S - A C T O B J ) ) T ... )

It could f u r t h e r be modified to permit optional constit- uents, as in

( P A T ( ( > P E R S O N > T R A N S - A C T O B J )

O P T I O N A L ) T ... )

Pattern matching p r o c e e d s b y m a t c h i n g each arc in the p a t t e r n against the input string, b u t is a f f e c t e d by the chosen "mode'" o f matching. Since the individual c o m p o n e n t arcs are, in a sense, c o m p l e x patterns, the A T N interpreter c a n be considered part o f the m a t c h - ing algorithm as we[l. I n arcs within patterns, explicit t r a n s f e r to a new state is i g n o r e d arid t h e n e x t arc a t t e m p t e d on success is the one following ha the pat- tern. A s in the example a b o v e , art arc in a p a t t e r n p r e f a c e d by " > " c a n be. c o n s i d e r e d optional, if the O P T I O N A L mode has been selected to activate this feature. W h e n this is done, the matching algorithm still attempts to m a t c h optional arcs, b u t m a y ignore them. In the example of a p a t t e r n arc using the o p -

<pat spec> :.:= ( < p a t t > <mode>*)

< p a t t > : : = (<p arc>*) <pat name>

<mode> : : = UNANCHOR OPTIONAL SKIP

<p arc> : : = < a r c > > < a r c >

< pat name> :: = user-assigned pattern name >

Figure 2. Description of pattern specification.

[image:5.612.329.561.569.714.2]
(6)

Stan C. Kwasny and Norman K. Sondheimer Relaxation Techniques for Parsing Ill-Formed Input

tional f e a t u r e above, the p a t t e r n c o m p o n e n t would be able to m a t c h a n y of the fragments:

* M a r y the car

* D r o v e the car *The car

as well as the original sentence. We will return to this e x a m p l e in our discussion on conjunction.

T h e m a n i p u l a t i o n of registers within optional arcs poses some interesting p r o b l e m s . With the optionality feature, not e v e r y arc will be e x e c u t e d in a p a t t e r n . T o complicate m a t t e r s , registers previously set m a y be used within a test or they m a y hold e l e m e n t s of the final structure. Tests involving u n d e f i n e d registers are d e f a u l t e d to allow t r a v e r s a l of these arcs, while structure-building actions involving u n d e f i n e d registers m a r k the missing c o m p o n e n t s as undefined.

In addition, there are two other m o d e s of matching. A p a t t e r n u n a n c h o r i n g capability is activated b y speci- fying the m o d e U N A N C H O R . In this m o d e , p a t t e r n s are p e r m i t t e d to skip words prior to matching. Specify- ing the SKIP m o d e results in words being ignored be- t w e e n m a t c h e s of the arcs within a pattern. This is a generalization of the U N A N C H O R mode.

As with all f o r m s of relaxation, p a t t e r n m a t c h i n g results in deviance notes. F o r patterns, these notes c o n t a i n i n f o r m a t i o n n e c e s s a r y to d e t e r m i n e h o w m a t c h i n g s u c c e e d e d . Sufficient i n f o r m a t i o n is c o n - tained in the deviance notes to r e c o v e r s k i p p e d words and skipped arcs, if desired.

3.4 P a t t e r n s , Ellipsis, a n d E x t r a n e o u s F o r m s

T h e p a t t e r n arc is the p r i m a r y m e c h a n i s m for h a n - dling ellipsis and e x t r a n e o u s forms. A p a t t e r n arc can be seen as capturing a single p a t h t h r o u g h a network. T h e m a t c h e r gives s o m e f r e e d o m in h o w t h a t p a t h relates to a string. T h e a p p r o p r i a t e p a r s i n g p a t h t h r o u g h a n e t w o r k relates to an elliptical s e n t e n c e or one with extra words in the same way. With c o n t e x t u - al ellipsis, the relationship will be in having s o m e of the arcs on the c o r r e c t p a t h not satisfied. In p a t t e r n arcs, these will be r e p r e s e n t e d b y arcs m a r k e d as o p - tional. Dialogue c o n t e x t will p r o v i d e the defaults f o r the missing c o m p o n e n t s . With p a t t e r n arcs, the devi- ance notes will show w h a t was left out and the o t h e r c o m p o n e n t s in the N L U s y s t e m will be responsible for supplying the values.

As an example, consider the following question and its possible elliptical responses:

W h o drove a car? *Mary.

*Mary did. *Mary her Ford.

T h e f o r m of the basic e x p e c t e d r e s p o n s e could be s h o w n b y the following p a t t e r n , where A U X refers to

an arc that identifies auxiliary verbs:

( P A T ( ( P E R S O N > A U X > T R A N S - A C T > O B J )

O P T I O N A L ) T ... )

This would serve to identify the three elliptical r e s p o n - ses as well as others. It would also a c c e p t s o m e un- likely inputs such as:

* M a r y could a car.

* M a r y the E m p i r e State Building.

T h e s e would have to be filtered b y later processing by o t h e r c o m p o n e n t s t h r o u g h the use of the d e v i a n c e notes. A p a t t e r n for the similar question:

M a r y d r o v e what?

could be as follows:

( P A T ( ( > P E R S O N > A U X > T R A N S - A C T O B J )

O P T I O N A L ) T ... )

T h e source of p a t t e r n s f o r c o n t e x t u a l ellipsis is i m p o r t a n t . In the L I F E R s y s t e m discussed in H e n d r i x , Sacerdoti, Sagalowicz, a n d Slocum ( 1 9 7 8 ) , the previ- ous user input can b e seen as a p a t t e r n for elliptical processing of the current input. T h e a u t o m a t i c p a t t e r n g e n e r a t o r i n t r o d u c e d in the next section, along with an e x p e c t a t i o n m e c h a n i s m , will c a p t u r e this level of p r o c - essing. But, with the ability to c o n s t r u c t a r b i t r a r y p a t t e r n s and to add t h e m to the g r a m m a r f r o m o t h e r c o m p o n e n t s of the N L U s y s t e m , o u r a p p r o a c h c a n accomplish m u c h more. F o r e x a m p l e , a question gen- eration routine could add an e x p e c t a t i o n of a y e s / n o a n s w e r in f r o n t of a t r a n s f o r m e d rephrasing of a ques- tion, as in

Did M a r y drive a car?

*Yes, she did. *No, she did not.

T h e a p p r o p r i a t e p a t t e r n s m i g h t be the following, where YES, N O , and N O T r e f e r to arcs that a c c e p t these words:

( P A T ( ( Y E S > P E R S O N > A U X > T R A N S - A C T

> O B J ) O P T I O N A L ) T ... )

( P A T ( ( N O > P E R S O N > A U X > N O T > T R A N S - A C T

> O B J ) O P T I O N A L ) T ... )

P a t t e r n s for telegraphic ellipsis h a v e to be a d d e d to the g r a m m a r manually. O n e typical usage would be in accepting terse questions w h e r e the actions default to a s t a n d a r d o p e r a t i o n in the system. F o r e x a m p l e , in a d a t a b a s e situation, a r e f e r e n c e to a set of o b j e c t s could be u n d e r s t o o d as a c o m m a n d to retrieve them, as with the " p r o f i t m a r g i n " q u e r y given earlier. A p a t t e r n here might be the following, where I M P - A C T is an arc that identifies the typical action, and S E T

(7)

Stan C. Kwasny and Norman K. Sondheimer Relaxation Techniques for Parsing Ill-Formed Input

identifies a set description:

( P A T ( ( > I M P - A C T S E T ) O P T I O N A L ) T ... )

Generally, p a t t e r n s of usage must be identified, say in a study like that of M a l h o t r a (1975), so that a p p r o p r i - ate p a t t e r n s can be constructed. P a t t e r n s f o r e x t r a n e - ous f o r m s m u s t also be a d d e d in a d v a n c e . T h e s e would use either the U N A N C H O R o p t i o n in o r d e r to skip false starts, or use d y n a m i c a l l y - p r o d u c e d p a t t e r n s to catch repetitions for emphasis. In general, only a limited n u m b e r of these p a t t e r n s should be required. The value of the p a t t e r n m e c h a n i s m here, especially in the case of t e l e g r a p h i c ellipsis, is in c o n n e c t i n g the u n g r a m m a t i c a l f o r m s to the g r a m m a t i c a l ones.

T h e p r o b l e m of e x t r a n e o u s words can be a t t a c k e d by t w o of the < m o d e > settings in p a t t e r n arcs. T h e U N A N C H O R m o d e applies to restarts, as in the earli- er example, through the use of a simple p a t t e r n arc:

m a r t h r o u g h one of two devices. T h e y m a y be c o n - structed as n e e d e d b y special m a c r o arcs or they m a y be c o n s t r u c t e d for future use t h r o u g h an e x p e c t a t i o n m e c h a n i s m .

As the e x p e c t a t i o n - b a s e d p a r s i n g e f f o r t s clearly show, s y n t a c t i c e l e m e n t s , especially words, c o n t a i n i m p o r t a n t clues on processing ( R i e s b e c k and Schank, 1976). Indeed, we also have f o u n d it useful to m a k e the A T N m e c h a n i s m m o r e " a c t i v e " by allowing it to p r o d u c e new arcs b a s e d on such clues. T o achieve this, the C A T , M E M , TST, and W R D arcs h a v e b e e n g e n e r a l i z e d and f o u r new " m a c r o " arcs, k n o w n as C A T * , M E M * , TST*, and W R D * , h a v e b e e n added to the A T N formalism. T h e s e are similar in e v e r y w a y to their c o u n t e r p a r t s , e x c e p t t h a t as a final action, in- stead of indicating the state to which the t r a v e r s a l leads, a new arc is c o n s t r u c t e d d y n a m i c a l l y and i m m e - diately executed. T h e difference in the f o r m that the new arc takes is seen in the following c o m p a r i s o n :

( P A T ( ( ( P U S H S / ... )) U N A N C H O R ) ... )

where the S / n e t w o r k is used for parsing sentences. E x t r a n e o u s words in the interior of sentences can be a c c o m m o d a t e d b y the SKIP mode. These m e t h o d s are similar to those d e s c r i b e d b y H a y e s a n d M o u r a d i a n (1980).

3.5 D y n a m i c G e n e r a t i o n of P a t t e r n s

P a t t e r n s need to be g e n e r a t e d dynamically in order to m a k e use of the p a t t e r n s of language occurring in the sentence. In this way, previous processing can be m a d e to contribute m o r e directly to later processing. An a u t o m a t i c p a t t e r n generation m e c h a n i s m has b e e n i m p l e m e n t e d using the trace of the c u r r e n t e x e c u t i o n p a t h to p r o d u c e a pattern. This is i n v o k e d b y using the s y m b o l " > " in place of the p a t t e r n name. P a t - terns p r o d u c e d in this fashion contain only those arcs t r a v e r s e d at the current level of recursion in the net- work, a l t h o u g h this could easily be g e n e r a l i z e d in a w a y which would permit P U S H arcs to be a u t o m a t i c a l - ly replaced by their s u b n e t w o r k paths. E a c h arc in an a u t o m a t i c p a t t e r n of this type is m a r k e d as optional; h o w e v e r , additional control of the optionality f e a t u r e of the p a t t e r n m a t c h e r can be exercised t h r o u g h judi- cious use of the test c o m p o n e n t of the arc. P a t t e r n s can also be c o n s t r u c t e d dynamically in precisely the s a m e w a y g r a m m a t i c a l s t r u c t u r e s are built b y using B U I L D Q and other structure-building functions.

P a t t e r n arcs enter the g r a m m a r in two ways. T h e y are manually written into the g r a m m a r in those cases where the u n g r a m m a t i c a l i t i e s are c o m m o n a n d t h e y are added to the g r a m m a r a u t o m a t i c a l l y in those cases where the u n g r a m m a t i c a l i t y is d e p e n d e n t on context. T h o s e that are p r o d u c e d dynamically e n t e r the g r a m -

( C A T < c a t > < t e s t > < a c t > * < t e r m > ) ( C A T * < c a t > < t e s t > < a c t > * < c r e a t a c t > )

In this e x a m p l e , < c r e a t a c t > is used to define the d y n a m i c arc t h r o u g h the use of B U I L D Q and similar structure-building functions, while ( t e r m > r e p r e s e n t s a n y terminal action (usually a T O action). Arcs c o m - p u t e d b y m a c r o arcs can be of a n y type p e r m i t t e d b y the A T N , but one of the m o s t useful arcs to c o m p u t e in this m a n n e r is the p a t t e r n arc discussed above. This allows a p r e s c r i b e d p a t h of arcs to be a t t e m p t e d in processing the sentence.

An e x a m p l e of m u c h of w h a t was just described is the following m a c r o arc:

( W R D * A N D T

( B U I L D Q

( P A T ( > O P T I O N A L )

T

( S E T R S ( B U I L D Q ( A N D + *

) ) )

) s))

This W R D * m a c r o arc a t t e m p t s to find the word A N D at the c u r r e n t p o s i t i o n of p r o c e s s i n g the input. If successful, it c o m p u t e s a p a t t e r n arc with the p a t t e r n left to be a u t o m a t i c a l l y g e n e r a t e d u p o n execution.

While the m a c r o arc forces i m m e d i a t e e x e c u t i o n of an arc, arcs m a y also be c o m p u t e d a n d t e m p o r a r i l y a d d e d to the g r a m m a r f o r later e x e c u t i o n t h r o u g h the

expectation mechanism. E x p e c t a t i o n s are p e r f o r m e d as actions within arcs (analogous to the H O L D action f o r parsing structures) or as actions elsewhere in the N L U system, e.g., during g e n e r a t i o n , w h e n particular types

(8)

Stan C. K w a s n y and N o r m a n K. Sondheimer Relaxation Techniques for Parsing I l l - F o r m e d I n p u t

of responses c a n be foreseen. T w o f o r m s are allowed: (essentially) p r o d u c e the arc:

( E X P E C T < c r e a t a c t > < s t a t e > ) ( E X P E C T < c r e a t a c t > )

In the first case, the arc c r e a t e d is b o u n d to a state as specified. W h e n later processing leads to that state, the e x p e c t e d arc will be a t t e m p t e d as one alternative at that state. In the second case, where no state is specified, the e f f e c t is to a t t e m p t the arc at e v e r y state visited during the parse.

T h e range of an e x p e c t a t i o n p r o d u c e d during p a r s - ing is ordinarily limited to a single sentence, with the arc disappearing after it has b e e n used; h o w e v e r , the start state, S / , is r e s e r v e d for e x p e c t a t i o n s i n t e n d e d to be active at the beginning of the n e x t sentence. T h e s e will d i s a p p e a r in turn at the end of processing for that sentence.

3.6 Conjunction and Macro Arcs

Besides their utility in handling cases of ellipsis, p a t t e r n arcs are also the p r i m a r y m e c h a n i s m for h a n - dling conjunction. As m e n t i o n e d earlier, the rationale f o r this is the c o n n e c t i o n b e t w e e n c o n j u n c t i o n and ellipsis. W h e n e v e r a c o n j u n c t i o n is seen, a p a t t e r n is d e v e l o p e d f r o m the a l r e a d y identified e l e m e n t s a n d m a t c h e d against the remaining s e g m e n t s of input.

All of the f o r m s of c o n j u n c t i o n described a b o v e are t r e a t e d t h r o u g h a globally defined set of " c o n j u n c t i o n a r c s " , which are active at e v e r y state of the g r a m m a r . S o m e r e s t r i c t e d cases, such as " a n d " following " b e t w e e n " , m a y h a v e the c o n j u n c t i o n built into the g r a m m a r . T h e s e f o r m s are not subject to the c o n j u n c - tion arcs. In general, the c o n j u n c t i o n arcs are m a d e up of m a c r o arcs which c o m p u t e p a t t e r n arcs. T h e a u t o m a t i c p a t t e r n m e c h a n i s m is heavily used.

R e t u r n i n g to the earlier e x a m p l e of p a t t e r n arcs, it c a n be s h o w n h o w these c o n j u n c t i o n arcs work. C o n - sider w h a t takes place w h e n the m a c r o arc p r e v i o u s l y d e s c r i b e d is a c t i v a t e d during the p r o c e s s i n g of the sentence:

M a r y drove the car and J o h n d r o v e the truck.

P r o c e s s i n g p r o c e e d s until the c o n j u n c t i o n " a n d " is e n c o u n t e r e d . F o r the p u r p o s e of this example, it is a s s u m e d that the t o p level p a t h of arcs followed during processing is simply the p a t t e r n discussed earlier:

( P E R S O N T R A N S - A C T OBJ)

T h e a c t i o n of the m a c r o arc is, t h e r e f o r e , to

(PAT ( ( > P E R S O N > T R A N S - A C T >OBJ) O P T I O N A L )

T

(SETR S ( B U I L D Q (AND + * ) S)) ) )

Processing continues f r o m the state that triggered the e x e c u t i o n of the c o n j u n c t i o n arc, and a structure for the c o n j o i n e d s e n t e n c e is produced. In fact, a n y of the following variations on the s e n t e n c e c a n be h a n - dled in precisely the s a m e way:

M a r y drove the car a n d the truck.

M a r y d r o v e the car and J o h n the truck.

M a r y d r o v e the car and d r o v e the truck.

O f course, m o r e actions could be specified in the arc, as well as m o r e c o m p l i c a t e d tests. In particular, a test should be included to force m a t c h i n g of the O B J arc.

With simple conjunctions, the r i g h t m o s t e l e m e n t s in the p a t t e r n s are m a t c h e d . I n t e r n a l e l e m e n t s in p a t - terns are skipped w h e n g a p p i n g occurs. T h e list f o r m of c o n j u n c t i o n which uses p u n c t u a t i o n in place of some of the conjunctions, can also be h a n d l e d t h r o u g h the c a r e f u l c o n s t r u c t i o n of d y n a m i c p a t t e r n s which f o r m d e f e r r e d expectations. C o r r e l a t i v e c o n j u n c t i o n is t r e a t e d similarly, with e x p e c t a t i o n s b a s e d on deferring the d y n a m i c building of p a t t e r n s as well.

T h e fact that c o n j u n c t i o n arcs occur implicitly at e v e r y state of the g r a m m a r p e r m i t s the same c o n j u n c - tion to trigger the s a m e set of c o n j u n c t i o n arcs f r o m several different states at potentially several different levels in the g r a m m a r . With p a t t e r n arcs being c o m - p u t e d d y n a m i c a l l y , d i f f e r e n t p a t t e r n s are a t t e m p t e d , d e p e n d i n g largely on the s u b n e t w o r k in which the state occurs. In this w a y the p r o p e r joining of constit- uents is realized.

3.7 Interaction of Techniques

As g r a m m a t i c a l processing p r o c e e d s , u n g r a m m a t i c a l possibilities are continually being suggested f r o m the various m e c h a n i s m s we have i m p l e m e n t e d . T o coordi- nate all of these activities, the b a c k t r a c k i n g m e c h a n i s m has b e e n i m p r o v e d to k e e p t r a c k of these alternatives. All paths in the original g r a m m a r are a t t e m p t e d first. O n l y w h e n all of these fail are the c o n j u n c t i o n a l t e r n a - tives a n d the m a n u a l l y - a d d e d a n d d y n a m i c a l l y - p r o d u c e d u n g r a m m a t i c a l alternatives tried. All of the a l t e r n a t i v e s a s s o c i a t e d with a single s t a t e c a n be t h o u g h t of as a single possibility. A selection m e c h a - nism is used to d e t e r m i n e which b a c k t r a c k p o i n t a m o n g the m a n y p o t e n t i a l alternatives should be ex- plored next. C u r r e n t l y , we use a m e t h o d also used b y Weischedel and Black ( 1 9 8 0 ) of selecting the a l t e r n a - tive with the longest path, i.e., the one with the d e e p - est p e n e t r a t i o n in the n e t w o r k .

(9)

Stan C. Kwasny and Norman K. Sondheimer Relaxation Techniques for Parsing Ill-Formed Input

4. L i m i t a t i o n s and E x t e n s i o n s

W o r k has only b e g u n on the p r o b l e m s associated with handling ill-formed input. T h e techniques dis- cussed in this p a p e r , we believe, are a step t o w a r d solving these problems, but w o r k is continuing along several dimensions.

As t h e y are p r e s e n t e d and i m p l e m e n t e d , the test and c a t e g o r y r e l a x a t i o n m e t h o d s c a n be t o o n o n - specific in permitting relaxation of these types, since all arcs with the n a m e d tests and categories b e c o m e potentially relaxable. But, the s a m e function can be used for different purposes. F o r example, the function G E T R can be used just to retrieve a value for a later test or as a predicate w h e n used as a register c o n t a i n - ing a t r u e / f a l s e flag. Weischedel and Black ( 1 9 8 0 ) allow for such cases b y having each instance of a test individually p r e d i c a t e d . A c o m p r o m i s e t h a t would allow m o r e g e n e r a l i t y to be c a p t u r e d would be to specify some or all of the a r g u m e n t s to the relaxable function w h e n describing the f o r m of relaxable func- tion calls. The identification of arcs for c a t e g o r y re- laxation can b e t r e a t e d similarly.

T h e SKIP m o d e on p a t t e r n s is limited in its applica- bility to sentences with e x t r a n e o u s forms. First, the m o d e setting c a n only be used o n patterns, not on the general g r a m m a r . S e c o n d , it is p r o b a b l y t o o n o n - selective. T h e i n t e r p r e t e r does p r e f e r to skip as f e w words as possible; h o w e v e r no p r e f e r e n c e is given as to where to skip t h e m . Thus, e v e n if p a t t e r n s of ex- t r a n e o u s words are identified precisely, the w o r d skip- ping m e c h a n i s m would simply n o t be able to allow for them.

O n e w e a k n e s s in the p a t t e r n arc is the t r e a t m e n t of register settings in o p t i o n a l arcs t h a t are skipped. R a t h e r t h a n ignoring the use of registers t h a t would have b e e n set in the arc, it would be b e t t e r to devise a default s t r a t e g y to force their setting.

It is instructive to c o m p a r e our c o n j u n c t i o n techni- que to the S Y S C O N J facility of W o o d s (1973). T h e latter treats c o n j u n c t i o n as showing a l t e r n a t i v e ways of continuing a sentence. This allows f o r sentences such as

H e d r o v e his car t h r o u g h a n d b r o k e a plate glass window.

which at best we will a c c e p t with a misleading devi- ance note. This is in p a r t an e x a m p l e of w h a t Q u i r k (1972) calls " c a t a p h o r i c " ellipsis:

J o h n can pass the examination, and B o b certainly will, pass the e x a m i n a t i o n

H e d r o v e his car through a plate glass window and he b r o k e a plate glass window.

H e r e , the ellipsis occurs b e f o r e , n o t after, the c o n j u n c - tion. T o utilize techniques in o u r style on the a b o v e examples, it would be n e c e s s a r y to e x t r a c t the p r o p e r

p a t t e r n f r o m the entire p a t h of t r a v e r s e d arcs. H o w e v - er, unlike S Y S C O N J , o u r t e c h n i q u e c a n h a n d l e the obvious elliptical cases such as gapping, o r the tightly constrained cases such as correlatives.

O n e o f our original h o p e s for this w o r k was that e a c h of the relaxations would be applicable to a b r o a d set of individual g r a m m a r s . H o w e v e r , it quickly b e - c a m e o b v i o u s that the relaxations and g r a m m a r w o r k best if they are d e v e l o p e d together. The test relaxa- tions that d e p e n d on the use of the predicates in the g r a m m a r are an o b v i o u s case in point. A n o t h e r e x a m - ple is the case of c o n j u n c t i o n arcs, which w o r k best w h e n c o n s t i t u e n t b o u n d a r i e s in the g r a m m a r reflect the structures t h a t c a n be conjoined.

A n o t h e r area f o r i m p r o v e m e n t is in the a m o u n t of time spent parsing b e f o r e a n y u n g r a m m a t i c a l choices are considered. C u r r e n t l y , all g r a m m a t i c a l p a t h s a r e considered first. This o r g a n i z a t i o n m a y be t e m p e r e d b y adjusting o p e r a t i o n a l p a r a m e t e r s in o u r i m p l e m e n - tation so that w h e n a b l o c k o c c u r s some or all of the u n g r a m m a t i c a l a l t e r n a t i v e s m a y be investigated. H o w - ever, guidelines f o r a d j u s t i n g t h e s e p a r a m e t e r s are lacking at the m o m e n t .

A n o t h e r a r e a f o r m o r e r e s e a r c h is the p r o d u c t i o n of p a t t e r n s for i n t e r p r e t i n g c o n t e x t u a l ellipsis. A t the m o m e n t , we i n s p e c t q u e s t i o n f o r m s a n d a d d p r e d e - fined p a t t e r n s to a c c e p t their elliptical answers. In order to p r o d u c e these p a t t e r n s automatically, a t h e o r y of q u e s t i o n - a n d - a n s w e r dialogue is necessary.

Finally, developing heuristics which c h o o s e a l t e r n a - tives for relaxation a m o n g m a n y b l o c k a g e s is a m a j o r p r o b l e m . O u r heuristic which picks the a l t e r n a t i v e with the longest p a t h c a n o v e r s h o o t the actual failure and possibly lead to an incorrectly built structure. We believe, as do Weischedel a n d Black (1980), that the a n s w e r m a y lie in being able to e x a m i n e the s e m a n t i c plausibility of partial structures.

Several o t h e r types of ill-formedness h a v e n o t b e e n c o n s i d e r e d in this study, f o r e x a m p l e , idioms, m e t a - phors, i n c o r r e c t w o r d order, r u n - t o g e t h e r s e n t e n c e s , incorrect p u n c t u a t i o n , misspelling, and p r e s u p p o s i t i o n - al failure. F o r e a c h of these p h e n o m e n a , either little is k n o w n a b o u t it or it has b e e n studied e l s e w h e r e i n d e p e n d e n t l y . In either case, w o r k r e m a i n s to be done to d e v e l o p processing f o r t h e m within our f r a m e - work.

5. C o n c l u s i o n s

D e s p i t e the limitations and n e e d e d extensions dis- cussed a b o v e , the results d e s c r i b e d h e r e are signifi- cant, we believe, b e c a u s e t h e y e x t e n d the state of the art in several ways. M o s t i m p o r t a n t are the following:

1. T h e use of the c a t e g o r y hierarchy to h a n - dle arc type failures.

(10)

Stan C. Kwasny and Norman K. Sondheimer Relaxation Techniques for Parsing lU-Formed Input

2. T h e use of the p a t t e r n m e c h a n i s m to allow for c o n t e x t u a l ellipsis and gapping.

3. M o r e generally, the use of p a t t e r n s to al- low f o r m a n y sorts of ellipsis a n d c o n - junctions.

4. Finally, the c o m b i n a t i o n of all of the tech- niques in one c o h e r e n t system, where b e - cause all g r a m m a t i c a l a l t e r n a t i v e s are tried first and no modifications are m a d e to the original g r a m m a r , its inherent effi- ciency and structure are preserved.

T h e t h e m e of the final point is f u r t h e r d e v e l o p e d in S o n d h e i m e r and Weischedel (1980).

A c k n o w l e d g m e n t s

W e w i s h t o a c k n o w l e d g e t h e c o m m e n t s o f R a l p h W e i s c h e d e l a n d M a r c F o g e l o n p r e v i o u s d r a f t s o f this p a p e r . T h e c o o p e r a t i o n a n d c o m m e n t s o f G e o r g e H e i d o r n , R i c h a r d W e x e l b l a t , a n d t h e r e v i e w e r s o f this p a p e r also c o n t r i b u t e d g r e a t l y .

R e f e r e n c e s

Bates, M., "The Theory and Practice of Augmented Transition

Network Grammars," in Natural Language Communication with

Computers, L. Bolc (Ed.), 191-259, Springer-Verlag, Berlin, 191-259, 1978.

Burton, Richard R., "Semantic Grammar: An Engineering Techni- que for Constructing Natural Language Understanding Sys- tems," Bolt Beranek and Newman, Report No. 3453, Decem- ber, 1976.

Chomsky, N., "Degrees of Grammaticalness," in The Structure of

Language: Readings in the Philosophy of Language, Fodor, J.A. and J.J. Katz (Eds.), 384-389, Prentice-Hall, Englewood Cliffs, New Jersey, 1964.

Halliday, M.A.K. and R. Hasan, Cohesion in English, Longman,

London, 1976.

Hayes, P., and G. Mouradian, "Flexible Parsing," Proceedings of the

18th Annual Meeting of the Association for Computational Linguistics, 97-103, Philadelphia, June, 1980.

Hendrix, G.G., E.D. Sacerdoti, D. Sagalowicz, and J. Slocum, "Developing a Natural Language Interface to Complex Data,"

ACM Transactions on Database Systems, 3, 2, 105-147, June, 1978.

Katz, J.J., "Semi-Sentences," in The Structure of Language: Read-

ings in the Philosophy of Language, Fodor, J.A. and J.J. Katz (Eds.), 400-416, Prentice-Hall, Englewood Cliffs, New Jersey, 1964.

Kwasny, S.C., "Treatment of Ungrammatical and Extragrammatical Phenomena in Natural Language Understanding Systems," PhD dissertation, Ohio State University, 1980, (available through the Indiana University Linguistics Club, Bloomington, Indiana). Malhotra, A., "Design Criteria for a Knowledge-Based English

Language System for Management: An Experimental Analysis," MAC TR-146, M.I.T., Cambridge, MA, February, 1975. Miller, L.A., G.E. Heidorn, and K. Jensen, "Text-Critiquing with

the EPISTLE System: An Author's Aid to Better Syntax,"

Proceedings of the National Computer Conference, 50, 649-655, AFIPS Press, Arlington, VA, 1981.

Parkison, R.C., K.M. Colby, and W.S. Faught, "Conversational Language Comprehension Using Integrated Pattern-Matching

and Parsing," Artificial Intelligence 9, 2, 111-134, October,

1977.

Quirk, R., S. Greenbaum, G. Leech, and J. Svartik, A Grammar of

Contemporary English, Seminar Press, New York, 1972.

Riesbeck, C.K., and R.C. Schank, "Comprehension by Computer: Expectation-Based Analysis of Sentences in Context," Yale University, Research Report 78, October, 1976.

Shores, D.L., "Black English and Black Attitudes," in Papers in

Language Variation, D . L Shores and C.P. Hines (Ed.), The University of Alabama Press, University, Alabama, 1977. Sondheimer, N.K., and R.M. Weischedel, "A Rule-Based Approach

to Ill-Formed Input," COLING 80: Proceedings of the Eighth

International Conference on Computational Linguistics, 46-53, Tokyo, October, 1980.

Thompson, B.H., "Linguistic Analysis of Natural Language Com-

munication with Computers," COLING 80: Proceedings of the

Eighth International Conference on Computational Linguistics,

190-201, Tokyo, October, 1980.

Weischedel, R.M., and J. Black, "Responding Intelligently to Un-

parsable Inputs," American Journal of Computational Linguistics,

6, 2, 97-109, 1980.

Wilks, Y., "Natural Language Understanding Systems Within the

A.I. Paradigm: A Survey," American Journal of Computational

Linguistics, microfiche 40, 1, 1976.

Woods, W.A., "An Experimental Parsing System for Transition

Network Grammars," in Natural Language Processing, R. Rustin

(Ed.), 111-154, Algorithmics Press, New York, 1973.

Stan C. Kwasny is an Assistant Professor in the C o m p u t e r S c i e n c e D e p a r t m e n t at l n d i a n a University. H e received the P h . D degree in C o m p u t e r a n d I n f o r m a - tion Science f r o m Ohio S t a t e University in 1 9 8 0 .

Norman K. Sondheimer is a Senior Computer Scien- tist in the Software Research Department o f Sperry Uni- vac. He received the Ph.D degree in Computer Science f r o m the University o f W i s c o n s i n - M a d i s o n in 1975.

Figure

Figure 1. Category hierarchy.
Figure 2 through a modified BNF grammar, where an The pattern specification (<pat spec>) is described in asterisk indicates zero or more occurrences of the preceding non-terminal

References

Related documents