• No results found

Parsing in Parallel

N/A
N/A
Protected

Academic year: 2020

Share "Parsing in Parallel"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)

P a r s i n g i n P a r a l l e l Xiuming Huang ~ Louise Guthrie

Computing Research Laboratory New Mexico State University Las Cruces, NMI USA 88003

A B S T R A C T

The paper is a description of a parallel model for n a t u r a l language parsing, and a design for its imple- m e n t a t i o n on the Hype,'eube multiproeessor. T h e pm'allel model is based on the Semantic Definite Clause G r a m m a r formalism and integrates s y n t a x and semantics t h r o u g h the commmfication of processes. The main proeessess, of which there are six, contain either purely s y n t a c t i c or purely semantic information, giving the a d v a n t a g e of simple, t r a n s p a r e n t algorithms dedicated to only one aspect of parsing. C o m m u n i c a - tion between processes is used to hnpose semantic eon- st,'aints on the syntactic processes.

1. I n t r o d u c t i o n

This paper describes parallel model for natural language parsing and gives a design for its implementa- tion. W i t h the a d v e n t of parallel machines, it may be possible to view the relation of syntax and semantics in n a t u r a l language parsing in a wholly new way. The approach is moving towards an application environ- m e a t which is similar to the heterarchical sytem pro- posed by W i n o g r a d [Winograd

721. Processes which

control the syntactic aspects can be s e p a r a t e d from those which control the semantic aspects in t h a t the syntactic processes contain no semantic information themselves, b u t receive it by c o m m u n i c a t i o n w i t h the semantic processes, a n d vice versa. The a d v a n t a g e of this a p p r o a c h is t h a t t r a n s p a r e n t algorithms can be w r i t t e n t h a t are dedicated to only one aspect of pars- ing, while the desirable effects of integrating s y n t a x and s e m a n t i c s can be achieved t h r o u g h the c o m m u n i c a t i o n of processes. In our model we use this c o m m u n i c a t i o n to enforce semantic c o n s t r a i n t s on the syntactic proces- sors in order to avoid the combinatorial explosion of producing all legal s y n t a c t i c possibilities.

C o m m u n i c a t i o n between the two c o m p o n e n t s is t h e n our focus in designing a parallel parser. There seem to be three obvious levels at which communica- tion between s y n t a x and semantics can take place: the word level, tim phrase level, and the sentence level. We have chosen to consider c o m m u n i c a t i o n at the phrase level r a t h e r t h a n at either of the other two because it would be too early for the syntactic and semantic c o m p o n e n t s to c o m m u n i c a t e at the word level (too lit- tle information is available at this level to help the parsing), and too late for t h e m to c o m m u n i c a t e at the sentence level (too m a n y syntactic parses might have already been "produced). How the c o m m u n i c a t i o n between the syntactic and semantic c o m p o n e n t s takes place at the phrase level will be described in Section 3.

In Section 4, we design an h n p l e m e n t a t i o n of this pa,'allel model for a 6-Hypereube lintel 85] multlpro- cessing system, which we will have available shortly.

The 6-Hypercube has

sixty-four

identical processors

(Intel 80286's with 512K bytes of m e m o r y ) a n d no shared memory. A l t h o u g h each node in the Hypereube can eventually c o m m u n i c a t e with any other node, each processor can directly c o m m u n i c a t e w i t h only six immediately neighboring nodes. W e therefore i n t e n d to

limit our message passing among processors to immedi- ate neighbors w h e n e v e r possible.

Like the work of Eiselt [Eiselt 85] on parallel infer- ence processing, we have a pers]~icuous assignment of n a t u r a l language processing moaules to processors in the machine, a l t h o u g h we are suggesting a parallel i m p l e m e n t a t i o n of a parser w i t h m u c h more parallelism and w i t h a clearer s e p a r a t i o n of s y n t a x and semantics. The work on "massively parallel parsing" by Waltz and Pollack [Waltz 85 models various c o m p o n e n t s of eompreheilsion by a~tivation and inhibition of nodes of a network. A practical applieation of t h e i r a p p r o a c h requires massively parallel processing, c u r r e n t l y beyond the s t a t e of l, he art in multiprocessing.

We base our parallel model on the Semantic Definite Clause G r a m m a r s (SDCG) formalism of Huang Illuang 8 5 . The SDCG evolve'd from the I)efinite Clause G r a , n m a r s of P e r e i r a [Pereira et al 80 a n d is described below.

2. S e m a n t i c D e f i n i t e C l a u s e G r a m m a r s

The SDCG is em'rently i m p l e m e n t e d on a single processor machine where it is the parser for the X T R A (English Chinese Sentence

Translator)

machine transla- tion system [Huang 85]. The X T R A is a p r o t o t y p e sys- tem now r u n n i n g nnd&" a C-prolog i n t e r p r e t e r and fias a wide coverage of English p h e n o m e n a , even t h o u g h its v o c a b u l a r y is r a t h e r small (1000 entries). The SDCG uses the s e m a n t i c s of words and phrases to restrict the n u m b e r of syntactic pm~es of a sentence to those which arc semantically compatible.

A simplified vemion of the SDCG used in the X T R A system is as follows:

(1) sentence(s(Subj Np,

v p ( v ( V e r b sense),Obj Np)) -- >

noun_phrase(S ubj Np), is v e r b ( V ~ r b ) , -

subject verb m a t c h ( S u b j Np,Verb,

- VeTb sense), - n o u n _ p h r a s e ( O h ] Np~,

verb obj ect__matell(Verb sense,Obj_Np). The g r a m i n a r says t h a t an i n p u t string is a sentence w i t h the s t r u c t u r e s(Sub3: Np, vp-(vYVerb sense)

Obj Np)).

if it is composed of Su(~j NP which is-a noun{ phrase, followed by Verb (a ve,'b) whose one sense

Verb sense is semantically compat:ble w i t h Subj Np,

followed by Obj NP (a n o u n phrase) which is semanti- cally c o m p a t i b l e - w i t h Verb_sense.

The s u b - g r a m m a r for pa,'sing a n o u n phrase is as follows:

(2) n o u n phrase[np(det(DeQ, adj(Adj sense),

n ( N o n n ~ e n s e ) ) ) - - > -

determiner(Det), adjective(Adjective), noun(Noun),

(2)

The last predicate ill the n o u n phl'~Lse sub- g r a m m a r , ' a d j _ j i o u n A I : a t e h ' , tries to m a t c h Adjective a n d N o u n to find a compatible pail" of senses for tile given A d j e c t i v e a n d Noun to be eombined. The predi- c a t e s ' s u b ] verb. m a t c h ' a n d 'verb object m a t e h ' i n i h e sentence g r a l n m a r accomplish shn-ilar ta~k. All those m a t c h e s are based on the system of seleetional restric- tions proposed by [Katz & F o d o r 63] and their eod- ings are o m i t t e d here to save spaee, l,ater we will see how t h e y function.

There is a syntactic lexicon ia the SDCG of the following form:

determiner(the).

noun(coach,[eoacht,eoaeh2]).

n o u n ( s t a r , [ s t a r l , s t a r 2 D.

adjective(tough,[tough1 ,tough2,toug h3,tough4]).

verb(marry,[mar,'yl

,inarry2]).

For instance, the syntactic entry for " c o a c h " is a noun h a v i n g two senses, labeled " e o a c b l " and " c o a c h 2 " .

For each word sense, a semantie i n t e r p r e t a t i o n is given in the semantic dictionary:

sem(coaehl,[head(thing)])*.

(eg.

'a

passenger

coaeh')

sem(coach2,[hoad(man)]).

(a

~rah,er)

sem(starl,[head(thing)]). (a celestial object)

Seyl/(star2,[hcad(l-/lan)D, (¢'a sil]g]llg S~al"', etc)

sem(toughl [poss(tlfing)]). (,nodilles

'thing', as h,

% tough m a t e r a : l " )

sem(tough2,[poss0;:,an ) ). (modines ' m a n ' , as i,, " a t o u g h m o u n t a i n e e r )

,

seln(ll:_{-irry

]

,lsubj{man),o ,j(m an),head(do)]).

( J o h n m re'led Mary. )

senl(marry2, snbj (,~1 an),obj(t hing),head(do)l), tog. in "IIe mm'ried money. )

For example, "coach1 labels the sense of " c o a c h " whereby it refms to a "tlfing . in pa~sing (3),

(3) The I, ough coach married a star*.

according to the g r a m m a r in (1) the system s t a r t s w i t h the predicate 'nonnA)lu'~me', which is presented in (2). After it i n s t a n t i a t e s tile variables

Det, Adjective

and

Noun

i n s t a n t i a t e d to t h e ' t o u g h " and coach" it a t t e m p t s to apply the predleate 'adj noun m a t c h ' , whose task it is to find tile first pair of senses for the words " t o u g h " and " e o a c h " , respectively, which are compatible w i t h each o t h e r aeeording to our seleetional restrietions. Here I, he first pair found would be ' l o a t h 1 + coach1', beeause the s e m a n t i c category of " c o a c h 1 " ( ' t h i n g ' ) fibs into bile 'poss(thing)' slot of the word sense % o u g h l " (meaning t h a t his adjectival sense is for

modifying sometlfing whose semant, ic category is

'thing').

Now tile parser is at tile predicate 'is verb' where it finds the verb " m a r r y " . It, t, hen tr:es to m a t e h

Subj ,Np

(%otigh] -I- c o a c h l ' ) witt: a some sense of the " m a m ' y " b u t fails because b o t h " m a r r y l " and " m a r r y 2 " prefer the subject to be of the semantic category ' m a n ' , which " c o a c h l " c a n n o t satisfy. The system b~ektracks, trying 'adj noun m a t c h ' again and producing the next matclfing-pah" of senses for " t h e

t o u g h coach" ('tough2 -I- coach2'). YVhei}

'subj v e r b m a t e h is tried again and it selects 'marry1 as tI:~ appTopriate verb sense. The parser proceeds to

analyse the rest of tim sentence, employing

" n o u n _ 0 h r a s e " to find the object noun p h r ~ e sense

* The s e m a n t i c primitives s n e h a.s ' t h i n g ' , ' m a n ' , ere, are based ell the primitive set suggested in [Wilks 75].

* Modified version of the " s e m a n t i e garden p a t h " sen- tence by [Chm'niak 83] ( " T h e a s t r o n o m e r married the

s t a r , " )

and " v e r b _ o b j _ m a t c h " to see w h e t h e r this noun phrase sense lits the partieular verb sense. 'S~arl' (a eelest:al object) is t h u s tried and rejected, and 'Stal'2' (a cele- brity) is accepted ( ' m a r r y 1 ' requires the object t'o be of the s e m a n t i c category m a n ). A plausible zeadlng of the sentence is t h u s gained (' "File strict ~ralner married a celebril, y.")

It is clear from t, he above description t h a t in the SI)CG s y n t a x and semantics closely interact: s y n t a x - s e m a n t i c s -. syntax, ere. One class of predicate waits for the o t h e r to make a decision, t h e n makes its own decision. ]low much baektraeking must be done is unpredictable; the pm'se m i g h t only be completed after several routes have been tried and rejeel, ed.

3 . P a r a l l e l P a r s i n g

The model consists of six processes which con> m u n l c a t e to produce all the semantically compatible parses of a given sentence. Each process will be hnple- m e n t e d as a tree of processors. The root node of t, he tree eonl~ains a queue of requests and allocates proces- sors to the elements of l, he qneue as they become awdl- able. For the pnrpose of this model it is sulIicent to note f, hat each process itself has {,he capability of pro- cessing several requests in parallel. We identify below each of the processes and describe the c o m m u n i c a t i o n between t h e m .

1) Sentenee maste," - Controlling process which operates as a modified top down syntactic processor (modified in the sense thaC infer- [nation fi'om el, her processes influences its decisions).

2) Noun-phrase m~ster ( N P - m a s t e r ) - Given an a r b i t r a r y string, it identifies syhtactieally all possible initial noun phr~mes in the

string. Ttn'ough eommuilication with the

A N - m a s t e r , it del, ernfines which of I, hese are senmntieally acceptable.

3) Semantic dictionary lna.ster - C o n t a i n s the semantic dictionary and provides appropri- ate entries for the current i n p u t sentence to the o t h e r semantic processes.

4) A d j e c t i v e - N o u n

master

(AN-master) - Given an adjective and a noun, Iiads all possible pairs (adjective word sense, neat] we "d sense) t h a i are compatible.

5) Subject-Verb m a s t e r ( S V - m a s t e r ) - Given a word sense for a

nou6

and a verb, finds all possible word senses for the verb t h a t are compatible.

6) Verb-Objeel, m a s t e r (VO-lm~ster) - Given a word sense of a verb and a word sense of a noun, determines w h e t h e r or not t h a t verb sense-object noun sense pair ]s compatible. The following diagram illustrates tile processes and the e o m m n n i e a t i o n between them.

r . . . input . . . :

I AN-lnaSLel'-*~ -- ~ N P - m a B L c r I

Ii // "\ , I

S e m a n t i c S V - m a s t e r

] ) i c t i o n a r y " m j - ~ ~ - - - _ S e n t e n c e lllas[,el" - - ~ l]'l t~.q ~ c 1-

(3)

I n p u t is read simultaneously by the semantic dic.~ tionary, and the sentence master. The sentence m a s t e r contains the s,vutaetic dictionary and tlegins a top- down parse o f tim sentence guided by the definite clause g r a m m a r . Wimnever a noun piu'ase is searched for, the noun phrase m a s t e r is invoked to produce all possible initial noun phrases in the r e m a i n d e r (tllc u n p a r s e d portion) of the i n p u t string. After the main verb of any clause imps been identified by tim sentence master, the SV-master is invoked to produce all possi- ble verb senses which are m e a n i n g f u l a t this point in the parse. Ill tim case t h a t a t r a n s i t i v e verb is found and a possible word sense fox" the object noun is deter- mined, the V O - m a s t e r is consulted as to wheti~er or not the given verb word sense and object noun word sense are acceptable as a verb-object pail'.

In c o m m u n i c a t i n g witl~ the N P - m a s t e r or SV- master, several possibilities m a y be r e t u r n e d to the sen- tence master, and the parse is continued fox" each of these possibilities in parallel.

Tile N P - m a s t e r , which is also a syntactic process, finds all possible initial n o u n phrases which are mean- ingful by using its own syntactic information (in a top down m a n n e r ) a n d by c o m m u n i c a t i n g with tile AN- m a s t e r for semantic information. This c o m m u n i c a t i o n is similar to t h a t of the sentence m a s t e r witll tile SV- master. After d e t e r m i n i n g an adjective which is fol- lowed by a noun, ti~e N P - m a s t e r invokes the AN- m a s t e r to tind all meaningful adjective-noun word sense pairs. Multiple adjectives which modify a noun are considered in parallel by the AN-master, which in ti~is ease, r e t u r n s pairs which consist of a list of adjective word senses and a noun word sense. W h e n e v e r the N P - m a s t e r reeives a pair from the A N - m a s t e r , it con- tinues any work t h a t it m i g h t lmve (such as finding prepositional pin'ascs which modify tile noun, e.g. 'the big boy in the park'). If several pairs are returned by the A N - m a s t e r , the r e m a i n d e r of the parse is h a n d l e d by the N P - m a s t e r and is done in parallel when possible. The sentence m a s t e r produces all the parses of the sentence t h a t have not been blocked. A parse may be blocked rot any one of the following three reasons:

1) The syntactic category needed by tim sen- tence m a s t e r is not satisfied by any initial segment of the unparsed portion of the input.

2) The S V - m a s t e r r e t u r n s a negative response. 3) The V O - m a s t c r returns a negative response. We use the example in Section 2 ( " T h e t o u g h coach married a s t a r . " ) to illustrate the above commun- ication of processes and to exhibit a p a t h whiei~ is blocked.

