(Hun) Rename some parameters + add show funs for param names

This commit is contained in:
Inari Listenmaa
2020-04-27 17:19:18 +02:00
parent fd6541846f
commit 5f6db51183
6 changed files with 49 additions and 10 deletions

View File

@@ -18,7 +18,7 @@ concrete NounHun of Noun = CatHun ** open
} ++ case <p,det.dt> of { } ++ case <p,det.dt> of {
<_, DetPoss _> <_, DetPoss _>
=> possessed ; => possessed ;
<NotPossessed, _> <NoPoss, _>
=> standalone ; => standalone ;
<Poss per rnum, _> <Poss per rnum, _>
=> let pron : Pronoun = pronTable ! <per,rnum> ; -- Possessor's number => 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) -- : CN -> NP -> CN ; -- city Paris (, numbers x and y)
ApposCN cn np = cn ** { 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 --2 Possessive and partitive constructs

View File

@@ -101,7 +101,7 @@ param
SubjCase = SCNom | SCDat ; -- Limited set of subject cases SubjCase = SCNom | SCDat ; -- Limited set of subject cases
Possessor = NotPossessed | Poss Person Number ; Possessor = NoPoss | Poss Person Number ;
oper oper
@@ -129,6 +129,45 @@ oper
SCDat => Dat 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 -- Numerals

View File

@@ -12,7 +12,7 @@ concrete PhraseHun of Phrase = CatHun ** open Prelude, ResHun in {
UttImpPol = UttImpSg ; UttImpPol = UttImpSg ;
-} -}
UttIP, 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} ; UttVP vp = {s = vp.obj ++ vp.adv ++ vp.s ! VInf} ;
UttAdv adv = adv ; UttAdv adv = adv ;
UttCN cn = {s = linCN cn} ; UttCN cn = {s = linCN cn} ;

View File

@@ -271,7 +271,7 @@ oper
emptyAdp : Adposition = nomAdp [] ; emptyAdp : Adposition = nomAdp [] ;
applyAdp : Adposition -> NounPhrase -> Str = \adp,np -> 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 = applyCase : (Str->Str->Str) -> Case -> Noun -> NumCaseStem -> Str =
\bind,cas,cn,stem -> bind (cn.s ! stem) (endCase cas ! cn.h) ; \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 { s = \\t,a,p => let subjcase : Case = case vp.sc of {
SCNom => Nom ; SCNom => Nom ;
SCDat => Dat } SCDat => Dat }
in np.s ! NotPossessed ! subjcase in np.s ! NoPoss ! subjcase
++ if_then_Pol p [] "nem" ++ if_then_Pol p [] "nem"
++ vp.s ! agr2vf np.agr ++ vp.s ! agr2vf np.agr
++ vp.obj -- ! np.agr ++ vp.obj -- ! np.agr

View File

@@ -133,8 +133,8 @@ lin
-- : NP -> Comp ; -- : NP -> Comp ;
CompNP np = UseCopula ** { CompNP np = UseCopula ** {
s = \\vf => case vf of { s = \\vf => case vf of {
VPres P3 _ => np.s ! NotPossessed ! Nom ; VPres P3 _ => np.s ! NoPoss ! Nom ;
_ => np.s ! NotPossessed ! Nom ++ copula.s ! vf } ; _ => np.s ! NoPoss ! Nom ++ copula.s ! vf } ;
} ; } ;
-- : Adv -> Comp ; -- : Adv -> Comp ;
@@ -149,7 +149,7 @@ oper
insertObj : ResHun.VPSlash -> NounPhrase -> VerbPhrase = \vps,np -> vps ** { insertObj : ResHun.VPSlash -> NounPhrase -> VerbPhrase = \vps,np -> vps ** {
obj = case <vps.sc,vps.c2> of { obj = case <vps.sc,vps.c2> of {
<SCDat,Nom> => [] ; <SCDat,Nom> => [] ;
_ => np.s ! NotPossessed ! vps.c2 } ; _ => np.s ! NoPoss ! vps.c2 } ;
s = \\vf => s = \\vf =>
-- If verb's subject case is Dat and object Nom, verb agrees with obj. -- If verb's subject case is Dat and object Nom, verb agrees with obj.