forked from GitHub/gf-rgl
(Hun) Rename some parameters + add show funs for param names
This commit is contained in:
@@ -18,7 +18,7 @@ concrete NounHun of Noun = CatHun ** open
|
||||
} ++ case <p,det.dt> of {
|
||||
<_, DetPoss _>
|
||||
=> possessed ;
|
||||
<NotPossessed, _>
|
||||
<NoPoss, _>
|
||||
=> standalone ;
|
||||
<Poss per rnum, _>
|
||||
=> let pron : Pronoun = pronTable ! <per,rnum> ; -- Possessor's number
|
||||
@@ -228,7 +228,7 @@ concrete NounHun of Noun = CatHun ** open
|
||||
|
||||
-- : CN -> NP -> CN ; -- city Paris (, numbers x and y)
|
||||
ApposCN cn np = cn ** {
|
||||
compl = \\n,c => cn.compl ! n ! c ++ np.s ! NotPossessed ! Nom
|
||||
compl = \\n,c => cn.compl ! n ! c ++ np.s ! NoPoss ! Nom
|
||||
} ;
|
||||
|
||||
--2 Possessive and partitive constructs
|
||||
|
||||
@@ -146,7 +146,7 @@ oper
|
||||
x + #v => x ;
|
||||
x + #v + ("sz"|"z"|"s"|"zs"|"j"|"ly"|"l"|"r"|"n"|"ny"|"ssz"
|
||||
|"zz"|"ss"|"ll"|"rr"|"nn"|"ns"|"nsz"|"nz") => tolla ;
|
||||
_ => tolla + "j" }
|
||||
_ => tolla + "j" }
|
||||
} ;
|
||||
in nTolla ** {
|
||||
s = \\nc => case nc of {
|
||||
|
||||
@@ -101,7 +101,7 @@ param
|
||||
|
||||
SubjCase = SCNom | SCDat ; -- Limited set of subject cases
|
||||
|
||||
Possessor = NotPossessed | Poss Person Number ;
|
||||
Possessor = NoPoss | Poss Person Number ;
|
||||
|
||||
oper
|
||||
|
||||
@@ -129,6 +129,45 @@ oper
|
||||
SCDat => Dat
|
||||
} ;
|
||||
|
||||
case2str : Case -> Str = \c -> case c of {
|
||||
Nom => "Nom" ;
|
||||
Acc => "Acc" ;
|
||||
Dat => "Dat" ;
|
||||
Ins => "Ins" ;
|
||||
Tra => "Tra" ;
|
||||
Sup => "Sup" ;
|
||||
Ine => "Ine" ;
|
||||
Ela => "Ela" ;
|
||||
All => "All" ;
|
||||
Ade => "Ade" ;
|
||||
Abl => "Abl" ;
|
||||
Sub => "Sub" ;
|
||||
Del => "Del" ;
|
||||
Ill => "Ill" ;
|
||||
Cau => "Cau" } ;
|
||||
|
||||
ncstem2str : NumCaseStem -> Str = \nc -> case nc of {
|
||||
SgNom => "SgNom" ;
|
||||
SgAccStem => "SgAccStem" ;
|
||||
SgSup => "SgSup" ;
|
||||
PlAcc => "PlAcc" ;
|
||||
SgInsStem => "SgInsStem" ;
|
||||
SgStem => "SgStem" ;
|
||||
PlStem => "PlStem" ;
|
||||
PossdSg_PossrP3 => "PossdSg_PossrP3" ;
|
||||
PossdSg_PossrPl1 => "PossdSg_PossrPl1" ;
|
||||
PossdPl => "PossdPl"
|
||||
} ;
|
||||
|
||||
possessor2str : Possessor -> Str = \p -> case p of {
|
||||
NoPoss => "NoPoss" ;
|
||||
Poss P1 Sg => "Poss P1 Sg" ;
|
||||
Poss P2 Sg => "Poss P2 Sg" ;
|
||||
Poss P3 Sg => "Poss P3 Sg" ;
|
||||
Poss P1 Pl => "Poss P1 Pl" ;
|
||||
Poss P2 Pl => "Poss P2 Pl" ;
|
||||
Poss P3 Pl => "Poss P3 Pl"
|
||||
} ;
|
||||
--------------------------------------------------------------------------------
|
||||
-- Numerals
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ concrete PhraseHun of Phrase = CatHun ** open Prelude, ResHun in {
|
||||
UttImpPol = UttImpSg ;
|
||||
-}
|
||||
UttIP,
|
||||
UttNP = \np -> {s = np.s ! NotPossessed ! Nom} ;
|
||||
UttNP = \np -> {s = np.s ! NoPoss ! Nom} ;
|
||||
UttVP vp = {s = vp.obj ++ vp.adv ++ vp.s ! VInf} ;
|
||||
UttAdv adv = adv ;
|
||||
UttCN cn = {s = linCN cn} ;
|
||||
|
||||
@@ -271,7 +271,7 @@ oper
|
||||
emptyAdp : Adposition = nomAdp [] ;
|
||||
|
||||
applyAdp : Adposition -> NounPhrase -> Str = \adp,np ->
|
||||
adp.pr ++ np.s ! NotPossessed ! adp.c ++ adp.s ;
|
||||
adp.pr ++ np.s ! NoPoss ! adp.c ++ adp.s ;
|
||||
|
||||
applyCase : (Str->Str->Str) -> Case -> Noun -> NumCaseStem -> Str =
|
||||
\bind,cas,cn,stem -> bind (cn.s ! stem) (endCase cas ! cn.h) ;
|
||||
@@ -501,7 +501,7 @@ oper
|
||||
s = \\t,a,p => let subjcase : Case = case vp.sc of {
|
||||
SCNom => Nom ;
|
||||
SCDat => Dat }
|
||||
in np.s ! NotPossessed ! subjcase
|
||||
in np.s ! NoPoss ! subjcase
|
||||
++ if_then_Pol p [] "nem"
|
||||
++ vp.s ! agr2vf np.agr
|
||||
++ vp.obj -- ! np.agr
|
||||
|
||||
@@ -133,8 +133,8 @@ lin
|
||||
-- : NP -> Comp ;
|
||||
CompNP np = UseCopula ** {
|
||||
s = \\vf => case vf of {
|
||||
VPres P3 _ => np.s ! NotPossessed ! Nom ;
|
||||
_ => np.s ! NotPossessed ! Nom ++ copula.s ! vf } ;
|
||||
VPres P3 _ => np.s ! NoPoss ! Nom ;
|
||||
_ => np.s ! NoPoss ! Nom ++ copula.s ! vf } ;
|
||||
} ;
|
||||
|
||||
-- : Adv -> Comp ;
|
||||
@@ -149,7 +149,7 @@ oper
|
||||
insertObj : ResHun.VPSlash -> NounPhrase -> VerbPhrase = \vps,np -> vps ** {
|
||||
obj = case <vps.sc,vps.c2> of {
|
||||
<SCDat,Nom> => [] ;
|
||||
_ => np.s ! NotPossessed ! vps.c2 } ;
|
||||
_ => np.s ! NoPoss ! vps.c2 } ;
|
||||
|
||||
s = \\vf =>
|
||||
-- If verb's subject case is Dat and object Nom, verb agrees with obj.
|
||||
|
||||
Reference in New Issue
Block a user