F o r shnplieity, we write the SDCG used previ- ously, w i t h o u t the a r g u m e n t s for the predicates

involved. We also add an additional rule for

n o u n p h r a s e and a n o t h e r e n t r y in the semantic diction- ary for the noun sense of 'tough',

tougi13 (as

in " t h e t o u g h never suffer"), to m a k e the example interesting.

sentence --:> n o u n p h r a s e , verb, subject verb m a t c h ,

noun p h r a s e , v e r b _ o b j e e t _ m a t oh.

n o u n A ) l n ' a s e - - : > determiner, adjective, noun, adj n o u n match.

n o u n _ p h r a s e -- > determiner, noun.

d e t e r m i n e r - - > [the].

d e t e r m i n e r -- > [].

The sentence m a s t e r receives the i n p u t and in this ease, immediately passes it to the N P - m a s t e r and waits. The N P - m a s t e r finds " T h e t o u g h " and " T h e t o u g h coach" as possible initial n o u n phrases in the string it was given. " T h e t o u g h " (tough_3) is r e t u r n e d immedi- ately to the sentence m a s t e r who begins searching fox" u

verb. Sinlultaneously, ti~e N P m a s t e r sends the adjec- tive noun pair, (tough, coach) to the A N - m a s t e r . The A N - m a s t e r r e t u r n s ( [ o u g h l , coachl) ("rugged vehicle") and (tough2, coacil2) ( " s t r i c t t r a i n e r " ) . Note t h a t these are the same possibilities considered by back- tracking in the example in Section 2. The N P - m a s t e r r e t u r n s these to the sentence m~ster, who initiates the c o n t i n u a t i o n of the parse fox" each of timse possibilities. The sentence master, in tim interim, found a verb (coach) for its f r s t n o u n - p h r a s e (the tou{~!13) and request a s u b j e c t - v e r b m a t c h from the S v - m a s t e r . The S V - m a s t e r r e t u r n s coacil3 (the verb sense of coach) and the sentence m a s t e r continues with the r e m a i n d e r of the i n p u t string " m a r r i e d a s t a r " . Here, a noun A0hrase is needed, and so once again the NP- m'mter is invoked, and asked to find an initial n o u n phrase in the string. Since no noun phrase is

found,

this p a t h is blocked. The p a t h containing

( t o u g M , c o a c h l ) will be blocked exactly as the descrip- tion in Section 2. The p a t h containing (tough2,eoaeb2) will succeed and produce the correct parse fox" the sen- tence.

We now consider the function of the Semantic Dic- tionary master. While the sentence m a s t e r is receiving its .input a n d begins the processing described above, the semantic dictionary m a s t e r simultaneously finds all pos- sible word senses for cacti i n p u t word. The semantic dictionary contains an e n t r y m r each sense of a word. The s t r u c t u r e of each e n t r y reveals its syntactic category. W o r d senses corresponding to nouns contain only the s e m a n t i c class to whici~ the word sense belongs. For example, the semantic dictionary e n t r y fox" tile n o u n " n a m e '~ (as in the gh'l's name) is given by:

sere(name1, [>ad(sign)l ).

Adjective word senses contain the semantic class of the n o u n t h a t it prefers to modify. The adjective "specific" has the following entry:

sere(specific1, [poss(sign)]).

W o r d senses corresponding to verbs m'e described witi~ a structm'e which contains the class of the subject t h a t is prefered by this verb, the class of' the object prefered, and the semantic class of tim verb itself. The verb " n a m e " ( " t o n a m e a dog") is represented as:

sere(name2, [subj(man), obj(man), head(make)l ). After finding all possible word senses for words in the i n p u t sentence, the s e m a n t i c dictionary m a s t e r sends these dictionary entries to the appropriate seman- tic processes. Verb entries are sent to the SV- and VO-masters, adjectives are sent to the A N - m a s t e r , and nouns arc sent to all three. These three process mas- ters t h e n contain a " c a c h e " of the semantic dictionary entries relevant to the parsing of the present i n p u t sen- tence. T h e purpose of the " c a c h e " is so t h a t the s e m a n t i c dictionary e n t r y fox" any input word can be quickly found by the processes which use these entries.

4. T h e D e s i g n o f t h e s y s t e m

>k

We describe the design of the i m p l e m e n t a t i o n of the parallel parsing model. E a c h of the six processes consists of a tree of processors. We label the root of each process tree w i t h the n a m e of the process t h a t it represents. The design of the semantic processors a n d the n o u n - p h r a s e m a s t e r is i n d e p e n d a n t of tim imple- m e n t a t i o n of the SDCG which is used. The design of the sentence master, however, is heavily d e p e n d a n t on the formal g r a m m a r used for the SDCG i m p l e m e n t a - tion as the parser fox' X T R A . The two syntactic processes above, the N P - m a s t e r and the sentence mas- ter, have a significantly more complex design t h a n those of the semantic processes so t h a t different possi- ble s y n t a c t i c alternatives m a y be considered in parallel.

(4)

4 . 1 . T h e s e n t e n c e m a s t e r

T h e desi~;n of tile s e n t e n c e m a s t e r is b a s e d o n t h e following p r o d u c t i o n rules o f t h e S D C G :

s e n t e n c e - - > s e n t e n c e 1)ody.

s e n t e n c e - - > s e n t e n c e h e a d , s c n t e n c e _ f l o d y .

I n t u i t i v e l y , we (:an c o n s i d e r t h e s e n t e n c e h e a d to be w b a t e v e , ' a p p e a r s before the s c n t e n e e s n b j e ~

0t

c a n be an e m p t y s t r i n g ) , a n d t h e s e n t e n c e b o d y Lo be t h e r e m a i n d e r of t h e s e n t e n c e .

T h e s e n t e n c e m a s t e r , as i l l u s t r a t e d below, c a n be t h o u g h t of as t h e root of a t r e e w h i c h h~s t w o c h i l d r e n w h i e h we will refer to as t h e s e n t e n c e m o n i t o r s : t h e s e n t e n c e h e a d m o n i t o r ( S H - m o n i t o r ) a n d t h e s e n t e n c e b o d y m o n i t o r (SB.-monitor). E a c h s e n t e n c e n l o n i t o r is tile root of a s u b ] r e d of ehild p r o c e s s o r s ( S i M l a n d l e r s a n d S B - h a a d l e r s ) a n d a c t s as ,'t m o n i t o r foi' t h e s e child p,'ocessors. W e l a t e r describe t h e s e n t e n e c h a n d l e r s in m o r e detail.

S e n t e n c e m a s t e r

SH-molntor SB-monitor

' - , • - ~ , ' SBhandleil SI h m d l e l 2 S l / h m d h l / SII handlml SII hmdlct2 ~ ' - , ' .." -. a '" ' - ; ".'1

T h e s e n t e n c e minster is t h e p r o c e s s w h i c h deter- m i n e s w h e t h e r or ]lot a st,'ing is a s e n t e n c e . A n y i n p u t to t h e s e n t e n c e m a s t e r is i m m e d i a t e l y g i v e n I,o b o t h t h e SliI-monitor a n d t h e SB-nlonlto," to e x a m i n e in parMlel t h e possibilities t h a t t h e s e n t e n c e does trod does n o t h a v e a s e n t e n c e h e a d . T h e S H - m o n i t o r s a n d t h e SB- ] n o n i t o r s e a c h p u t i n c o m i n g r e q u e s t s f r o m t h e s e n t e n e c I n ~ t e r in a q u e u e a n d allocate t h e first a v a i l a b l e child p r o c e s s o r t,) b e g i n its work. In t h e ease of a SH- h a n d l e r , t h i s w o r k is to i d e n t i f y a possible s e n t e n c e b e a d , a n d in t h e case of a n S B - h a n d l e r , it is to see if t h e i n p u t s t r i n g is a s e n t e n c e b o d y . T h e S I I - h a n d l e r s a n d S B - h a n d l e r s m o n i t o r child p r o c e s s e s w h i c h o p e r a t e in parMlel.

