1
0
forked from GitHub/gf-core

accusative for Finnish numeral determiners

This commit is contained in:
aarne
2008-12-03 16:23:54 +00:00
parent 7e613de9a1
commit 5418e7bdff
4 changed files with 25 additions and 21 deletions

View File

@@ -5,7 +5,7 @@ all: magnet
magnet: magnet:
# gfc --make -src --parser=off --name=fre BronzeageFre.gf +RTS -K100M # gfc --make -src --parser=off --name=fre BronzeageFre.gf +RTS -K100M
# gfc --make -src --erasing=on --name=bul BronzeageBul.gf # gfc --make -src --erasing=on --name=bul BronzeageBul.gf
gfc --make -src --parser=off --name=fin BronzeageFin.gf gfc --make -src --parser=off --name=fin BronzeageFin.gf +RTS -K100M
gfc --make -src --erasing=on --name=eng BronzeageEng.gf gfc --make -src --erasing=on --name=eng BronzeageEng.gf
gfc --make -src --erasing=on --name=ger BronzeageGer.gf gfc --make -src --erasing=on --name=ger BronzeageGer.gf
gfc --make -src --erasing=on --name=scand BronzeageNor.gf BronzeageSwe.gf gfc --make -src --erasing=on --name=scand BronzeageNor.gf BronzeageSwe.gf

View File

@@ -210,8 +210,8 @@ lin
wait_V2 = mkV2 (mkV "odottaa") partitive ; wait_V2 = mkV2 (mkV "odottaa") partitive ;
walk_V = mkV "kävellä" "käveli" ; walk_V = mkV "kävellä" "käveli" ;
warm_A = mkA warm_A = mkA
(mkN "lämmin" "lämpimän" "lämpimänä" "lämmintä" "lämpimään" (mkN "lämmin" "lämpimän" "lämmintä" "lämpimänä" "lämpimään"
"lämpiminä" "lämpimissä" "lämpimien" "lämpimiä" "lämpimiin" "lämpiminä" "lämpimiä" "lämpimien" "lämpimissä" "lämpimiin"
) )
"lämpimämpi" "lämpimin" ; "lämpimämpi" "lämpimin" ;
war_N = mkN "sota" ; war_N = mkN "sota" ;

View File

@@ -13,21 +13,26 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, Prelude in {
True => Sg ; True => Sg ;
_ => det.n _ => det.n
} ; } ;
ncase : Case -> NForm = \c -> ncase : NPForm -> Case * NForm = \c ->
let k = npform2case n c
in
case <n, c, det.isNum, det.isPoss, det.isDef> of { case <n, c, det.isNum, det.isPoss, det.isDef> of {
<_, Nom, True,_,_> => NCase Sg Part ; -- kolme kytkintä(ni) <_, NPAcc, True,_,_> => <Nom,NCase Sg Part> ; -- kolme kytkintä(ni)
<_, _, True,False,_> => NCase Sg c ; -- kolmeksi kytkimeksi <_, NPCase Nom, True,_,_> => <Nom,NCase Sg Part> ; -- kolme kytkintä(ni)
<Pl,Nom, _,_,False> => NCase Pl Part ; -- kytkimiä <_, _, True,False,_> => <k, NCase Sg k> ; -- kolmeksi kytkimeksi
<_, Nom,_,True,_> => NPossNom n ; -- kytkime+ni on/ovat... <Pl,NPCase Nom, _,_,False> => <k, NCase Pl Part> ; -- kytkimiä
<_, Gen,_,True,_> => NPossNom n ; -- kytkime+ni vika <_, NPCase Nom,_,True,_> => <k, NPossNom n> ; -- kytkime+ni on/ovat...
<_, Transl,_,True,_> => NPossTransl n ; -- kytkim(e|i)kse+ni <_, NPCase Gen,_,True,_> => <k, NPossNom n> ; -- kytkime+ni vika
<_, Illat,_,True,_> => NPossIllat n ; -- kytkim(ee|ii)+ni <_, NPCase Transl,_,True,_> => <k, NPossTransl n> ; -- kytkim(e|i)kse+ni
<_, NPCase Illat,_,True,_> => <k, NPossIllat n> ; -- kytkim(ee|ii)+ni
_ => NCase n c -- kytkin, kytkimen,... _ => <k, NCase n k> -- kytkin, kytkimen,...
} }
in { in {
s = \\c => let k = npform2case n c in s = \\c => let
det.s1 ! k ++ cn.s ! ncase k ++ det.s2 ; k = ncase c ;
in
det.s1 ! k.p1 ++ cn.s ! k.p2 ++ 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
_ => det.n _ => det.n
@@ -91,7 +96,7 @@ concrete NounFin of Noun = CatFin ** open ResFin, MorphoFin, Prelude in {
sp = \\c => quant.sp ! num.n ! c ++ num.s ! Sg ! c ; sp = \\c => quant.sp ! num.n ! c ++ num.s ! Sg ! c ;
s2 = quant.s2 ; s2 = quant.s2 ;
n = num.n ; n = num.n ;
isNum = case num.n of {Sg => False ; _ => True} ; isNum = num.isNum ; -- case num.n of {Sg => False ; _ => True} ;
isPoss = quant.isPoss ; isPoss = quant.isPoss ;
isDef = quant.isDef isDef = quant.isDef
} ; } ;

View File

@@ -129,12 +129,11 @@ param
appCompl : Bool -> Polarity -> Compl -> NP -> Str = \isFin,b,co,np -> appCompl : Bool -> Polarity -> Compl -> NP -> Str = \isFin,b,co,np ->
let let
c = case <isFin, b, co.c, np.isPron,np.a.n> of { c = case <isFin, b, co.c, np.isPron> of {
<_, Neg, NPAcc,_,_> => NPCase Part ; -- en näe taloa/sinua <_, Neg, NPAcc,_> => NPCase Part ; -- en näe taloa/sinua
<_, Pos, NPAcc,True,_> => NPAcc ; -- näen/täytyy sinut <_, Pos, NPAcc,True> => NPAcc ; -- näen/täytyy sinut
<True, Pos, NPAcc,False,Sg> => NPCase Gen ; -- näen talon <False,Pos, NPAcc,False> => NPCase Nom ; -- täytyy nähdä talo
<False,Pos, NPAcc,_,_> => NPCase Nom ; -- täytyy talo/sinut; näen talot <_,_,coc,_> => coc
<_,_,coc,_,_> => coc
} ; } ;
nps = np.s ! c nps = np.s ! c
in in