LFG-based syntactic transfer from English to French with XTE The Xerox Translation Environment
description
Transcript of LFG-based syntactic transfer from English to French with XTE The Xerox Translation Environment
Xerox Research Centre Europe26/11/1998
LFG-based syntactic transfer from English to French
with XTE The Xerox Translation Environment
Xerox Research Centre Europe26/11/1998
The Translation Architecture Source and Target LFG Grammars
Some Examples from the Corpus Transfer Coverage
Rule Ordering in a Transfer GrammarExamples of “stepwise” Transfer: Nominalization and Coordination
More on Coordination:Structure Deletion and Root Node Rewriting
Translation Cycles and Optional Rules
Overview
Xerox Research Centre Europe26/11/1998
The Translation Architecture Source and Target LFG Grammars
Xerox Research Centre Europe26/11/1998
The XTE Xerox Translation Environment
Translation Architecture
SL f-structure
SL f-structure terms
Source language string
XLE parsing
XTE term rewriting system
Transfer rulesTL f-structureterms
underspecified TL f-structure
Target language strings
XLE generation
disambiguation
pred(f,walk)subj(f,g), pred(g,’John’)
pred(A,walk) ==> pred(X,marcher).pred(A,’John’) ==> pred(X,’Jean’).
pred(f,marcher),subj(f,g), pred(g,’Jean’)
Xerox Research Centre Europe26/11/1998
The XTE Xerox Translation Environment
Translation Architecture
SL f-structure
SL f-structure terms
Source language string
XLE parsing
XTE term rewriting system
Transfer rulesTL f-structureterms
underspecified TL f-structure
Target language strings
XLE generation
disambiguation
pred(f,walk)subj(f,g), pred(g,’John’)
pred(A,walk) ==> pred(X,marcher).pred(A,’John’) ==> pred(X,’Jean’).
pred(f,marcher),subj(f,g), pred(g,’Jean’)
External AttributesaddonlyInternal Attributes
Xerox Research Centre Europe26/11/1998
Source and Target Language LFG Grammars
• Source language grammar: English (Tracy Holloway King - PARC)
• Target language grammar: French (Anette Frank, Veronika Lux - XRCE)
– Special focus on generation from underspecified structures
– Use of ``optimality’’ (preference) marks and surface order constraints to define e.g.
• preferred default positions for adverbs of different types• preferred default positions of adjuncts
– LFG grammars are reversible, but specify different preference rankings for analysis and generation mode
Xerox Research Centre Europe26/11/1998
Some Examples from the Corpus Transfer Coverage
Xerox Research Centre Europe26/11/1998
To keep your HomeCentre in good operating condition, you need to perform periodic maintenance tasks.Pour assurer le bon fonctionnement du HomeCentre, vous devez effectuer périodiquement des tâches d’entretien.
HEADER: Removing and Replacing the Paper CassetteHEADER: Retrait et mise en place de la cassette papier
Before you add paper, make sure that the paper matches the paper size setting in Windows.Avant d’ajouter du papier, assurez-vous que le papier correspond au format de papier sélectionné.
Keep in mind that you can’t use paper that is wider than 8 inches in the HomeCentre.N’oubliez pas que vous ne pouvez pas utiliser du papier qui dépasse 8 inches dans le HomeCentre.
Fan the paper and put up to 125 sheets into the paper tray.Ventilez le papier et placez jusqu’à 125 feuilles dans le plateau de départ papier.
Make sure that the green carriage lock lever is STILL moved all the way forward before you reinstall the print head.Assurez-vous que le levier vert de verrouillage du chariot est TOUJOURS repoussé complètement vers l’avant avant de remettre la tête d’impression en place.
Some Examples from the Corpus
Xerox Research Centre Europe26/11/1998
Transfer Coverage
The transfer corpus: A contiguous section of the HomeCentre user manual -- Chapter 6
(99 sentences/text items)
• A basic transfer “grammar” for translation from English to French
• 545 compiled transfer rules: 171 structural transfer rules 76 lexicalized transfer rule templates (374 instantiated lexical transfer rules; approx. 5 entries per rule template)
• Translations for 94 sentences
Xerox Research Centre Europe26/11/1998
Rule Ordering in a Transfer Grammar
Xerox Research Centre Europe26/11/1998
Overall Organization of a Transfer Grammar
Deleting grammar specific features of SL grammar Adjusting minor differences between SL and TL f-structures (e.g. create uniform feature space for nominals)General transformations on feature structures adjunct(A,B), in_set(C,B) ==> adjunct_x(A,C).
Lexical and structural transfer rules
nominalizationverbsnounsadjectivesadverbsconjunctionsprepositions
General transformations on feature structures (ADJUNCT)Final adjustments to match TL feature structures
Input
Output
Xerox Research Centre Europe26/11/1998
% Simple verbs
restriction/A :: 0 ==> 0.opt :: 0 ?=> 0.
Source -> Target :: % main transfer rule pred(A,Source), +vtype(A,_) ==> pred(A, Target) && opt && restriction/A.
open -> soulever. % optional opt :: 0 ==> 0.
open -> ouvrir. % obligatoryfan -> ventiler.
restriction/A :: -obj(A,_) ==> inhrefl/A. print -> imprimer. % intransitive to intransitive reflexive appear -> afficher.
Defining Optionality and Restrictions
Xerox Research Centre Europe26/11/1998
Examples of “stepwise” Transfer:
Nominalization
Xerox Research Centre Europe26/11/1998
Nominalization
HEADER: Removing the print head -- Retrait de la tête d’impression
Xerox Research Centre Europe26/11/1998
Nominalization
… when moving the printer -- .. lors du déplacement de l’imprimante
Xerox Research Centre Europe26/11/1998
nominal_or_verbal/A :: nominal_gerund_features/A, spectype(_)/A ==> spectype(def)/A ; verbal_gerund_features/A ==> spectype(def)/A, ntype(A,_), default_nominal_agr/A.
nominalization(SourceVerb,TargetNoun) :: pred(A,SourceVerb), tns_features/A ?=> pred(A,TargetNoun), nominalized(A) && nominal_or_verbal/A.
nominalization(print, impression).nominalization(move, déplacement).
nominalization(remove, retrait).
“Stepwise” Transfer
Rewriting a verbal head with verbal featuresinto a nominal head with nominal features
First step: The nominalization rule
Xerox Research Centre Europe26/11/1998
pred(0,remove)subj(0,1), pred(1,pro), pron_type(1,null)obj(0,2), pred(2,print head), ntype(2,2), grain(2,count), spec(2,4), spec_type(4,def), pers(2,’2’), num(2,sg),tns_asp(0,5), prog(5,+), perf(5,-),passive(0,-), pers(0,’2’), layout_type(0,header), stmt_type(0,header), vtype(0,main), num(0,sg),ntype(0,6), gerund(6,+), type(6,eventive).
pred(A,remove), tns_asp(A,B), perf(B,_), prog(B,_), vtype(A,_), +ntype(A,C), gerund(C,+), type(C,eventive) ?=> pred(A,retrait), nominalized(A).
Applying the nominalization rule to the input
Xerox Research Centre Europe26/11/1998
pred(0,retrait), nominalized(0),subj(0,1), pred(1,pro), pron_type(1,null)obj(0,2), pred(2,print head), ntype(2,2), grain(2,count), spec(2,4), spec_type(4,def), pers(2,’2’), num(2,sg),passive(0,-), pers(0,’2’), layout_type(0,header), stmt_type(0,header), num(0,sg),ntype(0,6).
Xerox Research Centre Europe26/11/1998
+nominalized(A), passive(A,-) subj(A,B), null_pron/B, obj(A,C) ==> adjunct_x(A,D), prepsem(de)/[D,C].
Second step: Relation changes in nominalization
Case 1: active transitive verbsrewrite transitive object into de-adjunct; delete null subject
Ex: start printing the page again ==> reprenez l’impression de la page
Xerox Research Centre Europe26/11/1998
+nominalized(A), passive(A,-), subj(A,B), null_pron/B ==> 0.
Second step: Relation changes in nominalization
Case 2: active intransitivedelete null subject
Ex: start printing again ==> reprenez l’impression
Xerox Research Centre Europe26/11/1998
+nominalized(A), passive(A,-), subj(A,B), null_pron/B ==> adjunct_x(A,C), prepsem(de)/[C,B].
Second step: Relation changes in nominalization
Case 3: passiverewrite passive subject into de-adjunct
Ex: when the scanner is being calibrated ==> pendant l’ étalonnage du scanner
Xerox Research Centre Europe26/11/1998
pred(0,retrait), nominalized(0), spec(0,7), spec_type(7,def), subj(0,1), pred(1,pro), pron_type(1,null) obj(0,2), pred(2,print head), ntype(2,2), grain(2,count), spec(2,4), spec_type(4,def), pers(2,’2’), num(2,sg), passive(0,-), pers(0,’2’), layout_type(0,header), stmt_type(0,header), num(0,sg), ntype(0,6).
+nominalized(A), passive(A,-) subj(A,B), null_pron/B, obj(A,C) ==> adjunct_x(A,D), prepsem(de)/[D,C].
Applying ``relation changes’’ to the (new) input
Xerox Research Centre Europe26/11/1998
pred(0,retrait), nominalized(0),spec(0,7), spec_type(7,def),adjunct_x(0,8), pred(8,de), ptype(8,sem), obj(8,2), pcase(2,de), pred(2,print head), ntype(2,2), grain(2,count), spec(2,4), spec_type(4,def), pers(2,’2’), num(2,sg),pers(0,’2’), layout_type(0,header), stmt_type(0,header), num(0,sg),ntype(0,6).
nominalized(A) ==> 0. pred(A,print head) ==> pred(A,tête d’impression).
Retrait de la tête d’impression
Xerox Research Centre Europe26/11/1998
You print a test page when you move the HomeCentre or replace an ink cartridge.Vous imprimez une page de test lorsque vous déplacez le HomeCentre ou (lors)que vous remplacez une cartouche d’encre.
Another Example of “stepwise” Transfer:
Head Switching in Coordination
Xerox Research Centre Europe26/11/1998
You print a test page when you move the HomeCentre or replace an ink cartridge.
Head Switching in Coordination
pred(0,print), subj(0,1), pred(1,pro), pron_type(1,pers), pers(1,’2’), num(1,sg), obj(0,2), pred(2,test page), spec(2,3), spec_type(3,indef), pers(2,’3’), num(2,sg),tns_asp(0,4), tense(4,pres), perf(4,-), prog(4,-),passive(0,-), stmt_type(0,declarative), adjunct_x(0,5), pred(5,when), obj(5,6), conj_level(6,vp), conj_form(6,or), in_set(7,6), pred(7,move), subj(7,8), pred(8,pro), pron_type(8,pers), pers(8,’2’),num(8,sg), obj(7,9), pred(9,HomeCentre), ….. tns_asp(7,10), tense(10,pres), … passive(7,-), stmt_type(7,declarative) in_set(8,6), pred(8,replace), subj(8,9), pred(9,pro), pron_type(9,pers), pers(9,’2’),.. obj(8,10), pred(10,HomeCentre), ….. tns_asp(8,11), tense(11,pres), … passive(8,-), stmt_type(8,declarative).
Source Structure:
Xerox Research Centre Europe26/11/1998
Vous imprimez une page de test lorsque vous déplacez le HomeCentre ou (lors)que vous remplacez une cartouche d’encre.
Head Switching in Coordination
pred(0,imprimer), subj(0,1), pred(1,pro), pron_type(1,pers), pers(1,’2’), num(1,sg), obj(0,2), pred(2,page de test), spec(2,3), spec_type(3,indef), pers(2,’3’), num(2,sg),tns_asp(0,4), tense(4,pres), perf(4,-), passive(0,-), stmt_type(0,declarative), adjunct_x(0,6), conj_level(6,vp), conj_form(6,or), in_set(7,6), pred(7,lorsque), obj(7,8), pred(8,deplacer), subj(8,9), pred(9,pro), pron_type(9,pers), pers(9,’2’), ... obj(8,10), pred(10,HomeCentre), ….. tns_asp(8,11), tense(11,pres), … passive(8,-), stmt_type(8,declarative) in_set(12,6), pred(12,lorsque), obj(12,13), pred(13,remplacer), subj(13,14), pred(14,pro), pron_type(14,pers), ... obj(13,15), pred(15,HomeCentre), ….. tns_asp(13,16), tense(16,pres), … passive(13,-), stmt_type(13,declarative).
Target Structure:
Xerox Research Centre Europe26/11/1998
A simple way: Doing it in one step
- rewrite the coordination structure, raise it to the level of the original conjunction (when)- rewrite the conjunction (when) twice as new conjuncts of new coordination structure, - let them embed the original conjuncts (B,C)
Head Switching in Coordination
semconj(CompForm,AdvType)/[A,Coord], coord(ConjForm)/[Coord,B,C] ==> coord(ConjForm)/[A,Bnew,Cnew], semconj(CompForm,AdvType)/[Bnew,B], semconj(CompForm,AdvType)/[Cnew,C].
Xerox Research Centre Europe26/11/1998
A simple way: Doing it in one step
- rewrite the coordination structure, raise it to the level of the original conjunction (when)- rewrite the conjunction (when) twice as new conjuncts of new coordination structure, - let them embed the original conjuncts (B,C)
Head Switching in Coordination
semconj(CompForm,AdvType)/[A,Coord], coord(ConjForm)/[Coord,B,C] ==> coord(ConjForm)/[A,Bnew,Cnew], semconj(CompForm,AdvType)/[Bnew,B], semconj(CompForm,AdvType)/[Cnew,C].
This rule only accounts for two-conjunct coordination !
Xerox Research Centre Europe26/11/1998
“Stepwise” Transfer
semconj(CompForm,AdvType)/[A,Coord], conj_form(Coord,ConjForm) ==> conj_form(A,ConjForm), raise_conjuncts_into_compl(CompForm,AdvType, Coord, A).
+raise_conjuncts_into_compl(CompForm,AdvType, Coord, A), in_set(B,Coord), +subj(B,_) ==> in_set(Bnew,A), semconj(CompForm,AdvType)/[Bnew,B]. raise_conjuncts_into_compl(_,_,_,_) ==> 0.
A better, more general way: Doing it in two steps
- rewrite the coordination structure, raise it to the higher level (A)- delete the conjunction (when) - but transmit the conjunction form and the upper and lower nodes (Coord,A) to the next rule - the next rule creates, for each conjunct (B) of the raised coordination (Coord) a new conjunction (when) that embeds the original conjunct
Xerox Research Centre Europe26/11/1998
More on Coordination:
Structure Deletion and Root Node Rewriting
Xerox Research Centre Europe26/11/1998
hold Press and release the green LED button.
prolongée Exercez une pression brève sur le voyant vert.
Structure Deletion and Root Node Rewriting
Xerox Research Centre Europe26/11/1998
Structure Deletion and Root Node Rewriting
Xerox Research Centre Europe26/11/1998
Press and hold the green LED button.Exercez une pression prolongée sur le voyant
vert.
v_coord_v(SourceV1, SourceV2, InterimV) :: conj_form(A,_), in_set(B,A), pred(B,SourceV1), in_set(C,A), pred(C,SourceV2), scopes(B,C) ==> pred(B,InterimV), rewrite(A,B), delete_structure(C).
v_coord_v(press, hold, ’press-hold’).v_coord_v(press, hold, ’press-release’).
First step: structure deletion
rewrite(A,B), { A == var(0) } ==> move_structure(B, var(0)). rewrite(A,B), adjunct_x(X,A) ==> adjunct_x(X,B).
Second step: (root) node rewriting
Xerox Research Centre Europe26/11/1998
Press and hold the green LED button.Exercez une pression prolongée sur le voyant
vert.
v v_v_s_o2v_s_obl_o_adj(InterimV, TargetV, TargetSpecType, TargetNoun, TargetAdj, TargetPrep) :: pred(A,InterimV), x_arg/[obj,2,A,B] ==> pred(A,TargetV), x_arg/[obj,2,A,C], pred(C,TargetNoun), spectype(TargetSpecType)/C, ntype(C,_), default_nominal_agr/C, adjunct_x_adjective(TargetAdj)/C, x_arg/[obl,3,A,D], prepsem(TargetPrep)/[D,B].
v_v_s_o2v_s_obl_o_adj(‘press-hold’, exercer, indef, pression, prolongé, sur). v_v_s_o2v_s_obl_o_adj(‘press-release’, exercer, indef, pression, bref, sur).
Third step: defining the target predicate and its arguments
Xerox Research Centre Europe26/11/1998
Xerox Research Centre Europe26/11/1998
Translation Cycles and Filtering
Source and target language markingFiltering ``spurious’’ ambiguity paths from optional rules
Xerox Research Centre Europe26/11/1998
Reinstall the print head -- Remettre la tête d’impression en place
reinstall X ==> mettre X en place
Keep it in a safe place -- Rangez-la en lieu sûr
place ==> lieu
* Remettre la tête d’impression en lieu
Translation Cycles Source and Target Language Marking
Xerox Research Centre Europe26/11/1998
Translation CyclesSource and Target Language Marking
Introduce source language parameters
pred(X,Pred) ==> pred(X,Pred,src).
Rewriting source into target predicates
pred(0,reinstall,src), +obj(0,_) ==> pred(0,remettre,trg), adjunct_x(0,1), pred(1,en,trg), arg(1,1,2), obj(1,2), ptype(1,sem), pcase(2,en), pred(2,place, trg), pers(2,’3’), num(2,sg), spec(2,3), spec_type(3,def).
Eliminating target predicate marking
pred(X,Pred,trg) ==> pred(X,Pred).
Xerox Research Centre Europe26/11/1998
Reinstall the print head -- Remettre la tête d’impression en place
reinstall X (src) ==> mettre X en place (trg)
Keep it in a safe place -- Rangez-la en lieu sûr
place (src) ==> lieu (trg)
Remettre la tête d’impression en place
Translation CyclesSource and Target Language Marking
Xerox Research Centre Europe26/11/1998
pred(A,need,src)
need ?=> il vous faut
pred(A,need,src) pred(A,falloir,trg) need ?=> il est nécessaire de
pred(A,need,src) pred(A, nécessaire,trg)
need ==> devoir
pred(A,devoir,trg)
Ambiguity paths introduced by optional rules
Xerox Research Centre Europe26/11/1998
need ==> devoir
You need to perform periodic maintenance tasks. -- Vous devez effectuer périodiquement des tâches d’entretien.
You do not need to perform maintenance tasks.-- * Vous ne devez pas effectuer des tâches d’entretien.
-- Il n’est pas nécessaire d’effectuer des tâches d’entretien.
restriction/A :: -adjunct_x(A,B) ==> 0; +adjunct_x(A,B), -adjunct_type(B,neg) ==> 0.
SourceV ->TargetV :: pred(A,SourceV,src) ==> pred(A,TargetV,_), +vtype(A,_)&& restriction/A.
need -> devoir.
Xerox Research Centre Europe26/11/1998
pred(A,need,src)
need ?=> il vous faut
pred(A,need,src) pred(A,falloir,trg) need ?=> il est nécessaire de
pred(A,need,src) pred(A, nécessaire,trg)
need ==> devoir
pred(A,need,src)
no applicationadjunct_type(_,neg)
Ambiguity paths introduced by optional rules
You do not need to perform maintenance tasks
Xerox Research Centre Europe26/11/1998
pred(A,need,src)
need ?=> il vous faut
pred(A,need,src) pred(A,falloir,trg) need ?=> il est nécessaire de
pred(A,need,src) pred(A, nécessaire,trg)
need ==> devoir
pred(A,need,src)
Filtering ambiguity paths introduced by optional rules
``Stop’’ Predicate
pred(_,_,src) ==> stop.