darcs pull

This commit is contained in:
aarne
2008-06-04 13:41:52 +00:00
parent 869e0563d1
commit 742a7feeea
9 changed files with 199 additions and 82 deletions

View File

@@ -27,7 +27,7 @@ concrete VerbEng of Verb = CatEng ** open ResEng in {
insertObj (\\a => infVP vv.isAux vp a) (predVV vv) **
{c2 = vp.c2} ;
SlashV2VNP vv np vp =
insertObjPre (\\_ => vp.c2 ++ np.s ! Acc)
insertObjPre (\\_ => v.c2 ++ np.s ! Acc)
(insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) **
{c2 = vp.c2} ;

View File

@@ -19,10 +19,10 @@ concrete CatFin of Cat = CommonX ** open ResFin, Prelude in {
-- Question
QCl = {s : ResFin.Tense => Anteriority => Polarity => Str} ;
IP = {s : NPForm => Str ; n : Number} ;
IComp = {s : Agr => Str} ;
IDet = {s : Case => Str ; n : Number} ;
QCl = {s : ResFin.Tense => Anteriority => Polarity => Str} ;
IP = {s : NPForm => Str ; n : Number} ;
IComp = {s : Agr => Str} ;
IDet = {s : Case => Str ; n : Number ; isNum : Bool} ;
IQuant = {s : Number => Case => Str} ;
-- Relative
@@ -33,6 +33,7 @@ concrete CatFin of Cat = CommonX ** open ResFin, Prelude in {
-- Verb
VP = ResFin.VP ;
VPSlash = ResFin.VP ** {c2 : Compl} ;
Comp = {s : Agr => Str} ;
-- Adjective
@@ -60,10 +61,10 @@ concrete CatFin of Cat = CommonX ** open ResFin, Prelude in {
---- QuantSg, QuantPl = {s1 : Case => Str ; s2 : Str ; isPoss, isDef : Bool} ;
Ord = {s : Number => Case => Str} ;
Predet = {s : Number => NPForm => Str} ;
Quant = {s1 : Number => Case => Str ; s2 : Str ; isPoss, isDef : Bool} ;
Art = {s1 : Number => Case => Str ; s2 : Str ; isPoss, isDef : Bool} ;
Card = {s : Number => Case => Str ; n : Number} ;
Num = {s : Number => Case => Str ; isNum : Bool ; n : Number} ;
Quant = {s1 : Number => Case => Str ; s2 : Str ; isPoss : Bool} ;
Art = {s1 : Number => Case => Str ; isDef : Bool} ;
Card = {s : Number => Case => Str ; n : Number} ;
Num = {s : Number => Case => Str ; isNum : Bool ; n : Number} ;
-- Numeral

View File

@@ -35,6 +35,22 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in {
isPron = False
} ;
DetNP det =
let
n : Number = case det.isNum of {
True => Sg ;
_ => det.n
} ;
in {
s = \\c => let k = npform2case n c in
det.s1 ! k ; -- det.s2 is possessive suffix
a = agrP3 (case det.isDef of {
False => Sg ; -- autoja menee; kolme autoa menee
_ => det.n
}) ;
isPron = False
} ;
UsePN pn = {
s = \\c => pn.s ! npform2case Sg c ;
a = agrP3 Sg ;
@@ -59,23 +75,70 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in {
a = np.a ;
isPron = np.isPron -- minun täällä - ni
} ;
{-
DetSg quant ord = {
s1 = \\c => quant.s1 ! Sg ! c ++ ord.s ! Sg ! c ;
s2 = quant.s2 ;
n = Sg ;
isNum = False ;
isPoss = quant.isPoss ;
isDef = False -- doesn't matter with Sg
} ;
-}
DetQuantOrd quant num ord = {
s1 = \\c => quant.s1 ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! Pl ! c ;
s2 = quant.s2 ;
n = num.n ;
isNum = num.isNum ;
isPoss = quant.isPoss ;
isDef = quant.isDef
isDef = True
} ;
DetQuant quant num = {
s1 = \\c => quant.s1 ! num.n ! c ++ num.s ! Sg ! c ;
s2 = quant.s2 ;
n = num.n ;
isNum = num.isNum ;
isPoss = quant.isPoss ;
isDef = True
} ;
DetArtOrd quant num ord = {
s1 = \\c => quant.s1 ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! Pl ! c ;
s2 = [] ;
n = num.n ;
isNum = num.isNum ;
isPoss = False ;
isDef = True
} ;
DetArtCard quant num = {
s1 = \\c => quant.s1 ! num.n ! c ++ num.s ! Sg ! c ;
s2 = [] ;
n = num.n ;
isNum = True ;
isPoss = False ;
isDef = True
} ;
DetArtSg det cn =
let
n : Number = Sg ;
ncase : Case -> NForm = \c -> NCase n c ;
in {
s = \\c => let k = npform2case n c in
det.s1 ! Sg ! k ++ cn.s ! ncase k ;
a = agrP3 Sg ;
isPron = False
} ;
DetArtPl det cn =
let
n : Number = Pl ;
ncase : Case -> NForm = \c ->
case <n,c,det.isDef> of {
<Pl,Nom,False> => NCase Pl Part ; -- kytkimiä
_ => NCase n c -- kytkin, kytkimen,...
}
in {
s = \\c => let k = npform2case n c in
det.s1 ! Pl ! k ++ cn.s ! ncase k ;
a = agrP3 (case det.isDef of {
False => Sg ; -- autoja menee; kolme autoa menee
_ => Pl
}) ;
isPron = False
} ;
PossPron p = {
@@ -89,8 +152,7 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in {
NumSg = {s = \\_,_ => [] ; isNum = False ; n = Sg} ;
NumPl = {s = \\_,_ => [] ; isNum = False ; n = Pl} ;
----b NumInt n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ; --DEPREC
----b OrdInt n = {s = \\_,_ => n.s ++ "."} ;
NumCard n = n ** {isNum = True} ;
NumDigits numeral = {
s = \\n,c => numeral.s ! NCard (NCase n c) ;
@@ -106,7 +168,11 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in {
} ;
OrdNumeral numeral = {s = \\n,c => numeral.s ! NOrd (NCase n c)} ;
AdNum adn num = {s = \\n,c => adn.s ++ num.s ! n ! c ; isNum = num.isNum ; n = num.n} ;
AdNum adn num = {
s = \\n,c => adn.s ++ num.s ! n ! c ;
isNum = num.isNum ;
n = num.n
} ;
OrdSuperl a = {s = \\n,c => a.s ! Superl ! AN (NCase n c)} ;
@@ -123,17 +189,30 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in {
isNum,isPoss,isDef = False -- autoja on
} ;
{-
MassDet = {
s1 = \\_,_ => [] ; --- Nom is Part ?
s2 = [] ;
isNum,isPoss,isDef = False
MassNP cn =
let
n : Number = Sg ;
ncase : Case -> NForm = \c -> NCase n c ;
in {
s = \\c => let k = npform2case n c in
cn.s ! ncase k ;
a = agrP3 Sg ;
isPron = False
} ;
-}
UseN n = n ;
UseN2 n = n ;
----b UseN3 n = n ;
Use2N3 f = {
s = f.s ;
c2 = f.c2
} ;
Use3N3 f = {
s = f.s ;
c2 = f.c3
} ;
--- If a possessive suffix is added here it goes after the complements...
@@ -150,6 +229,13 @@ concrete NounFin of Noun = CatFin ** open ResFin, Prelude in {
} ;
RelCN cn rs = {s = \\nf => cn.s ! nf ++ rs.s ! agrP3 (numN nf)} ;
RelNP np rs = {
s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ;
a = np.a ;
isPron = np.isPron ---- correct ?
} ;
AdvCN cn ad = {s = \\nf => cn.s ! nf ++ ad.s} ;
SentCN cn sc = {s = \\nf=> cn.s ! nf ++ sc.s} ;

View File

@@ -49,21 +49,48 @@ concrete QuestionFin of Question = CatFin ** open ResFin, Prelude in {
-- since we don't have possessive suffixes or definiteness.
--- It could still be nice to have a common oper...
{-
IDetCN idet num ord cn = let n = idet.n in {
IdetCN idet cn = let n = idet.n in {
s = \\c =>
let
k = npform2case n c ;
ncase = case <k,num.isNum> of {
ncase = case <k,idet.isNum> of {
<Nom, True> => NCase Sg Part ; -- mitkä kolme kytkintä
<_, True> => NCase Sg k ; -- miksi kolmeksi kytkimeksi
_ => NCase n k -- mitkä kytkimet
}
in
idet.s ! k ++ num.s ! Sg ! k ++ ord.s ! n ! k ++ cn.s ! ncase ;
idet.s ! k ++ cn.s ! ncase ;
n = n
} ;
-}
IdetIP idet = let n = idet.n in {
s = \\c =>
let
k = npform2case n c ;
in
idet.s ! k ;
n = n
} ;
IdetQuant idet num =
let
n = num.n ;
isn = num.isNum
in {
s = \\k =>
let
ncase = case <k,isn> of {
<Nom, True> => NCase Sg Part ; -- mitkä kolme kytkintä
<_, True> => NCase Sg k ; -- miksi kolmeksi kytkimeksi
_ => NCase n k -- mitkä kytkimet
}
in
idet.s ! n ! k ++ num.s ! Sg ! k ;
n = n ;
isNum = isn
} ;
CompIAdv a = {s = \\_ => a.s} ;
CompIP ip = {s = \\_ => ip.s ! NPCase Nom} ;
}

View File

@@ -572,4 +572,6 @@ oper
a = agrP3 Sg ; -- does not matter (--- at least in Slash)
isPron = False -- has no special accusative
} ;
etta_Conj : Str = "että" ;
}

View File

@@ -20,30 +20,11 @@ concrete SentenceFin of Sentence = CatFin ** open Prelude, ResFin in {
-- The object case is formed at the use site of $c2$, in $Relative$ and $Question$.
{-
SlashV2 np v2 = {
s = \\t,a,p => (mkClause (subjForm np v2.sc) np.a (predV v2)).s ! t ! a ! p ! SDecl ;
c2 = v2.c2
SlashVP np vp = {
s = \\t,a,p => (mkClause (subjForm np vp.sc) np.a vp).s ! t ! a ! p ! SDecl ;
c2 = vp.c2
} ;
SlashVVV2 np vv v2 =
let
sc = case v2.sc of {
NPCase Nom => vv.sc ; -- joka minun täytyy pestä
c => c -- joka minulla täytyy olla
}
in
{s = \\t,ag,p =>
(mkClause
(subjForm np sc) np.a
(insertObj
(\\_,b,a => infVP vv.sc b a (predV v2))
(predV vv)
)
).s ! t ! ag ! p ! SDecl ;
c2 = v2.c2
} ;
-}
AdvSlash slash adv = {
s = \\t,a,b => slash.s ! t ! a ! b ++ adv.s ;
c2 = slash.c2
@@ -64,7 +45,7 @@ concrete SentenceFin of Sentence = CatFin ** open Prelude, ResFin in {
} ;
EmbedS s = {s = "että" ++ s.s} ;
EmbedS s = {s = etta_Conj ++ s.s} ;
EmbedQS qs = {s = qs.s} ;
EmbedVP vp = {s = infVP (NPCase Nom) Pos (agrP3 Sg) vp} ; --- case,pol,agr
@@ -81,4 +62,6 @@ concrete SentenceFin of Sentence = CatFin ** open Prelude, ResFin in {
AdvS a s = {s = a.s ++ s.s} ;
RelS s r = {s = s.s ++ "," ++ r.s ! agrP3 Sg} ; ---- mikä
}

View File

@@ -47,7 +47,7 @@ concrete StructuralFin of Structural = CatFin **
here7from_Adv = ss "täältä" ;
how_IAdv = ss "miten" ;
how8many_IDet =
{s = \\c => "kuinka" ++ (mkN "moni" "monia").s ! NCase Sg c ; n = Sg} ;
{s = \\c => "kuinka" ++ (mkN "moni" "monia").s ! NCase Sg c ; n = Sg ; isNum = False} ;
if_Subj = ss "jos" ;
in8front_Prep = postGenPrep "edessä" ;
i_Pron = mkPronoun "minä" "minun" "minua" "minuna" "minuun" Sg P1 ;

View File

@@ -6,13 +6,16 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in {
lin
UseV = predV ;
{-
ComplV2 v np = insertObj (\\fin,b,_ => appCompl fin b v.c2 np) (predV v) ;
ComplV3 v np np2 =
SlashV2a v = predV v ** {c2 = v.c2} ;
Slash2V3 v np =
insertObj
(\\fin,b,_ => appCompl fin b v.c2 np ++ appCompl fin b v.c3 np2) (predV v) ;
-}
(\\fin,b,_ => appCompl fin b v.c2 np) (predV v) ** {c2 = v.c3} ;
Slash3V3 v np =
insertObj
(\\fin,b,_ => appCompl fin b v.c3 np) (predV v) ** {c2 = v.c2} ;
ComplVV v vp =
insertObj
(\\_,b,a => infVP v.sc b a vp)
@@ -24,38 +27,53 @@ concrete VerbFin of Verb = CatFin ** open Prelude, ResFin in {
}
) ;
ComplVS v s = insertExtrapos ("että" ++ s.s) (predV v) ;
ComplVS v s = insertExtrapos (etta_Conj ++ s.s) (predV v) ;
ComplVQ v q = insertExtrapos ( q.s) (predV v) ;
ComplVA v ap =
insertObj
(\\_,b,agr =>
ap.s ! False ! AN (NCase agr.n (npform2case agr.n v.c2.c))) --- v.cs.s ignored
(predV v) ;
{-
ComplV2S v np s =
insertExtrapos ("että" ++ s.s)
(insertObj (\\fin,b,_ => appCompl fin b v.c2 np) (predV v)) ;
ComplV2Q v np q =
insertExtrapos (q.s)
(insertObj (\\fin,b,_ => appCompl fin b v.c2 np) (predV v)) ;
ComplV2V v np vp =
insertObj (\\_,b,a => infVP v.sc b a vp) ---- different infinitives
(insertObj (\\fin,b,_ => appCompl fin b v.c2 np) (predV v)) ;
ComplV2A v np ap =
SlashV2S v s =
insertExtrapos (etta_Conj ++ s.s) (predV v) ** {c2 = v.c2} ;
SlashV2Q v q =
insertExtrapos (q.s) (predV v) ** {c2 = v.c2} ;
SlashV2V v vp =
insertObj (\\_,b,a => infVP v.sc b a vp) (predV v) ** {c2 = v.c2} ;
---- different infinitives
SlashV2A v ap =
insertObj
(\\fin,b,_ => appCompl fin b v.c2 np ++
ap.s ! False ! AN (NCase np.a.n (npform2case np.a.n v.c3.c))) --agr to obj
(predV v) ;
-}
(\\fin,b,_ =>
ap.s ! False ! AN (NCase Sg (npform2case Sg v.c3.c))) ----agr to obj
(predV v) ** {c2 = v.c2} ;
ComplSlash vp np = insertObj (\\fin,b,_ => appCompl fin b vp.c2 np) vp ;
UseComp comp =
insertObj (\\_,_ => comp.s) (predV (verbOlla ** {sc = NPCase Nom})) ;
SlashVV v vp =
insertObj
(\\_,b,a => infVP v.sc b a vp)
(predV {s = v.s ;
sc = case vp.sc of {
NPCase Nom => v.sc ; -- minun täytyy pestä auto
c => c -- minulla täytyy olla auto
}
}
) ** {c2 = vp.c2} ; ---- correct ??
SlashV2VNP v np vp =
insertObj
(\\fin,b,a => appCompl fin b v.c2 np ++ infVP v.sc b a vp)
(predV v) ** {c2 = vp.c2} ;
AdvVP vp adv = insertObj (\\_,_,_ => adv.s) vp ;
AdVVP adv vp = insertObj (\\_,_,_ => adv.s) vp ;
---- ReflV2 v = insertObj (\\fin,b,agr => appCompl fin b v.c2 (reflPron agr)) (predV v) ;
ReflVP v = insertObj (\\fin,b,agr => appCompl fin b v.c2 (reflPron agr)) v ;
PassV2 v = let vp = predV v in {
s = \\_ => vp.s ! VIPass ;

View File

@@ -33,7 +33,7 @@ incomplete concrete VerbScand of Verb = CatScand ** open CommonScand, ResScand i
insertObj (\\a => v.c2 ++ infVP vp a) (predV v) ** {c2 = vp.c2} ;
SlashV2VNP v np vp =
insertObj
(\\a => vp.c2 ++ np.s ! accusative ++ v.c3 ++ infVP vp a) (predV v)
(\\a => v.c2 ++ np.s ! accusative ++ v.c3 ++ infVP vp a) (predV v)
** {c2 = v.c2} ;
UseComp comp = insertObj (\\a => comp.s ! agrAdj a.gn DIndef) (predV verbBe) ;