1
0
forked from GitHub/gf-core

plural accusative case in Finnish

This commit is contained in:
aarne
2006-06-22 11:32:58 +00:00
parent 7efc60a809
commit 1823dca475
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)
} ;
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} ;
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,...
}
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 ;
a = agrP3 (case det.isDef of {
False => Sg ; -- autoja menee; kolme autoa menee
@@ -36,14 +36,14 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in {
} ;
UsePN pn = {
s = \\c => pn.s ! npform2case c ;
s = \\c => pn.s ! npform2case Sg c ;
a = agrP3 Sg ;
isPron = False
} ;
UsePron p = p ** {isPron = True} ;
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 ;
isPron = np.isPron -- kaikki minun - ni
} ;

View File

@@ -476,7 +476,7 @@ reg3N = \vesi,veden,vesi
regPN m = mkPN (regN m) ;
mkPN n = mkProperName n ** {lock_PN = <>} ;
mkNP noun num = {
s = \\c => noun.s ! NCase num (npform2case c) ;
s = \\c => noun.s ! NCase num (npform2case num c) ;
a = agrP3 num ;
isPron = False ;
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 {
s = \\c =>
let
k = npform2case c ;
k = npform2case n c ;
ncase = case <k,num.isNum> of {
<Nom, True> => NCase Sg Part ; -- mitkä kolme kytkintä
<_, True> => NCase Sg k ; -- miksi kolmeksi kytkimeksi

View File

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

View File

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

View File

@@ -11,9 +11,9 @@ concrete StructuralFin of Structural = CatFin **
let
kaiket = caseTable n (nhn (sKorpi "kaikki" "kaiken" "kaikkena"))
in
case c of {
case npform2case n c of {
Nom => "kaikki" ;
_ => kaiket ! c
k => kaiket ! k
}
} ;
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 ;
in_Prep = casePrep inessive ;
it_Pron = {
s = \\c => pronSe.s ! npform2case c ;
s = \\c => pronSe.s ! npform2case Sg c ;
a = agrP3 Sg ;
isPron = False
} ;
less_CAdv = ss "vähemmän" ;
many_Det = mkDet Sg (reg2N "moni" "monia") ;
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"} ;
must_VV = subjcaseV (regV "täytyä") genitive ;
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 ;
so_AdA = ss "niin" ;
somebody_NP = {
s = \\c => jokuPron ! Sg ! npform2case c ;
s = \\c => jokuPron ! Sg ! npform2case Sg c ;
a = agrP3 Sg ;
isPron = False
} ;
@@ -92,7 +92,7 @@ concrete StructuralFin of Structural = CatFin **
n = Pl
} ;
something_NP = {
s = \\c => jokinPron ! Sg ! npform2case c ;
s = \\c => jokinPron ! Sg ! npform2case Sg c ;
a = agrP3 Sg ;
isPron = False
} ;
@@ -144,11 +144,11 @@ concrete StructuralFin of Structural = CatFin **
want_VV = regV "tahtoa" ;
we_Pron = mkPronoun "me" "meidän" "meitä" "meinä" "meihin" Pl P1 ;
whatPl_IP = {
s = table {NPAcc => "mitkä" ; c => mikaInt ! Pl ! npform2case c} ;
s = table {NPAcc => "mitkä" ; c => mikaInt ! Pl ! npform2case Pl c} ;
n = Pl
} ;
whatSg_IP = {
s = \\c => mikaInt ! Sg ! npform2case c ;
s = \\c => mikaInt ! Sg ! npform2case Sg c ;
n = Sg
} ;
when_IAdv = ss "milloin" ;
@@ -163,11 +163,11 @@ concrete StructuralFin of Structural = CatFin **
n = Sg
} ;
whoSg_IP = {
s = table {NPAcc => "kenet" ; c => kukaInt ! Sg ! npform2case c} ;
s = table {NPAcc => "kenet" ; c => kukaInt ! Sg ! npform2case Sg c} ;
n = Sg
} ;
whoPl_IP = {
s = table {NPAcc => "ketkä" ; c => kukaInt ! Pl ! npform2case c} ;
s = table {NPAcc => "ketkä" ; c => kukaInt ! Pl ! npform2case Pl c} ;
n = Pl
} ;
why_IAdv = ss "miksi" ;

View File

@@ -30,12 +30,12 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in {
ComplVA v ap =
insertObj
(\\_,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) ;
ComplV2A v np ap =
insertObj
(\\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) ;
UseComp comp =