and whose name ts ANALYSIS.. and PP noun phrase 1.
Trang 1Grammar W r i t i n g System (GRADE) of Mu-Machtne T r a n s l a t i o n P r o j e c t
and i t s C h a r a c t e r i s t i c s
J u n - t c h t NAKAMURA J u n - t c h t TSUJII Makoto NAGAO Department o f E l e c t r i c a l E n g i n e e r i n g
Kyoto U n i v e r s i t y Sakyo Kyoto Japan
ABSTRACT
A powerful grammar w r i t i n g system has been
developed Thts grammar w r t t t n g system ts c a l l e d
GRADE (GRAmmar D E s c r i b e r ) GRADE a l l o w s a grammar
w r i t e r t o w r i t e grammars I n c l u d i n g a n a l y s t s ,
t r a n s f e r , and g e n e r a t i o n using t h e same e x p r e s s i o n
GRADE has powerful grammar w r i t i n g f a c i l i t y GRADE
a l l o w s a grammar w r i t e r t o c o n t r o l the process o f a
machine t r a n s l a t i o n GRADE a l s o has a f u n c t i o n t o
use grammatical r u l e s w r i t t e n tn a word d i c t i o n a r y
GRADE has been used f o r more than a year as the
software o f the machine t r a n s l a t i o n p r o j e c t from
Japanese I n t o E n g l t s h which ts supported by the
Japanese Government and c a l l e d N u - p r o J e c t
1 O b j e c t i v e s
Vhen we develop a machine t r a n s l a t i o n
system, the i n t e n t i o n o f a grammar w r i t e r should be
a c c u r a t e l y s t a t e d tn the form of grammatical r u l e s
achieved A programming language t o w r i t e a
grammar, which ts composed of a grammar w r i t i n g
language, and a software system t o execute t t ts
t r a n s l a t i o n system ( B o t t e t 82)
I f a grammar w r i t i n g language f o r a machine
t r a n s l a t i o n system is t o have a powerful w r i t i n g
f a c i l i t y , t t must f u l f i l l the f o l l o w i n g needs
A grammar w r t t l n g language must be able t o
manipulate l i n g u i s t i c c h a r a c t e r i s t i c s tn Japanese
and o t h e r languages The 1 1 n g u l s t l c s t r u c t u r e of
Jcpanese tS l a r g e l y d i f f e r e n t from t h a t of E n g l t s h ,
f o r i n s t a n c e Japanese does not r e s t r i c t the word
order s t r o n g l y , and a l l o w s the omission of some
s y n t a c t i c components Vhen a machine t r a n s l a t i o n
system t r a n s l a t e s sentences between Japanese and
E n g l i s h , a grammar w r i t e r must be able to express
such c h a r a c t e r i s t i c s
A grammar w r i t i n g language should have a
framework t o w r i t e grammars tn a n a l y s i s , t r a n s f e r ,
and g e n e r a t i o n phase using the same e x p r e s s i o n I t
Is u n d e s l r a b l e f o r the grammar w r i t e r t o l e a r n
several d i f f e r e n t e x p r e s s i o n s f o r d i f f e r e n t stages
of a machine t r a n s l a t i o n
There are m a n y word s p e c i f i c l i n g u i s t i c phenomena tn a n a t u r a l language A grammar w r i t e r must be a b l e t o add word s p e c i f i c r u l e s t o a machine t r a n s l a t i o n system one a f t e r another t o deal w t t h word s p e c i f i c l i n g u i s t i c phenomena, and improve hts machine t r a n s l a t i o n system o v e r a long
p e r i o d T h e r e f o r e a grammar w r i t i n g language must
be able t o handle grammatical r u l e s w r i t t e n tn word
d i c t i o n a r i e s
t r a n s l a t i o n process For example, a p a r s t n g o f noun phrases which do not c o n t a i n s e n t e n t t a l forms
is executed b e f o r e a p a r s i n g o f more complex noun phrases An approximate p a r s i n g of compound sentences is executed b e f o r e a p a r s i n g o f complex sentences A l s o when an a p p l i c a t i o n sequence o f grammatical r u l e s are w r i t t e n e x p l i c i t l y , a grammar
w r i t i n g system can execute the r u l e s e f f i c i e n t l y because the system J u s t needs t o t e s t the
a p p l i c a b i l i t y o f a r e s t r i c t e d number o f grammatical
r u l e s So a grammar w r i t i n g language must be able
t o express s e v e r a l phases o f a t r a n s l a t i o n process
in the e x p r e s s i o n e x p l i c i t l y
A grammar w r i t i n g language must be a b l e t o
t r e a t the s y n t a c t i c and semantic a m b i g u i t i e s tn
mechanisms t o a v o i d a c o m b i n a t o r i a l e x p l o s i o n
Keeping these p o i n t s in mind, we developed
a new programming system, which ts composed o f the grammar w r i t i n g language and i t s e x e c u t i n g system
Ve w t l l c a l l i t GRADE (Grammar D e s c r i b e r )
2 Expression o f the data f o r a p r o c e s s i n g
The form of data t o express the s t r u c t u r e
of a sentence d u r i n g an a n a l y s i s , a t r a n s f e r , and a
g e n e r a t i o n process has a s t r o n g e f f e c t on the framework o f a grammar w r t t t n g language GRADE uses an annotated t r e e s t r u c t u r e f o r e x p r e s s i n g a sentence Grammatical r u l e s tn GRADE are d e s c r i b e d
tn the form o f t r e e - t o - t r e e t r a n s f o r m a t i o n w t t h
a n n o t a t i o n t o each node
Trang 2The a n n o t a t e d t r e e tn GRADE ts a t r e e
s t r u c t u r e whose nodes have l t s t s o f p r o p e r t y names
and t h e i r v a l u e s F i g u r e 1 shows an example o f t h e
a n n o t a t e d t r e e
~ -CAT - S~
-SEM = HUMAN
E-CAT : E n g l l s h C a t e g o r y Symbol
E-NUMBER: E n g l i s h Number (SINGULAR or PLURAL)
E-SEM : E n g l t s h Semantic Marker
F t g u r e 1 An example o f t h e a n n o t a t e d t r e e tn GRADE
The a n n o t a t e d t r e e can e x p r e s s a l o t o f
I n f o r m a t i o n such as s y n t a c t i c c a t e g o r y , number
semantic m a r k e r , and o t h e r t h t n g s The a n n o t a t e d
t r e e can a l s o e x p r e s s a f l a g tn t t s node whlch ts
s t m t l a r t o a f l a g tn a c o n v e n t i o n a l programming
l a n g u a g e , t o c o n t r o l t h e p r o c e s s o f a t r a n s l a t i o n
For example, in a grammar o f a g e n e r a t i o n , a
g r a m m a t i c a l r u l e ts a p p l l e d t o a l l nodes tn t h e
a n n o t a t e d t r e e , whose p r o c e s s t n g s a r e n o t f i n i s h e d
In such a case, a g r a m m a t i c a l r u l e checks t h e DONE
f l a g whether t t t s p r o c e s s e d o r n o t end s e t s T t o
the newly p r o c e s s e d ones
3 Rewriting Rule tn GRADE
The b a s t c component o f a grammar w r t t t n g
language i s a r e w r i t i n g r u l e The r e w r i t i n g r u l e
In GRADE t r a n s f o r m s one a n n o t a t e d t r e e t n t o anoti~er
a n n o t a t e d t r e e The r e w r i t i n g r u l e can be used In
the grammars o f a n a l y s t s , t r a n s f e r and g e n e r a t i o n
phase in a machtne t r a n s l a t i o n system, because t h e
t r e e - t o - t r e e t r a n s f o r m a t i o n by t h t s r e w r i t i n g r u l e
ts v e r y p o w e r f u l
A r e w r i t i n g r u l e tn GRADE c o n s t s t s o f a
d e c l a r a t i o n p a r t and a m a t n p a r t The d e c l a r a t i o n
p a r t has t h e f o l l o w i n g f o u r components ( 1 )
D i r e c t o r y E n t r y p a r t , whtch c o n t a i n s a grammar
w r i t e r ' s name, a v e r s t o n number o f t h e r e w r t t i n 9
r u l e , and t h e l a s t d a t e o f t h e r e v i s i o n Thts p a r t
ts n o t used a t t h e e x e c u t i o n ttme o f t h e r e w r i t i n g
r u l e A grammar w r t t e r ts a b l e t o see t h e
i n f o r m a t i o n by ustng t h e h e l p f a c t l t t y o f t h e GRADE
system ( 2 ) P r o p e r t y D e f i n i t i o n p a r t , where a
grammar w r i t e r d e c l a r e s t h e p r o p e r t y names and
t h e t r v a l u e s ( 3 ) V a r t a b l e I n t t p a r t , where a
grammar w r t t e r d e c l a r e s t h e names o f v a r i a b l e s
( 4 ) Matchtng I n s t r u c t i o n p a r t , where a grammar
w r t t e r s p e c i f i e s t h e mode t o a p p l y t h e r e w r i t i n g
r u l e t o an a n n o t a t e d t r e e
The matn p a n t s p e c i f i e s t h e t r a n s f o r m a t i o n
tn the r e w r i t i n g r u l e and has t h e f o l l o w i n g t h r e e
p a r t s ( 1 ) M a t c h t n g C o n d i t i o n p a r t where t h e
c o n d i t i o n o f a s t r u c t u r e and t h e p r o p e r t y v a l u e s o f
an a n n o t a t e d t r e e ts d e s c r i b e d ( 2 ) S u b s t r u c t u r e
O p e r a t i o n p a r t , whtch s p e c i f i e s o p e r a t i o n s f o r t h e
a n n o t a t e d t r e e t h a t has matched w t t h t h e c o n d i t i o n
w r t t t e n tn t h e m a t c h i n g c o n d i t i o n p a n t ( 3 )
C r e a t t o n p a r t , whtch s p e c | f t e s t h e s t r u c t u r e and the p r o p e r t y v a l u e s o f t h e t r a n s f o r m e d a n n o t a t e d
t r e e
3 1 M a t c h i n g C o n d i t i o n p a r t
The m a t c h t n g c o n d i t i o n p a r t s p e c i f i e s the
c o n d i t i o n o f t h e s t r u c t u r e and t h e p r o p e r t y v a l u e s
o f t h e a n n o t a t e d t r e e The m a t c h t n g c o n d i t i o n p a r t
a l l o w s a grammar w r i t e r t o s p e c t f y n o t o n l y a r t g t d
s t r u c t u r e o f t h e a n n o t a t e d t r e e , b u t a l s o
s t r u c t u r e s whtch may r e p e a t s e v e r a l t t m e s ,
s t r u c t u r e s which may be o m t t t e d , and s t r u c t u r e s tn which t h e o r d e r o f t h e t n s u b - s t r u c t u r e s ts n o t
r e s t r i c t e d
For example, t h e s t r u c t u r e tn whtch
a d j e c t i v e s (ADJ) r e p e a t a r b i t r a r y ttmes and a noun (N) f o l l o w s them tn E n g l l s h ts e x p r e s s e d as
f o l l o w s
ADJ ADJ N
- - - > m a t c h i n g _ c o n d i t i o n : • (ADJS N):
AOJS: anyC~(ADJ)): The s t r u c t u r e 11ke a c o m b i n a t i o n o f a v e r b (V) and
an a d v e r b i a l p a r t t c l e (ADVPART) tn t h t s sequence
w t t h o r w i t h o u t a pronoun (PRON) tn between tn
E n g l t s h t s w r t t t e n as f o l l o w s
V (PRON) ADVPART
- - - > m a t c h i n g _ c o n d i t i o n : • (V PRON ADVPART):
PRON: o p t i o n a l :
A t y p t c a l Japanese s e n t e n t t a l s t r u c t u r e tn whtch
t h r e e a d v e r b i a l p h r a s e s (ADVP) each composed o f a noun phrase (NP) and a case p a r t i c l e (GA, WO o r
N I ) proceed an v e r b ( V ) tn no p a r t i c u l a r o r d e r ts
e x p r e s s e d a s f o l l o w s
m a t c h i n g _ c o n d i t i o n ;
~(A1 A2 A3 Y);
A1 A3: d i s o r d e r ; ADVP1 ADVP2 ADVP3 V - - - > A l : ~ ( ( A D V P 1 N P 1 G A ) ) :
The m a t c h t n g c o n d i t i o n p a r t a l l o w s a grammar w r t t e r t o s p e c t f y c o n d i t i o n s a b o u t p r o p e r t y names and p r o p e r t y v a l u e s f o r t h e nodes o f t h e
a n n o t a t e d t r e e A grammar w r t t e r can compare n o t
o n l y a p r o p e r t y v a l u e o f a node w t t h a c o n s t a n t
v a l u e , b u t a l s o v a l u e s between two nodes tn a t r e e
339
Trang 3noun and a v e r b Is w r i t t e n as f o l l o w s
m a t c h i n g _ c o n d i t i o n :
~(NP UP):
NP.NUNBER " VP.NUNBE~;
3 2 S u b s t r u c t u r e O p e r a t i o n p a r t
The s u b s t r u c t u r e o p e r a t i o n p a r t s p e c ' t f t e s
o p e r a t i o n s f o r t h e a n n o t a t e d t r e e which has matched
w t t h t h e m a t c h t n g c o n d i t i o n p a r t The s u b s t r u c t u r e
o p e r a t i o n p a r t a l l o w s a grammar w r i t e r t o s e t a
p r o p e r t y v a l u e t o a node and t o a s s i g n a t r e e o r a
p r o p e r t y v a l u e t o a v a r i a b l e , whtch i s d e c l a r e d tn
t h e v a r i a b l e t n t t p a r t I t a l s o a l l o w s htm t o
c a l l a subgnammar, a subgnammar n e t w o r k , a
d i c t l o n a r y r u l e a b u l l t - l n f u n c t l o n , and a LISP
f u n c t i o n The subgrammar, t h e subgramman n e t w o r k
t h e d i c t t o n a n y r u l e , and t h e b u t l t - t n f u n c t i o n w111
be d i s c u s s e d tn s e c t t o n 4 5 , and 6 In
a d d i t i o n , a grammar w n t t e r can w r i t e a c o n d i t i o n a l
o p e r a t i o n by u s i n g t h e IF-THEN-ELSE f o r m An
o p e r a L i o n t o s e t ' A ' t o t h e l e x t c a l u n t t o f t h e
d e t e r m i n e r node (DET.LEX) t f t h e number o f t h e NP
node |S SINGULAR Is w r t t t e n as f o l l o w s
s u b s t n u c t u n e _ o p e r a t t o n :
t f NP.NUMBER - 'SINGULAR':
t h e n DET.LEX <- " A ' :
e l s e DET.LEX <- " N I L ' ;
e n d _ t f :
/t,,,
B C D
T r a n s f o r m a t i o n o f a w h o l e a n n o t a t e d t r e e :
/t,,,
B C D
F i g u r e 2 An e x a m p l e o f an a p p l i c a t i o n o f t h e main
p a r t
The m a t c h i n g t n s t n u c t t o n p a n t s p e c i f i e s t h e
t r a v e n s e p a t h o f t h e a n n o t a t e d t r e e T h e r e a r e
f o u r t y p e s o f t h e t r a v e r s e p a t h e s , whtch a r e t h e
c o m b i n a t i o n s o f < l e f t - t o - r i g h t o r n i g h t - t o - l e f t > and < b o t t o m - t o - t o p on t o p - t o - b o t t o m > When a grammar w r i t e r s p e c i f i e s l e f t - t o - r i g h t and
b o t t o m - t o - t o p mode, t h e a n n o t a t e d t r e e w111 be
t r a v e r s e d as f o l l o w s
5
3 /
3 3 C r e a t i o n p a r t
The s t r u c t u r e and t h e p r o p e r t y v a l u e s o f
t h e t r a n s f o r m e d a n n o t a t e d t r e e t s w r i t t e n tn t h e
c r e a t i o n p a r t The t r a n s f o r m e d t r e e t s d e s c r i b e d
by node names such as NP and VP, whtch a r e used i n
t h e m a t c h t n g c o n d i t i o n p a r t on t h e s u b s t r u c t u r e
o p e r a t i o n p a r t A c n e a t t o n p a r t t o c r e a t e t h e t r e e
whose t o p node t s S and whtch has a NP s u b - t r e e and
a VP s u b - t r e e ts w n t t t e n as f o l l o w s
c r e a t i o n :
Z((S NP V P ) ) :
3 4 M a t c h i n g I n s t r u c t i o n p a r t
The maln part of a rewrltlng rule In GRADE
a p p l i c a t i o n o f a maln p a r t
4 C o n t r o l o f t h e g r a m m a t i c a l r u l e a p p l i c a t i o n s
A grammar w r i t i n g l a n g u a g e must be a b l e t o
e x p r e s s d e t a i l e d phases o f a t r a n s l a t i o n p r o c e s s tn
t h e e x p r e s s i o n e x p l t c t t ] y GRADE a l l o w s a grammar
w r i t e r t o d i v i d e a w h o l e grammar i n t o s e v e r a l
p a r t s Each p a r t o f t h e grammar ts c a l l e d a subgnammar A subgrammar may c o r r e s p o n d t o a
g r a m m a t i c a l u n i t such as t h e p a r s t n g o f a s t m p l e noun p h r a s e and t h e p a r t n g o f a compound s e n t e n c e
A w h o l e grammar ts t h e n d e s c r i b e d by a n e t w o r k o f subgrammars T h t s n e t w o r k t s c a l l e d a subgnammar
n e t w o r k A subgrammar n e t w o r k a l l o w s a grammar
w r i t e r t o c o n t r o l t h e p r o c e s s o f a t r a n s l a t i o n tn
d e t a t l When • subgrammar n e t w o r k tn t h e a n a l y s t s phase c o n s i s t s o f a subgrammar f o r a n o u n - p h r a s e (SG1) and a subgrammar for a v e r b - p h r a s e (SG2) tn
t h i s s e q u e n c e , t h e e x e c u t o r o f GRADE f i r s t a p p l t e s SG1 t o an i n p u t s e n t e n c e , t h e n a p p l t e s SG2 t o t h e
r e s u l t o f an a p p l i c a t i o n o f SG1
4 1 Subgrammar
A subgrammar c o n s t s t s o f a s e t o f r e w r i t i n g
r u l e s R e w r i t i n g r u l e s tn a subgrammar have a
p r t o n t t y o n d e r t n g tn t h e i r a p p l i c a t i o n The n - t h
Trang 4r e w r i t i n g r u l e tn a subgrammar t s t r t e d b e f o r e the
( n + l ) - t h r u l e
A grammar w r t t e r can s p e c t f y f o u r types of
a p p l i c a t i o n sequence o f r e w r i t i n g r u l e s tn a
subgrammar Let us assume the s i t u a t i o n t h a t a s e t
or r e w r i t i n g r u l e s tn the subgrammar ts composed of
RR1 RR2 and RRn t h a t RR1 and RR|-I
cannot be a p p l i e d t o an t n p u t t r e e and t h a t RRt
can be a p p l t e d t o t t When a grammar w r t t e r
s p e c i f i e s the f t r s t t y p e whtch ts c a l l e d ORDER(I)
the e f f e c t of the subgrammar e x e c u t i o n ts the
a p p l i c a t i o n o f RRt t o the t n p u t t r e e When a
grammar w r t t e r s p e c i f i e s the second t y p e which |s
c a l l e d ORDER(2) the e x e c u t o r of GRADE t r t e s t o
a p p l y RRt+I RRn t o the r e s u l t of the
a p p l i c a t i o n o f RRt So ORDER(2) m e a n s t h a t
r e w r i t i n g r u i ~ s tn the subgrammsr are s e q u e n t i a l l y
a p p l t e d t o an t n p u t t r e e
The t h t r d and f o u r t h t y p e whtch are c a l l e d
ORDER(3) and ORDER(4) are the I t e r a t i o n type o f
ORDER(l) end ORDER(2) r e s p e c t i v e l y So, the
e x e c u t o r o f GRADE t r t e s t o a p p l y r e w r i t i n g r u l e s
untt1 no r e w r i t i n g r u l e Is a p p l i c a b l e t o the
annotated t r e e
SEARCH-CANDIDATE-OF-HOUNS.sg:
sg_mode: o r d e r ( Z ) :
r r _ t n _ s g :
CANDIDATE-OF-NOUNS-t:
UP-NP-TO-PNP:
CANDIDATE-OF-NOUNS-Z;
end_sg.SEARCH-CANDIDATE-OF-NOUNS:
Ftgure 3 An example o f a subgrammar
Ftgure 3 shows an example o f a subgrammsr
When t h t s subgrammar i s a p p l t e d t o an annotated
t r e e the e x e c u t o r o f GRADE f t r s t t r t e s t o a p p l y
the r e w r i t i n g r u l e CANDIDATE-OF-NOUNS-1 t o the
t n p u t t r e e I f the a p p l | c a t t o n o f t h t s r u l e
succeeds, the t n p u t t r e e ts transformed t o the
r e s u l t o f the a p p l i c a t i o n o f the r e w r i t i n g r u l e
CANDIDATE-OF-NOUNS-1 Otherwise the t n p u t t r e e ts
not m o d i f i e d In e t t h e r case the e x e c u t o r of
GRADE n e x t t r | e s t o a p p l y the r e w r t t | n g r u l e
UP-NP-TO-PNP t o the t n p u t t r e e The e x e c u t o r
c o n t i n u e s such a process untt1 the a p p l i c a t i o n o f
the l a s t r e w r i t i n g r u l e CANDIDATE-OF-NOUNS-2 ts
f i n i s h e d
4 2 S u b g r a m a r Network
A subgrammar network d e s c r | b e s the
a p p l i c a t i o n sequence o f s u b g r a u a r s The
s p e c i f i c a t i o n o f a subgrammar network c o n s t s t s of
the f o l l o w i n g f t v e p a r t s (1) D i r e c t o r y E n t r y
p a r t whtch ts as the same as the one tn a
r e w r i t i n g r u l e ( 2 ) P r o p e r t y D e f i n i t i o n p a r t
whtch Is the same as the one tn a r e w r i t i n g r u l e This p a r t ts used as the d e f a u l t d e c l a r a t i o n tn
r e w r i t i n g r u l e s ( 3 ) V s r t a b l e ] n t t p a r t which ts the same as the one tn a r e w r i t i n g r u l e The
v a r i a b l e s are used t o c o n t r o l the t r a n s i t i o n o f the subgrammar network The v a r i a b l e s are r e f e r r e d t o and asstgned tn the s u b s t r u c t u r e o p e r a t i o n p a r t o f the r e w r i t i n g r u l e The v a r i a b l e s are a l s o
r e f e r r e d t n e 11nk s p e c i f i c a t i o n p a r t whtch w t l l
be d e s c r i b e d l a t e r ( 4 ) E n t r y p a r t whtch
s p e c i f i e s a s t a r t node o f the network ( 5 ) Network
p a r t whtch s p e c i f i e s a network o f subgrammars,
The network p a r t s p e c | f ] e s the network
s t r u c t u r e of subgrammars, and c o n s t s t s o f node
s p e c i f i c a t i o n s and 11nk s p e c t f t c a t | o n s The node
s p e c i f i c a t i o n has a l a b e l and a subgrammer or s subgnammar network name whlch ts c a l l e d when the node gets the c o n t r o l o f the p r o c e s s i n g The 11nk
s p e c i f i c a t i o n s p e c i f i e s the t r a n s i t | o n among nodes
tn a subgramman network The 11nk s p e c i f i c a t i o n checks the v a l u e o f a v e r t e b l e whtch | s s e t tn •
r e w r i t i n g r u l e and dectdes the l a b e l o f a node whtch w t l l be processed n e x t
PRE.sgn;
d i r e c t o r y _ e n t r y : owner(J.NAKAHURA): verston(VO2L05):
l a s t _ u p d a t e ( 8 3 / 1 2 / 2 5 ) :
v a r _ t n t t ; OPRE-FLAG t n t t ( T ) :
e n t r y : START:
network:
START: PRE-STEP-|osg;
LOOP : PRE-STEP-2.sg;
| f OPRE-FLAG: then goto LOOP:
e l s e g o t o LAST:
e x t t : end_sgn.PRE;
Ftgure 4 An example o f a subgrammar network
Ftgure 4 shows an example o f a subgrammar network When the e x e c u t o r o f GRADE a p p l t e s t h t s subgranunar network t o an t n p u t t r e e the e x e c u t o r checks the v a r - t n t t p a r t then puts a new v a r t a b l e OPRE-FLAG on a s t a c k , and sets T t o OPRE-FLAG as an
t n t t t a l v a l u e A f t e r t h a t the e x e c u t o r checks the
e n t r y p a r t and f i n d the l a b e l o f the s t a r t node START tn the network Then the e x e c u t o r searches
PRE-STEP-1 t o the t n p u t t r e e A f t e r the
a p p l i c a t i o n , the e x e c u t o r a p p l t e s the subgrammer
name: A) t o the annotated t r e e tn t h t s sequence Next the e x e c u t o r a p p l l e s the subgrammar
341
Trang 5R e w r i t i n g r u l e s in PRE-END-CHECK examine t h e t r e e
and s e t T or NIL t o t h e v a r i a b l e ePRE-FLAG The
e x e c u t o r checks the l i n k s p e c t f | c a t J o n p a r t , which
i s s t a r t e d by I F and examines the v a l u e o f the
v a r i a b l e @PRE-FLAG The node in t h e n e t w o r k which
w i l l be a c t i v a t e d n e x t i s t h e node LOOP i f
@PRE-FLAG i s n o t NZL, o t h e r w l s e , t h e node LAST
Thus, w h i l e @FRE-FLAG ts n o t N I L , t h e e x e c u t o r
r e p e a t s t h e a p p l i c a t i o n s o f t h r e e subgrammars,
PRE-STEP-2 PRE-STEP-3 and PRE-END-CHECK t o the
a n n o t a t e d t r e e W h e n @PRE-FLAG becomes N I L the
subgrammar PRE-STEP-4 tn t h e node LAST ts a p p l t e d
t o the t r e e and the a p p l i c a t i o n o f t h l s subgrammar
network PRE Is t e r m i n a t e d
5 H a n d l i n g t h e g r a n n a a t l c a l r u l e tn t h e word
d i c t i o n a r i e s
GRADE a l l o w s a grammar w r t t e r t o w r i t e word
s p e c i f i c g r a m m a t i c a l r u l e s as a subgramman In an
e n t r y o f word d i c t i o n a r i e s o f a machine t r a n s l a t i o n
system A subgramman w r i t t e n in a d i c t i o n a r y e n t r y
is c a l l e d a d i c t i o n a r y r u l e The d i c t i o n a r y r u l e
i s s p e c i f i c t o a p a r t i c u l a r word In t h e d i c t i o n a r y
The d i c t i o n a r y r u l e i s r e t r i e v e d w t t h a
e n t r y word and a r u l e i d e n t i f i e r as t h e k e y and i s
a p p l i e d t o t h e a n n o t a t e d t r e e which i s s p e c i f i e d by
a grammar w r i t e r , when CALL-DIC o p e r a t i o n In t h e
s u b s t r u c t u r e o p e r a t i o n p a r t Is e x e c u t e d F i g u r e 5
shows an example o f a r e w r i t i n g r u l e which c a l l s a
d i c t i o n a r y r u l e In t h t s case a d i c t i o n a r y r u l e
which ts w r i t t e n in an e n t r y o f a word as i n d i c a t e d
by V.LEX ( t h e v a l u e o f t h e l e x t c a l u n t t o f v e r b )
and whose name ts ANALYSIS ts e p p l t e d t o t h e
sequence o f NP1 V NP2 and PP (noun phrase 1
v e r b p h r a s e , noun phrase 2 and p r e p o s i t i o n a l
p h r a s e ) Then t h e r e s u l t o f t h e a p p l i c a t i o n o f t h e
d i c t i o n a r y rule Is a s s i g n e d t o t h e v a r t a b l e aS
CASE-FRANE.rr:
v a r _ t n t t : aS;
m a t c h i n g _ c o n d i t i o n :
Z(NPZ v Me2 PP):
s u b s t r u c t u r e _ o p e r a t i o n :
@S <- c a 1 1 - d t c ( V L E X
ANALYSIS Z ( N P 1 V NP2 PP)):
c r e a t i o n :
~ ( e s ) :
end_Pr.CASE-FRAME:
F t g u r e S An example o f a r e w r i t i n g r u l e which c a l l s
a d i c t i o n a r y r u l e
6 T r e a t m e n t o f A m b i g u i t i e s
A grammar w r t t t n g language must be a b l e t o
t r e a t the s y n t a c t i c end s e m a n t i c a m b i g u i t i e s in
n a t u r a l l a n g u a g e s GRADE a l l o w s a grammar w r i t e r
t o c o l l e c t a l l t h e r e s u l t o f p o s s i b l e t r e e - t o - t r e e
t r a n s f o r m a t i o n s by a subgrammar However, It must
a v o i d a c o m b i n a t o r i a l e x p l o s i o n , when t t e n c o u n t e r s the a m b i g u i t i e s
For i n s t a n c e , l e t us assume t h a t a grammar
w r i t e r w r i t e s a subgramman which c o n t a i n s two
r e w r i t i n g r u l e s t o a n a l y z e t h e case frame o f •
v e r b , t h a t a r e w r i t i n g r u l e s ts t h e r u l e t o
c o n s t r u c t VP ( v e r b p h r a s e ) from V and UP (a v e r b and a noun p h r a s e ) , and t h a t t h e o t h e r ts t h e r u l e
t o c o n s t r u c t VP ( v e r b p h r a s e ) from V NP and PP (a
v e r b a noun p h r a s e , and a p r e p o s i t i o n a l p h r a s e ) When he s p e c i f i e s NONDETERMINISTIC_PARALLELED mode
t o t h e subgremmar, t h e e x e c u t o r o f GRADE 8 p p l t e s
b o t h r e w r i t i n g r u l e s t o an I n p u t t r e e , c o n s t r u c t s two t r a n s f o r m e d t r e e s , and merges them t n t o 8 new
t r e e whose t o p node has 8 s p e c t a l p r o p e r t y PARA The t o p node o f t h i s s t r u c t u r e i s c a l l e d a p a r e
s p e c i a l node whose s u b - t r e e s a r e t h e t r a n s f o r m e d
t r e e s by t h e r e w r i t i n g r u l e s F i g u r e 6 shows an example o f t h t s mode and a p a r a node
- - ' 7
PARA
F i g u r e 6 An example o f a p a r s s p e c l a l node
A grammar w r i t e r can s e l e c t t h e most
a p p r o p r i a t e one from t h e s u b - t r e e s under a p a r e
s p e c i a l node A grammar w r i t e r ts a b l e t o use
b u i l t - i n f u n c t l o n s MAP-SG MAP-SGN SORT CUT and INJECTION in t h e s u b s t r u c t u r e o p e r a t i o n p a r t t o choose t h e most a p p n o p r l a t e one F i g u r e 7 shows an example t o use t h e s e b u l l t - J n f u n c t i o n s
s u b s t r u c t u r e _ o p e r a t i o n :
eX <= c a 1 1 - d t c ( V L E X CASE-FRAME Z(N NP P P ) ) :
eX <- c a 1 1 - b u t l t ( m a p - s g ~ ( g X ) t r e e
EVALUATE-CASE-FRAME):
@X <- c a l l - b u i l t ( s o r t Z(@X) t r e e SCORE):
@X <- c e l l - b u i l t ( c u t [ ( e X ) t r e e 1 ) : 9X <- c a l l - b u i l t ( I n j e c t i o n ~ ( e X ) t r e e 1 ) :
F i g u r e 7 An example o f b u l l t - l n f u n c t i o n s
In t h i s s u b s t r u c t u r e o p e r a t i o n p a r t t h e
e x e c u t o r o f GRADE a p p l t e s the d i c t i o n a r y r u l e
w r t t t e n tn a word which ts t h e v a l u e o f V.LEX ( l e x l c a l u n t t o f v e r b ) t o t h e t r e e and s e t s t h e
r e s u l t to t h e v a r t a b l e eX When t h e
n o n d e t e r m t n i s t t c - p a r a l l e l e d mode ts used tn t h e
d i c t i o n a r y r u l e the v a l u e o f eX ts t h e t r e e whose
r o o t node t s a p a r e s p e c t e l node A f t e r t h a t , t h e
e x e c u t o r c a l l s b u t l t - t n f u n c t t o n MAP-SG t o a p p l y
Trang 6the subgrammar EVALUATE-CASE-FRAME t o each s u b - t r e e
of the v a l u e o f OK and sets the r e s u l t t o eX
a g a i n The subgrammar EVALUATE-CASE-FRAME computes
the e v a l u a t i o n score end s e t s the score t o the
v a l u e o f t h e p r o p e r t y SCORE tn the r o o t node o f the
s u b - t r e e s N e x t , the e x e c u t o r c a l l s b u t l t - t n
f u n c t t o n SORT C U T and INJECTION t o g e t the
s u b - t r e e whose score Is the h i g h e s t one among t h e
s u b - t r e e s under the pare s p e c t a l node This t r e e
ts then s e t t o 9X as the most a p p r o p r i a t e r e s u l t o f
the d i c t i o n a r y r u ] e
The para s p e c t a l node ts t r e a t e d as the
same as the o t h e r nodes tn the c u r r e n t
I m p l e m e n t a t i o n o f GRADE A grammar w r t t e r can use
the para node as he want, and can s e l e c t a s u b - t r e e
under a pare node a t the l a t e r grammatical r u l e
a p p l i c a t i o n
7 System c o n f i g u r a t i o n end t h e e n v i r o n m e n t
The system c o n f i g u r a t i o n o f GRADE ts Shown
tn F i g u r e 8 Grammatical r u l e s w r i t t e n tn GRADE
are f i r s t t r a n s l a t e d t n t o t n t e r n a l forms, which are
expressed by s - e x p r e s s i o n s tn LISP This
t r a n s l a t i o n ts performed by GRADE t r a n s l a t o r The
I n t e r n a l forms o f g r a m m a t i c a l r u l e s are a p p l t e d t o
an t n p u t t r e e which ts an o u t p u t o f the
m o r p h o l o g i c a l a n a l y s t s program Thts r u l e
a p p l i c a t i o n Is performed by GRADE e x e c u t o r The
r e s u l t o f r u l e a p p l i c a t i o n s |s sent t o the
m o r p h o l o g i c a l g e n e r a t 4 o n program
D i c t i o n a r y Grammar
f
J GRADE
t r a n s l a t o r
D i c t i o n a r y Grammar
( I n t e r n a l f o r m )
t n p u t _ ~ GRADE ~ o u t p u t
s e n t e n t t a l t r e e | e x e c u t o r J s e n t e n t t a l t r e e
F t g u r e 8 The system c o n f i g u r a t i o n o f GRADE
GRADE system ts m r t t t e n tn UTILISP
( U n i v e r s i t y o f Tokyo I n t e r a c t i v e LISP) and
Implemented on FACON M 3 8 2 w t t h t h e a d d i t i o n a l
f u n c t t o n o f h a n d l l n g Chatnese c h a r a c t e r s The
system ts a l s o u s a b l e on Ltsp Machtne Symbollcs
3600 The program s t z e o f GRADE system ts a b o u t
10.000 l t n e s
the form o f t r e e - t o - t r e e t r a n s f o r m a t i o n r t t h
a n n o t a t i o n t o each node ( 2 ) R e w r i t i n g r u l e has •
p o w e r f u l w r t t t n g f a c i l i t y ( 3 ) Grammar can be
d i v i d e d I n t o s e v e r a l p a r t s and can be 11nked
t o g e t h e r as a subgrammar n e t w o r k ( 4 ) Subgrammar can be w r i t t e n tn the d i c t i o n a r y e n t r t e s t o express word s p e c t f t c l i n g u i S t i C phenomena ( 5 ) S p e c t e l node ts p r o v t d e d tn a t r e e f o r embedding
a m b i g u i t i e s
GRADE has been used f o r more than a y e a r as the s o f t w a r e o f the n a t t o n a l machtne t r a n s l a t i o n
p r o j e c t from Japanese I n t o E n g l i s h The
e f f e c t i v e n e s s o f GRADE has been demonstrated tn
t h t s p r o j e c t The l i n g u i s t i c p a r t s o f the p r o j e c t such as t h e m o r p h o l o g i c a l a n a l y s t s / g e n e r a t i o n programs, t h e grammars f o r t h e a n a l y s t s o f Japanese the t r a n s f e r from Japanese I n t o E n g l t s h and the g e n e r a t i o n o f E n g l l s h are discussed tn
o t h e r papers (Sakamoto 84) (TsuJt1 84) (Raged 8 4 )
Thts s t u d y : "Research on the machtne
t r a n s l a t i o n system ( J a p a n e s e - E n g l i s h ) o f s c i e n t i f i c and t e c h n o l o g i c a l documents" Is betng performed through S p e c t a l C o o r d i n a t i o n Funds f o r Promoting Science & Technology o f t h e Science and Technology Agency o f the Japanese Government
ACKNOWLEDGEMENTS
c o n t r i b u t i o n o f N Kogt F N t s h t n o Y Sakane M Kobayasht S S a t e and Y Senda who programmed much o f t h e system We mould a l s o 11ke t o thank the o t h e r member o f M e - p r o j e c t f o r t h e i r u s e f u l comments
REFERENCES
B o t t e t Ch., e t e l I m p l e m e n t a t i o n and
C o n v e r s a t i o n a l Environment o f ARIANE 7 8 4 Proc
COLING82 1982
RageD, M., e t e l , D e a l t n g w t t h Incompleteness o f
L i n g u i s t i c Kno~ledego on Language T r a n s l a t i o n Proc COLING84o ; 9 6 4
Sakamoto, Y e t a l , Lextcon F e a t u r e s f o r Japanese
S y n t a c t i c A n a l y s t s In Mu-ProJect-JE, Proc COLING84, 1984
T s u J t t , J , e t e l , A n a l y s t s Grammar o r Japanese tn
H u - P r o J e c t , Proc COLING84, ; 9 8 4
8 C o n c l u s i o n
The grammar w r t t t n g system GRADE ts
discussed 4n t h t s p a p e r GRADE has t h e f o l l o w 4 n g
f e a t u r e S ( I ) R e w r i t i n g r u l e ts an e x p r e s s i o n tn
343