in t h e egse t h a t a s e n t e n c e h e a d is f o u n d b y one of t h e S I I - h a n d l e r s , the. r e s u l t is r e t n r n e d to tile s e n t e n c e m a s t e r v i a t h e S H - m o n i t o r . T h e r e m a i n d e r of t h e i n p u t is t h e n g i v e n to t h e S B - m o n i t o r w h i c h a l l o c a t e s a fl'ee SB-handle," to c o n t i n u e t h e p a r s e of t h e r e m a i n d e r of t h e s e n t e n c e . F o r e x a m p l e , c o n s i d e r t h e s e n t e n c e :

(4) W r i t i n g to ,Iohn w a s dill]cult.

T h e s e n t e n c e m a s t e r g i v e s t h e s e n t e n c e t o b o t h t h e S I I - h a n d l e r a n d tile S B - m o n i t o r w h i c h in t u r n give it to one o f t h e i r c h i l d r e n , s a y S I I - h a n d l e r l a n d S B - h a n d l e r l . Since t h e g r a m m a r for tile S D C G i n d i c a t e s t h a t a n lag--clause is a possible s e n t e n c e h e a d , S H - h a n d l e r l will i d e n t i f y " w r i t i n g to . l o h n " as a c a n d i d a t e s e n t e n c e h e a d . [ h e , e m a m d e r o f t h e s e n t e n c e " w a s difficult" is g i v e n to a n e w S B - h a n d l e r , s a y S B - h a n d l e r 2 v i a t h e S H - m o n i t o r a n d t h e S B q n o n i t o r , to see if t h i s is a pos- sible s e n t e n c e b o d y . S B ° h a n d l e r 2 fails a n d notifies SH- h a n d l e r 1 (via tile SIt- a n d S B - m o n i t o r s ) . S i t - h a n d l e , ' 1 a n d S B - h a n d l e l ' 2 b e c o m e a v a i l a b l e for' o t h e r p r o c e s s i n g a n d S B - h a n d l e r l s u c c e e d s in s h o w i n g t h a t "WrilAng to ,John w a s dilrieult" is a legal s e n t e n c e b o d y .

T h e S]-l-handlers a n d tile S B - h a n d l e r s are a r r a y s of

