Professional Documents
Culture Documents
Microfiche 7
C o g y r i g h t 1974
by t h e 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 L i n g u i s t i c s
ABSTRACT
A formal d e f i n i t i o n f o r t h e
The d e f i n i t i o n i s a model
s p e c i f i e d by a f i n i t e set of tree-replacement r u l e s .
W p r e s e n t a proe
t r a n s l a t i o n , i f the t r a n s l a t i o n e x i s t s .
another program t h a t i s a t r a n s l a t o r .
TABLE OF CONTENTS
Abstract
............................ T a b l e o f Contents . . . . . . . . . . . . . . . . . . . . . . . .
1 Phrase Structure Syntax and Semantics
6
7
D e f i n k t i o n o f meaning function;:
L(G) + 2
CP U
. a . a . . . .8
........
2 T r a n s l a t i o n s as Tree Mappings
DefinitionofgenCT)
.... ....................
+
. . . . . . . . . . . . . . . . 12
2L(G.2)
12
13
Example2 (gen(T))
.....................
-t
D e f i n i t i o n of translatioh r: T G ) (
2T (G2)
Definition of t r a n s l a t i o n
7: L(G1)
2LCG2)
Example 3 ( f i n i t e l y s p e c i f i e d translation)
........ .........
. . . a . a . .
........
13 14
15
16
Proof t h a t translatiotl
17
19
22
25
Figure 1
4
. . . .
. a . m . .
. Sample Translations . . . . . a . a . . . . . . . . . . . . 27 .
TRANSLATION I (Postfix t o Precedence I n f i x ) TRANSLATION XI (Cxpliclt * t o I m p l i c i t *)
.
. . . . . . . . 27
. .
T R A N S L A T I O N I I I ( 2 . + t o 1 . +)
TRANSLATIONIV(1. + t 0 2 . + )
................ . .
31
32
33
.............
. . a m . o * * . * . ~ .
33
36
H. William Buttelmam Department of Computer and Information Science Ohio S t a t e U n i v e r s i t y Columbus, Ohio 43210
0 .
f r e e languages.
w i l l find i t i n t u i t i v e l y s a t i s f y i n g i n i t s s i m p l i c i t y .
A t t h e same time,
about t h e n a t u r e o f language t r a n s l a t i o n .
T r a n s l a t i o n i s n e c e s s a r i l y concerned w i t h b o t h s y n t a x and semantics,
set of r u l e s which s p e c i f y how t o r e p l a c e p h r a s e s i n t h e source language w i t h s e m a n t i c a l l y e q u i v a l e n t p h r a s e s i n t h e t a r g e t language. l a t i o n algorithm, i t t u r n s o u t , i s s t t a i g h t f o r w a r d . The transThe key p r o b l e ~ in is
A e a r l i e r v e r s i o n of t h i s paper was p r e s e n t e d t o t h e Eleventh Annual n Meeting of t h e Association f o r Computational L i n g u i s t i c s a t Ann Arbor, Michigan, August, 1973.
This r e s e a r c h was supported i n p a r t by NSF g r a n t GN-534.1.
t o read only through Example 1, and then t o peruse Section 4 (Sample Translations) t o pick up some i n t u i t i o n , before proceeding with t h e rest of the paper.
and of t h e meanings of i t s c o n s t i t u m t s .
is nothing but aq assignment of elements i n i t s csdemain t o elements i n its domain, t h i s d e f i n i t i o n w i l l provide for idiomatic and emotive meaning,
I believe
D e f i n i t i o n 1.
Let. G = (V,
z,
P , S ) b e a c o n t e x t f r e e grammar where:
V i s t h e f i n i t e nonempty vocabulary,
-t
C) i s t h e axiom, and
B,
f o r A (V
C) and B 6 V
+.
M, u, X, A , F, R), where: U i s a s e t , t h e u n i v e r s e of d i s c o u r s e ,
(u,
...
R is
t o e a c h grammar r u l e A
-t
...Bn t h e r e i s a s s i g n e d one
A
+ B1.
UX
U A)
+, and
..Bn
(xl,*..,X ~l
= P,
rA + B1.
.B ( x ~ , ~n~ ~ , x 1=P n
s p e c i f i e s a p a r t i a l recursive function:
W a l s o r e q u i r e that X fI (M e
A) =
0.
Example 1 .
... I .
= (U,
M,
X, 4, F, R ) , where:
semantics
v
c
= {S, =
I, +)
U = N U {f } U { I } , where:
N
{I, +)
i s t h e s e t of non-aegatiue i n t e g e r s ,
3-
and f
M =
and
a r e r e c u r s i v e functions
defined i n F below,
+ t {N, 1, f 1
( i d e n t i t y function on N + N):
(x) = x
x
(integer a d d i t i o n on N
1)
N) :
(' i s the successor
f+(x ,Y) =
=
(f+(X,Y))
f. n)
x 2 (X 1 ,X3) does indeed s p e c i f y a r e c u r s i v e function on v ( S ) xu(+) xv(S) -+ v ( S ) , s i n c e i f x, and x are i n p(S) = N and if , . + 1, then x2(x1,x3) = f+(X xI. ) i s i n N and f + i s defined is i n v(+) = {f X2 1 3 '
J
primitive recursive,
Before explaining t h e example, let's f i r s t consider what t h e semantics
i s used f o r .
0) a i s a tree, f o r all a f C.
1) a c t 1
...tn > is a
tree, f o r all a
..., tn .
--
for trees.
fr(t).
W s h a l l a l s o need t h e f o l l o w i n g non-standard n o t a t i o n : e
t
0 1
It
...tn ]
i s a tree i f t
0 '
Informally, t o [ tl.
+. I
..tn ]
i " '
-A
In
tions:
can see, t h e "box n o t a t i o n " i s u s e f u l f o r i s o l a t i n g any rooted s u b t r e e . t h e grammar of Example 1, with its dominating s u h t r e e S<S+S> isolated.
f u n c t i o n 4 on t h e trees of t h e grammar which a s s i g n s t o each syntax tree t Then 4 and t h e meaning f u n c t i o n p a r e used t o F i r s t , we define d e f i n e a meaning f u n c t i o n p on t h e s e n t e n c e s o f G.
4,
then
u.
To d e f i n e $, w e must first d e f i n e the codomain of @, @.
i s t h e set of a l l n-ary f u n c t i o n s on 2
X * * * X Z ~+
u, for
Informally,
arbitrary n.
U n=1,2,
... @n .
f i s a function of n arguments).
t
The f u n c t i o n @:T(G)
+ @ a s s i g n s t o each t i n
T(G)
a semantic f u ~ c t i o n
$ ( t ) on IJ(B~)x*.~x~(B) + p ( r t ( t ) ) , where B1...B n semantic f u n c t i o n w e w i l l use t h e n o t a t h n f(x t h e name of t h e f u n c t i o n , (xl,. domain, and C is t h e codomain. definition:
= fr(t).
To s p e c i f y a
+
..,x n)
1'
**8,\)
:D
C, where
f is
i s t h e v e c t o r o f arguments, D i s t h e
$ i s d e f i n e d by t h e following i n d u c t i v e
T(G)
= r
A+B1.. .B n
tO[t t
(xl,
...,xn ) : p ( ~1)x***xp(B a)
A
. +
+ p(A),
where
B1...B
n i s a grammar r u l e .
1) Let t
n +l...Bi
TG, ()
...,
...,
I n t u i t i v & l y , t h e semantic f u n c t i o n assigned t o each t r e e t i s t h e composit i o n of t h e semantic f u n c t i o n s assigned t o t h e s u b t r e e s of which t i s composed. function
W leave i t t o t h e r e a d e r t o v e r i f y t h a t $ i s well-defined. e
on a l a r g e r domain
--
A phrase form i s s i m i l a r t o a s e n t e n t i a l form, except t h a t i t need n o t be derived from t h e axiom. Formally, t h e set o f phrase. forms of G i s t h e set
C V
P(G) = I w
Iv
* and A a w *
f o r some A 6
v).
The
1
..OW
..., tm .
Let w = w
n Then the
be
L(G)
, the
language of G, i s a s u b s e t of P(G)
+ 2
sentences, p:L(G)
u, is
, so
t h e meaning f u n c t i o n on.
j u s t the r e s t r i c t i o n of p t o L(G)
Since t h e t h r e e functions
v,
never be confused, s o w e s h a l l w r i t e
f o r all t h r e e .
) . I
i s the meaning
function, which assigns t o each sentence, phrase form, and symbol, one o r more meanings according t o the semantics
d.
Their meanings,
the morphemes
morphemes ( t h i s i s the s e t of "atomic morphemes", M) of a sentence i s a function of i t s morphemes. determined by i t s s y n t a c t i c s t r u c t u r e . s t i t u e n t s is semantically ambiguous.
l h i c h function t o use tq
+ I' + I".
It has
F o r notational
+ I + I" a l s o
2.
Translation9 A s Tree Mappings. Consider now any two c f g ' s and t h e i r a s s o c i a t e d semantics,
9, l d
and G2,
T:
J2.
+ 2
A t r a n s l a t i o n of L(G1)
L(G,)
L (G*)
defined a s f o l l e w :
tences i n L(G2).
fied by a f i n i t e set of r u l e s .
This s e c t i o n
p r e s e n t s th2 bethod f o r giving the f i n i t e s p e c i f i c a t i o n of T and the I n f a c t , i n s t e a d of s p e c i f y i n g a t r a n s l a t i o n on t h e languages, we s p e c i f y a t r a n s l a t i o n on t h e t r e e s of t h e syntaxes. To make p r e c i s e what i s meant by " t r a n s l q t i o n s which a r e s p e c i f i e d by
Let T
0 f o r T j u s t i n case every tree i n T7 i s e i t h e r i n T o r i s constructed of a 2 C and j u s t i n case every t r e e s o constructed is f i n i t e number of trees of T 1' in T t . Formally, l e t T be a s e t of trees w i t h l a b p l s from Z. The set
T is defined inductively
%asfol'lows:
0 TI:- gen(7) C
and T c gen(T),
..., tn
gen(T).
t i
gen(T), f o r i = 1,
....
..tn] , where
s. t
Example 2 .
The s e t of production.trees of a cfg i s a generating set f o r the set of all the syntax trees of the grammar. L e t G = (V, C, P, S ) , l e t P B (i) contain k rules, and l e t P = -{ A (i) , ( i ) ( i ) 1 *2 .. n4 1 i E 1 , 2 , m . a , k l . .B Then the set of production t r e e s of G i s the .set
s (COS)" (>p
n >- , 0
Note t h a t t can a l s o
mp),
for T(GI).
Let
;be
N,L
a f u n c t i o n on T
T(Gp)
N0
++
which s a t i s f i e s the
xl...x
n =
1 f r ( t t ) 1,
1
and
0 < x . < I f r ( t ) I , f o r i = 1, -
xi # 0 * f r ( t r ) i = r ( f r ( t )
..., n, and
), f o r i = 1,
..., n.
T(Gg)
Then we d e f i n e the funktion r: T(G1)
+
by t h e following i n d u c t i v e
definition:
0)
t T -r(t)
= t
, where
;(t)
= (' t,
x).
where
i) ;(to) =
ii)
(T ( t o ) , XI-
) 9 and
any member of
. ..
...w', n
and
then
t N i s t h e set of non-negative i n t e g e r s . 0
W will c a l l r f i h i t e l y s p e c i f i e d ( s p e c i f i e d by a f i n i t e set of r u l e s ) i f f e
the g e n e r a t i n g set T is f i n i t e .
F i n a l l y , r is used t o d e f i n e a t r d n s l a t i o n r: L(G1)
L e t w L(Gl)
.... \.
-+
L(%)
as follows:
Then
r(w) = { w '
i s a s y n t a x tree of w
and
t t ~ ( t ) I.
It follows from t h e d e f i n i t i o n s t h a t
.w' and l e t w' E T(w). n m sy&tax trees t of w and t ' of w' such t h a t t ' C df). L e t
..
7 is
a translation i f r is.
To see
= @(t)(ul(wl)9".9u
1(wm ) ) and E 2 = ( t f ) ( 2 , . . , 2 ( w ) .
and
) c2 -
11, c1 - II 1(w) G
fl
E2 # 0,
s o <(w)
fl
- -
= (
I r is
V~(T(W))
0, and s o r i s a
The f u n c t i o n s
;and i
a r e t h e method f o r s p e c i f v i n g t h e f u n c t i o n r.
l a t i o n of any tree in T(G ) , and the definition of y, t o g e t h e r w i t h t h i s 1 algorithm and a g e n e r a l c o n t e x t f r e e p a r s e r such as Floyd's o r E a r l y ' s
algorithm, g i v e s the algorithm f o r computing t h e t r a n s l a t i o n of any sentence in L(G ) . The next example illustrates.
The r e a d e r can e a s i l y
determine t h e rest of t h e s p e c i f i c a t i o n s f o r t h e grammars and semantics, i f For c f g ' s we s h a l l f o l l o w t h e u s u a l convention t h a t a l l symbols left-hand side o f some grammar r u l e are termiwhich do n o t appear on t h e
rule. )
Example 3.
W present two c f g ' s and their semantics, and a finitely specified e translation T on T(G ) + 2T(G2) T h e l p the i n t u i t i o n , consider that o
G1, 1 describes well-parenthesized subtract ion expressions, and G2, 1
d2
E-E
x2(x1,x3)
U1 = U2 = N U {f-1, where
f-: N
ordinary subtracfion
?(E) = S
contains 12-39
E - E
1 O
'
A
I
i e
. ., T 1 2 3 )
contains 1239-
and is translated:
3.
and G
and t h e i r
Can w e find i t ?
That i s , can we
i t may n o t h a l t o r t h e Function
T
i t d e s c r i b e s may.be only p a r t i a l .
-
Kt
i s guaranteed t o be c o r r e c t ; t h a t i s , t h e d e f i n i t i o n s of i and
+
A
; pro-
duced s p e c i f y a p a r t i a l f u n c t i o n r: T(G,.)
2T(G2) which i s a t r a n s l a t i o n
i: V N q + V
I
which have the p r o p e r t y that f o r every t r e e t E T, i f 0 0 ' r ( t O ) = ( t , x , then t 0 and t 0 r e p r e s e n t t h e same semantic f u n c t i o n . What i s meant by IIto and t r e p r e s e n t t h e same semantic function" is i u s t t h i s : ;
A
T T + T(G2) x N :
N. .L
and
I f ;(to)
= Ct&
5 ...xn )
then 4 ( t O ) ( ~ 1 , e a m s ~ m )( t b ) ( ~ i , a a a ~ ' ) , = 4
provided y ' = i
I n g e n e r a l , t o g e t semantic e q u i v a l e n c e , one h a s t o b e c a r e f u l how the a r e a s s o c i a t e d by t h e s t r i n g x 0 ;, with t h e s y n t a c t i c v a r i a b l e s on t h e f r o n t i e r of t) s i n c e these r e p r e s e n t p o s s i b l e t r e e s w i t h mceming, and hence t h e domains of t h e semantic f w c and t' I f such a g e n e r a t i n g set T and f u n c t i o n s i and ;can 0 0' be found, t h e job i s f i n i s h e d , s i n c e i t can then be shown t h a t t h e f u n c t i o n tions for t
T
s y n t a c t i c v a r i a b l e s on t h e f r o n t i e r of t
d e f i n e d by i and
;i s
a translation.
The procedure b e g i n s w i t h t h e set Tp of production t r e e s o f G1 which ' I f t h e procedure can f i n d a is indeed a f i n i t e g e n e r a t i n g s e t f o r T(G1) ?? i t w i l l be successful, and w i l l h a l t and t r a n s l a t i o n " for each t i n T
a
output T, in T
and
;.
and s e a r c h e s T(G ) f o r a s e m a n t i c a l l y e q u i v a l e n t tree t;) whose fron2 t i e r i t can roatch up by some r u l e x. If i t@a f i n d s one, i t o u t p u t s the
d e f i n i t i o n ;(to) = i n g trees.
from T and tries one of t h e remain0 P If i t succeeds in exhausting TP i t i s s u c c e s s f u l . ' x), deletes t
(tb,
Suppose, however, t h a t f o r some to i n Tp, t h e p r o c e d u r e can't find a " t r a n s l a t i o n " i T(G2). n t h e case t h a t t Then i f w e assume t h a t
7 does
exist, i t must be
i s p a r t of a l a r g e r t r e e ( o r of e a c h of a set of larger
Furthermore, i f w e a l s o assume t h a t Thus, the procedure tries
OS
r i s f i n i t e l y s p e c i f i e d , this s e t i s f i n i t e . T1
, not
containing t
which i s a f i n i t e
lang,uage r e p r e s e n t e d by T(G1).
as
a new
g e n e r a t i n g s e t t o work w i t h a n d b e g i n s a g a i n .
Therefore, t o
guarantee t h a t T will be found if i t e x i s t s , the procedure tries all possThe procedure has t h e g e n e r a l s t e u c t u x e of a t r e e search", and i s r e p r e s e n t e d by t h e s e a r c h t r e e p i c t u r e d . below.
Each
tree.
-F
cfg's G
and G
i n t e g e r p a i r s ( m a x i , m a x s ) = (1,
(2, 2),
... .
Iffor
success",
then h a l t .
step 1:
Set i
Ci.
i,,
N,
. ..., ; } such k
J
that for
2
each j = 1, 2,
..., k,
pl
Execute s t e p 2 f o r each f u n c t i o n
(i.e.,
f o r each j = 1, 2,
11
...,
k).
; J
If f o r
of s t e p 2 r e t u r n s
success", t h e n h a l t
and o u t p u t
success".
If
If step 2 returns
"fail" f o r a
step 2:
(Nab.. T , is a f i n i t e set)
If Ti = (8 then r e t u r n I t success".
If i > maki t h e n return " f a i l t t .
Othewise
I f t h e execution of e x e c u t e step 3 f o r each t T i ' 11 step 3 returns success", then r e t u r n "success". If step 3
returns "fail",
t h e n pick t h e
next t
againr
"fail".
step 3:
Execute search.
If search returns "fail" then execute expand. If expand returns "fail" then return "fail" t o step 2.
If either search or expand returns
11
II
success" to s t e p 2.
search:
T~ = {ti, ti,
me a ,
t'
following properties :
i ;(rt (t)) )
=
rt(tl)
if) There is a string of non-negative integers x = , 1 2 .xn x x such that each of the following i s true:
..
b) xi # O = , f r ( t t ) i = ; ( f r ( t )
X4
) for i =
1, 2 , . . . , n
for i = 1, 2 ,
..., n
provided
r1
fail" t o step 3.
= ( t t , x)
- it))
I1
success" return
success" t o step 3.
1I
expand:
rn
some e x e c u t i o n of s e a r c h i n t h e c u r r e n t p a t h of t h e search
L e t T$' denote t h e ( f i n i t e ) s e t (T. U ~ o m ( i ) ) .Define i 1 t h e s e t T t o be t h e s m a l l e s t s e t of trees which i s a g e n e r a t i n g t s e t f o r (gen(~;) I t ) ) , and which c o n t a i n s t h e set (TI It}). i (Note t h a t Tt does n o t c o n t a i n t.)
tree).
If T
is not f i n i t e , return
II
f a i l " t o step 3.
S e t i + i+l.
Set T
- i + Tto
11
Execute a new v e r s i o n of s t e p 2.
I f step 2 returns
success" r e t u r n
1I
11
success" t o s t e p 3.
f a i l " t o s t e p 3.
END OF PROCEDURE
Now w e want t o e x p l a i n how t h e PROCEDURI$ d e f i n e s f u n c t i o n s ( p o s s i b l y p a r t i a l f u n c t i o n s ) on T(G1)
-+ 2 T(G2)
F
step 3
=?
step 1
( ;
i s d e f i n e d h e r e .)
= Tp i s d e f i n e d here.)
(To
( ( t ) = (t' , x) i s d e f i n e d h e r e i f ; t h e node i s s e a r c h . )
0
step 2
(T1
i s defined here.)
(T
is defined here.)
Both are f i n i t e .
?,
and t h e e n t i r e d e f i n i t i o n of
;i s
given by
t h e s e t of a l l t h e s e items d e f i n e d by e x e c u t i o n s of s e a r c h i n t h e p a t h .
{k
;(t)
i s d e f i n e d by some e x e c u t i o n o f t h e
s u b r o u t i n e s e a r c h i n t h e path}. S i m i l a r l y , each e x e c u t i o n of t h e s u b r o u t i n e expand, i n i t s f i r s t s t e p , d e f i n e s a new set, which daes n o t c o n t a i n t h e t r e e t . T h i s s t e p has Tts t h e e f f e c t of excluding t h e tree t from any f u r t h e r c o n s i d e r a t i o n i n t h e The s e t of a l l such trees i s t h e s e t
t r a n s l a t i o n process.
Excl = { t
i s d e f i n e d by some e x e c u t i o n of t h e
om(;) U T
if T = b t h e n ;is t o t a l on .the g e n e r a t i n g s e t , and s o T i s t o t a l on n (T (GI) - Excl) , and t h i s i s j us t t h e case when t h e PROCEDURE h a l t s . Since
Excl i s a f i n i t e s e t , we have t h e r e s u l t that T i s defined on a l l b u t a
is. a p a r t i a l f u n c t i o n on T(G )
-+
T(G2)
, it
f o l l o w s from t h e
p (G2)
d e f i n i t i o n of
7 in
S e c t i o n 2 t h a t ? i s a p a r t i a l f u n c t i o n on P(G ) + 2
+
L(G*)
i s t o t a l on (T(G,)
A
- Exc~, it )
P (Excl) )
Thus,
i s t o t a l on L(G1)
7 is
not
defined.
The r e a d e r may
r e c a l l t h a t t h e r e may be s e v e r a l n o n t r i v i a l f a c t o r i n g s of trees i n t o a
T
condi.tions make t h e proof t h a t r i s a t r a n s l a t i o n l e s s l u c i d , s o w e s h a l l g i v e h e r e t h e proof f o r t h e c a s e where r i s defined f o r only one f a c t o r i n g of each tree and t h e r e i s no ambiguity. t o have t h e following n o t a t i o n :
t ' C T(G2) have f r ( t l ) = It w i l l be h e l p f u l i n t h e proof
w i ...wn. '
..
..wm and l e t
Let ~ ( t = t'. )
t can b e w r i t t e n a s t [ t t ] where t o C om(;) 0 1 m and each of the t r e e s t ,, t m C g e n ( ~ o m ( i ) ) . Let ; ( t o ) = (tb, xl. .X n ) 1' ) ' . ' Then fram t h e d e f i n i t i o n of T , ~ ( t = t 0 [ t '1. . t n] , where f o r each
om(;)),
...
..,m,
Then w e have:
For r
1,
...,m
...,n
l e t y r = $(t rj ( v 1 (W jrm1+l*
), )( l e t y'i = $ ( y !1 y 2 (v' kiWl+l
jr 1
(w'
, and
Then, if w e
f o r i = 1,
define j
...,u
) ki
= kg = 0, t h e r e s u l t above demonstrates t h a t
Thus, by t h e d e f i l i i g i o n of
in s e a r c h ,
= $(t')(p2(~i),...,~2(~A)),
o r + ( t )E $ ( t ' ) .
Thus r i s a t r a n s l a t i o x .
translator
a f r o n t i e r s t r i p p e r (see Figure 1 )
G
and
a1 b e t h e cfg and s e m a n t i c s f o r
T r a n s l a t i o n proceeds as follows:
Let
The t r ~ n s l a t o ris
The p a r s e r produces a p a r s e tree t < w ) f o r w. ( I f 1' w i s s y n t a c t i c a l l y ambiguous, t h e p a r s e r may produce all t h e p a r s e t r e e s of given a s e n t e n c e w i n 7 L
w.) I f t(w) i s i n t h e domain of tihe f u n c t i o n T d e f i n e d by t h e tree mapper, t h e tree mapper w i l l produce ~ ( t ( w ) ) whose f r o n t i e r i s a s e n t e n c e u i n L
2'
TRANSLATOR
-1
FRONTIER
I I
I
F i g u r e 1.
-------------T r a n s l a t o r g e n e r a t o r and t r a n s l a t o r .
MPSPER
* T&K 9I
The importance of t h e argument t h a t the f u n c t i o n d e f i n e d By t h e PROCEDURE i s a t r a n s l a t i o n , i s just t h a t w and u are guaranteed t o have t h e sgne
meaning. i f they are unambiguous, and i f thev are ambiguous, w and u are guaranteed t o have meanings i n common
-- i .e ., t h a t
u i s , a bona f i'de
--
t r a n s l a t i o n of w, i n t h e o r d i n a r y s e n s e of t h e word
The u s e f u l n e s s of such a method of t r a h s l a t i n g i s t h a t the generator,
No seman&c computing i s r e q u i r e d a t t r a n s l o t o
Postfix:
Infix:
Grammar Rules
Semantic Rules
x3 (*l,x2)
Grammar Rules
Semantic Rules
S -, sso
EOT
Universe of discourse
R = real numbers =
I R ~ , R2,
Rg,
...1
F = ~ f + ~ f * , 'I f-,
A1
I:
N: ~ ( x ) x. =
%I
R3, F, f
, f ,*f , f / 1
and
One
is:
T A A, ,
s s J=( o
E o T
91002)
;(AJ=(?!
s s o
E O T
yl~~]9
A ( E
A E
t o corppute t h e f u n c t i o n s f translation.
+, ,
* , and
i n order t o discover t h i s
i n both semantics, i t r e p r e s e n t s t h e same semantic e n t i t y i n each, whatever that e n t i t y is. For example, consider t h e two t r e e s i n the
t r a n s l a t i o n involving
"+".
Let t = S<S%O<+>>,
t h a t , (g(t) :+ ( t l ) .
T(ABc+*) A*(w(c)): =
30
I F I
1
T C F
IE l (
1
TRANSLATION I1 ( E x p l i c i t
to i m p l i c i t *)
has no translation.
But ,it can findsa phrase form involving that word which can b e translated
*:
x2(xI,5Lj)
-t
EOE
~ ~ ( = f* 0 )
(+)=
E O E
(i+
13)
A ;.PAEi m 1 1 R r * * 1 1 1 1 1 1 If
A *
A
B *
I-
A
B
n
A
+ to
1, +)
the
+2+
s t r i n g s of the form 1
+ 1+
... + 1.
.. . + 2 .
L(GZ) i s the s e t of a l l
expresses t h e even i n t e g e r s and L(G ) the integers. The procedure 2 1 1 I! "discovers" t h a t t h e - 2 in L(G ) must be translated as t h e phrase word 1
...)
1)
I
+
I
'
( ' is t h e suc-
cessor fn+>
:N
(identity) :
(x) = x
+, s i n c e
(2) = 2 , b u t
( l ) , ( f ) I ( ) = f ( 1 , = 2
TRANSLATION IV (1 t o 2 ,+) ,+
Suppose t h e procedure were asked t o t r a n s l a t e from L(G 2 ) t o L(G 1 i n ) t h e previous example i . e . , from t h e i n t e g e r s t o the even i n t e g e r s . It
+ 2",
etc.
I t wotild
d e f i n e a t r a n s l a t i o n which i s t o t a l on t h e s t r i n g s in L(G ) whose v a l u e s 2 a r e even, and i t would continue t o look f0reve.r f o r p o s s i b l e t r a n s l a t i o n s f o r t h e odd-valued s t r i n g s . g i v e the f u n c t i o n s W l e a v e i t a s an e x e r c i s e f o r t h e r e a d e r t o e define t h i s p a r t i a l translation.
;and ;which
5.
in translation.
understanding.
d e f i n i t i o n of phrase-s t r u c t u r e semantics i n S e c t i o n 1 p r o v i d e s f o r s o l u t i o n s t o t h e semantic p r o j e c t i o n problem (cf Katz and Fodor (1964), and
Langendoen (1969))
.
A f t e r having played
worse" ones.
o r simple, o r
11
c a n ' t say much of a s p e c i f i c n a t u r e about what i t means f o r a grammar and semantics t o be "elegant", "simple", or
It
natural".
It seems t h a t s m o e
s t u d y ih t h i s a r e a might g i v e u s i n s i g h t i n t o c e r t a i n s k i l l s f o r maklng i t e a s i e r t o w r i t e l i n g u i s t i c d e s c r i p t i o n s s u i t a b l e for. t r a n s l a t i o n . One phenomenon t h i s model explains is why i t i s s o d i f f i c u l t t o compute an i n v e r s e t r a n s l a t i o n and g e t a n y t h i n g l i k e t h e original.
That
i s , if one $ t a r t s with sentence w i n L and t r a n s l a t e s t o w i n L2, then 1 t r a n s l a t e s w ' t o w" back in L one would l i k e f o r - w and w" t o have the 1' same meaning. But t h e s c u t t 1 e b u t . t says i t i s n ' t s o , and t h i s model shows
why.
Note t h a t all t h a t is r e q u i f e d f o r T:
is t h a t i f w' i s a tran&@ion
-r
Ll of w, then pl(w) f l v 2 ( w t )
2L2 t o B e a t r a n s l a t i o n
# fl, i . e . , t h a t
Now
suppose
T: '
n n
-+
y (wf)
2 b1(w1')
# 0 and
-y
@. I n
(wi!)
n u 1(w") # 0,
T r a n s l a t i o n programs don' t u s u a l l y do t h a t .
-- haw
8-
i t i s t h a t two very
For n a t u r a l language, one would l i k e t,opexte i t h e theory in t h i s paper t o a r b i t r a r y phrase s t r u c t u r e grammars and t o t r a n s f o r m a t i o n a l
grammars.
3-
"The s p i r i t indeed i s w i l l - i n g , but t h e f l e s h i s weak." Then l e took t h e t r a n s l a t i o n and fed i t i n t o a t r a n s l a t o r froui L,L t o i LI, and g o t : "The l i q u o r i s a l l r i g h t , b u t t h e meat i s s p o i l e d . "
f o r m a l i z i n g t h e n o t i o n of t h e t r a n s f o r m p f a s e m a n t i c f u n c t i o n t o be a s s o c i a t e d w i t h each syntax t r a n s f o r m a t i o n . (For t r a n s f o r m a t i o n a l semantic t h e o r i e s which do n o t allow semantic change i n t h e t r a n s f o r m a t i o n s , t h e e x t e n s i o n t o a r b i t r a r y p h r a s e s t r u c t u r e grammars i s s u f f i c i e n t , of course.)
The e x t e n s i o n t o a r b i t r a r y p h r a s e s t r u c t u r e grammars r e q u i r e s f i r s t a
formal statement o.f the "phrase s t r u c t u r e s " of u n r e s t r i c t e d grammars,
s i n c e these s t r u c t u r e s are n o t t r e e s . f o r u n r e s t r i c t e d languages in d e t a i l . The a u t h o r ' s forthcoming paper, l i s t e d i n t h e b i b l i o g r a p h y , covers t h e s u b j e c t of t h e s y n t a c t i c s t r u c t u r e s
guaranteed t o p r e s e r v e seaantics
of a s e n t e n c e r e c u r s i v e l y .
I a m more l i k e l y t o c a l l t h e r e s u l t which I
interpretation",
r a t h e r t h a n a t f t ~ a n s l a t i o n " . 2)
I f used much,
problems are examined once and for a l l i n t h e t r a n s l a t o r g e n e r a t o r ; a t t r a n s l a t i o n t i m e , only a sequence of t r e e mappings i s performed a s t r u c t u r e matching and r e p l a c i n g technique.
- simply
3)
r e q u i r e s knowing how to s p e c i f y l i n k u i s t i c d e s c r i p t i o n s i n such a way that, given a meaning i n semantic n o t a t i o n , one can produce a sentence having t h a t meaning. T h i s problem Ts a d i f f i c k l t one not y e t w e l l understood.
Selected Bibliography. Bbnson, D. B. (1970). Syntax and semantics: a categorial view. Information - Control, - ~ p 738-773. and 16, . Benson, D. B. (forthcoming) Semantic ,preserving translations. Brooks, F. P., Jr., and Iverson, K. E. (1969'). Automatic Data Processing. New ~drk: Wiley. Buttelmann, H. W. (forthcoming). On the syntactic structures of Unreand stricted gramark In Information - Control. Katz, 3 0 , and Fodor, 3. A. (1964). The structure of a semantic theory. In Language, - pp. 170-210. Reprinted in Fodor and Katz 39, (eds.) - Structure of Language. Englewood Cliffs, New The Jersey: 479-518.
In
of KBtz, J., and Postal, P. (1964). An Integrated TKeory - ~inguistic Descriptions. cambridge? MIT Press.
and Hopcroft, J. and Ullmann, J. (1967). Formal Language-s- their Relatioh to - AutomaIt;,a. Reading, Mass: Addison-Wesley.
The of Free Languages. Ginsburg, S (1963) - Mathematical Theory - c o i t e x t -New York: McGrw-Hill. Knuth, D. E. ( 9 6 ) 1.8. Semantics b f context-free languages. - MatheIn mattea1 Sys-terns Theory, 2_, pp. 127-146. (1971). Examples of formal semantics. Symposium on Semantics of Algorithmic Languages. Engelor, ed. Lecture Notes i< Math #188. New York: Springer-'Jarlag, p p . 212-235
,
Langendoen, D. T. (1969). - Study - Syntax. New york: The of hart and ::lington.
Holt, Rine-
Tarski, A. (1936). Der Wwheitsbergriff in den f~rmalasiertenSprachen. I n Squdia Philosophica, I , pp. 261-304. Originally published in 1933.