forked from GitHub/gf-rgl
(Est) Use genitive stem+suffix for 4 other cases
This commit is contained in:
@@ -11,7 +11,7 @@ concrete AdverbEst of Adverb = CatEst ** open ResEst, Prelude in {
|
|||||||
s = cadv.s ++ a.s ! Posit ! AAdv ++ cadv.p ++ s.s
|
s = cadv.s ++ a.s ! Posit ! AAdv ++ cadv.p ++ s.s
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PrepNP prep np = {s = preOrPost prep.isPre prep.s (np.s ! prep.c)} ;
|
PrepNP prep np = {s = appCompl True Pos prep np} ;
|
||||||
|
|
||||||
AdAdv = cc2 ;
|
AdAdv = cc2 ;
|
||||||
|
|
||||||
|
|||||||
@@ -23,11 +23,17 @@ lincat
|
|||||||
oper
|
oper
|
||||||
heading : N -> Str = \n -> (nounHeading n).s ;
|
heading : N -> Str = \n -> (nounHeading n).s ;
|
||||||
|
|
||||||
|
caseplus2nf : N -> ResEst.Number -> CasePlus -> Str = \noun,num,cas ->
|
||||||
|
noun.s ! NCase num cas.c ++ cas.suf ;
|
||||||
|
|
||||||
|
caseplus2af : (AForm => Str) -> ResEst.Number -> CasePlus -> Str = \adj,num,cas ->
|
||||||
|
adj ! AN (NCase num cas.c) ++ cas.suf ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
InflectionN, InflectionN2, InflectionN3 = \noun -> {
|
InflectionN, InflectionN2, InflectionN3 = \noun -> {
|
||||||
t = "s" ;
|
t = "s" ;
|
||||||
s1 = heading1 (heading noun_Category) ;
|
s1 = heading1 (heading noun_Category) ;
|
||||||
s2 = inflNoun (\nf -> noun.s ! nf)
|
s2 = inflNoun (caseplus2nf noun)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
InflectionA, InflectionA2 = \adj ->
|
InflectionA, InflectionA2 = \adj ->
|
||||||
@@ -37,11 +43,11 @@ lin
|
|||||||
in
|
in
|
||||||
{ t = "a" ;
|
{ t = "a" ;
|
||||||
s1 = heading1 (heading adjective_Category) ;
|
s1 = heading1 (heading adjective_Category) ;
|
||||||
s2 = inflNoun (\nf -> posit ! AN nf) ++
|
s2 = inflNoun (caseplus2af posit) ++
|
||||||
heading2 (heading comparative_Parameter) ++
|
heading2 (heading comparative_Parameter) ++
|
||||||
inflNoun (\nf -> compar ! AN nf) ++
|
inflNoun (caseplus2af compar) ++
|
||||||
heading2 (heading superlative_Parameter) ++
|
heading2 (heading superlative_Parameter) ++
|
||||||
inflNoun (\nf -> superl ! AN nf)
|
inflNoun (caseplus2af superl)
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
InflectionAdv, InflectionAdV, InflectionAdA, InflectionAdN = \adv -> {
|
||||||
@@ -248,24 +254,24 @@ oper
|
|||||||
td (vfin (PastPart Pass )))
|
td (vfin (PastPart Pass )))
|
||||||
) ; --}
|
) ; --}
|
||||||
|
|
||||||
inflNoun : (NForm -> Str) -> Str = \nouns ->
|
inflNoun : (Number -> CasePlus -> Str) -> Str = \nouns ->
|
||||||
frameTable (
|
frameTable (
|
||||||
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++
|
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter)) ++
|
||||||
tr (th (heading nominative_Parameter) ++ td (nouns (NCase Sg Nom)) ++ td (nouns (NCase Pl Nom))) ++
|
tr (th (heading nominative_Parameter) ++ td (nouns Sg Nominative) ++ td (nouns Pl Nominative)) ++
|
||||||
tr (th (heading genitive_Parameter) ++ td (nouns (NCase Sg Gen)) ++ td (nouns (NCase Pl Gen))) ++
|
tr (th (heading genitive_Parameter) ++ td (nouns Sg Genitive) ++ td (nouns Pl Genitive)) ++
|
||||||
tr (th (heading partitive_Parameter) ++ td (nouns (NCase Sg Part)) ++ td (nouns (NCase Pl Part))) ++
|
tr (th (heading partitive_Parameter) ++ td (nouns Sg Partitive) ++ td (nouns Pl Partitive)) ++
|
||||||
tr (th (heading translative_Parameter) ++ td (nouns (NCase Sg Transl)) ++ td (nouns (NCase Pl Transl))) ++
|
tr (th (heading translative_Parameter) ++ td (nouns Sg Translative) ++ td (nouns Pl Translative)) ++
|
||||||
tr (th (heading essive_Parameter) ++ td (nouns (NCase Sg Ess)) ++ td (nouns (NCase Pl Ess))) ++
|
tr (th (heading essive_Parameter) ++ td (nouns Sg Essive) ++ td (nouns Pl Essive)) ++
|
||||||
tr (th (heading inessive_Parameter) ++ td (nouns (NCase Sg Iness)) ++ td (nouns (NCase Pl Iness))) ++
|
tr (th (heading inessive_Parameter) ++ td (nouns Sg Inessive) ++ td (nouns Pl Inessive)) ++
|
||||||
tr (th (heading elative_Parameter) ++ td (nouns (NCase Sg Elat)) ++ td (nouns (NCase Pl Elat))) ++
|
tr (th (heading elative_Parameter) ++ td (nouns Sg Elative) ++ td (nouns Pl Elative)) ++
|
||||||
tr (th (heading illative_Parameter) ++ td (nouns (NCase Sg Illat)) ++ td (nouns (NCase Pl Illat))) ++
|
tr (th (heading illative_Parameter) ++ td (nouns Sg Illative) ++ td (nouns Pl Illative)) ++
|
||||||
tr (th (heading adessive_Parameter) ++ td (nouns (NCase Sg Adess)) ++ td (nouns (NCase Pl Adess))) ++
|
tr (th (heading adessive_Parameter) ++ td (nouns Sg Adessive) ++ td (nouns Pl Adessive)) ++
|
||||||
tr (th (heading ablative_Parameter) ++ td (nouns (NCase Sg Ablat)) ++ td (nouns (NCase Pl Ablat))) ++
|
tr (th (heading ablative_Parameter) ++ td (nouns Sg Ablative) ++ td (nouns Pl Ablative)) ++
|
||||||
tr (th (heading allative_Parameter) ++ td (nouns (NCase Sg Allat)) ++ td (nouns (NCase Pl Allat))) ++
|
tr (th (heading allative_Parameter) ++ td (nouns Sg Allative) ++ td (nouns Pl Allative)) ++
|
||||||
tr (th (heading abessive_Parameter) ++ td (nouns (NCase Sg Abess)) ++ td (nouns (NCase Pl Abess))) ++
|
tr (th (heading abessive_Parameter) ++ td (nouns Sg Abessive) ++ td (nouns Pl Abessive)) ++
|
||||||
tr (th (heading comitative_Parameter) ++ td (nouns (NCase Sg Comit)) ++ td (nouns (NCase Pl Comit))) ++
|
tr (th (heading comitative_Parameter) ++ td (nouns Sg Comitative) ++ td (nouns Pl Comitative)) ++
|
||||||
tr (th (heading instructive_Parameter) ++ td (nouns (NCase Sg Termin)) ++ td (nouns (NCase Pl Termin))
|
tr (th (heading instructive_Parameter) ++ td (nouns Sg Terminative) ++ td (nouns Pl Terminative))
|
||||||
)) ;
|
) ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
NoDefinition t = {s=t.s};
|
NoDefinition t = {s=t.s};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
concrete ExtraEst of ExtraEstAbs = CatEst **
|
concrete ExtraEst of ExtraEstAbs = CatEst **
|
||||||
open ResEst, MorphoEst, Coordination, Prelude, NounEst, StructuralEst, (R = ParamX) in {
|
open ResEst, MorphoEst, Coordination, Prelude, NounEst, StructuralEst, (R = ParamX), (P = ParadigmsEst) in {
|
||||||
flags coding=utf8;
|
flags coding=utf8;
|
||||||
lin
|
lin
|
||||||
GenNP np = {
|
GenNP np = {
|
||||||
@@ -9,11 +9,11 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
|
|||||||
isNeg = False
|
isNeg = False
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
GenCN = caseCN Gen ; -- soome mees
|
GenCN = caseCN Genitive ; -- soome mees
|
||||||
ComitCN = caseCN Comit ; -- puudega mets
|
ComitCN = caseCN Comitative ; -- puudega mets
|
||||||
ElatCN = caseCN Elat ; -- puust laud
|
ElatCN = caseCN Elative ; -- puust laud
|
||||||
AbessCN = caseCN Abess ; -- autota pere
|
AbessCN = caseCN Abessive ; -- autota pere
|
||||||
TerminCN = caseCN Termin ; -- maani kleit
|
TerminCN = caseCN Terminative ; -- maani kleit
|
||||||
|
|
||||||
GenIP ip = {s = \\_,_ => ip.s ! NPCase Gen} ;
|
GenIP ip = {s = \\_,_ => ip.s ! NPCase Gen} ;
|
||||||
|
|
||||||
@@ -23,8 +23,9 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
|
|||||||
--- a = RAg (agrP3 num.n)
|
--- a = RAg (agrP3 num.n)
|
||||||
} ;
|
} ;
|
||||||
oper
|
oper
|
||||||
caseCN : Case -> NP -> CN -> CN = \c,np,cn ->
|
caseCN : CasePlus -> NP -> CN -> CN = \c,np,cn -> cn ** {
|
||||||
lin CN { s = \\nf => np.s ! NPCase c ++ cn.s ! nf } ;
|
s = \\nf => appCompl True Pos (P.casePrep c) np ++ cn.s ! nf
|
||||||
|
} ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
VPI = {s : InfStem => Str} ;
|
VPI = {s : InfStem => Str} ;
|
||||||
|
|||||||
@@ -520,16 +520,12 @@ caseTable : Number -> Noun -> Case => Str = \n,cn ->
|
|||||||
NPCase Gen => minu ;
|
NPCase Gen => minu ;
|
||||||
NPCase Part => mind ;
|
NPCase Part => mind ;
|
||||||
NPCase Transl => minu + "ks" ;
|
NPCase Transl => minu + "ks" ;
|
||||||
NPCase Ess => minu + "na" ;
|
|
||||||
NPCase Iness => minu_short + "s" ;
|
NPCase Iness => minu_short + "s" ;
|
||||||
NPCase Elat => minu_short + "st" ;
|
NPCase Elat => minu_short + "st" ;
|
||||||
NPCase Illat => minu_short + "sse" ;
|
NPCase Illat => minu_short + "sse" ;
|
||||||
NPCase Adess => minu_short + "l" ;
|
NPCase Adess => minu_short + "l" ;
|
||||||
NPCase Ablat => minu_short + "lt" ;
|
NPCase Ablat => minu_short + "lt" ;
|
||||||
NPCase Allat => minu_short + "le" ;
|
NPCase Allat => minu_short + "le" ;
|
||||||
NPCase Abess => minu + "ta" ;
|
|
||||||
NPCase Comit => minu + "ga" ;
|
|
||||||
NPCase Termin => minu + "ni" ;
|
|
||||||
NPAcc => mind
|
NPAcc => mind
|
||||||
} ;
|
} ;
|
||||||
a = Ag n p
|
a = Ag n p
|
||||||
@@ -584,16 +580,12 @@ oper
|
|||||||
Gen => "selle" ;
|
Gen => "selle" ;
|
||||||
Part => "seda" ;
|
Part => "seda" ;
|
||||||
Transl => "selleks" ;
|
Transl => "selleks" ;
|
||||||
Ess => "sellena" ;
|
|
||||||
Iness => "selles" ;
|
Iness => "selles" ;
|
||||||
Elat => "sellest" ;
|
Elat => "sellest" ;
|
||||||
Illat => "sellesse" ;
|
Illat => "sellesse" ;
|
||||||
Adess => "sellel" ;
|
Adess => "sellel" ;
|
||||||
Ablat => "sellelt" ;
|
Ablat => "sellelt" ;
|
||||||
Allat => "sellele" ;
|
Allat => "sellele"
|
||||||
Abess => "selleta" ;
|
|
||||||
Comit => "sellega" ;
|
|
||||||
Termin => "selleni"
|
|
||||||
} ;
|
} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -604,16 +596,12 @@ oper
|
|||||||
Gen => "nende" ;
|
Gen => "nende" ;
|
||||||
Part => "neid" ;
|
Part => "neid" ;
|
||||||
Transl => "nendeks" ;
|
Transl => "nendeks" ;
|
||||||
Ess => "nendena" ;
|
|
||||||
Iness => "nendes" ;
|
Iness => "nendes" ;
|
||||||
Elat => "nendest" ;
|
Elat => "nendest" ;
|
||||||
Illat => "nendesse" ;
|
Illat => "nendesse" ;
|
||||||
Adess => "nendel" ;
|
Adess => "nendel" ;
|
||||||
Ablat => "nendelt" ;
|
Ablat => "nendelt" ;
|
||||||
Allat => "nendele" ;
|
Allat => "nendele"
|
||||||
Abess => "nendeta" ;
|
|
||||||
Comit => "nendega" ;
|
|
||||||
Termin => "nendeni"
|
|
||||||
} ;
|
} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -19,13 +19,6 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
|||||||
case <n, c, det.isNum, det.isDef> of {
|
case <n, c, det.isNum, det.isDef> of {
|
||||||
<_, NPAcc, True,_> => <Nom,NCase Sg Part> ; -- kolm kassi (as object)
|
<_, NPAcc, True,_> => <Nom,NCase Sg Part> ; -- kolm kassi (as object)
|
||||||
<_, NPCase Nom, True,_> => <Nom,NCase Sg Part> ; -- kolm kassi (as subject)
|
<_, NPCase Nom, True,_> => <Nom,NCase Sg Part> ; -- kolm kassi (as subject)
|
||||||
|
|
||||||
--Only the last word gets case ending.
|
|
||||||
<_, NPCase Comit, _, _> => <Gen,NCase n Comit> ; -- kolme kassiga
|
|
||||||
<_, NPCase Abess, _, _> => <Gen,NCase n Abess> ; -- kolme kassita
|
|
||||||
<_, NPCase Ess, _, _> => <Gen,NCase n Ess> ; -- kolme kassina
|
|
||||||
<_, NPCase Termin,_, _> => <Gen,NCase n Termin> ; -- kolme kassini
|
|
||||||
|
|
||||||
<_, _, True,_> => <k, NCase Sg k> ; -- kolmeks kassiks (all other cases)
|
<_, _, True,_> => <k, NCase Sg k> ; -- kolmeks kassiks (all other cases)
|
||||||
_ => <k, NCase n k> -- kass, kassi, ... (det is not a number)
|
_ => <k, NCase n k> -- kass, kassi, ... (det is not a number)
|
||||||
}
|
}
|
||||||
@@ -212,10 +205,7 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
|
|||||||
s = \\nf =>
|
s = \\nf =>
|
||||||
case ap.infl of {
|
case ap.infl of {
|
||||||
Invariable|Participle => ap.s ! True ! NCase Sg Nom ++ cn.s ! nf ; --valmis kassile; väsinud kassile
|
Invariable|Participle => ap.s ! True ! NCase Sg Nom ++ cn.s ! nf ; --valmis kassile; väsinud kassile
|
||||||
Regular => case nf of {
|
Regular => ap.s ! True ! nf ++ cn.s ! nf -- Ess,Abess,Comit,Termin will only get case ending after the CN, so suure kassiga, not *suurega kassiga
|
||||||
NCase num (Ess|Abess|Comit|Termin) => ap.s ! True ! NCase num Gen ++ cn.s ! nf ; --suure kassiga, not *suurega kassiga
|
|
||||||
_ => ap.s ! True ! nf ++ cn.s ! nf
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -276,50 +276,67 @@ oper
|
|||||||
-- The definitions should not bother the user of the API. So they are
|
-- The definitions should not bother the user of the API. So they are
|
||||||
-- hidden from the document.
|
-- hidden from the document.
|
||||||
|
|
||||||
Case = MorphoEst.Case ;
|
Case = MorphoEst.CasePlus ;
|
||||||
Number = MorphoEst.Number ;
|
Number = MorphoEst.Number ;
|
||||||
|
|
||||||
singular = Sg ;
|
singular = Sg ;
|
||||||
plural = Pl ;
|
plural = Pl ;
|
||||||
|
|
||||||
nominative = Nom ;
|
nominative = Nominative ;
|
||||||
genitive = Gen ;
|
genitive = Genitive ;
|
||||||
partitive = Part ;
|
partitive = Partitive ;
|
||||||
illative = Illat ;
|
illative = Illative ;
|
||||||
inessive = Iness ;
|
inessive = Inessive ;
|
||||||
elative = Elat ;
|
elative = Elative ;
|
||||||
allative = Allat ;
|
allative = Allative ;
|
||||||
adessive = Adess ;
|
adessive = Adessive ;
|
||||||
ablative = Ablat ;
|
ablative = Ablative ;
|
||||||
translative = Transl ;
|
translative = Translative ;
|
||||||
terminative = Termin ;
|
terminative = Terminative ;
|
||||||
essive = Ess ;
|
essive = Essive ;
|
||||||
abessive = Abess ;
|
abessive = Abessive ;
|
||||||
comitative = Comit ;
|
comitative = Comitative ;
|
||||||
|
|
||||||
|
-- IL 2022-04: after introducing stem+suffixes, 4 other cases have just genitive stems.
|
||||||
|
-- isActuallyGenitive is needed for those mkN2 and mkN3 instances that take a Prep as an argument,
|
||||||
|
-- and actual Gen gets isPre=True, and those with genitive stem+suffix should get False.
|
||||||
|
-- This is confusing and error-prone, consider restructuring/renaming things later.
|
||||||
|
isActuallyGenitive : MorphoEst.CasePlus -> Bool = \c -> case c of {
|
||||||
|
{c = MorphoEst.Gen ; suf = ""} => True ;
|
||||||
|
_ => False
|
||||||
|
} ;
|
||||||
|
|
||||||
-- combination of stem + suffix, e.g. infDes = {stem = InfD ; suf = "es"} ;
|
-- combination of stem + suffix, e.g. infDes = {stem = InfD ; suf = "es"} ;
|
||||||
InfForm = ResEst.InfForms ;
|
InfForm = ResEst.InfForms ;
|
||||||
infDa = InfDa ; infMa = InfMa ; infMast = InfMast ;
|
infDa = InfDa ; infMa = InfMa ; infMast = InfMast ;
|
||||||
infDes = InfDes ; infMas = InfMas ; infMaks = InfMaks ; infMata = InfMata ; infMine = InfMine ;
|
infDes = InfDes ; infMas = InfMas ; infMaks = InfMaks ; infMata = InfMata ; infMine = InfMine ;
|
||||||
|
|
||||||
prePrep : Case -> Str -> Prep =
|
mkPrep : (isPre : Bool) -> Case -> Str -> Prep = \isPre,c,p -> lin Prep {
|
||||||
\c,p -> {c = NPCase c ; s = p ; isPre = True ; lock_Prep = <>} ;
|
c = casep2npformp c ;
|
||||||
postPrep : Case -> Str -> Prep =
|
s = p ;
|
||||||
\c,p -> {c = NPCase c ; s = p ; isPre = False ; lock_Prep = <>} ;
|
isPre = isPre
|
||||||
postGenPrep p = {
|
} ;
|
||||||
c = NPCase genitive ; s = p ; isPre = False ; lock_Prep = <>} ;
|
prePrep : Case -> Str -> Prep = mkPrep True ;
|
||||||
casePrep : Case -> Prep =
|
postPrep : Case -> Str -> Prep = mkPrep False ;
|
||||||
\c -> {c = NPCase c ; s = [] ; isPre = True ; lock_Prep = <>} ;
|
postGenPrep : Str -> Prep = postPrep genitive ;
|
||||||
accPrep = {c = NPAcc ; s = [] ; isPre = True ; lock_Prep = <>} ;
|
|
||||||
|
|
||||||
|
-- The Prep's isPre field is used in a special (hacky) way in mkN3 and mkN2.
|
||||||
|
-- Used to be able to match whether the Prep's case is Gen, but now several
|
||||||
|
-- Preps use the genitive stem, so we need to check if it's actually genitive.
|
||||||
|
casePrep : Case -> Prep = \c -> mkPrep (isActuallyGenitive c) c [] ;
|
||||||
|
|
||||||
|
-- NPAcc is different, it's not formed from a Case(Plus)
|
||||||
|
accPrep : Prep = lin Prep {
|
||||||
|
c = case2npformp NPAcc ;
|
||||||
|
s = [] ;
|
||||||
|
isPre = True
|
||||||
|
} ;
|
||||||
|
|
||||||
mkAdv : Str -> Adv = \str -> {s = str ; lock_Adv = <>} ;
|
mkAdv : Str -> Adv = \str -> {s = str ; lock_Adv = <>} ;
|
||||||
mkAdV : Str -> AdV = \str -> {s = str ; lock_AdV = <>} ;
|
mkAdV : Str -> AdV = \str -> {s = str ; lock_AdV = <>} ;
|
||||||
mkAdN : Str -> AdN = \str -> {s = str ; lock_AdN = <>} ;
|
mkAdN : Str -> AdN = \str -> {s = str ; lock_AdN = <>} ;
|
||||||
mkAdA : Str -> AdA = \str -> {s = str ; lock_AdA = <>} ;
|
mkAdA : Str -> AdA = \str -> {s = str ; lock_AdA = <>} ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mkConj = overload {
|
mkConj = overload {
|
||||||
mkConj : Str -> Conj = \ja -> lin Conj ((sd2 "" ja) ** {n = Sg}) ;
|
mkConj : Str -> Conj = \ja -> lin Conj ((sd2 "" ja) ** {n = Sg}) ;
|
||||||
mkConj : Str -> Number -> Conj = \ja,num -> lin Conj ((sd2 "" ja) ** {n = num}) ;
|
mkConj : Str -> Number -> Conj = \ja,num -> lin Conj ((sd2 "" ja) ** {n = num}) ;
|
||||||
@@ -565,7 +582,7 @@ oper
|
|||||||
lock_N3 = <>
|
lock_N3 = <>
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mkIsPre : Prep -> Bool = \p -> case p.c of {
|
mkIsPre : Prep -> Bool = \p -> case p.c.npf of {
|
||||||
NPCase Gen => notB p.isPre ; -- Jussin veli (prep is <Gen,"",True>, isPre becomes False)
|
NPCase Gen => notB p.isPre ; -- Jussin veli (prep is <Gen,"",True>, isPre becomes False)
|
||||||
_ => True -- syyte Jussia vastaan, puhe Jussin puolesta
|
_ => True -- syyte Jussia vastaan, puhe Jussin puolesta
|
||||||
} ;
|
} ;
|
||||||
@@ -821,7 +838,7 @@ oper
|
|||||||
<_,_,_,_> => regVForms jatma jatta jatab jaetakse
|
<_,_,_,_> => regVForms jatma jatta jatab jaetakse
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
caseV c v = {s = v.s ; p = v.p; sc = NPCase c ; lock_V = <>} ;
|
caseV c v = v ** {sc = NPCase c.c} ;
|
||||||
|
|
||||||
vOlema = verbOlema ** {sc = NPCase Nom ; lock_V = <>} ;
|
vOlema = verbOlema ** {sc = NPCase Nom ; lock_V = <>} ;
|
||||||
vMinema = verbMinema ** {sc = NPCase Nom ; lock_V = <>} ;
|
vMinema = verbMinema ** {sc = NPCase Nom ; lock_V = <>} ;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ concrete RelativeEst of Relative = CatEst ** open Prelude, ResEst, MorphoEst in
|
|||||||
who = appCompl True p slash.c2 (rp2np (complNumAgr ag) rp)
|
who = appCompl True p slash.c2 (rp2np (complNumAgr ag) rp)
|
||||||
in
|
in
|
||||||
who ++ cls ;
|
who ++ cls ;
|
||||||
c = slash.c2.c
|
c = slash.c2.c.npf
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
FunRP p np rp = {
|
FunRP p np rp = {
|
||||||
|
|||||||
@@ -15,16 +15,35 @@ resource ResEst = ParamX ** open Prelude in {
|
|||||||
-- This is the $Case$ as needed for both nouns and $NP$s.
|
-- This is the $Case$ as needed for both nouns and $NP$s.
|
||||||
|
|
||||||
param
|
param
|
||||||
Case = Nom | Gen | Part
|
Case = Nom | Gen | Part | Transl
|
||||||
| Illat | Iness | Elat | Allat | Adess | Ablat
|
| Illat | Iness | Elat | Allat | Adess | Ablat
|
||||||
| Transl | Ess | Termin | Abess | Comit;
|
;
|
||||||
|
|
||||||
NForm = NCase Number Case ;
|
NForm = NCase Number Case ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
-- Reduce the Case parameter: many cases use the Genitive stem and just add suffix to it
|
||||||
|
CasePlus : Type = {
|
||||||
|
c : Case ; -- e.g. Gen
|
||||||
|
suf : Str -- e.g. "ga" for comitative
|
||||||
|
} ;
|
||||||
|
|
||||||
|
Nominative = {c = Nom ; suf = []} ;
|
||||||
|
Genitive = {c = Gen ; suf = []} ;
|
||||||
|
Partitive = {c = Part ; suf = []} ;
|
||||||
|
Illative = {c = Illat ; suf = []} ;
|
||||||
|
Inessive = {c = Iness ; suf = []} ;
|
||||||
|
Elative = {c = Elat ; suf = []} ;
|
||||||
|
Allative = {c = Allat ; suf = []} ;
|
||||||
|
Adessive = {c = Adess ; suf = []} ;
|
||||||
|
Ablative = {c = Ablat ; suf = []} ;
|
||||||
|
Translative = {c = Transl ; suf = []} ;
|
||||||
|
Terminative = {c = Gen ; suf = BIND ++ "ni"} ;
|
||||||
|
Essive = {c = Gen ; suf = BIND ++ "na"} ;
|
||||||
|
Abessive = {c = Gen ; suf = BIND ++ "ta"} ;
|
||||||
|
Comitative = {c = Gen ; suf = BIND ++ "ga"} ;
|
||||||
|
|
||||||
|
param
|
||||||
-- Agreement of $NP$ has number*person and the polite second ("te olette valmis").
|
-- Agreement of $NP$ has number*person and the polite second ("te olette valmis").
|
||||||
|
|
||||||
|
|
||||||
Agr = Ag Number Person | AgPol ;
|
Agr = Ag Number Person | AgPol ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
@@ -66,6 +85,14 @@ param
|
|||||||
NPForm = NPCase Case | NPAcc ;
|
NPForm = NPCase Case | NPAcc ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
|
NPFormPlus : Type = {
|
||||||
|
npf : NPForm ; -- e.g. NPCase Gen
|
||||||
|
suf : Str -- e.g. "ga" for comitative
|
||||||
|
} ;
|
||||||
|
|
||||||
|
casep2npformp : CasePlus -> NPFormPlus = \cp -> cp ** {npf = NPCase cp.c} ;
|
||||||
|
case2npformp : NPForm -> NPFormPlus = \npf-> {npf = npf ; suf = []} ;
|
||||||
|
|
||||||
npform2case : Number -> NPForm -> Case = \n,f ->
|
npform2case : Number -> NPForm -> Case = \n,f ->
|
||||||
|
|
||||||
-- type signature: workaround for gfc bug 9/11/2007
|
-- type signature: workaround for gfc bug 9/11/2007
|
||||||
@@ -150,11 +177,11 @@ param
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Compl : Type = {s : Str ; c : NPForm ; isPre : Bool} ;
|
Compl : Type = {s : Str ; c : NPFormPlus ; isPre : Bool} ;
|
||||||
|
|
||||||
appCompl : Bool -> Polarity -> Compl -> NP -> Str = \isFin,b,co,np ->
|
appCompl : Bool -> Polarity -> Compl -> NP -> Str = \isFin,b,co,np ->
|
||||||
let
|
let
|
||||||
c = case co.c of {
|
c = case co.c.npf of {
|
||||||
NPAcc => case b of {
|
NPAcc => case b of {
|
||||||
Neg => NPCase Part ; -- ma ei näe raamatut/sind
|
Neg => NPCase Part ; -- ma ei näe raamatut/sind
|
||||||
Pos => case isFin of {
|
Pos => case isFin of {
|
||||||
@@ -165,25 +192,17 @@ param
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
_ => co.c
|
_ => co.c.npf
|
||||||
} ;
|
} ;
|
||||||
{-
|
nps = np.s ! c ++ co.c.suf ; -- complement's NPFormPlus may include suffix for the cases based on Gen stem, e.g. comitative "ga"
|
||||||
c = case <isFin, b, co.c, np.isPron> of {
|
|
||||||
<_, Neg, NPAcc,_> => NPCase Part ; -- en näe taloa/sinua
|
|
||||||
<_, Pos, NPAcc,True> => NPAcc ; -- näen/täytyy sinut
|
|
||||||
<False,Pos, NPAcc,False> => NPCase Nom ; -- täytyy nähdä talo
|
|
||||||
<_,_,coc,_> => coc
|
|
||||||
} ;
|
|
||||||
-}
|
|
||||||
nps = np.s ! c
|
|
||||||
in
|
in
|
||||||
preOrPost co.isPre co.s nps ;
|
preOrPost co.isPre co.s nps ;
|
||||||
|
|
||||||
-- Used for passive; c2 of V2/VPSlash becomes sc of VP
|
-- Used for passive; c2 of V2/VPSlash becomes sc of VP
|
||||||
compl2subjcase : Compl -> NPForm = \compl ->
|
compl2subjcase : Compl -> NPForm = \compl ->
|
||||||
case compl.c of {
|
case compl.c.npf of {
|
||||||
NPCase Gen => NPCase Nom ; -- valisin koera -> koer valitakse
|
NPCase Gen => NPCase Nom ; -- valisin koera -> koer valitakse
|
||||||
_ => compl.c -- rääkisin koerale -> koerale räägitakse
|
_ => compl.c.npf -- rääkisin koerale -> koerale räägitakse
|
||||||
} ;
|
} ;
|
||||||
-- For $Verb$.
|
-- For $Verb$.
|
||||||
|
|
||||||
@@ -418,7 +437,7 @@ oper
|
|||||||
-- This is used for subjects of passives: therefore isFin in False.
|
-- This is used for subjects of passives: therefore isFin in False.
|
||||||
|
|
||||||
subjForm : NP -> NPForm -> Polarity -> Str = \np,sc,b ->
|
subjForm : NP -> NPForm -> Polarity -> Str = \np,sc,b ->
|
||||||
appCompl False b {s = [] ; c = sc ; isPre = True} np ;
|
appCompl False b {s = [] ; c = case2npformp sc ; isPre = True} np ;
|
||||||
|
|
||||||
infVP : NPForm -> Polarity -> Agr -> VP -> InfForms -> Str = infVPAnt Simul ;
|
infVP : NPForm -> Polarity -> Agr -> VP -> InfForms -> Str = infVPAnt Simul ;
|
||||||
|
|
||||||
@@ -709,31 +728,23 @@ oper
|
|||||||
NCase Sg Gen => joe ;
|
NCase Sg Gen => joe ;
|
||||||
NCase Sg Part => joge ;
|
NCase Sg Part => joge ;
|
||||||
NCase Sg Transl => joe + "ks" ;
|
NCase Sg Transl => joe + "ks" ;
|
||||||
NCase Sg Ess => joe + "na" ;
|
|
||||||
NCase Sg Iness => joe + "s" ;
|
NCase Sg Iness => joe + "s" ;
|
||||||
NCase Sg Elat => joe + "st" ;
|
NCase Sg Elat => joe + "st" ;
|
||||||
NCase Sg Illat => joesse ;
|
NCase Sg Illat => joesse ;
|
||||||
NCase Sg Adess => joe + "l" ;
|
NCase Sg Adess => joe + "l" ;
|
||||||
NCase Sg Ablat => joe + "lt" ;
|
NCase Sg Ablat => joe + "lt" ;
|
||||||
NCase Sg Allat => joe + "le" ;
|
NCase Sg Allat => joe + "le" ;
|
||||||
NCase Sg Abess => joe + "ta" ;
|
|
||||||
NCase Sg Comit => joe + "ga" ;
|
|
||||||
NCase Sg Termin => joe + "ni" ;
|
|
||||||
|
|
||||||
NCase Pl Nom => joe + "d" ;
|
NCase Pl Nom => joe + "d" ;
|
||||||
NCase Pl Gen => jogede ;
|
NCase Pl Gen => jogede ;
|
||||||
NCase Pl Part => jogesid ;
|
NCase Pl Part => jogesid ;
|
||||||
NCase Pl Transl => jogede + "ks" ;
|
NCase Pl Transl => jogede + "ks" ;
|
||||||
NCase Pl Ess => jogede + "na" ;
|
|
||||||
NCase Pl Iness => jogede + "s" ;
|
NCase Pl Iness => jogede + "s" ;
|
||||||
NCase Pl Elat => jogede + "st" ;
|
NCase Pl Elat => jogede + "st" ;
|
||||||
NCase Pl Illat => jogede + "sse" ;
|
NCase Pl Illat => jogede + "sse" ;
|
||||||
NCase Pl Adess => jogede + "l" ;
|
NCase Pl Adess => jogede + "l" ;
|
||||||
NCase Pl Ablat => jogede + "lt" ;
|
NCase Pl Ablat => jogede + "lt" ;
|
||||||
NCase Pl Allat => jogede + "le" ;
|
NCase Pl Allat => jogede + "le"
|
||||||
NCase Pl Abess => jogede + "ta" ;
|
|
||||||
NCase Pl Comit => jogede + "ga" ;
|
|
||||||
NCase Pl Termin => jogede + "ni"
|
|
||||||
|
|
||||||
} --;
|
} --;
|
||||||
-- lock_N = <>
|
-- lock_N = <>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ concrete VerbEst of Verb = CatEst ** open Prelude, ResEst in {
|
|||||||
insertObj
|
insertObj
|
||||||
(\\_,b,agr =>
|
(\\_,b,agr =>
|
||||||
let n = (complNumAgr agr) in
|
let n = (complNumAgr agr) in
|
||||||
ap.s ! False ! (NCase n (npform2case n v.c2.c))) --- v.cs.s ignored
|
ap.s ! False ! (NCase n (npform2case n v.c2.c.npf))) --- v.cs.s ignored
|
||||||
(predV v) ;
|
(predV v) ;
|
||||||
|
|
||||||
SlashV2S v s =
|
SlashV2S v s =
|
||||||
@@ -47,7 +47,7 @@ concrete VerbEst of Verb = CatEst ** open Prelude, ResEst in {
|
|||||||
SlashV2A v ap =
|
SlashV2A v ap =
|
||||||
insertObj
|
insertObj
|
||||||
(\\fin,b,_ =>
|
(\\fin,b,_ =>
|
||||||
ap.s ! False ! (NCase Sg (npform2case Sg v.c3.c))) ----agr to obj
|
ap.s ! False ! (NCase Sg (npform2case Sg v.c3.c.npf))) ----agr to obj
|
||||||
(predV v) ** {c2 = v.c2} ;
|
(predV v) ** {c2 = v.c2} ;
|
||||||
|
|
||||||
ComplSlash vp np = insertObjPre (\\fin,b,_ => appCompl fin b vp.c2 np) vp ;
|
ComplSlash vp np = insertObjPre (\\fin,b,_ => appCompl fin b vp.c2 np) vp ;
|
||||||
|
|||||||
Reference in New Issue
Block a user