some more Finnish

This commit is contained in:
aarne
2005-06-22 14:18:35 +00:00
parent 00d421085d
commit 92d159c8b8
4 changed files with 49 additions and 52 deletions

View File

@@ -8,11 +8,11 @@ concrete ClauseFin of Clause = CategoriesFin **
lin
SPredV np v =
sats2clause (mkSats np v) ;
{-
SPredPassV subj v =
sats2clause (mkSatsCopula subj (v.s ! VPart (pgen2gen subj.g) subj.n)) ;
---- SPredPassV subj v =
---- sats2clause (mkSatsCopula subj (v.s ! VPart (pgen2gen subj.g) subj.n)) ;
SPredV2 np v y =
sats2clause (mkSatsObject np v y) ;
{-
SPredV3 subj verb obj1 obj2 =
sats2clause (insertObject (mkSatsObject subj verb obj1) verb.c3 verb.s3 obj2) ;
SPredReflV2 subj verb =

View File

@@ -963,7 +963,7 @@ caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
(juosta + (a + "n"))
juoksi
(juoksi + "n")
(juoksi + "sin")
(juoksi + "si")
juossut
juostu
(init juossut + "n") ;
@@ -985,7 +985,7 @@ caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
(juoda + (a + "n"))
joi
(joi + "n")
(joi + "sin")
(joi + "si")
(juo + "n" + u + "t")
(juo + "t" + u)
(juo + "d" + u + "n") ;
@@ -1002,10 +1002,11 @@ caseTable : Number -> CommonNoun -> Case => Str = \n,cn ->
let ei =
mkVerb
"ei" "ei" "en" "eivät" "älkää"
"ei" "ei" "ei" "ei" "ei" "ei" "ei"
"ei" "e" "en" "e" "ei" "ei" "ei"
in
{s = table {
Imper Sg => "älä" ;
Impf n p | Cond n p => ei.s ! Pres n p ;
v => ei.s ! v
}
} ;

View File

@@ -1,6 +1,6 @@
--# -path=.:../abstract:../../prelude
concrete NumeralsFin of Numerals = open TypesFin, MorphoFin in {
concrete NumeralsFin of Numerals = open TypesFin, MorphoFin, ParadigmsFin in {
lincat
Numeral, Sub1000000 = {s : NForm => Str ; n : Number} ;
@@ -13,7 +13,7 @@ lin
"kaksien" "kaksia" "kaksiin" ;
n3 = mkSubst "a" "kolme" "kolme" "kolme" "kolmea" "kolmeen" "kolmi" "kolmi"
"kolmien" "kolmia" "kolmiin" ;
n4 = regNoun "neljä" ;
n4 = regN "neljä" ;
n5 = reg3Noun "viisi" "viiden" "viisiä" ;
n6 = reg3Noun "kuusi" "kuuden" "kuutta" ;
n7 = mkSubst "ä" "seitsemän" "seitsemä" "seitsemä" "seitsemää"

View File

@@ -479,10 +479,11 @@ oper
Sats : Type = {
subj : Str ;
pred : Bool => SForm => {
fin : Str ;
inf : Str
fin : Str ;
inf : Str ;
obj : Str -- object case depends on both
} ;
comp : Bool => Str
comp : Str
} ;
sats2clause : Sats -> Clause = \sats ->
@@ -492,11 +493,12 @@ oper
pred = sats.pred ! b ! sf ;
fin = pred.fin ;
inf = pred.inf ;
comp = sats.comp ! b
obj = pred.obj ;
comp = sats.comp
in
case st of {
SDecl => subj ++ fin ++ inf ++ comp ;
SQuest => questPart fin ++ subj ++ inf ++ comp
SDecl => subj ++ fin ++ inf ++ obj ++ comp ;
SQuest => questPart fin ++ subj ++ inf ++ obj ++ comp
}
} ;
@@ -504,12 +506,40 @@ oper
mkSats : NounPhrase -> Verb -> Sats = \subj,verb ->
{subj = subj.s ! NPCase Nom ; --- "minusta tulee poliisi"
pred = inflectVerb verb subj.n (np2Person subj.p) ;
comp = \\_ => []
pred = \\b,sf =>
inflectVerb verb subj.n (np2Person subj.p) b sf ** {obj = []} ;
comp = []
} ;
inflectVerb : Verb -> Number -> Person -> Bool => SForm => {fin, inf : Str} =
\verb,n,p -> \\b,sf =>
mkSatsObject : NounPhrase -> TransVerb -> NounPhrase -> Sats = \subj,verb,obj ->
insertObject (mkSats subj verb) verb.c verb.s3 verb.s4 obj ;
insertObject : Sats -> ComplCase -> Str -> Str -> NounPhrase -> Sats =
\sats, c, prep, postp, obj ->
{subj = sats.subj ;
pred = \\b,sf =>
let spred = sats.pred ! b ! sf in
{fin = spred.fin ;
inf = spred.inf ;
obj = spred.obj ++ prep ++ obj.s ! complCase b c sf ++ postp
} ;
comp = sats.comp
} ;
complCase : Bool -> ComplCase -> SForm -> NPForm = \b,c,v -> case c of {
CCase k => NPCase k ;
CAcc => case b of {
True => case v of {
VFinite _ _ => NPAccGen ;
_ => NPAccNom
} ;
_ => NPCase Part
}
} ;
inflectVerb : Verb -> Number -> Person -> Bool -> SForm -> {fin, inf : Str} =
\verb,n,p,b,sf ->
let
vs = verb.s ;
olla = verbOlla.s ;
@@ -538,40 +568,6 @@ oper
VImperat => älä
} ;
{-
predVerb : Verb -> VerbGroup = \walk ->
let {
noCompl : {s2 : VForm => Str} = {s2 = \\_ => []} ;
infCompl : {s2 : VForm => Str} = {s2 = table {
Imper Pl => walk.s ! ImpNegPl ;
_ => walk.s ! vFormNeg
}
}
}
in
nomVerbPhrase (walk ** noCompl) (verbEi ** infCompl) ;
predVerbPhrase : NounPhrase -> VerbPhrase -> Sentence = \jussi,uida ->
let {
p = np2Person jussi.p ;
c = complementCase True uida.c Inf --- True,Inf don't matter here
}
in
ss (jussi.s ! c ++ uida.s ! Pres jussi.n p ++ uida.s2 ! Pres jussi.n p) ;
oper
npForm2Case : Number -> NPForm -> Case = \n,f -> case f of {
NPCase c => c ;
NPAccNom => Nom ;
NPAccGen => case n of {
Sg => Gen ;
Pl => Nom
}
} ;
NounPhrase : Type = {s : NPForm => Str ; n : Number ; p : NPPerson} ;
-}
-- Verb phrases are discontinuous: the two parts of a verb phrase are