0: sl: I see them tl: VEO LOS tree: <((S,0 (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,0 (PRON,2:3 "LOS") ) ) ) )> tl: YO VEO LOS tree: <((S,1 (NP,0 (PRON,1:1 "YO") ) (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,0 (PRON,2:3 "LOS") ) ) ) )> 1: sl: I see cars tl: VEO AUTOS tree: <((S,0 (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,2 (N,1:3 "AUTOS") ) ) ) )> tl: YO VEO AUTOS tree: <((S,1 (NP,0 (PRON,1:1 "YO") ) (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,2 (N,1:3 "A UTOS") ) ) ) )> 1. Lexicon: simulation-lexicon1.trf {PRON,1} PRON::PRON |: [i] -> [yo] ((X1::Y1) ((x0 form) = i) ((x0 agr pers) = 1) ((x0 agr num) = sg) ((x0 case) = nom) ((y0 pos) = pron)) {V,1} V::V |: [see] -> [veo] ((X1::Y1) ((x0 form) = see) ((x0 actform) = see) ((x0 tense) = pres) ((y0 agr pers) = 1) ((y0 agr num) = sg) ((y0 pos) = v)) {N,1} N::N |: [cars] -> [autos] ((X1::Y1) ((x0 form) = car) ((x0 agr pers) = 3) ((x0 agr num) = pl) ((y0 agr gen) = masc) ((y0 pos) = n)) PRON::PRON |: [them] -> [los] ((X1::Y1) ((x0 form) = them) ((x0 agr pers) = 3) ((x0 agr num) = pl) ((y0 agr gen) = masc) ; added for simulation ((x0 case) = acc) ; switched from x to y-side for case constraint (simulation) ((y0 pos) = pron)) 2. Grammar: simulation-grammar1.trf ;; Simulating the automatic correction of "I see them" and "I see cars" ; Spanish is a Pro-drop language ; enforce it when the NP is a 1st and 2nd singular personal pronoun ; seems to be what the translator of the elicitation corpus did ; no way to know the degree of formality (agr register = in/form) {S,0} S::S : [NP VP] -> [VP] ( (X2::Y1) ((y1 agr pers) = (*OR* 1 2)) ((y1 agr num) = sg) (x0 = x2) ((y1 agr) = (x1 agr)) ((y1 tense) = (x2 tense)) ) {S,1} S::S : [NP VP] -> [NP VP] ( (X1::Y1) (X2::Y2) (x0 = x2) ((y1 case) = nom) ; subj it !-> la/lo ((y1 agr) = (x1 agr)) ((y2 agr) = (y1 agr)) ((y2 tense) = (x2 tense)) ) NP::NP : [PRON] -> [PRON] ( (X1::Y1) (x0 = x1) (y0 = x0) ; transfers agr (pers, num, gen), semtype and case if specified ; (consider doing it individually) ; y0 is undefined wrt formality (it comes from the y-side in the lexitem) ((y0 agr register) = (y1 agr register)) ; passes up the degree of formality ((y0 case) = (y1 case)) ; in case "case" was not defined on the x-side ; example: [you] -> [te] (y1 = y0) ) {NP,2} NP::NP : [N] -> [N] ( (X1::Y1) (x0 = x1) (y0 = x0) ; transfers agr pers,agr num, agr gen and semtype ; (consider doing it individually) (y1 = y0) ; passes the constraints down to the daughter ; (could do that in the lexical entry directly) ) {VP,1} VP::VP : [V] -> [V] ( (X1::Y1) (x0 = x1) ((y0 tense) = (x0 tense)) ; only pass to the y-side what I need ((y0 type) = (x0 type)) ; temporarily (as default), but careful ; the srs and tgt might have different types ((y0 agr) = (y1 agr)) ; passes the agr features up from the lexicon ; to the VP ) {VP,3} VP::VP : [VP NP] -> [VP NP] ( (X1::Y1) (X2::Y2) ((x2 case) = acc) ; for the pron, it should unify, for other NP, adds it ((x0 obj) = x2) ((x0 agr) = (x1 agr)) (x0 = x1) ((y0 tense) = (x0 tense)) ((y0 agr) = (y1 agr)) ) {VP,4} VP::VP : [VP NP] -> [NP VP] ( (X1::Y2) (X2::Y1) ((x2 case) = acc) ((x0 obj) = x2) ((x0 agr) = (x2 agr)) (x0 = x1) ((y0 tense) = (x0 tense)) ((y0 agr) = (y2 agr))) ------------------------------------------------------------------------ Simulation ------------------------------------------------------------------------ 0. MT output ------------ sl: I see them tl: VEO LOS tree: <((S,0 (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,0 (PRON,2:3 "LOS") ) ) ) )> tl: YO VEO LOS tree: <((S,1 (NP,0 (PRON,1:1 "YO") ) (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,0 (PRON,2:3 "LOS") ) ) ) )> 1. User-feedback ---------------- initial TLS: veo los drag "los" to be in front of "veo" final TLS: los veo -> final POS sequence: PRON VP Correction type: word order change 2. Retrieve relevant rule ------------------------- VP,3 {VP,3} VP::VP : [VP NP] -> [VP NP] ( (X1::Y1) (X2::Y2) ((x2 case) = acc) ((x0 obj) = x2) ((x0 agr) = (x1 agr)) (x0 = x1) ((y0 tense) = (x0 tense)) ((y0 agr) = (y1 agr))) 3. Variable instantiation ------------------------- Wi = los Wc = ? -> in this case it's not the verb, but rather a combination of features in Wi (pron+acc) Wi = los = Y2 correct order: NP(Y2) VP(Y1) 4. Type of RR operation ----------------------- 4.c (need MP to determine refinement) 5. check if PRON VP exists as the RHS in a VP rule. -------------------------------------------------- not in the simulation grammar 6. flip order in original rule (re-arrange alignments) and constraint numbers ----------------------------------------------------- {VP,4} VP::VP : [VP NP] -> [NP VP] ;; <--- ( (X1::Y2) ;; <--- (X2::Y1) ;; <--- ((x2 case) = acc) ((x0 obj) = x2) ((x0 agr) = (x1 agr)) (x0 = x1) ((y0 tense) = (x0 tense)) ((y0 agr) = (y2 agr))) ;; <--- which produces the desired MT output :) Refined MT Output: 0: sl: I see them tl: VEO LOS tree: <((S,0 (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,0 (PRON,2:3 "LOS") ) ) ) )> tl: YO VEO LOS tree: <((S,1 (NP,0 (PRON,1:1 "YO") ) (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,0 (PRON,2:3 "LOS") ) ) ) )> tl: LOS VEO tree: <((S,0 (VP,4 (NP,0 (PRON,2:3 "LOS") ) (VP,1 (V,1:2 "VEO") ) ) ) )> tl: YO LOS VEO tree: <((S,1 (NP,0 (PRON,1:1 "YO") ) (VP,4 (NP,0 (PRON,2:3 "LOS") ) (VP,1 (V,1:2 "VEO") ) ) ) )> but also: 1: sl: I see cars tl: VEO AUTOS tree: <((S,0 (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,2 (N,1:3 "AUTOS") ) ) ) )> tl: YO VEO AUTOS tree: <((S,1 (NP,0 (PRON,1:1 "YO") ) (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,2 (N,1:3 "A UTOS") ) ) ) )> tl: AUTOS VEO tree: <((S,0 (VP,4 (NP,2 (N,1:3 "AUTOS") ) (VP,1 (V,1:2 "VEO") ) ) ) )> tl: YO AUTOS VEO -> need to restrict further 7. Find a MP where the original rule applies successfully --------------------------------------------------------- -> I see cars - veo autos 8. Calculate the delta function to find the triggering context -------------------------------------------------------------- delta(T1,T2) = delta(veo los, veo autos) = delta(los,autos) = {pos} since los has a pos = pron and autos has a pos = n 9. Add appropriate constraints to appropriate rule (duplicate, more specific) ----------------------------------------------------------------------------- Ideally, we want the new rule VP,4 to only apply when the NPobj is a pronoun, thus we need to add the following constraints to VP,4: {VP,4} VP::VP : [VP NP] -> [NP VP] ( (X1::Y2) (X2::Y1) ((x2 case) = acc) ((x0 obj) = x2) ((x0 agr) = (x2 agr)) (x0 = x1) ((y0 tense) = (x0 tense)) ((y0 agr) = (y2 agr)) ((y1 pos) =c pron)) ;; <--- but for that to have any effect, we need to make sure that the pos is passed from the PRON to the NP in NP,0 (know from MT output tree) 10. Make sure the relevant features are passed up from the POS to the consituent level, if applicable: --------------------------------------------------------------------- NP::NP : [PRON] -> [PRON] ( (X1::Y1) (x0 = x1) (y0 = x0) ((y0 agr register) = (y1 agr register)) ((y0 case) = (y1 case)) ((y0 pos) = (y1 pos)) ;; <--- (y1 = y0) ) which have the desired effect of not overgenerating for cases where the NPobj is not a pronoun: 0: sl: I see them tl: VEO LOS tree: <((S,0 (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,0 (PRON,2:3 "LOS") ) ) ) )> tl: YO VEO LOS tree: <((S,1 (NP,0 (PRON,1:1 "YO") ) (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,0 (PRON,2:3 "LOS") ) ) ) )> tl: LOS VEO tree: <((S,0 (VP,4 (NP,0 (PRON,2:3 "LOS") ) (VP,1 (V,1:2 "VEO") ) ) ) )> tl: YO LOS VEO tree: <((S,1 (NP,0 (PRON,1:1 "YO") ) (VP,4 (NP,0 (PRON,2:3 "LOS") ) (VP,1 (V,1:2 "VEO") ) ) ) )> 1: sl: I see cars tl: VEO AUTOS tree: <((S,0 (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,2 (N,1:3 "AUTOS") ) ) ) )> tl: YO VEO AUTOS tree: <((S,1 (NP,0 (PRON,1:1 "YO") ) (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,2 (N,1:3 "A UTOS") ) ) ) )> 11. Block application of original rule to the corrected TLS ------------------------------------------------------------ {VP,3} VP::VP : [VP NP] -> [VP NP] ( (X1::Y1) (X2::Y2) ((x2 case) = acc) ((x0 obj) = x2) ((x0 agr) = (x1 agr)) (x0 = x1) ((y0 tense) = (x0 tense)) ((y0 agr) = (y1 agr)) ((y2 pos) = (*NOT* pron))) ; <-- And finally, the desired MT output is generated by the refined grammar: 0: sl: I see them tl: LOS VEO tree: <((S,0 (VP,4 (NP,0 (PRON,2:3 "LOS") ) (VP,1 (V,1:2 "VEO") ) ) ) )> tl: YO LOS VEO tree: <((S,1 (NP,0 (PRON,1:1 "YO") ) (VP,4 (NP,0 (PRON,2:3 "LOS") ) (VP,1 (V,1:2 "VEO") ) ) ) )> 1: sl: I see cars tl: VEO AUTOS tree: <((S,0 (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,2 (N,1:3 "AUTOS") ) ) ) )> tl: YO VEO AUTOS tree: <((S,1 (NP,0 (PRON,1:1 "YO") ) (VP,3 (VP,1 (V,1:2 "VEO") ) (NP,2 (N,1:3 "A UTOS") ) ) ) )> Refined grammar: {S,0} S::S : [NP VP] -> [VP] ( (X2::Y1) ((y1 agr pers) = (*OR* 1 2)) ((y1 agr num) = sg) (x0 = x2) ((y1 agr) = (x1 agr)) ((y1 tense) = (x2 tense)) ) {S,1} S::S : [NP VP] -> [NP VP] ( (X1::Y1) (X2::Y2) (x0 = x2) ((y1 case) = nom) ; subj it !-> la/lo ((y1 agr) = (x1 agr)) ((y2 agr) = (y1 agr)) ((y2 tense) = (x2 tense)) ) NP::NP : [PRON] -> [PRON] ( (X1::Y1) (x0 = x1) (y0 = x0) ; transfers agr (pers, num, gen), semtype and case if specified ; (consider doing it individually) ; y0 is undefined wrt formality (it comes from the y-side in the lexitem) ((y0 agr register) = (y1 agr register)) ; passes up the degree of formality ((y0 case) = (y1 case)) ; in case "case" was not defined on the x-side ((y0 pos) = (y1 pos)) ; <--- (y1 = y0) ) {NP,2} NP::NP : [N] -> [N] ( (X1::Y1) (x0 = x1) (y0 = x0) ; transfers agr pers,agr num, agr gen and semtype ; (consider doing it individually) (y1 = y0) ; passes the constraints down to the daughter ; (could do that in the lexical entry directly) ) {VP,1} VP::VP : [V] -> [V] ( (X1::Y1) (x0 = x1) ((y0 tense) = (x0 tense)) ; only pass to the y-side what I need ((y0 type) = (x0 type)) ; temporarily (as default), but careful ; the srs and tgt might have different types ((y0 agr) = (y1 agr)) ; passes the agr features up from the lexicon ; to the VP ) {VP,3} VP::VP : [VP NP] -> [VP NP] ( (X1::Y1) (X2::Y2) ((x2 case) = acc) ; for the pron, it should unify, for other NP, adds it ((x0 obj) = x2) ((x0 agr) = (x1 agr)) (x0 = x1) ; (y0 = x0) ; (y2 == (y0 obj)) ((y0 tense) = (x0 tense)) ; only pass to the y-side what I need ; ((y0 type) = (x0 type)) ((y0 agr) = (y1 agr)) ((y2 pos) = (*NOT* pron)) ; <-- ) {VP,4} VP::VP : [VP NP] -> [NP VP] ; <-- ( (X1::Y2) ; <-- (X2::Y1) ; <-- ((x2 case) = acc) ((x0 obj) = x2) ((x0 agr) = (x2 agr)) (x0 = x1) ((y0 tense) = (x0 tense)) ((y0 agr) = (y2 agr)) ; <-- ((y1 pos) =c pron)) ; <--