(Hun) Add postmod field to CN and NP, to better control word order.

This commit is contained in:
Inari Listenmaa
2020-06-21 21:06:06 +02:00
parent 270067291a
commit 49fbbffacc
6 changed files with 31 additions and 13 deletions

View File

@@ -128,13 +128,14 @@ lin
_ => cn.s ! SgNom
++ cn.compl ! Sg ! Nom
++ copula.s ! vf} ;
adv = cn.postmod ;
} ;
-- : NP -> Comp ;
CompNP np = UseCopula ** {
s = \\vf => case vf of {
VPres P3 _ => np.s ! NoPoss ! Nom ;
_ => np.s ! NoPoss ! Nom ++ copula.s ! vf } ;
VPres P3 _ => linNP np ;
_ => linNP np ++ copula.s ! vf } ;
} ;
-- : Adv -> Comp ;
@@ -151,6 +152,12 @@ insertObj : ResHun.VPSlash -> NounPhrase -> VerbPhrase = \vps,np -> vps ** {
<SCDat,Nom> => [] ;
_ => np.s ! NoPoss ! vps.c2 } ;
-- To accommodate application grammars that use AdvCN in place of AdvVP.
-- (Easy mistake to make, because in English it doesn't affect word order.)
-- If you want the NP's postmodifiers to go right next to the NP,
-- put np.postmod right after np.s.
adv = vps.adv ++ np.postmod ;
s = \\vf =>
-- If verb's subject case is Dat and object Nom, verb agrees with obj.
case <vps.sc,vps.c2> of { -- have_V2 needs its object possessed by the subject