~

r o e e s s o r s w h i c h i m p l e m e n t t h e o r - p a r a l l e l i s m of P r o l o g )r t h e p r e d i c a t e s s e n t e n c e _ h e a d a n d s e n t e n c e b o d y

r e s p e c t i v e l y . Below is a s i m p l i f i e d v e r s i o n of t h e g r a m - m a r r u l e s u s e d in t h e S D C G for s e n t e n c e h e a d .

s e n t e n c e h e a d - - > i n g - e l a u s e .

s e n t e n c e h e a d - - > p r e p o s i t i o n a l p h r a s e . s e n t e n c e - h e a d - - > a d v e r b i a l p h r a s e .

B a s e d o n t h e s e rules, e a c h Sil-handle," m o n i t o r s t h r e e child p r o c e s s o r s :

S H - h a n d l e r

pl e p o m t r o n a l plu ase m~ clause par e n t h e t i d a l _ p l u ase

T i m S B - h a n d l e r s m o n i t o r five p,'ocessors w h i c h are a g a i n b a s e d o n t h e S D C G . T h e f u n c t i o n of t h e s e five child p r o c e s s e s will v a r y d e p e n d i n g o n t h e t y p e of t h e i n p u t s e n t e n c e ( d e c l a r a t i v e , i n t e r r o g a t i v e or i m p e r a - tive). W e g i v e he,'e a s i m p l i f i e d v e r s i o n of t h e s e n l ; e n e e _ b o d y p r o d u c t i o n s in t h e S D C G for a deelara.- t i r e s e n t e n c e .

