From de301c45cdbeb30c1249e6f39e5b4c358ff43b94 Mon Sep 17 00:00:00 2001 From: odanoburu Date: Sat, 9 Feb 2019 11:50:11 -0200 Subject: [PATCH] (Por,Spa) don't invert word order in questions most of the time - don't invert in QuestIAdv either (Romance) allow for finer-grained choice of when to invert word order in questions --- src/portuguese/DiffPor.gf | 6 +++++- src/romance/DiffRomance.gf | 4 ++++ src/romance/QuestionRomance.gf | 6 +++--- src/spanish/DiffSpa.gf | 5 ++++- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/portuguese/DiffPor.gf b/src/portuguese/DiffPor.gf index 3e76fd04..fb057128 100644 --- a/src/portuguese/DiffPor.gf +++ b/src/portuguese/DiffPor.gf @@ -1,6 +1,6 @@ --# -path=.:../romance:../abstract:../common:../prelude -instance DiffPor of DiffRomance - [chooseTA,partAgr,vpAgrSubj,vpAgrClits] = open CommonRomance, PhonoPor, BeschPor, Prelude in { +instance DiffPor of DiffRomance - [iAdvQuestionInv,chooseTA,otherInv,partAgr,vpAgrSubj,vpAgrClits] = open CommonRomance, PhonoPor, BeschPor, Prelude in { flags optimize=noexpand ; coding=utf8 ; @@ -96,6 +96,10 @@ instance DiffPor of DiffRomance - [chooseTA,partAgr,vpAgrSubj,vpAgrClits] = open estarCopula = EstarCop ; ficarCopula = FicarCop ; + oper + iAdvQuestionInv : Direct = DDir ; + otherInv : Direct = DDir ; + oper -- the other Cases are defined in ResRomance dative : Case = CPrep P_a ; diff --git a/src/romance/DiffRomance.gf b/src/romance/DiffRomance.gf index 83be3312..29c69338 100644 --- a/src/romance/DiffRomance.gf +++ b/src/romance/DiffRomance.gf @@ -63,6 +63,10 @@ interface DiffRomance = open CommonRomance, Prelude in { oper iAdvQuestionInv : Direct = DInv ; -- except Fre + oper iCompQuestionInv : Direct = DInv ; -- for Cat,Por,Spa where otherInv will be DDir + + oper otherInv : Direct = DInv ; -- except Cat, Por, Spa + --2 Constants that must derivatively depend on language param NPForm = Ton Case | Aton Case | Poss {g : Gender ; n : Number} ; --- AAgr diff --git a/src/romance/QuestionRomance.gf b/src/romance/QuestionRomance.gf index 9cf5e2c0..d460d491 100644 --- a/src/romance/QuestionRomance.gf +++ b/src/romance/QuestionRomance.gf @@ -29,7 +29,7 @@ incomplete concrete QuestionRomance of Question = \d -> slash.s ! ip.a ! d ! t ! a ! p ! Indic ; who = slash.c2.s ++ ip.s ! slash.c2.c in table { - QDir => who ++ cls DInv ; + QDir => who ++ cls otherInv ; QIndir => who ++ cls DDir } } ; @@ -39,7 +39,7 @@ incomplete concrete QuestionRomance of Question = let ord = case q of { QDir => iAdvQuestionInv ; - QIndir => iAdvQuestionInv + QIndir => iAdvQuestionInv } ; cls = cl.s ! ord ! t ! a ! p ! Indic ; why = iadv.s @@ -51,7 +51,7 @@ incomplete concrete QuestionRomance of Question = let vp = predV (selectCopula icomp.cop) ; cls = (mkClause (np.s ! Nom).comp np.hasClit np.isPol np.a vp).s ! - DInv ! t ! a ! p ! Indic ; + iCompQuestionInv ! t ! a ! p ! Indic ; why = icomp.s ! complAgr np.a ; in why ++ cls } ; diff --git a/src/spanish/DiffSpa.gf b/src/spanish/DiffSpa.gf index 60232329..f9571baf 100644 --- a/src/spanish/DiffSpa.gf +++ b/src/spanish/DiffSpa.gf @@ -1,6 +1,6 @@ --# -path=.:../romance:../abstract:../common:prelude -instance DiffSpa of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits,contractInf] = open CommonRomance, PhonoSpa, BeschSpa, Prelude in { +instance DiffSpa of DiffRomance - [iAdvQuestionInv,otherInv,partAgr,vpAgrSubj,vpAgrClits,contractInf] = open CommonRomance, PhonoSpa, BeschSpa, Prelude in { flags optimize=noexpand ; coding=utf8 ; @@ -139,6 +139,9 @@ instance DiffSpa of DiffRomance - [partAgr,vpAgrSubj,vpAgrClits,contractInf] = o serCopula = False ; estarCopula = True ; + iAdvQuestionInv : Direct = DDir ; + otherInv : Direct = DDir ; + negation : RPolarity => (Str * Str) = table { RPos => <[],[]> ; RNeg _ => <"no",[]>