1
0
forked from GitHub/gf-rgl

plural accusative case in Finnish

This commit is contained in:
aarne
2006-06-22 11:32:58 +00:00
parent 8a6eb56c6d
commit 9daacea3d8
8 changed files with 24 additions and 22 deletions

View File

@@ -56,7 +56,8 @@ concrete CatFin of Cat = CommonX ** open ResFin, Prelude in {
isDef : Bool -- True (verb agrees in Pl, Nom is not Part) isDef : Bool -- True (verb agrees in Pl, Nom is not Part)
} ; } ;
QuantSg, QuantPl = {s1 : Case => Str ; s2 : Str ; isPoss, isDef : Bool} ; QuantSg, QuantPl = {s1 : Case => Str ; s2 : Str ; isPoss, isDef : Bool} ;
Predet, Ord = {s : Number => Case => Str} ; Ord = {s : Number => Case => Str} ;
Predet = {s : Number => NPForm => Str} ;
Quant = {s1 : Number => Case => Str ; s2 : Str ; isPoss, isDef : Bool} ; Quant = {s1 : Number => Case => Str ; s2 : Str ; isPoss, isDef : Bool} ;
Num = {s : Number => Case => Str ; isNum : Bool} ; Num = {s : Number => Case => Str ; isNum : Bool} ;

View File