s e n t e n c e _ b o d y --:> s u b j e c t n p , v p l . s e n t e n c e b o d y - - > s u b j e c t np, vp2. s e n t e n c e b o d y -- > i n v e r t e d _ s e n t e n c e .

s u b j e c t n p - - > n o u n I)hrase. s u b j e c t _ n p -.- > ing_.elause.

Here v p l r e p r e s e n t s a c o m p l e t e v e r b p h r a s e , like t h a t in t h e s e n t e n c e

(5) J o h n d i d n ' t go to t h e p a r k y e s t e r d a y .

A n d v p 2 , ' e p r e s e n t s a n elliptical v e r b phra.se, like " d i d n ' t " in

(6) No, J o h n d i d n ' t .

A n i l l u s t , ' a t i o n of t h e S B - h a n d l e r s in t h i s case is g i v e n below.

Sl:l-handler

noun phrase mg clause nounA)hrase lag_clause inverted~sentenee

vpl vpl vp2 vp2

i n S e c t i o n 3 we i n d i c a t e d t h a t t h e s e n t e n c e m a s t e r c o m m u n i e a t e r s w i t h t h e N P - m a s t e r . A c t u a l l y , e a c h of t h e child p r o c e s s o r s of t h e s e n t e n c e h a n d l e r s s e n d s a m e s s a g e to t h e N P - m a s t e r , v i a t h e s e n t e n c e m a s t e r , w h e n e v e r tile D C G d i c t a t e s t h a t a n o u n p h r a s e s h o u l d be f o u n d n e x t in tile i n p u t s t r i n g . T h e N P - m a s t e r r e t u r n s all s e m a n t i c a l l y c o m p a t i b l e n o u n p h r a s e s . W h e r e t h e r e is m o r e t h a n o n e a c c e p t a b l e n o u n p h r a s e , a mess.age m s e n t to tile r e q u e s t i n g s e n t e n c e h a n d l e r w h o a l l o c a t e s one possible n o u n p h r a s e to t h e w a i t i n g child p r o c e s s o r a n d d i s t r i b u t e s t h e o t h e r s to a v a i l a b l e child p r o c e s s o r s . E a c h child p r o c e s s of tile s e n t e n c e h a n d l e r s c o m m u n i c a t e s w i t h t h e N P - , SV-, a n d VO- ma:sters v i a t h e s e n t e n c e m a s t e r .

(5)

Should each of the sentence handlers have a wait- ing child processor and the sentence master a request, we invoke a special processor, called t h e black-sheep processor, to g r a n t the request, so t h a t the requesting processes m a y continue. The black-sheep processor, functions precisely as the current single processor i m p l e m e n t a t i o n of the SDCG and will only be used to avoid deadlock*.

4.2. The Noun-phrase master

Since noun phrases are the m a j o r building block of m a n y s u b s t r u c t u r e s of a sentence, and since a m b i g u i t y often arises t h r o u g h d e t e r m i n a t i o n of different n o u n phrases (eg. " T h e tough coach the y o u n g " and " T h e prime n u m b e r consecutively"), the identification of noun phrases is an i m p o r t a n t place tbr parallelism in the parser. The N P - m a s t e r can be t h o u g h t of as the root of a tree of processors. It functions similarly to the sentence master. The noun-phrase m a s t e r contains a queue of noun-phrase requests and allocates t h e m to available n o u n - p h r a s e handlers.

N

o

u

n

-

~

Each n o u n - p h r a s e handler monitors three child processors. The child processors try to parse the next i n p u t phrase as a noun phrase w i t h no adjectives, one adjective, and two or more adjectives respectively. For example, in parsing the phrase " t h e t o u g h coach," two of the child processors would succeed (no adjectives and one adjective), these results are reported to the p a r e n t noun-~phrase handler, and t h e n sent to the sen- tenee m a s t e r via the N P - m a s t e r . A t this point, the waiting sentence processor (child of either one of the SB-handlers or one of the SH-hundlers) continues w i t h one of the possibilities a n d an available sibling proces- sor is allocated b y the sentence handler to continue the parse of the sentence using the other possible n o u n phrase.