@@ -26,7 +26,7 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in {
_ => NCase n c -- kytkin, kytkimen,... _ => NCase n c -- kytkin, kytkimen,...
} }
in { in {
s = \\c => let k = npform2case c in s = \\c => let k = npform2case n c in
det.s1 ! k ++ cn.s ! ncase k ++ det.s2 ; det.s1 ! k ++ cn.s ! ncase k ++ det.s2 ;
a = agrP3 (case det.isDef of { a = agrP3 (case det.isDef of {
False => Sg ; -- autoja menee; kolme autoa menee False => Sg ; -- autoja menee; kolme autoa menee
@@ -36,14 +36,14 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in {
} ; } ;
UsePN pn = { UsePN pn = {
s = \\c => pn.s ! npform2case c ; s = \\c => pn.s ! npform2case Sg c ;
a = agrP3 Sg ; a = agrP3 Sg ;
isPron = False isPron = False
} ; } ;
UsePron p = p ** {isPron = True} ; UsePron p = p ** {isPron = True} ;
PredetNP pred np = { PredetNP pred np = {
s = \\c => pred.s ! np.a.n ! npform2case c ++ np.s ! c ; s = \\c => pred.s ! np.a.n ! c ++ np.s ! c ;
a = np.a ; a = np.a ;
isPron = np.isPron -- kaikki minun - ni isPron = np.isPron -- kaikki minun - ni
} ; } ;

View File

@@ -476,7 +476,7 @@ reg3N = \vesi,veden,vesi
regPN m = mkPN (regN m) ; regPN m = mkPN (regN m) ;
mkPN n = mkProperName n ** {lock_PN = <>} ; mkPN n = mkProperName n ** {lock_PN = <>} ;
mkNP noun num = { mkNP noun num = {
s = \\c => noun.s ! NCase num (npform2case c) ; s = \\c => noun.s ! NCase num (npform2case num c) ;
a = agrP3 num ; a = agrP3 num ;
isPron = False ; isPron = False ;
lock_NP = <> lock_NP = <>

View File

@@ -52,7 +52,7 @@ concrete QuestionFin of Question = CatFin ** open ResFin, Prelude in {
IDetCN idet num ord cn = let n = idet.n in { IDetCN idet num ord cn = let n = idet.n in {
s = \\c => s = \\c =>
let let
k = npform2case c ; k = npform2case n c ;
ncase = case <k,num.isNum> of { ncase = case <k,num.isNum> of {
<Nom, True> => NCase Sg Part ; -- mitkä kolme kytkintä <Nom, True> => NCase Sg Part ; -- mitkä kolme kytkintä
<_, True> => NCase Sg k ; -- miksi kolmeksi kytkimeksi <_, True> => NCase Sg k ; -- miksi kolmeksi kytkimeksi

View File

@@ -39,7 +39,7 @@ concrete RelativeFin of Relative = CatFin ** open Prelude, ResFin, MorphoFin in
} ; } ;
IdRP = { IdRP = {
s = \\n,c => relPron ! n ! npform2case c ; s = \\n,c => relPron ! n ! npform2case n c ;
a = RNoAg a = RNoAg
} ; } ;

View File

@@ -56,9 +56,10 @@ param
NPForm = NPCase Case | NPAcc ; NPForm = NPCase Case | NPAcc ;
oper oper
npform2case : NPForm -> Case = \f -> case f of { npform2case : Number -> NPForm -> Case = \n,f -> case <f,n> of {
NPCase c => c ; <NPCase c,_> => c ;
NPAcc => Gen -- appCompl does the job <NPAcc,Sg> => Gen ;-- appCompl does the job
<NPAcc,Pl> => Nom
} ; } ;
n2nform : NForm -> NForm = \nf -> case nf of { n2nform : NForm -> NForm = \nf -> case nf of {

View File

@@ -11,9 +11,9 @@ concrete StructuralFin of Structural = CatFin **
let let
kaiket = caseTable n (nhn (sKorpi "kaikki" "kaiken" "kaikkena")) kaiket = caseTable n (nhn (sKorpi "kaikki" "kaiken" "kaikkena"))
in in
case c of { case npform2case n c of {
Nom => "kaikki" ; Nom => "kaikki" ;
_ => kaiket ! c k => kaiket ! k
} }
} ; } ;
almost_AdA, almost_AdN = ss "melkein" ; almost_AdA, almost_AdN = ss "melkein" ;
@@ -52,14 +52,14 @@ concrete StructuralFin of Structural = CatFin **
i_Pron = mkPronoun "minä" "minun" "minua" "minuna" "minuun" Sg P1 ; i_Pron = mkPronoun "minä" "minun" "minua" "minuna" "minuun" Sg P1 ;
in_Prep = casePrep inessive ; in_Prep = casePrep inessive ;
it_Pron = { it_Pron = {
s = \\c => pronSe.s ! npform2case c ; s = \\c => pronSe.s ! npform2case Sg c ;
a = agrP3 Sg ; a = agrP3 Sg ;
isPron = False isPron = False
} ; } ;
less_CAdv = ss "vähemmän" ; less_CAdv = ss "vähemmän" ;
many_Det = mkDet Sg (reg2N "moni" "monia") ; many_Det = mkDet Sg (reg2N "moni" "monia") ;
more_CAdv = ss "enemmän" ; more_CAdv = ss "enemmän" ;
most_Predet = {s = \\n,c => (nhn (sSuurin "useinta")).s ! NCase n c} ; most_Predet = {s = \\n,c => (nhn (sSuurin "useinta")).s ! NCase n (npform2case n c)} ;
much_Det = mkDet Sg {s = \\_ => "paljon"} ; much_Det = mkDet Sg {s = \\_ => "paljon"} ;
must_VV = subjcaseV (regV "täytyä") genitive ; must_VV = subjcaseV (regV "täytyä") genitive ;
no_Phr = ss "ei" ; no_Phr = ss "ei" ;
@@ -77,7 +77,7 @@ concrete StructuralFin of Structural = CatFin **
she_Pron = mkPronoun "hän" "hänen" "häntä" "hänenä" "häneen" Sg P3 ; she_Pron = mkPronoun "hän" "hänen" "häntä" "hänenä" "häneen" Sg P3 ;
so_AdA = ss "niin" ; so_AdA = ss "niin" ;
somebody_NP = { somebody_NP = {
s = \\c => jokuPron ! Sg ! npform2case c ; s = \\c => jokuPron ! Sg ! npform2case Sg c ;
a = agrP3 Sg ; a = agrP3 Sg ;
isPron = False isPron = False
} ; } ;
@@ -92,7 +92,7 @@ concrete StructuralFin of Structural = CatFin **
n = Pl n = Pl
} ; } ;
something_NP = { something_NP = {
s = \\c => jokinPron ! Sg ! npform2case c ; s = \\c => jokinPron ! Sg ! npform2case Sg c ;
a = agrP3 Sg ; a = agrP3 Sg ;
isPron = False isPron = False
} ; } ;
@@ -144,11 +144,11 @@ concrete StructuralFin of Structural = CatFin **
want_VV = regV "tahtoa" ; want_VV = regV "tahtoa" ;
we_Pron = mkPronoun "me" "meidän" "meitä" "meinä" "meihin" Pl P1 ; we_Pron = mkPronoun "me" "meidän" "meitä" "meinä" "meihin" Pl P1 ;
whatPl_IP = { whatPl_IP = {
s = table {NPAcc => "mitkä" ; c => mikaInt ! Pl ! npform2case c} ; s = table {NPAcc => "mitkä" ; c => mikaInt ! Pl ! npform2case Pl c} ;
n = Pl n = Pl
} ; } ;
whatSg_IP = { whatSg_IP = {
s = \\c => mikaInt ! Sg ! npform2case c ; s = \\c => mikaInt ! Sg ! npform2case Sg c ;
n = Sg n = Sg
} ; } ;
when_IAdv = ss "milloin" ; when_IAdv = ss "milloin" ;
@@ -163,11 +163,11 @@ concrete StructuralFin of Structural = CatFin **
n = Sg n = Sg
} ; } ;
whoSg_IP = { whoSg_IP = {
s = table {NPAcc => "kenet" ; c => kukaInt ! Sg ! npform2case c} ; s = table {NPAcc => "kenet" ; c => kukaInt ! Sg ! npform2case Sg c} ;
n = Sg n = Sg
} ; } ;
whoPl_IP = { whoPl_IP = {
s = table {NPAcc => "ketkä" ; c => kukaInt ! Pl ! npform2case c} ; s = table {NPAcc => "ketkä" ; c => kukaInt ! Pl ! npform2case Pl c} ;
n = Pl n = Pl
} ; } ;
why_IAdv = ss "miksi" ; why_IAdv = ss "miksi" ;

View File

@@ -30,12 +30,12 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in {
ComplVA v ap = ComplVA v ap =
insertObj insertObj
(\\_,b,agr => (\\_,b,agr =>
ap.s ! False ! AN (NCase agr.n (npform2case v.c2.c))) --- v.cs.s ignored ap.s ! False ! AN (NCase agr.n (npform2case agr.n v.c2.c))) --- v.cs.s ignored
(predV v) ; (predV v) ;
ComplV2A v np ap = ComplV2A v np ap =
insertObj insertObj
(\\fin,b,_ => appCompl fin b v.c2 np ++ (\\fin,b,_ => appCompl fin b v.c2 np ++
ap.s ! False ! AN (NCase np.a.n (npform2case v.c3.c))) --agr to obj ap.s ! False ! AN (NCase np.a.n (npform2case np.a.n v.c3.c))) --agr to obj
(predV v) ; (predV v) ;
UseComp comp = UseComp comp =