In the ease of a t r u l y ambiguous sentence, all legal parses are eventually produced. The above exam- ple would produce two parses in the case of " T h e t o u g h coach married people"?, b u t not in the case of " T h e tough coach the young.

Each of the child processes of the noun-phrase handler c o m m u n i c a t e s with the A N - m a s t e r via the noun-phrase handler.

4.3. The Semantic Processors

The semantic dictionary m a s t e r and the AN-, SV- and V O - m a s t e r processor trees have a m u c h simpler s t r u c t u r e in t h a t t h e y have only two levels. The root node is the master; children of the root are handlcm.

Semantic A N - m a s t e r SV-master V O - m a s t e r Dictionary

m a s t e r

The Semantic dictionary entries are divided

among the semantic dictionary handlers. The Seman-

tic dictionary m a s t e r reads the input and passes the relevant semantic entries, which it o b t a i n s from its child processors, to the AN-, SV-, and V O - m a s t e r s as described in Section 3.

T h e A N - m a s t e r receives i n p u t which is in general a list of adjectives and u noun, from the noun-phrase handlers. It forms all possible pairs (adjective word sense, n o u n word sense) and allocates child processors to d e t e r m i n e w h e t h e r or not there is a semantic m a t c h . The pail'S consisting of a list of adjective word senses, and a n o u n word sense which matches each of the adjective word senses in the list, are r e t u r n e d to the N P - m a s t e r .

The S V - m a s t e r a n d the V O - m a s t e r receive i n p u t directly from the sentence processors. The i n p u t and o u t p u t of these processes is exactly as d e s e r i b e d i n Sec- tion 3. In b o t h cases, the semantically compatible word sense pairs are d e t e r m i n e d in parallel.

5. Future work

The C o m p u t i n g Research L a b o r a t o r y (CRL) has the use of L o n g m a n ' s L D O C E English dictionary, which is realistic in size, prov]des comprehensive syn- tactic i n f o r m a t i o n and also has its semantic entries b o t h syntactically and semantically restricted, and lim- ited to a 2000 word vocabulary. We plan to i m p l e m e n t the Semantic Dictionary m a s t e r by providing each of the s e m a n t i c dictionary handlers with a portion of LDOCE.

A f t e r the initial i m p l e m e n t a t i o n of the designed parallel parser, we would like to see how W]lksian Preference Semantics [Wilks 75, Wilks et al 85] can be realized in our parser in the sense t h a t one or more readings (in the case of genuine ambiguity) can be selected by weighting the competing interpretations. We are also investigating a parallel parsing model which is driven b y semantics, r a t h e r t h a n syntax. We have in m i n d t h a t the role of the sentence m a s t e r in this case is purely semantic and t h a t s y n t a x is used only to help the s e g m e n t a t i o n of the i n p u t string. C o m p a r i s o n of the two systems would be of great interest to us. Eventually, we also w a n t to consider the incorporation of p r a g m a t l c s into the system.

6. Acknowledgements

We would like to t h a n k the N a t u r a l Language group at the CRL, namely Yorick Wilks, Jerry Ball, S h a r o n Dorfman, David Furwell, Dan Fuss, C h e n g m i n g Guo, and Sylvia Candeluria de Rain, for their com- m e n t s and suggestions. We also t h a n k Ted D u n n i n g for his m a n y helpful discussions.

7.

References

Charniak,

E . (1983) " P a s s i n g markers: a theory of

contextual influence in language comprehension," Cog- nition Science, 1983, 7, 171-190.

E i s e l t , K . P . (1985) " A parallel-process model of on- line inference processing," Proceedings of International Joint Conference on Artificial Intelligence, Los Angles, CA.

Huang,

X - M . (1985) " M a c h i n e t r a n s l a t i o n in the

SDCG formalism," Proceedings of the Conf. on

Theoretical and Methodological Issues in Machine

Translation of Natural Languages, Colgate University,

New York.

*The system will never invoke the black-sheep proces- SOl" unless the sentence contains four or more conjoined sentences or a p a r e n t h e t i c a l sentence with three or more eonjunets m it. In these eases the black-sheep

processor

is used only for the recursive calls which can-

(6)

Intel, C o r p . (1985)

iPSC Data Sheet,

Intel Scientific Coinputers~ Oregon.

K a t z , J. & Fodor~ J. (1.963) "The structure or a semantic bheolT,"

Language

39, pp.170-210.

P e r e i r a , F. & W a r r e n , D. (1980) "Definite elause grammars for language analysis - a survey of the for-

malism and a comparison with augmented transition

networlcs,"

ArtificialIntelligence,

13:231-278.

W a l t z , D a v i d L. Sz Pollack, J o r d a n B. (1985) M,'~ssively parallel parsing: a sl, rongly interactive

model of natural language inberpretaiton," mimeo. Wilks, Y.A. (1975) "Preference semantics," Keenan

(ed),

Formal Semantics o] Natural Language,

Cam-

bridge University Press, London. ~. ,,

Wilks, Y., Huang, X-M. and Fass, D. (198o) Syn-

tax,

preference and right attachment,'

Proceedings o]

IJCAI85,

UCLA, Los Angeles.

Winograd~ T. (1972)

Understanding

Natural

Language,

Academic Press, New York.

References

Related documents

The disabilities for which manpower development programme are conducted in different categories ranging from certificate to Master Degree in Regular, Distance and

At levels of tone above baseline (e.g. initial profiles, or constriction caused by AD), the curvilinearity of the Pd/Q relationship may, as in the gills (Wood, 1974a), indicate

In this study, MAUT, AHP, and TOPSIS methods were used to rank OECD countries by R&D indicators which are GDP Spending on R&D, Researchers, Government Researchers

THE IMPACT OF SELF HELP GROUP APPROACH IN THE LIVES OF BENEFICIARIES AT HOUSEHOLD LEVEL: THE CASE OF CHILDREN’S.. HOME SOCIETY AND FAMILY SERVICES, HOSANNA FAMILY

Kahya, “A class of exponential quadratically convergent iterative formulae for unconstrained optimization,” Applied Mathematics and Computation, vol.. Submit your manuscripts

evaluated 77 Lenke type 1 AIS patients who underwent single-stage posterior correc- tion and instrumented spinal fusion with pedicle screw fixation; they found that a high screw

Additionally, I would like to thank the librarians and students working in the Woman’s Collection at Texas Woman’s University for their assistance and work putting

The objective of this study is to examine the ill- ness experience of arthritis, including disease perceptions, physical and psychosocial effects of disease, and coping strategies