1
0
forked from GitHub/gf-rgl

(Est) Automatic whitespace removal

in its own commit,rather than have whitespace changes in content commits
This commit is contained in:
Inari Listenmaa
2022-04-13 10:42:34 +08:00
parent 983274d239
commit 31c31b3e69
24 changed files with 539 additions and 538 deletions

View File

@@ -16,10 +16,10 @@ concrete AdjectiveEst of Adjective = CatEst ** open ResEst, Prelude in {
} ; } ;
infl = Regular ; --a.infl infl = Regular ; --a.infl
} ; } ;
CAdvAP ad ap np = { CAdvAP ad ap np = {
s = \\m,af => ad.s ++ ap.s ! m ! af ++ ad.p ++ np.s ! NPCase Nom ; s = \\m,af => ad.s ++ ap.s ! m ! af ++ ad.p ++ np.s ! NPCase Nom ;
infl = ap.infl infl = ap.infl
} ; } ;
UseComparA a = { UseComparA a = {
s = \\_,nf => a.s ! Compar ! AN nf ; s = \\_,nf => a.s ! Compar ! AN nf ;
@@ -34,14 +34,14 @@ concrete AdjectiveEst of Adjective = CatEst ** open ResEst, Prelude in {
ComplA2 adj np = { ComplA2 adj np = {
s = \\isMod,af => s = \\isMod,af =>
preOrPost isMod (appCompl True Pos adj.c2 np) (adj.s ! Posit ! AN af) ; preOrPost isMod (appCompl True Pos adj.c2 np) (adj.s ! Posit ! AN af) ;
infl = adj.infl infl = adj.infl
} ; } ;
ReflA2 adj = { ReflA2 adj = {
s = \\isMod,af => s = \\isMod,af =>
preOrPost isMod preOrPost isMod
(appCompl True Pos adj.c2 (reflPron (agrP3 Sg))) (adj.s ! Posit ! AN af) ; (appCompl True Pos adj.c2 (reflPron (agrP3 Sg))) (adj.s ! Posit ! AN af) ;
infl = adj.infl infl = adj.infl
} ; } ;

View File

@@ -1,6 +1,6 @@
--# -path=.:../abstract:../common:../prelude:../api --# -path=.:../abstract:../common:../prelude:../api
concrete AllEst of AllEstAbs = concrete AllEst of AllEstAbs =
LangEst, -- - [SlashV2VNP,SlashVV, TFut], ---- to speed up linking; to remove spurious parses LangEst, -- - [SlashV2VNP,SlashVV, TFut], ---- to speed up linking; to remove spurious parses
ExtendEst -- - [ProDrop, ProDropPoss, S_OSV, S_VSO, S_ASV] -- to exclude spurious parses ExtendEst -- - [ProDrop, ProDropPoss, S_OSV, S_VSO, S_ASV] -- to exclude spurious parses
** **

View File

@@ -1,4 +1,4 @@
abstract AllEstAbs = abstract AllEstAbs =
Lang, Lang,
ExtraEstAbs ExtraEstAbs
** {} ; ** {} ;

View File

@@ -21,7 +21,7 @@ concrete CatEst of Cat = CommonX ** open HjkEst, ResEst, Prelude in {
QCl = {s : ResEst.Tense => Anteriority => Polarity => Str} ; QCl = {s : ResEst.Tense => Anteriority => Polarity => Str} ;
IP = {s : NPForm => Str ; n : Number} ; IP = {s : NPForm => Str ; n : Number} ;
IComp = {s : Agr => Str} ; IComp = {s : Agr => Str} ;
IDet = {s : Case => Str ; n : Number ; isNum : Bool} ; IDet = {s : Case => Str ; n : Number ; isNum : Bool} ;
IQuant = {s : Number => Case => Str} ; IQuant = {s : Number => Case => Str} ;
@@ -33,17 +33,17 @@ concrete CatEst of Cat = CommonX ** open HjkEst, ResEst, Prelude in {
-- Verb -- Verb
VP = ResEst.VP ; VP = ResEst.VP ;
VPSlash = ResEst.VP ** {c2 : Compl} ; VPSlash = ResEst.VP ** {c2 : Compl} ;
Comp = {s : Agr => Str} ; Comp = {s : Agr => Str} ;
-- Adjective -- Adjective
-- The $Bool$ in s tells whether usage is modifying (as opposed to -- The $Bool$ in s tells whether usage is modifying (as opposed to
-- predicative), e.g. "x on suurem kui y" vs. "y:st suurem arv". -- predicative), e.g. "x on suurem kui y" vs. "y:st suurem arv".
-- The $Infl$ in infl tells whether the adjective inflects as a -- The $Infl$ in infl tells whether the adjective inflects as a
-- modifier: e.g. "väsinud mehele" vs. "mees muutus väsinuks". -- modifier: e.g. "väsinud mehele" vs. "mees muutus väsinuks".
AP = {s : Bool => NForm => Str ; infl : Infl} ; AP = {s : Bool => NForm => Str ; infl : Infl} ;
-- Noun -- Noun
@@ -55,8 +55,9 @@ concrete CatEst of Cat = CommonX ** open HjkEst, ResEst, Prelude in {
sp : Case => Str ; -- se (substantival form) sp : Case => Str ; -- se (substantival form)
n : Number ; -- Pl (agreement feature for verb) n : Number ; -- Pl (agreement feature for verb)
isNum : Bool ; -- True (a numeral is present) isNum : Bool ; -- True (a numeral is present)
isDef : Bool -- True (verb agrees in Pl, Nom is not Part) --I: actually, can we get rid of this? isDef : Bool -- True (verb agrees in Pl, Nom is not Part) --I: actually, can we get rid of this?
} ; } ;
---- QuantSg, QuantPl = {s : Case => Str ; isDef : Bool} ; ---- QuantSg, QuantPl = {s : Case => Str ; isDef : Bool} ;
Ord = {s : NForm => Str} ; Ord = {s : NForm => Str} ;
Predet = {s : Number => NPForm => Str} ; Predet = {s : Number => NPForm => Str} ;

View File

@@ -1,6 +1,6 @@
--# -path=alltenses:.:../abstract:../api:../common --# -path=alltenses:.:../abstract:../api:../common
concrete ConstructionEst of Construction = CatEst ** concrete ConstructionEst of Construction = CatEst **
open SyntaxEst, SymbolicEst, ParadigmsEst, (L = LexiconEst), (E = ExtraEst), (R = ResEst), Prelude in { open SyntaxEst, SymbolicEst, ParadigmsEst, (L = LexiconEst), (E = ExtraEst), (R = ResEst), Prelude in {
flags coding=utf8 ; flags coding=utf8 ;
@@ -12,7 +12,7 @@ lin
ill_VP = mkVP (mkA "haige") ; ill_VP = mkVP (mkA "haige") ;
ready_VP = mkVP (ParadigmsEst.mkA "valmis") ; ready_VP = mkVP (ParadigmsEst.mkA "valmis") ;
has_age_VP card = has_age_VP card =
let n_years_AdA : AdA = lin AdA (mkUtt (lin NP (mkNP <lin Card card : Card> L.year_N))) let n_years_AdA : AdA = lin AdA (mkUtt (lin NP (mkNP <lin Card card : Card> L.year_N)))
in mkVP (mkAP n_years_AdA L.old_A) ; in mkVP (mkAP n_years_AdA L.old_A) ;
@@ -25,7 +25,7 @@ lin
-- some more things -- some more things
weather_adjCl ap = mkCl (mkVP (lin AP ap)) ; weather_adjCl ap = mkCl (mkVP (lin AP ap)) ;
is_right_VP = mkVP have_V2 (lin NP (mkNP (ParadigmsEst.mkN "õigus"))) ; is_right_VP = mkVP have_V2 (lin NP (mkNP (ParadigmsEst.mkN "õigus"))) ;
is_wrong_VP = mkVP (ParadigmsEst.mkV "eksima") ; is_wrong_VP = mkVP (ParadigmsEst.mkV "eksima") ;
@@ -37,7 +37,7 @@ lin
where_go_QCl np = mkQCl (lin IAdv (ss "kuhu")) (mkCl np (mkVP L.go_V)) ; where_go_QCl np = mkQCl (lin IAdv (ss "kuhu")) (mkCl np (mkVP L.go_V)) ;
where_come_from_QCl np = mkQCl (lin IAdv (ss "kust")) (mkCl np (mkVP L.come_V)) ; where_come_from_QCl np = mkQCl (lin IAdv (ss "kust")) (mkCl np (mkVP L.come_V)) ;
go_here_VP = mkVP (mkVP L.go_V) (mkAdv "siia") ; go_here_VP = mkVP (mkVP L.go_V) (mkAdv "siia") ;
come_here_VP = mkVP (mkVP L.come_V) (mkAdv "siia") ; come_here_VP = mkVP (mkVP L.come_V) (mkAdv "siia") ;
come_from_here_VP = mkVP (mkVP L.come_V) (mkAdv "sealt") ; come_from_here_VP = mkVP (mkVP L.come_V) (mkAdv "sealt") ;
@@ -61,16 +61,16 @@ lin
monthAdv m = SyntaxEst.mkAdv in_Prep (mkNP m) ; monthAdv m = SyntaxEst.mkAdv in_Prep (mkNP m) ;
yearAdv y = SyntaxEst.mkAdv (prePrep nominative "aastal") y ; yearAdv y = SyntaxEst.mkAdv (prePrep nominative "aastal") y ;
---- dayMonthAdv d m = ParadigmsEst.mkAdv (d.s ! R.NPCase R.Nom ++ BIND ++ "." ++ m.s ! R.NCase R.Sg R.Part) ; ---- dayMonthAdv d m = ParadigmsEst.mkAdv (d.s ! R.NPCase R.Nom ++ BIND ++ "." ++ m.s ! R.NCase R.Sg R.Part) ;
---- monthYearAdv m y = SyntaxEst.mkAdv in_Prep (mkNP (mkNP m) (SyntaxEst.mkAdv (casePrep nominative) y)) ; ---- monthYearAdv m y = SyntaxEst.mkAdv in_Prep (mkNP (mkNP m) (SyntaxEst.mkAdv (casePrep nominative) y)) ;
---- dayMonthYearAdv d m y = ---- dayMonthYearAdv d m y =
---- lin Adv {s = d.s ! R.NPCase R.Nom ++ BIND ++ "." ++ m.s ! R.NCase R.Sg R.Part ++ y.s ! R.NPCase R.Nom} ; ---- lin Adv {s = d.s ! R.NPCase R.Nom ++ BIND ++ "." ++ m.s ! R.NCase R.Sg R.Part ++ y.s ! R.NPCase R.Nom} ;
intYear = symb ; intYear = symb ;
intMonthday = symb ; intMonthday = symb ;
oper oper
pointWeekday : Weekday -> Str = \w -> (SyntaxEst.mkAdv (casePrep essive) (mkNP w.noun)).s ; pointWeekday : Weekday -> Str = \w -> (SyntaxEst.mkAdv (casePrep essive) (mkNP w.noun)).s ;
lincat Language = N ; lincat Language = N ;
@@ -86,11 +86,11 @@ lin
oper mkLanguage : Str -> N = \s -> mkN (s ++ "keel") ; oper mkLanguage : Str -> N = \s -> mkN (s ++ "keel") ;
oper mkWeekday : Str -> Weekday = \d -> oper mkWeekday : Str -> Weekday = \d ->
lin Weekday { lin Weekday {
noun = mkN d ; noun = mkN d ;
habitual = ParadigmsEst.mkAdv (d + "iti") ; --kolmapäeviti habitual = ParadigmsEst.mkAdv (d + "iti") ; --kolmapäeviti
} ; } ;
lin monday_Weekday = mkWeekday "esmaspäev" ; lin monday_Weekday = mkWeekday "esmaspäev" ;
@@ -101,9 +101,9 @@ lin friday_Weekday = mkWeekday "reede" ;
lin saturday_Weekday = mkWeekday "laupäev" ; lin saturday_Weekday = mkWeekday "laupäev" ;
lin sunday_Weekday = mkWeekday "pühapäev" ; lin sunday_Weekday = mkWeekday "pühapäev" ;
lin january_Month = mkN "jaanuar" ; lin january_Month = mkN "jaanuar" ;
lin february_Month = mkN "veebruar" ; lin february_Month = mkN "veebruar" ;
lin march_Month = mkN "märts" ; lin march_Month = mkN "märts" ;
lin april_Month = mkN "aprill" ; lin april_Month = mkN "aprill" ;
lin may_Month = mkN "mai" ; lin may_Month = mkN "mai" ;
lin june_Month = mkN "juuni" ; lin june_Month = mkN "juuni" ;

View File

@@ -2,5 +2,5 @@
-- documentation of Estonian in Estonian: the default introduced in LangEst -- documentation of Estonian in Estonian: the default introduced in LangEst
concrete DocumentationEst of Documentation = CatEst ** concrete DocumentationEst of Documentation = CatEst **
DocumentationEstFunctor with (Terminology = TerminologyEst) ; DocumentationEstFunctor with (Terminology = TerminologyEst) ;

View File

@@ -2,5 +2,5 @@
-- documentation of Estonian in English -- documentation of Estonian in English
concrete DocumentationEstEng of Documentation = CatEst ** concrete DocumentationEstEng of Documentation = CatEst **
DocumentationEstFunctor with (Terminology = TerminologyEng) ; DocumentationEstFunctor with (Terminology = TerminologyEng) ;

View File

@@ -1,6 +1,6 @@
--# -path=.:../abstract:../common --# -path=.:../abstract:../common
incomplete concrete DocumentationEstFunctor of Documentation = CatEst ** open incomplete concrete DocumentationEstFunctor of Documentation = CatEst ** open
Terminology, -- the interface Terminology, -- the interface
ResEst, ResEst,
ParadigmsEst, ParadigmsEst,
@@ -30,17 +30,17 @@ lin
s2 = inflNoun (\nf -> noun.s ! nf) s2 = inflNoun (\nf -> noun.s ! nf)
} ; } ;
InflectionA, InflectionA2 = \adj -> InflectionA, InflectionA2 = \adj ->
let posit : (AForm => Str) = adj.s ! Posit ; let posit : (AForm => Str) = adj.s ! Posit ;
compar : (AForm => Str) = adj.s ! Compar ; compar : (AForm => Str) = adj.s ! Compar ;
superl : (AForm => Str) = adj.s ! Superl ; superl : (AForm => Str) = adj.s ! Superl ;
in in
{ t = "a" ; { t = "a" ;
s1 = heading1 (heading adjective_Category) ; s1 = heading1 (heading adjective_Category) ;
s2 = inflNoun (\nf -> posit ! AN nf) ++ s2 = inflNoun (\nf -> posit ! AN nf) ++
heading2 (heading comparative_Parameter) ++ heading2 (heading comparative_Parameter) ++
inflNoun (\nf -> compar ! AN nf) ++ inflNoun (\nf -> compar ! AN nf) ++
heading2 (heading superlative_Parameter) ++ heading2 (heading superlative_Parameter) ++
inflNoun (\nf -> superl ! AN nf) inflNoun (\nf -> superl ! AN nf)
} ; } ;
@@ -58,91 +58,91 @@ lin
InflectionV v = { InflectionV v = {
t = "v" ; t = "v" ;
s1 = heading1 (heading verb_Category) ++ s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v)) ; paragraph (verbExample (S.mkCl S.she_NP v)) ;
s2 = inflVerb v s2 = inflVerb v
} ; } ;
InflectionV2 v = { InflectionV2 v = {
t = "v" ; t = "v" ;
s1 = heading1 (heading verb_Category) ++ s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.something_NP)) ; paragraph (verbExample (S.mkCl S.she_NP v S.something_NP)) ;
s2 = inflVerb v s2 = inflVerb v
} ; } ;
InflectionV3 v = { InflectionV3 v = {
t = "v" ; t = "v" ;
s1 = heading1 (heading verb_Category) ++ s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.something_NP S.something_NP)) ; paragraph (verbExample (S.mkCl S.she_NP v S.something_NP S.something_NP)) ;
s2 = inflVerb v s2 = inflVerb v
} ; } ;
InflectionV2V v = { InflectionV2V v = {
t = "v" ; t = "v" ;
s1 = heading1 (heading verb_Category) ++ s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (S.mkVP (L.sleep_V)))) ; paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (S.mkVP (L.sleep_V)))) ;
s2 = inflVerb v s2 = inflVerb v
} ; } ;
InflectionV2S v = { InflectionV2S v = {
t = "v" ; t = "v" ;
s1 = heading1 (heading verb_Category) ++ s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (lin S (ss "...")))) ; paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (lin S (ss "...")))) ;
s2 = inflVerb v s2 = inflVerb v
} ; } ;
InflectionV2Q v = { InflectionV2Q v = {
t = "v" ; t = "v" ;
s1 = heading1 (heading verb_Category) ++ s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (lin QS (ss "...")))) ; paragraph (verbExample (S.mkCl S.she_NP v S.we_NP (lin QS (ss "...")))) ;
s2 = inflVerb v s2 = inflVerb v
} ; } ;
InflectionV2A v = { InflectionV2A v = {
t = "v" ; t = "v" ;
s1 = heading1 (heading verb_Category) ++ s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v S.we_NP L.beautiful_A)) ; paragraph (verbExample (S.mkCl S.she_NP v S.we_NP L.beautiful_A)) ;
s2 = inflVerb v s2 = inflVerb v
} ; } ;
InflectionVV v = { InflectionVV v = {
t = "v" ; t = "v" ;
s1 = heading1 (heading verb_Category) ++ s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v (S.mkVP (L.sleep_V)))) ; paragraph (verbExample (S.mkCl S.she_NP v (S.mkVP (L.sleep_V)))) ;
s2 = inflVerb v s2 = inflVerb v
} ; } ;
InflectionVS v = { InflectionVS v = {
t = "v" ; t = "v" ;
s1 = heading1 (heading verb_Category) ++ s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v (lin S (ss "...")))) ; paragraph (verbExample (S.mkCl S.she_NP v (lin S (ss "...")))) ;
s2 = inflVerb v s2 = inflVerb v
} ; } ;
InflectionVQ v = { InflectionVQ v = {
t = "v" ; t = "v" ;
s1 = heading1 (heading verb_Category) ++ s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v (lin QS (ss "...")))) ; paragraph (verbExample (S.mkCl S.she_NP v (lin QS (ss "...")))) ;
s2 = inflVerb v s2 = inflVerb v
} ; } ;
InflectionVA v = { InflectionVA v = {
t = "v" ; t = "v" ;
s1 = heading1 (heading verb_Category) ++ s1 = heading1 (heading verb_Category) ++
paragraph (verbExample (S.mkCl S.she_NP v L.beautiful_A)) ; paragraph (verbExample (S.mkCl S.she_NP v L.beautiful_A)) ;
s2 = inflVerb v s2 = inflVerb v
} ; } ;
oper oper
verbExample : CatEst.Cl -> Str = \cl -> (S.mkUtt cl).s ; verbExample : CatEst.Cl -> Str = \cl -> (S.mkUtt cl).s ;
{- {-
-} --# notpresent -} --# notpresent
inflVerb : CatEst.V -> Str = \verb -> inflVerb : CatEst.V -> Str = \verb ->
let let
--verb = sverb2verbSep verb0 ; --verb = sverb2verbSep verb0 ;
vfin : ResEst.VForm -> Str = \f -> vfin : ResEst.VForm -> Str = \f ->
verb.s ! f ; verb.s ! f ;
nounNounHeading : Parameter -> Parameter -> Str = \n1,n2 -> nounNounHeading : Parameter -> Parameter -> Str = \n1,n2 ->
(S.mkUtt (G.PossNP (S.mkCN n1) (S.mkNP n2))).s ; (S.mkUtt (G.PossNP (S.mkCN n1) (S.mkNP n2))).s ;
in in
@@ -152,7 +152,7 @@ oper
th (heading singular_Parameter) ++ th (heading singular_Parameter) ++
th (heading plural_Parameter) th (heading plural_Parameter)
++ th (heading passive_Parameter) --# notpresent ++ th (heading passive_Parameter) --# notpresent
) ++ ) ++
tr (th "1.p" ++ td (vfin (Presn Sg P1)) ++ td (vfin (Presn Pl P1)) tr (th "1.p" ++ td (vfin (Presn Sg P1)) ++ td (vfin (Presn Pl P1))
++ intagAttr "td" "rowspan=3" (vfin (PassPresn True)) --# notpresent ++ intagAttr "td" "rowspan=3" (vfin (PassPresn True)) --# notpresent
) ++ ) ++
@@ -167,13 +167,13 @@ oper
th (heading singular_Parameter) ++ th (heading singular_Parameter) ++
th (heading plural_Parameter) th (heading plural_Parameter)
++ th (heading passive_Parameter) --# notpresent ++ th (heading passive_Parameter) --# notpresent
) ++ ) ++
tr (th "1.p" ++ td (vfin (Impf Sg P1)) ++ td (vfin (Impf Pl P1)) tr (th "1.p" ++ td (vfin (Impf Sg P1)) ++ td (vfin (Impf Pl P1))
++ intagAttr "td" "rowspan=3" (vfin (PassImpf True))) ++ ++ intagAttr "td" "rowspan=3" (vfin (PassImpf True))) ++
tr (th "2.p" ++ td (vfin (Impf Sg P2)) ++ td (vfin (Impf Pl P2))) ++ tr (th "2.p" ++ td (vfin (Impf Sg P2)) ++ td (vfin (Impf Pl P2))) ++
tr (th "3.p" ++ td (vfin (Impf Sg P3)) ++ td (vfin (Impf Pl P3))) ++ tr (th "3.p" ++ td (vfin (Impf Sg P3)) ++ td (vfin (Impf Pl P3))) ++
tr (th (heading negative_Parameter) ++ tr (th (heading negative_Parameter) ++
td (vfin (PastPart Act)) ++ td (vfin (PastPart Act)) ++
td (vfin (PastPart Pass)) ++ td (vfin (PastPart Pass)) ++
td (vfin (PassImpf False))) td (vfin (PassImpf False)))
) ++ ) ++
@@ -183,12 +183,12 @@ oper
th (heading singular_Parameter) ++ th (heading singular_Parameter) ++
th (heading plural_Parameter) th (heading plural_Parameter)
++ th (heading passive_Parameter) --# notpresent ++ th (heading passive_Parameter) --# notpresent
) ++ ) ++
tr (th "1.p" ++ td (vfin (Condit Sg P1)) ++ td (vfin (Condit Pl P1)) tr (th "1.p" ++ td (vfin (Condit Sg P1)) ++ td (vfin (Condit Pl P1))
++ intagAttr "td" "rowspan=3" "TODO pass condit (nt loetaks)" --# notpresent ++ intagAttr "td" "rowspan=3" "TODO pass condit (nt loetaks)" --# notpresent
) ++ ) ++
tr (th "2.p" ++ td (vfin (Condit Sg P2)) ++ td (vfin (Condit Pl P2))) ++ tr (th "2.p" ++ td (vfin (Condit Sg P2)) ++ td (vfin (Condit Pl P2))) ++
tr (th "3.p" ++ td (vfin (Condit Sg P3)) ++ td (vfin (Condit Pl P3))) tr (th "3.p" ++ td (vfin (Condit Sg P3)) ++ td (vfin (Condit Pl P3)))
) ++ ) ++
heading3 (nounNounHeading present_Parameter quotative_Parameter) ++ heading3 (nounNounHeading present_Parameter quotative_Parameter) ++
frameTable ( frameTable (
@@ -196,8 +196,8 @@ oper
th (heading singular_Parameter) ++ th (heading singular_Parameter) ++
th (heading plural_Parameter) th (heading plural_Parameter)
++ th (heading passive_Parameter) --# notpresent ++ th (heading passive_Parameter) --# notpresent
) ++ ) ++
tr (th "isik." ++ td (vfin (Quotative Act)) tr (th "isik." ++ td (vfin (Quotative Act))
++ intagAttr "td" "rowspan=3" (vfin (Quotative Act)) --# notpresent ++ intagAttr "td" "rowspan=3" (vfin (Quotative Act)) --# notpresent
) ++ ) ++
tr (th "umbis." ++ td (vfin (Quotative Pass)) ++ td (vfin (Quotative Pass)) tr (th "umbis." ++ td (vfin (Quotative Pass)) ++ td (vfin (Quotative Pass))
@@ -208,11 +208,11 @@ oper
th (heading singular_Parameter) ++ th (heading singular_Parameter) ++
th (heading plural_Parameter) th (heading plural_Parameter)
++ th (heading passive_Parameter) --# notpresent ++ th (heading passive_Parameter) --# notpresent
) ++ ) ++
tr (th "1.p" ++ td "" ++ td (vfin ImperP1Pl) ++ tr (th "1.p" ++ td "" ++ td (vfin ImperP1Pl) ++
intagAttr "td" "rowspan=3" (vfin ImperPass)) ++ intagAttr "td" "rowspan=3" (vfin ImperPass)) ++
tr (th "2.p" ++ td (vfin (Imper Sg)) ++ td (vfin (Imper Pl))) ++ tr (th "2.p" ++ td (vfin (Imper Sg)) ++ td (vfin (Imper Pl))) ++
tr (th "3.p" ++ td (vfin (ImperP3)) ++ td (vfin ImperP3)) tr (th "3.p" ++ td (vfin (ImperP3)) ++ td (vfin ImperP3))
) ++ ) ++
heading2 (nounPluralHeading nominal_form_ParameterType).s ++ heading2 (nounPluralHeading nominal_form_ParameterType).s ++
heading3 (heading infinitive_Parameter) ++ heading3 (heading infinitive_Parameter) ++
@@ -221,32 +221,32 @@ oper
th (heading nominative_Parameter) ++ td (vfin (Inf InfDa))) ++ th (heading nominative_Parameter) ++ td (vfin (Inf InfDa))) ++
tr (th (heading inessive_Parameter) ++ td (vfin (Inf InfDes))) ++ tr (th (heading inessive_Parameter) ++ td (vfin (Inf InfDes))) ++
tr (intagAttr "th" "rowspan=5" "ma" ++ tr (intagAttr "th" "rowspan=5" "ma" ++
th (heading illative_Parameter) ++ td (vfin (Inf InfMa))) ++ th (heading illative_Parameter) ++ td (vfin (Inf InfMa))) ++
tr (th (heading inessive_Parameter) ++ td (vfin (Inf InfMas))) ++ tr (th (heading inessive_Parameter) ++ td (vfin (Inf InfMas))) ++
tr (th (heading elative_Parameter) ++ td (vfin (Inf InfMast))) ++ tr (th (heading elative_Parameter) ++ td (vfin (Inf InfMast))) ++
tr (th (heading abessive_Parameter) ++ td (vfin (Inf InfMata))) ++ tr (th (heading abessive_Parameter) ++ td (vfin (Inf InfMata))) ++
tr (th (heading translative_Parameter) ++ td (vfin (Inf InfMaks))) tr (th (heading translative_Parameter) ++ td (vfin (Inf InfMaks)))
) ++ ) ++
heading3 (heading participle_Parameter) ++ heading3 (heading participle_Parameter) ++
frameTable ( frameTable (
tr (intagAttr "th" "rowspan=2" (heading present_Parameter) ++ tr (intagAttr "th" "rowspan=2" (heading present_Parameter) ++
th (heading active_Parameter) ++ th (heading active_Parameter) ++
td (vfin (PresPart Act))) ++ td (vfin (PresPart Act))) ++
tr (th (heading passive_Parameter) ++ tr (th (heading passive_Parameter) ++
td (vfin (PresPart Pass))) ++ td (vfin (PresPart Pass))) ++
tr (intagAttr "th" "rowspan=2" (heading perfect_Parameter) ++ tr (intagAttr "th" "rowspan=2" (heading perfect_Parameter) ++
th (heading active_Parameter) ++ th (heading active_Parameter) ++
td (vfin (PastPart Act ))) ++ td (vfin (PastPart Act ))) ++
tr (th (heading passive_Parameter) ++ tr (th (heading passive_Parameter) ++
td (vfin (PastPart Pass ))) td (vfin (PastPart Pass )))
) ; --} ) ; --}
inflNoun : (NForm -> Str) -> Str = \nouns -> inflNoun : (NForm -> Str) -> Str = \nouns ->
frameTable ( frameTable (
tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++ tr (th "" ++ th (heading singular_Parameter) ++ th (heading plural_Parameter) ) ++
tr (th (heading nominative_Parameter) ++ td (nouns (NCase Sg Nom)) ++ td (nouns (NCase Pl Nom))) ++ tr (th (heading nominative_Parameter) ++ td (nouns (NCase Sg Nom)) ++ td (nouns (NCase Pl Nom))) ++
tr (th (heading genitive_Parameter) ++ td (nouns (NCase Sg Gen)) ++ td (nouns (NCase Pl Gen))) ++ tr (th (heading genitive_Parameter) ++ td (nouns (NCase Sg Gen)) ++ td (nouns (NCase Pl Gen))) ++
@@ -274,6 +274,6 @@ lin
MkTag i = ss (i.t) ; MkTag i = ss (i.t) ;
{- --# notpresent {- --# notpresent
-} -}
} }

View File

@@ -1,4 +1,4 @@
concrete ExtraEst of ExtraEstAbs = CatEst ** concrete ExtraEst of ExtraEstAbs = CatEst **
open ResEst, MorphoEst, Coordination, Prelude, NounEst, StructuralEst, (R = ParamX) in { open ResEst, MorphoEst, Coordination, Prelude, NounEst, StructuralEst, (R = ParamX) in {
flags coding=utf8; flags coding=utf8;
lin lin
@@ -6,7 +6,7 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
s,sp = \\_,_ => np.s ! NPCase Gen ; s,sp = \\_,_ => np.s ! NPCase Gen ;
isNum = False ; isNum = False ;
isDef = True ; --- "Jussin kolme autoa ovat" ; thus "...on" is missing isDef = True ; --- "Jussin kolme autoa ovat" ; thus "...on" is missing
isNeg = False isNeg = False
} ; } ;
GenCN = caseCN Gen ; -- soome mees GenCN = caseCN Gen ; -- soome mees
@@ -18,11 +18,11 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
GenIP ip = {s = \\_,_ => ip.s ! NPCase Gen} ; GenIP ip = {s = \\_,_ => ip.s ! NPCase Gen} ;
GenRP num cn = { GenRP num cn = {
s = \\n,c => let k = npform2case num.n c in relPron ! NCase n Gen ++ cn.s ! NCase num.n k ; s = \\n,c => let k = npform2case num.n c in relPron ! NCase n Gen ++ cn.s ! NCase num.n k ;
a = RNoAg a = RNoAg
--- a = RAg (agrP3 num.n) --- a = RAg (agrP3 num.n)
} ; } ;
oper oper
caseCN : Case -> NP -> CN -> CN = \c,np,cn -> caseCN : Case -> NP -> CN -> CN = \c,np,cn ->
lin CN { s = \\nf => np.s ! NPCase c ++ cn.s ! nf } ; lin CN { s = \\nf => np.s ! NPCase c ++ cn.s ! nf } ;
@@ -37,17 +37,17 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
MkVPI vp = {s = \\i => infVP (NPCase Nom) Pos (agrP3 Sg) vp i} ; MkVPI vp = {s = \\i => infVP (NPCase Nom) Pos (agrP3 Sg) vp i} ;
ConjVPI = conjunctDistrTable InfForm ; ConjVPI = conjunctDistrTable InfForm ;
ComplVPIVV vv vpi = ComplVPIVV vv vpi =
insertObj (\\_,_,_ => vpi.s ! vv.vi) (predV vv) ; insertObj (\\_,_,_ => vpi.s ! vv.vi) (predV vv) ;
lincat lincat
VPS = { VPS = {
s : Agr => Str ; s : Agr => Str ;
sc : NPForm ; --- can be different for diff parts sc : NPForm ; --- can be different for diff parts
} ; } ;
[VPS] = { [VPS] = {
s1,s2 : Agr => Str ; s1,s2 : Agr => Str ;
sc : NPForm ; --- take the first: minä osaan kutoa ja täytyy virkata sc : NPForm ; --- take the first: minä osaan kutoa ja täytyy virkata
} ; } ;
@@ -79,45 +79,45 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
PassAgentVPSlash vp np = vp ; PassAgentVPSlash vp np = vp ;
{- {-
s = {s = vp.s.s ; h = vp.s.h ; p = vp.s.p ; sc = npform2subjcase vp.c2.c} ; s = {s = vp.s.s ; h = vp.s.h ; p = vp.s.p ; sc = npform2subjcase vp.c2.c} ;
s2 = \\b,p,a => np.s ! NPCase Nom ++ vp.s2 ! b ! p ! a ; s2 = \\b,p,a => np.s ! NPCase Nom ++ vp.s2 ! b ! p ! a ;
adv = vp.adv ; adv = vp.adv ;
ext = vp.ext ; ext = vp.ext ;
vptyp = vp.vptyp ; vptyp = vp.vptyp ;
} ; -} } ; -}
AdvExistNP adv np = AdvExistNP adv np =
mkClause (\_ -> adv.s) np.a (insertObj mkClause (\_ -> adv.s) np.a (insertObj
(\\_,b,_ => np.s ! NPCase Nom) (predV (verbOlema ** {sc = NPCase Nom}))) ; (\\_,b,_ => np.s ! NPCase Nom) (predV (verbOlema ** {sc = NPCase Nom}))) ;
RelExistNP prep rp np = { RelExistNP prep rp np = {
s = \\t,ant,bo,ag => s = \\t,ant,bo,ag =>
let let
n = complNumAgr ag ; n = complNumAgr ag ;
cl = mkClause cl = mkClause
(\_ -> appCompl True Pos prep (rp2np n rp)) (\_ -> appCompl True Pos prep (rp2np n rp))
np.a np.a
(insertObj (insertObj
(\\_,b,_ => np.s ! NPCase Nom) (\\_,b,_ => np.s ! NPCase Nom)
(predV (verbOlema ** {sc = NPCase Nom}))) ; (predV (verbOlema ** {sc = NPCase Nom}))) ;
in in
cl.s ! t ! ant ! bo ! SDecl ; cl.s ! t ! ant ! bo ! SDecl ;
c = NPCase Nom c = NPCase Nom
} ; } ;
AdvPredNP adv v np = AdvPredNP adv v np =
mkClause (\_ -> adv.s) np.a (insertObj mkClause (\_ -> adv.s) np.a (insertObj
(\\_,b,_ => np.s ! NPCase Nom) (predV v)) ; (\\_,b,_ => np.s ! NPCase Nom) (predV v)) ;
ICompExistNP adv np = ICompExistNP adv np =
let cl = mkClause (\_ -> adv.s ! np.a) np.a (insertObj let cl = mkClause (\_ -> adv.s ! np.a) np.a (insertObj
(\\_,b,_ => np.s ! NPCase Nom) (predV (verbOlema ** {sc = NPCase Nom}))) ; (\\_,b,_ => np.s ! NPCase Nom) (predV (verbOlema ** {sc = NPCase Nom}))) ;
in { in {
s = \\t,a,p => cl.s ! t ! a ! p ! SDecl s = \\t,a,p => cl.s ! t ! a ! p ! SDecl
} ; } ;
IAdvPredNP iadv v np = IAdvPredNP iadv v np =
let cl = mkClause (\_ -> iadv.s) np.a (insertObj let cl = mkClause (\_ -> iadv.s) np.a (insertObj
(\\_,b,_ => np.s ! v.sc) (predV v)) ; (\\_,b,_ => np.s ! v.sc) (predV v)) ;
in { in {
s = \\t,a,p => cl.s ! t ! a ! p ! SDecl s = \\t,a,p => cl.s ! t ! a ! p ! SDecl
@@ -132,14 +132,14 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
n = Sg n = Sg
} ; } ;
PartCN cn = PartCN cn =
let let
acn = DetCN (DetQuant IndefArt NumSg) cn acn = DetCN (DetQuant IndefArt NumSg) cn
in { in {
s = table { s = table {
NPCase Nom | NPAcc => acn.s ! NPCase ResEst.Part ; NPCase Nom | NPAcc => acn.s ! NPCase ResEst.Part ;
c => acn.s ! c c => acn.s ! c
} ; } ;
a = acn.a ; a = acn.a ;
isPron = False ; isNeg = False isPron = False ; isNeg = False
} ; } ;
@@ -147,34 +147,34 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
--The reflexive possessive "oma" --The reflexive possessive "oma"
--for "ta näeb oma koera" instead of *"tema koera" --for "ta näeb oma koera" instead of *"tema koera"
OmaPoss = {s,sp = \\_,_ => "oma" ; isDef,isNeg,isNum = False} ; OmaPoss = {s,sp = \\_,_ => "oma" ; isDef,isNeg,isNum = False} ;
ma_Pron = shortPronoun "ma" "mu" "mind" "minu" Sg P1 ; ma_Pron = shortPronoun "ma" "mu" "mind" "minu" Sg P1 ;
sa_Pron = shortPronoun "sa" "su" "sind" "sinu" Sg P2; sa_Pron = shortPronoun "sa" "su" "sind" "sinu" Sg P2;
ta_Pron = shortPronoun "ta" "ta" "teda" "tema" Sg P3 ; ta_Pron = shortPronoun "ta" "ta" "teda" "tema" Sg P3 ;
me_Pron = me_Pron =
{s = table { {s = table {
NPCase Nom => "me" ; NPCase Nom => "me" ;
n => (we_Pron.s) ! n n => (we_Pron.s) ! n
} ; } ;
a = Ag Pl P1 } ; a = Ag Pl P1 } ;
te_Pron = te_Pron =
{s = table { {s = table {
NPCase Nom => "te" ; NPCase Nom => "te" ;
n => (youPl_Pron.s) ! n n => (youPl_Pron.s) ! n
} ; } ;
a = Ag Pl P2 } ; a = Ag Pl P2 } ;
nad_Pron = nad_Pron =
{s = table { {s = table {
NPCase Nom => "nad" ; NPCase Nom => "nad" ;
n => (they_Pron.s) ! n n => (they_Pron.s) ! n
} ; } ;
a = Ag Pl P3 } ; a = Ag Pl P3 } ;
---- copied from VerbEst.CompAP, should be shared ---- copied from VerbEst.CompAP, should be shared
ICompAP ap = { ICompAP ap = {
s = \\agr => s = \\agr =>
let let
n = complNumAgr agr ; n = complNumAgr agr ;
c = case n of { c = case n of {
@@ -187,68 +187,68 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
IAdvAdv adv = {s = "kui" ++ adv.s} ; IAdvAdv adv = {s = "kui" ++ adv.s} ;
ProDrop p = { ProDrop p = {
s = table {NPCase (Nom | Gen) => [] ; c => p.s ! c} ; s = table {NPCase (Nom | Gen) => [] ; c => p.s ! c} ;
---- drop Gen only works in adjectival position ---- drop Gen only works in adjectival position
a = p.a a = p.a
} ; } ;
-- : Pron -> Quant ; -- : Pron -> Quant ;
ProDropPoss p = { ProDropPoss p = {
s = \\_,_ => "oma" ; s = \\_,_ => "oma" ;
sp = \\_,_ => p.s ! NPCase Gen ; sp = \\_,_ => p.s ! NPCase Gen ;
isNum = False ; isNum = False ;
isDef = True ; isDef = True ;
isNeg = False isNeg = False
} ; } ;
lincat lincat
ClPlus, ClPlusObj, ClPlusAdv = ClausePlus ; ClPlus, ClPlusObj, ClPlusAdv = ClausePlus ;
Part = {s : Str} ; Part = {s : Str} ;
lin lin
S_SVO part t p clp = S_SVO part t p clp =
let let
cl = clp.s ! t.t ! t.a ! p.p ; cl = clp.s ! t.t ! t.a ! p.p ;
pa = part.s ---- pa = part.s ----
in in
{s = t.s ++ p.s ++ cl.subj ++ pa ++ cl.fin ++ cl.inf ++ cl.compl ++ cl.adv ++ cl.ext} ; {s = t.s ++ p.s ++ cl.subj ++ pa ++ cl.fin ++ cl.inf ++ cl.compl ++ cl.adv ++ cl.ext} ;
S_OSV part t p clp = S_OSV part t p clp =
let let
cl = clp.s ! t.t ! t.a ! p.p ; cl = clp.s ! t.t ! t.a ! p.p ;
pa = part.s ---- pa = part.s ----
in in
{s = t.s ++ p.s ++ cl.compl ++ pa ++ cl.subj ++ cl.fin ++ cl.inf ++ cl.adv ++ cl.ext} ; {s = t.s ++ p.s ++ cl.compl ++ pa ++ cl.subj ++ cl.fin ++ cl.inf ++ cl.adv ++ cl.ext} ;
S_VSO part t p clp = S_VSO part t p clp =
let let
cl = clp.s ! t.t ! t.a ! p.p ; cl = clp.s ! t.t ! t.a ! p.p ;
pa = part.s pa = part.s
in in
{s = t.s ++ p.s ++ cl.fin ++ pa ++ cl.subj ++ cl.inf ++ cl.compl ++ cl.adv ++ cl.ext} ; {s = t.s ++ p.s ++ cl.fin ++ pa ++ cl.subj ++ cl.inf ++ cl.compl ++ cl.adv ++ cl.ext} ;
S_ASV part t p clp = S_ASV part t p clp =
let let
cl = clp.s ! t.t ! t.a ! p.p ; cl = clp.s ! t.t ! t.a ! p.p ;
pa = part.s pa = part.s
in in
{s = t.s ++ p.s ++ cl.adv ++ pa ++ cl.subj ++ cl.fin ++ cl.inf ++ cl.compl ++ cl.ext} ; {s = t.s ++ p.s ++ cl.adv ++ pa ++ cl.subj ++ cl.fin ++ cl.inf ++ cl.compl ++ cl.ext} ;
S_OVS part t p clp = S_OVS part t p clp =
let let
cl = clp.s ! t.t ! t.a ! p.p ; cl = clp.s ! t.t ! t.a ! p.p ;
pa = part.s ---- pa = part.s ----
in in
{s = t.s ++ p.s ++ cl.compl ++ pa ++ cl.fin ++ cl.inf ++ cl.subj ++ cl.adv ++ cl.ext} ; {s = t.s ++ p.s ++ cl.compl ++ pa ++ cl.fin ++ cl.inf ++ cl.subj ++ cl.adv ++ cl.ext} ;
PredClPlus np vp = mkClausePlus (subjForm np vp.sc) np.a vp ; PredClPlus np vp = mkClausePlus (subjForm np vp.sc) np.a vp ;
PredClPlusFocSubj np vp = insertKinClausePlus 0 (mkClausePlus (subjForm np vp.sc) np.a vp) ; PredClPlusFocSubj np vp = insertKinClausePlus 0 (mkClausePlus (subjForm np vp.sc) np.a vp) ;
PredClPlusFocVerb np vp = insertKinClausePlus 1 (mkClausePlus (subjForm np vp.sc) np.a vp) ; PredClPlusFocVerb np vp = insertKinClausePlus 1 (mkClausePlus (subjForm np vp.sc) np.a vp) ;
PredClPlusObj np vps obj = PredClPlusObj np vps obj =
insertObjClausePlus 0 False (\\b => appCompl True b vps.c2 obj) (mkClausePlus (subjForm np vps.sc) np.a vps) ; insertObjClausePlus 0 False (\\b => appCompl True b vps.c2 obj) (mkClausePlus (subjForm np vps.sc) np.a vps) ;
PredClPlusFocObj np vps obj = PredClPlusFocObj np vps obj =
insertObjClausePlus 0 True (\\b => appCompl True b vps.c2 obj) (mkClausePlus (subjForm np vps.sc) np.a vps) ; insertObjClausePlus 0 True (\\b => appCompl True b vps.c2 obj) (mkClausePlus (subjForm np vps.sc) np.a vps) ;
PredClPlusAdv np vp adv = PredClPlusAdv np vp adv =
insertObjClausePlus 1 False (\\_ => adv.s) (mkClausePlus (subjForm np vp.sc) np.a vp) ; insertObjClausePlus 1 False (\\_ => adv.s) (mkClausePlus (subjForm np vp.sc) np.a vp) ;
PredClPlusFocAdv np vp adv = PredClPlusFocAdv np vp adv =
insertObjClausePlus 1 True (\\_ => adv.s) (mkClausePlus (subjForm np vp.sc) np.a vp) ; insertObjClausePlus 1 True (\\_ => adv.s) (mkClausePlus (subjForm np vp.sc) np.a vp) ;
ClPlusWithObj c = c ; ClPlusWithObj c = c ;
@@ -256,4 +256,4 @@ concrete ExtraEst of ExtraEstAbs = CatEst **
gi_Part = ss "gi" | ss "ki" ; gi_Part = ss "gi" | ss "ki" ;
} }

View File

@@ -33,7 +33,7 @@ abstract ExtraEstAbs = Extra [
me_Pron : Pron ; me_Pron : Pron ;
te_Pron : Pron ; te_Pron : Pron ;
nad_Pron : Pron ; nad_Pron : Pron ;
OmaPoss : Quant ; -- Reflexive possessive "oma" OmaPoss : Quant ; -- Reflexive possessive "oma"
ProDropPoss : Pron -> Quant ; -- vaimoni --TODO Is this relevant in Estonian? Is the agreement of pronoun ever needed, or is it the same as oma? ProDropPoss : Pron -> Quant ; -- vaimoni --TODO Is this relevant in Estonian? Is the agreement of pronoun ever needed, or is it the same as oma?

View File

@@ -1,6 +1,6 @@
concrete GrammarEst of Grammar = concrete GrammarEst of Grammar =
NounEst, NounEst,
VerbEst, VerbEst,
AdjectiveEst, AdjectiveEst,
AdverbEst, AdverbEst,
NumeralEst, NumeralEst,

View File

@@ -1,11 +1,11 @@
concrete IdiomEst of Idiom = CatEst ** concrete IdiomEst of Idiom = CatEst **
open MorphoEst, ParadigmsEst, Prelude in { open MorphoEst, ParadigmsEst, Prelude in {
flags optimize=all_subs ; coding=utf8; flags optimize=all_subs ; coding=utf8;
lin lin
ExistNP np = ExistNP np =
let let
cas : Polarity -> NPForm = \p -> case p of { cas : Polarity -> NPForm = \p -> case p of {
Pos => NPCase Nom ; -- on olemas lammas Pos => NPCase Nom ; -- on olemas lammas
Neg => NPCase Part -- ei ole olemas lammast Neg => NPCase Part -- ei ole olemas lammast
@@ -14,7 +14,7 @@ concrete IdiomEst of Idiom = CatEst **
in in
existClause noSubj (agrP3 Sg) vp ; existClause noSubj (agrP3 Sg) vp ;
ExistIP ip = ExistIP ip =
let let
cas : NPForm = NPCase Nom ; ---- also partitive in Extra cas : NPForm = NPCase Nom ; ---- also partitive in Extra
vp = insertObj (\\_,b,_ => "olemas") (predV olla) ; vp = insertObj (\\_,b,_ => "olemas") (predV olla) ;
@@ -45,11 +45,11 @@ concrete IdiomEst of Idiom = CatEst **
adv = vp.adv ; adv = vp.adv ;
p = vp.p ; p = vp.p ;
ext = vp.ext ; ext = vp.ext ;
sc = vp.sc ; sc = vp.sc ;
} ; } ;
ProgrVP vp = ProgrVP vp =
let let
inf = (vp.s ! VIInf InfMas ! Simul ! Pos ! agrP3 Sg).fin ; inf = (vp.s ! VIInf InfMas ! Simul ! Pos ! agrP3 Sg).fin ;
on = predV olla on = predV olla
in { in {
@@ -58,16 +58,16 @@ concrete IdiomEst of Idiom = CatEst **
adv = vp.adv ; adv = vp.adv ;
p = vp.p ; p = vp.p ;
ext = vp.ext ; ext = vp.ext ;
sc = vp.sc ; sc = vp.sc ;
} ; } ;
-- This gives "otetaan oluet" instead of "ottakaamme oluet". -- This gives "otetaan oluet" instead of "ottakaamme oluet".
-- The imperative is not available in a $VP$. -- The imperative is not available in a $VP$.
ImpPl1 vp = ImpPl1 vp =
let vps = vp.s ! VIPass Pres ! Simul ! Pos ! Ag Pl P1 let vps = vp.s ! VIPass Pres ! Simul ! Pos ! Ag Pl P1
in in
{s = vps.fin ++ vps.inf ++ {s = vps.fin ++ vps.inf ++
vp.s2 ! True ! Pos ! Ag Pl P1 ++ vp.p ++ vp.ext vp.s2 ! True ! Pos ! Ag Pl P1 ++ vp.p ++ vp.ext
} ; } ;

View File

@@ -1,6 +1,6 @@
concrete LexiconEst of Lexicon = CatEst ** open MorphoEst, ParadigmsEst, Prelude in { concrete LexiconEst of Lexicon = CatEst ** open MorphoEst, ParadigmsEst, Prelude in {
flags flags
optimize=values ; coding=utf8; optimize=values ; coding=utf8;
@@ -216,7 +216,7 @@ lin
yellow_A = mkA (mkN "kollane" "kollase" "kollast" "kollasesse" "kollaste" "kollaseid") ; yellow_A = mkA (mkN "kollane" "kollase" "kollast" "kollasesse" "kollaste" "kollaseid") ;
young_A = mkA (mkN "noor" "noore" "noort") ; young_A = mkA (mkN "noor" "noore" "noort") ;
do_V2 = mkV2 (mkV "tegema" "teha") ; do_V2 = mkV2 (mkV "tegema" "teha") ;
now_Adv = mkAdv "nüüd" ; now_Adv = mkAdv "nüüd" ;
already_Adv = mkAdv "juba" ; already_Adv = mkAdv "juba" ;

View File

@@ -1,9 +1,9 @@
resource MakeStructuralEst = open CatEst, ParadigmsEst, MorphoEst, Prelude in { resource MakeStructuralEst = open CatEst, ParadigmsEst, MorphoEst, Prelude in {
oper oper
mkConj : Str -> Str -> ParadigmsEst.Number -> Conj = \x,y,n -> mkConj : Str -> Str -> ParadigmsEst.Number -> Conj = \x,y,n ->
{s1 = x ; s2 = y ; n = n ; lock_Conj = <>} ; {s1 = x ; s2 = y ; n = n ; lock_Conj = <>} ;
mkSubj : Str -> Subj = \x -> mkSubj : Str -> Subj = \x ->
{s = x ; lock_Subj = <>} ; {s = x ; lock_Subj = <>} ;
mkIQuant : Str -> IQuant = \s -> mkIQuant : Str -> IQuant = \s ->
{s = \\n,c => s ; lock_IQuant = <>} ; ---- {s = \\n,c => s ; lock_IQuant = <>} ; ----

View File

@@ -11,7 +11,7 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
flags optimize=all ; coding=utf8; flags optimize=all ; coding=utf8;
oper oper
---------------------- ----------------------
-- morph. paradigms -- -- morph. paradigms --
---------------------- ----------------------
@@ -19,7 +19,7 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
--Noun paradigms in HjkEst --Noun paradigms in HjkEst
--Comparative adjectives --Comparative adjectives
--(could just use hjk_type_IVb_audit "suurem" "a") --(could just use hjk_type_IVb_audit "suurem" "a")
-- Comparative adjectives inflect in the same way -- Comparative adjectives inflect in the same way
-- TODO: confirm this -- TODO: confirm this
dSuurempi : Str -> NForms = \suurem -> dSuurempi : Str -> NForms = \suurem ->
@@ -47,17 +47,17 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
saama saama
(saa + "da") (saa + "da")
(saa + "b") (saa + "b")
(saa + "dakse") (saa + "dakse")
(saa + "ge") -- Imper Pl (saa + "ge") -- Imper Pl
sai sai
(saa + "nud") (saa + "nud")
(saa + "dud") ; (saa + "dud") ;
-- TS 49 -- TS 49
-- no d/t in da, takse ; imperfect 3sg ends in s -- no d/t in da, takse ; imperfect 3sg ends in s
cKaima : (_ : Str) -> VForms = \kaima -> cKaima : (_ : Str) -> VForms = \kaima ->
let let
kai = Predef.tk 2 kaima ; kai = Predef.tk 2 kaima ;
in vForms8 in vForms8
kaima kaima
(kai + "a") (kai + "a")
@@ -65,10 +65,10 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
(kai + "akse") (kai + "akse")
(kai + "ge") (kai + "ge")
(kai + "s") (kai + "s")
(kai + "nud") (kai + "nud")
(kai + "dud") ; (kai + "dud") ;
-- TS 49 -- TS 49
-- vowel changes in da, takse, no d/t ; imperfect 3sg ends in i -- vowel changes in da, takse, no d/t ; imperfect 3sg ends in i
cJooma : (_ : Str) -> VForms = \jooma -> cJooma : (_ : Str) -> VForms = \jooma ->
let let
@@ -78,7 +78,7 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
u = case o of { u = case o of {
"o" => "u" ; "o" => "u" ;
"ö" => "ü" ; "ö" => "ü" ;
_ => o _ => o
} ; } ;
q = case o of { q = case o of {
("o"|"ö") => "õ" ; ("o"|"ö") => "õ" ;
@@ -91,9 +91,9 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
juua juua
(joo + "b") (joo + "b")
(juua + "kse") (juua + "kse")
(joo + "ge") (joo + "ge")
j6i j6i
(joo + "nud") (joo + "nud")
(joo + "dud") ; (joo + "dud") ;
-- TS 50-52 (elama, muutuma, kirjutama), 53 (tegelema) alt forms -- TS 50-52 (elama, muutuma, kirjutama), 53 (tegelema) alt forms
@@ -105,10 +105,10 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
elama elama
(ela + "da") (ela + "da")
(ela + "b") (ela + "b")
(ela + "takse") (ela + "takse")
(ela + "ge") -- Imperative P1 Pl (ela + "ge") -- Imperative P1 Pl
(ela + "s") -- Imperfect P3 Sg (ela + "s") -- Imperfect P3 Sg
(ela + "nud") (ela + "nud")
(ela + "tud") ; (ela + "tud") ;
-- TS 53 (tegelema) -- TS 53 (tegelema)
@@ -121,12 +121,12 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
tegelema tegelema
(tegel + "da") (tegel + "da")
(tegele + "b") (tegele + "b")
(tegel + "dakse") (tegel + "dakse")
(tegel + "ge") -- Imperative P1 Pl (tegel + "ge") -- Imperative P1 Pl
(tegele + "s") -- Imperfect P3 Sg (tegele + "s") -- Imperfect P3 Sg
(tegel + "nud") (tegel + "nud")
(tegel + "dud") ; (tegel + "dud") ;
-- TS 54 (tulema) -- TS 54 (tulema)
-- consonant assimilation (l,r,n) in da, takse -- consonant assimilation (l,r,n) in da, takse
-- d in tud, g in ge -- d in tud, g in ge
@@ -146,7 +146,7 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
(tul + "i") (tul + "i")
(tul + "nud") (tul + "nud")
(tul + "dud") ; (tul + "dud") ;
-- TS 55-56 (õppima, sündima) -- TS 55-56 (õppima, sündima)
-- t in takse, tud ; consonant gradation on stem -- t in takse, tud ; consonant gradation on stem
cLeppima : (_ : Str) -> VForms = \leppima -> cLeppima : (_ : Str) -> VForms = \leppima ->
@@ -154,7 +154,7 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
leppi = Predef.tk 2 leppima ; leppi = Predef.tk 2 leppima ;
i = last leppi ; i = last leppi ;
lepp = init leppi ; lepp = init leppi ;
lepi = (weaker lepp) + i lepi = (weaker lepp) + i
in vForms8 in vForms8
leppima leppima
(leppi + "da") (leppi + "da")
@@ -164,7 +164,7 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
(leppi + "s") -- Imperfect P3 Sg (leppi + "s") -- Imperfect P3 Sg
(leppi + "nud") (leppi + "nud")
(lepi + "tud") ; (lepi + "tud") ;
-- TS 57 (lugema) -- TS 57 (lugema)
-- Like 55-56 but irregular gradation patterns, that shouldn't be in HjkEst.weaker -- Like 55-56 but irregular gradation patterns, that shouldn't be in HjkEst.weaker
--including also marssima,valssima --including also marssima,valssima
@@ -184,7 +184,7 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
_ + ("uge"|"ude") => l + "oe" ; _ + ("uge"|"ude") => l + "oe" ;
_ + #c + "ssi" => (init lug) + e; _ + #c + "ssi" => (init lug) + e;
_ => (weaker lug) + e _ => (weaker lug) + e
} ; } ;
in vForms8 in vForms8
lugema lugema
@@ -195,8 +195,8 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
(luge + "s") -- Imperfect P3 Sg (luge + "s") -- Imperfect P3 Sg
(luge + "nud") (luge + "nud")
(loe + "tud") ; (loe + "tud") ;
-- TS 58 muutma, saatma, -- TS 58 muutma, saatma,
-- like laskma (TS 62, 64), but no reduplication of stem consonant (muutma~muuta, not *muutta) -- like laskma (TS 62, 64), but no reduplication of stem consonant (muutma~muuta, not *muutta)
-- like andma (TS 63) but different takse (muudetakse vs. antakse) -- like andma (TS 63) but different takse (muudetakse vs. antakse)
@@ -213,8 +213,8 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
(muut + "is") (muut + "is")
(muut + "nud") (muut + "nud")
(muud + "etud") ; -- always e? (muud + "etud") ; -- always e?
-- TS 59-60 (petma~petetakse, jätma~jäetakse) -- TS 59-60 (petma~petetakse, jätma~jäetakse)
-- takse given as second argument -- takse given as second argument
cPetma : (_,_ : Str) -> VForms = \petma,jaetakse -> cPetma : (_,_ : Str) -> VForms = \petma,jaetakse ->
let let
@@ -251,8 +251,8 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
(jatt + "is") (jatt + "is")
(jat + "nud") (jat + "nud")
(ko + "etud") ; (ko + "etud") ;
-} -}
-- TS 61 (laulma) -- TS 61 (laulma)
--vowel (a/e) given with the second argument --vowel (a/e) given with the second argument
--veenma,naerma --veenma,naerma
@@ -268,7 +268,7 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
(kuul + "is") (kuul + "is")
(kuul + "nud") (kuul + "nud")
(kuul + "dud") ; (kuul + "dud") ;
-- TS 62 (tõusma), 64 (mõksma) -- TS 62 (tõusma), 64 (mõksma)
-- vowel (a/e) given with the second argument -- vowel (a/e) given with the second argument
-- doesn't give alt. forms joosta, joostes -- doesn't give alt. forms joosta, joostes
@@ -283,9 +283,9 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
(las + "takse") (las + "takse")
(las + "ke") (las + "ke")
(lask + "is") (lask + "is")
(lask + "nud") (lask + "nud")
(las + "tud") ; (las + "tud") ;
-- TS 62 alt forms -- TS 62 alt forms
cJooksma : (_ : Str) -> VForms = \jooksma -> cJooksma : (_ : Str) -> VForms = \jooksma ->
let let
@@ -298,10 +298,10 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
(joos + "takse") (joos + "takse")
(joos + "ke") (joos + "ke")
(jooks + "is") (jooks + "is")
(jooks + "nud") (jooks + "nud")
(joos + "tud") ; (joos + "tud") ;
-- TS 63 (andma, murdma, hoidma) -- TS 63 (andma, murdma, hoidma)
-- vowel given in second arg (andma~annab; tundma~tunneb) -- vowel given in second arg (andma~annab; tundma~tunneb)
cAndma : (_,_ : Str) -> VForms = \andma,annab -> cAndma : (_,_ : Str) -> VForms = \andma,annab ->
let let
@@ -310,18 +310,18 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
ann = weaker and ; --murr, hoi ann = weaker and ; --murr, hoi
te = case (last ann) of { --to prevent teadma~teaab te = case (last ann) of { --to prevent teadma~teaab
"a" => init ann ; "a" => init ann ;
_ => ann _ => ann
} ; } ;
in vForms8 in vForms8
andma andma
(and + "a") (and + "a")
annab annab
(an + "takse") (an + "takse")
(and + "ke") (and + "ke")
(and + "is") (and + "is")
(and + "nud") (and + "nud")
(an + "tud") ; (an + "tud") ;
-- TS 65 (pesema) -- TS 65 (pesema)
-- a consonant stem verb in disguise -- a consonant stem verb in disguise
cPesema : (_ : Str) -> VForms = \pesema -> cPesema : (_ : Str) -> VForms = \pesema ->
@@ -356,9 +356,9 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
(nag + "i") (nag + "i")
(nai + "nud") (nai + "nud")
(nah + "tud") ; (nah + "tud") ;
-- TS 67-68 (hüppama, tõmbama) -- TS 67-68 (hüppama, tõmbama)
-- strong stem in ma, b, s -- strong stem in ma, b, s
-- weak stem in da, takse, ge, nud, tud -- weak stem in da, takse, ge, nud, tud
-- t in da, takse; k in ge -- t in da, takse; k in ge
@@ -387,7 +387,7 @@ resource MorphoEst = ResEst ** open Prelude, Predef, HjkEst in {
omb = Predef.tk 2 omble ; omb = Predef.tk 2 omble ;
omm = case omb of { omm = case omb of {
"mõt" => "mõe" ; --some "double weak" patterns; however weaker (weaker omb) makes the coverage worse "mõt" => "mõe" ; --some "double weak" patterns; however weaker (weaker omb) makes the coverage worse
_ => weaker omb _ => weaker omb
} ; } ;
ommel = omm + e + l ; ommel = omm + e + l ;
in vForms8 in vForms8
@@ -445,22 +445,22 @@ These used to be here:
aForms2A : AForms -> Adjective = \afs -> { aForms2A : AForms -> Adjective = \afs -> {
s = table { s = table {
Posit => table { Posit => table {
AN n => (nForms2N afs.posit).s ! n ; AN n => (nForms2N afs.posit).s ! n ;
AAdv => afs.adv_posit AAdv => afs.adv_posit
} ; } ;
Compar => table { Compar => table {
AN n => (nForms2N afs.compar).s ! n ; AN n => (nForms2N afs.compar).s ! n ;
AAdv => afs.adv_compar AAdv => afs.adv_compar
} ; } ;
Superl => table { Superl => table {
AN n => (nForms2N afs.superl).s ! n ; AN n => (nForms2N afs.superl).s ! n ;
AAdv => afs.adv_superl AAdv => afs.adv_superl
} }
} ; } ;
lock_A = <> lock_A = <>
} ; } ;
nforms2aforms : NForms -> AForms = \nforms -> nforms2aforms : NForms -> AForms = \nforms ->
let let
suure = init (nforms ! 1) ; suure = init (nforms ! 1) ;
suur = Predef.tk 4 (nforms ! 8) ; suur = Predef.tk 4 (nforms ! 8) ;
@@ -477,7 +477,7 @@ These used to be here:
These used to be here: These used to be here:
VForms : Type = Predef.Ints 7 => Str ; VForms : Type = Predef.Ints 7 => Str ;
vForms8 : (x1,_,_,_,_,_,_,x8 : Str) -> VForms ; vForms8 : (x1,_,_,_,_,_,_,x8 : Str) -> VForms ;
regVForms : (x1,_,_,x4 : Str) -> VForms ; regVForms : (x1,_,_,x4 : Str) -> VForms ;
vforms2V : VForms -> Verb ; vforms2V : VForms -> Verb ;
-} -}
@@ -487,7 +487,7 @@ These used to be here:
-- for Structural -- for Structural
----------------------- -----------------------
caseTable : Number -> Noun -> Case => Str = \n,cn -> caseTable : Number -> Noun -> Case => Str = \n,cn ->
\\c => cn.s ! NCase n c ; \\c => cn.s ! NCase n c ;
mkDet : Number -> Noun -> { mkDet : Number -> Noun -> {
@@ -510,11 +510,11 @@ caseTable : Number -> Noun -> Case => Str = \n,cn ->
-- TODO: remove NPAcc? -- TODO: remove NPAcc?
-- I: keep NPAcc; see appCompl in ResEst, it takes care of finding a right case for various types of complements; incl. when pronouns get different treatment than nouns (PassVP). -- I: keep NPAcc; see appCompl in ResEst, it takes care of finding a right case for various types of complements; incl. when pronouns get different treatment than nouns (PassVP).
mkPronoun : (_,_,_ : Str) -> Number -> Person -> mkPronoun : (_,_,_ : Str) -> Number -> Person ->
{s : NPForm => Str ; a : Agr} = {s : NPForm => Str ; a : Agr} =
\mina, minu, mind, n, p -> \mina, minu, mind, n, p ->
let { let {
minu_short = ie_to_i minu minu_short = ie_to_i minu
} in } in
{s = table { {s = table {
NPCase Nom => mina ; NPCase Nom => mina ;
NPCase Gen => minu ; NPCase Gen => minu ;
@@ -533,7 +533,7 @@ caseTable : Number -> Noun -> Case => Str = \n,cn ->
NPAcc => mind NPAcc => mind
} ; } ;
a = Ag n p a = Ag n p
} ; } ;
-- meiesse/teiesse -> meisse/teisse -- meiesse/teiesse -> meisse/teisse
ie_to_i : Str -> Str ; ie_to_i : Str -> Str ;
@@ -543,14 +543,14 @@ caseTable : Number -> Noun -> Case => Str = \n,cn ->
_ => x _ => x
} ; } ;
shortPronoun : (_,_,_,_ : Str) -> Number -> Person -> shortPronoun : (_,_,_,_ : Str) -> Number -> Person ->
{s : NPForm => Str ; a : Agr} = {s : NPForm => Str ; a : Agr} =
\ma, mu, mind, minu, n, p -> \ma, mu, mind, minu, n, p ->
let shortMa = mkPronoun ma mu mind n p ; let shortMa = mkPronoun ma mu mind n p ;
mulle : Str = case mu of { mulle : Str = case mu of {
"mu" => "mulle" ; "mu" => "mulle" ;
"su" => "sulle" ; "su" => "sulle" ;
_ => shortMa.s ! NPCase Allat _ => shortMa.s ! NPCase Allat
} ; } ;
in shortMa ** { s = table { in shortMa ** { s = table {
@@ -561,18 +561,18 @@ caseTable : Number -> Noun -> Case => Str = \n,cn ->
NPCase Comit => minu + "ga" ; NPCase Comit => minu + "ga" ;
NPCase Termin => minu + "ni" ; NPCase Termin => minu + "ni" ;
x => shortMa.s ! x } } ; x => shortMa.s ! x } } ;
oper oper
relPron : NForm => Str = relPron : NForm => Str =
let mis = nForms2N (nForms6 "mis" "mille" "mida" "millesse" "mille" "mida") let mis = nForms2N (nForms6 "mis" "mille" "mida" "millesse" "mille" "mida")
in fixPlNom "mis" mis.s ; in fixPlNom "mis" mis.s ;
kesPron : NForm => Str = kesPron : NForm => Str =
let kes = nForms2N (nForms6 "kes" "kelle" "keda" "kellesse" "kelle" "keda") let kes = nForms2N (nForms6 "kes" "kelle" "keda" "kellesse" "kelle" "keda")
in fixPlNom "kes" kes.s ; in fixPlNom "kes" kes.s ;
ProperName = {s : Case => Str} ; ProperName = {s : Case => Str} ;
@@ -613,7 +613,7 @@ oper
Allat => "nendele" ; Allat => "nendele" ;
Abess => "nendeta" ; Abess => "nendeta" ;
Comit => "nendega" ; Comit => "nendega" ;
Termin => "nendeni" Termin => "nendeni"
} ; } ;
} ; } ;

View File

@@ -7,15 +7,15 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
-- The $Number$ is subtle: "nuo autot", "nuo kolme autoa" are both plural -- The $Number$ is subtle: "nuo autot", "nuo kolme autoa" are both plural
-- for verb agreement, but the noun form is singular in the latter. -- for verb agreement, but the noun form is singular in the latter.
DetCN det cn = DetCN det cn =
let let
n : Number = case det.isNum of { n : Number = case det.isNum of {
True => Sg ; True => Sg ;
_ => det.n _ => det.n
} ; } ;
ncase : NPForm -> Case * NForm = \c -> ncase : NPForm -> Case * NForm = \c ->
let k = npform2case n c let k = npform2case n c
in in
case <n, c, det.isNum, det.isDef> of { case <n, c, det.isNum, det.isDef> of {
<_, NPAcc, True,_> => <Nom,NCase Sg Part> ; -- kolm kassi (as object) <_, NPAcc, True,_> => <Nom,NCase Sg Part> ; -- kolm kassi (as object)
<_, NPCase Nom, True,_> => <Nom,NCase Sg Part> ; -- kolm kassi (as subject) <_, NPCase Nom, True,_> => <Nom,NCase Sg Part> ; -- kolm kassi (as subject)
@@ -25,12 +25,12 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
<_, NPCase Abess, _, _> => <Gen,NCase n Abess> ; -- kolme kassita <_, NPCase Abess, _, _> => <Gen,NCase n Abess> ; -- kolme kassita
<_, NPCase Ess, _, _> => <Gen,NCase n Ess> ; -- kolme kassina <_, NPCase Ess, _, _> => <Gen,NCase n Ess> ; -- kolme kassina
<_, NPCase Termin,_, _> => <Gen,NCase n Termin> ; -- kolme kassini <_, NPCase Termin,_, _> => <Gen,NCase n Termin> ; -- kolme kassini
<_, _, True,_> => <k, NCase Sg k> ; -- kolmeks kassiks (all other cases) <_, _, True,_> => <k, NCase Sg k> ; -- kolmeks kassiks (all other cases)
_ => <k, NCase n k> -- kass, kassi, ... (det is not a number) _ => <k, NCase n k> -- kass, kassi, ... (det is not a number)
} }
in { in {
s = \\c => let s = \\c => let
k = ncase c ; k = ncase c ;
in in
det.s ! k.p1 ++ cn.s ! k.p2 ; det.s ! k.p1 ++ cn.s ! k.p2 ;
@@ -42,7 +42,7 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
isPron = False isPron = False
} ; } ;
DetNP det = DetNP det =
let let
n : Number = case det.isNum of { n : Number = case det.isNum of {
True => Sg ; True => Sg ;
@@ -50,7 +50,7 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
} ; } ;
in { in {
s = \\c => let k = npform2case n c in s = \\c => let k = npform2case n c in
det.sp ! k ; det.sp ! k ;
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
@@ -59,7 +59,7 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
} ; } ;
UsePN pn = { UsePN pn = {
s = \\c => pn.s ! npform2case Sg c ; s = \\c => pn.s ! npform2case Sg c ;
a = agrP3 Sg ; a = agrP3 Sg ;
isPron = False isPron = False
} ; } ;
@@ -72,10 +72,10 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
} ; } ;
PPartNP np v2 = PPartNP np v2 =
let let
num : Number = complNumAgr np.a ; num : Number = complNumAgr np.a ;
part : Str = v2.s ! (PastPart Pass) ; part : Str = v2.s ! (PastPart Pass) ;
adj : NForms = hjk_type_IVb_maakas part ; adj : NForms = hjk_type_IVb_maakas part ;
partGen : Str = adj ! 1 ; partGen : Str = adj ! 1 ;
partEss : Str = partGen + "na" partEss : Str = partGen + "na"
in { in {
@@ -91,8 +91,8 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
} ; } ;
DetQuantOrd quant num ord = { DetQuantOrd quant num ord = {
s = \\c => quant.s ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! NCase num.n c ; s = \\c => quant.s ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! NCase num.n c ;
sp = \\c => quant.sp ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! NCase num.n c ; sp = \\c => quant.sp ! num.n ! c ++ num.s ! Sg ! c ++ ord.s ! NCase num.n c ;
n = num.n ; n = num.n ;
isNum = num.isNum ; isNum = num.isNum ;
isDef = quant.isDef isDef = quant.isDef
@@ -135,19 +135,19 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
NumCard n = n ** {isNum = case n.n of {Sg => False ; _ => True}} ; -- üks raamat/kaks raamatut NumCard n = n ** {isNum = case n.n of {Sg => False ; _ => True}} ; -- üks raamat/kaks raamatut
NumDigits numeral = { NumDigits numeral = {
s = \\n,c => numeral.s ! NCard (NCase n c) ; s = \\n,c => numeral.s ! NCard (NCase n c) ;
n = numeral.n n = numeral.n
} ; } ;
OrdDigits numeral = {s = \\nc => numeral.s ! NOrd nc} ; OrdDigits numeral = {s = \\nc => numeral.s ! NOrd nc} ;
NumNumeral numeral = { NumNumeral numeral = {
s = \\n,c => numeral.s ! NCard (NCase n c) ; s = \\n,c => numeral.s ! NCard (NCase n c) ;
n = numeral.n n = numeral.n
} ; } ;
OrdNumeral numeral = {s = \\nc => numeral.s ! NOrd nc} ; OrdNumeral numeral = {s = \\nc => numeral.s ! NOrd nc} ;
AdNum adn num = { AdNum adn num = {
s = \\n,c => adn.s ++ num.s ! n ! c ; s = \\n,c => adn.s ++ num.s ! n ! c ;
n = num.n n = num.n
} ; } ;
@@ -156,17 +156,17 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
OrdSuperl a = {s = \\nc => "kõige" ++ a.s ! Compar ! AN nc} ; OrdSuperl a = {s = \\nc => "kõige" ++ a.s ! Compar ! AN nc} ;
DefArt = { DefArt = {
s = \\_,_ => [] ; s = \\_,_ => [] ;
sp = table {Sg => pronSe.s ; Pl => pronNe.s} ; sp = table {Sg => pronSe.s ; Pl => pronNe.s} ;
isNum = False ; isNum = False ;
isDef = True -- autot ovat isDef = True -- autot ovat
} ; } ;
IndefArt = { IndefArt = {
s = \\_,_ => [] ; --use isDef in DetCN s = \\_,_ => [] ; --use isDef in DetCN
sp = \\n,c => sp = \\n,c =>
(nForms2N (nForms6 "üks" "ühe" "üht" "ühesse" "ühtede" (nForms2N (nForms6 "üks" "ühe" "üht" "ühesse" "ühtede"
"ühtesid")).s ! NCase n c ; "ühtesid")).s ! NCase n c ;
isNum,isDef = False -- autoja on isNum,isDef = False -- autoja on
} ; } ;
@@ -176,7 +176,7 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
ncase : Case -> NForm = \c -> NCase n c ; ncase : Case -> NForm = \c -> NCase n c ;
in { in {
s = \\c => let k = npform2case n c in s = \\c => let k = npform2case n c in
cn.s ! ncase k ; cn.s ! ncase k ;
a = agrP3 Sg ; a = agrP3 Sg ;
isPron = False isPron = False
} ; } ;
@@ -209,21 +209,21 @@ concrete NounEst of Noun = CatEst ** open ResEst, HjkEst, MorphoEst, Prelude in
AdjCN ap cn = { AdjCN ap cn = {
s = \\nf => s = \\nf =>
case ap.infl of { case ap.infl of {
(Invariable|Participle) => ap.s ! True ! (NCase Sg Nom) ++ cn.s ! nf ; --valmis kassile; väsinud kassile Invariable|Participle => ap.s ! True ! NCase Sg Nom ++ cn.s ! nf ; --valmis kassile; väsinud kassile
Regular => case nf of { Regular => case nf of {
NCase num (Ess|Abess|Comit|Termin) => ap.s ! True ! (NCase num Gen) ++ cn.s ! nf ; --suure kassiga, not *suurega kassiga NCase num (Ess|Abess|Comit|Termin) => ap.s ! True ! NCase num Gen ++ cn.s ! nf ; --suure kassiga, not *suurega kassiga
_ => ap.s ! True ! nf ++ cn.s ! nf _ => ap.s ! True ! nf ++ cn.s ! nf
} }
} }
} ; } ;
RelCN cn rs = {s = \\nf => cn.s ! nf ++ rs.s ! agrP3 (numN nf)} ; RelCN cn rs = {s = \\nf => cn.s ! nf ++ rs.s ! agrP3 (numN nf)} ;
RelNP np rs = { RelNP np rs = {
s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ; s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ;
a = np.a ; a = np.a ;
isPron = np.isPron ---- correct ? isPron = np.isPron ---- correct ?
} ; } ;

View File

@@ -2,12 +2,12 @@
-- --
-- Based on the Finnish Lexical Paradigms by Aarne Ranta 2003--2008 -- Based on the Finnish Lexical Paradigms by Aarne Ranta 2003--2008
-- --
-- This is an API to the user of the resource grammar -- This is an API to the user of the resource grammar
-- for adding lexical items. It gives functions for forming -- for adding lexical items. It gives functions for forming
-- expressions of open categories: nouns, adjectives, verbs. -- expressions of open categories: nouns, adjectives, verbs.
-- --
-- Closed categories (determiners, pronouns, conjunctions) are -- Closed categories (determiners, pronouns, conjunctions) are
-- accessed through the resource syntax API and $Structural.gf$. -- accessed through the resource syntax API and $Structural.gf$.
-- --
-- The main difference with $MorphoEst.gf$ is that the types -- The main difference with $MorphoEst.gf$ is that the types
-- referred to are compiled resource grammar types. We have moreover -- referred to are compiled resource grammar types. We have moreover
@@ -23,9 +23,9 @@
-- @author Kaarel Kaljurand -- @author Kaarel Kaljurand
-- @version 2013-10-21 -- @version 2013-10-21
resource ParadigmsEst = open resource ParadigmsEst = open
(Predef=Predef), (Predef=Predef),
Prelude, Prelude,
MorphoEst, MorphoEst,
HjkEst, HjkEst,
CatEst CatEst
@@ -33,9 +33,9 @@ resource ParadigmsEst = open
flags optimize=noexpand ; coding=utf8; flags optimize=noexpand ; coding=utf8;
--2 Parameters --2 Parameters
-- --
-- To abstract over gender, number, and (some) case names, -- To abstract over gender, number, and (some) case names,
-- we define the following identifiers. The application programmer -- we define the following identifiers. The application programmer
-- should always use these constants instead of the constructors -- should always use these constants instead of the constructors
-- defined in $ResEst$. -- defined in $ResEst$.
@@ -83,15 +83,15 @@ oper
--2 Conjunctions, adverbs --2 Conjunctions, adverbs
mkAdv : Str -> Adv ; mkAdv : Str -> Adv ;
mkAdV : Str -> AdV ; mkAdV : Str -> AdV ;
mkAdN : Str -> AdN ; mkAdN : Str -> AdN ;
mkAdA : Str -> AdA ; mkAdA : Str -> AdA ;
mkConj : overload { mkConj : overload {
mkConj : Str -> Conj ; -- just one word, default number Sg: e.g. "ja" mkConj : Str -> Conj ; -- just one word, default number Sg: e.g. "ja"
mkConj : Str -> Number -> Conj ; --just one word + number: e.g. "ja" Pl mkConj : Str -> Number -> Conj ; --just one word + number: e.g. "ja" Pl
mkConj : Str -> Str -> Conj ; --two words, default number: e.g. "nii" "kui" mkConj : Str -> Str -> Conj ; --two words, default number: e.g. "nii" "kui"
mkConj : Str -> Str -> Number -> Conj ; --two words + number: e.g. "nii" "kui" Pl mkConj : Str -> Str -> Number -> Conj ; --two words + number: e.g. "nii" "kui" Pl
} ; } ;
@@ -139,7 +139,7 @@ oper
-- Non-comparison one-place adjectives are just like nouns. -- Non-comparison one-place adjectives are just like nouns.
-- The regular adjectives are based on $regN$ in the positive. -- The regular adjectives are based on $regN$ in the positive.
-- Comparison adjectives have three forms. -- Comparison adjectives have three forms.
-- The comparative and the superlative -- The comparative and the superlative
-- are always inflected in the same way, so the nominative of them is actually -- are always inflected in the same way, so the nominative of them is actually
-- enough (TODO: confirm). -- enough (TODO: confirm).
@@ -156,7 +156,7 @@ oper
mkA2 : A -> Prep -> A2 -- e.g. "vihane" (postGenPrep "peale") mkA2 : A -> Prep -> A2 -- e.g. "vihane" (postGenPrep "peale")
= \a,p -> a ** {c2 = p ; lock_A2 = <>}; = \a,p -> a ** {c2 = p ; lock_A2 = <>};
invA : Str -> A ; -- invariable adjectives, such as genitive attributes ; no agreement to head, no comparison forms. invA : Str -> A ; -- invariable adjectives, such as genitive attributes ; no agreement to head, no comparison forms.
--2 Verbs --2 Verbs
-- --
@@ -237,8 +237,8 @@ oper
mkV2V : V -> Prep -> V2V ; -- e.g. "käskima" adessive mkV2V : V -> Prep -> V2V ; -- e.g. "käskima" adessive
mkV2V : Str -> V2V ; -- e.g. "käskima" adessive mkV2V : Str -> V2V ; -- e.g. "käskima" adessive
} ; } ;
mkV2Vf : V -> Prep -> InfForm -> V2V ; -- e.g. "keelama" partitive infMast mkV2Vf : V -> Prep -> InfForm -> V2V ; -- e.g. "keelama" partitive infMast
mkVA : overload { mkVA : overload {
mkVA : V -> Prep -> VA ; -- e.g. "muutuma" translative mkVA : V -> Prep -> VA ; -- e.g. "muutuma" translative
mkVA : Str -> VA ; -- string, default case translative mkVA : Str -> VA ; -- string, default case translative
@@ -248,21 +248,21 @@ oper
mkV2A : V -> Prep -> Prep -> V2A ; -- e.g. "värvima" genitive translative mkV2A : V -> Prep -> Prep -> V2A ; -- e.g. "värvima" genitive translative
mkV2A : Str -> V2A ; -- string, default cases genitive and translative mkV2A : Str -> V2A ; -- string, default cases genitive and translative
} ; } ;
mkVQ : overload { mkVQ : overload {
mkVQ : V -> VQ ; mkVQ : V -> VQ ;
mkVQ : Str -> VQ ; mkVQ : Str -> VQ ;
} ; } ;
mkV2Q : V -> Prep -> V2Q ; -- e.g. "küsima" ablative mkV2Q : V -> Prep -> V2Q ; -- e.g. "küsima" ablative
mkAS : A -> AS ; --% mkAS : A -> AS ; --%
mkA2S : A -> Prep -> A2S ; --% mkA2S : A -> Prep -> A2S ; --%
mkAV : A -> AV ; --% mkAV : A -> AV ; --%
mkA2V : A -> Prep -> A2V ; --% mkA2V : A -> Prep -> A2V ; --%
-- Notice: categories $AS, A2S, AV, A2V$ are just $A$, -- Notice: categories $AS, A2S, AV, A2V$ are just $A$,
-- and the second argument is given -- and the second argument is given
-- as an adverb. Likewise -- as an adverb. Likewise
-- $V0$ is just $V$. -- $V0$ is just $V$.
V0 : Type ; --% V0 : Type ; --%
@@ -290,13 +290,13 @@ oper
translative = Transl ; translative = Transl ;
terminative = Termin ; terminative = Termin ;
essive = Ess ; essive = Ess ;
abessive = Abess ; abessive = Abess ;
comitative = Comit ; comitative = Comit ;
infDa = InfDa ; infMa = InfMa ; infMast = InfMast ; infDa = InfDa ; infMa = InfMa ; infMast = InfMast ;
infDes = InfDes ; infMas = InfMas ; infMaks = InfMaks ; infMata = InfMata ; infDes = InfDes ; infMas = InfMas ; infMaks = InfMaks ; infMata = InfMata ;
prePrep : Case -> Str -> Prep = prePrep : Case -> Str -> Prep =
\c,p -> {c = NPCase c ; s = p ; isPre = True ; lock_Prep = <>} ; \c,p -> {c = NPCase c ; s = p ; isPre = True ; lock_Prep = <>} ;
postPrep : Case -> Str -> Prep = postPrep : Case -> Str -> Prep =
\c,p -> {c = NPCase c ; s = p ; isPre = False ; lock_Prep = <>} ; \c,p -> {c = NPCase c ; s = p ; isPre = False ; lock_Prep = <>} ;
@@ -313,7 +313,7 @@ oper
mkAdA : Str -> AdA = \str -> {s = str ; lock_AdA = <>} ; mkAdA : Str -> AdA = \str -> {s = str ; lock_AdA = <>} ;
mkConj = overload { mkConj = overload {
mkConj : Str -> Conj = \ja -> lin Conj ((sd2 "" ja) ** {n = Sg}) ; mkConj : Str -> Conj = \ja -> lin Conj ((sd2 "" ja) ** {n = Sg}) ;
mkConj : Str -> Number -> Conj = \ja,num -> lin Conj ((sd2 "" ja) ** {n = num}) ; mkConj : Str -> Number -> Conj = \ja,num -> lin Conj ((sd2 "" ja) ** {n = num}) ;
@@ -335,12 +335,12 @@ oper
} ; } ;
-- Adjective forms (incl. comp and sup) are derived from noun forms -- Adjective forms (incl. comp and sup) are derived from noun forms
mk1A : Str -> A = \suur -> mk1A : Str -> A = \suur ->
let aforms = aForms2A (nforms2aforms (hjk_type suur)) let aforms = aForms2A (nforms2aforms (hjk_type suur))
in aforms ** {infl = Regular } ; in aforms ** {infl = Regular } ;
mkNA : N -> A = \suur -> mkNA : N -> A = \suur ->
let aforms = aForms2A (nforms2aforms (n2nforms suur)) ; let aforms = aForms2A (nforms2aforms (n2nforms suur)) ;
in aforms ** {infl = Regular } ; in aforms ** {infl = Regular } ;
@@ -348,28 +348,28 @@ oper
-- mk2N, mk3N, mk4N make sure that the user specified forms end up in the paradigm, -- mk2N, mk3N, mk4N make sure that the user specified forms end up in the paradigm,
-- even though the rest is wrong -- even though the rest is wrong
mk2N : (link,lingi : Str) -> N = \link,lingi -> mk2N : (link,lingi : Str) -> N = \link,lingi ->
let nfs : NForms = (nForms2 link lingi) ; let nfs : NForms = (nForms2 link lingi) ;
nfs_fixed : NForms = table { nfs_fixed : NForms = table {
0 => link ; 0 => link ;
1 => lingi ; 1 => lingi ;
2 => nfs ! 2 ; 2 => nfs ! 2 ;
3 => nfs ! 3 ; 3 => nfs ! 3 ;
4 => nfs ! 4 ; 4 => nfs ! 4 ;
5 => nfs ! 5 5 => nfs ! 5
} ; } ;
in nForms2N nfs_fixed ** {lock_N = <> } ; in nForms2N nfs_fixed ** {lock_N = <> } ;
mk3N : (tukk,tuku,tukku : Str) -> N = \tukk,tuku,tukku -> mk3N : (tukk,tuku,tukku : Str) -> N = \tukk,tuku,tukku ->
let nfs : NForms = (nForms3 tukk tuku tukku) ; let nfs : NForms = (nForms3 tukk tuku tukku) ;
nfs_fixed : NForms = table { nfs_fixed : NForms = table {
0 => tukk ; 0 => tukk ;
1 => tuku ; 1 => tuku ;
2 => tukku ; 2 => tukku ;
3 => nfs ! 3 ; 3 => nfs ! 3 ;
4 => nfs ! 4 ; 4 => nfs ! 4 ;
5 => nfs ! 5 5 => nfs ! 5
} ; } ;
in nForms2N nfs_fixed ** {lock_N = <> } ; in nForms2N nfs_fixed ** {lock_N = <> } ;
@@ -381,7 +381,7 @@ oper
1 => paadi ; 1 => paadi ;
2 => paati ; 2 => paati ;
3 => nfs ! 3 ; 3 => nfs ! 3 ;
4 => nfs ! 4 ; 4 => nfs ! 4 ;
5 => paate 5 => paate
} ; } ;
in nForms2N nfs_fixed ** {lock_N = <> } ; in nForms2N nfs_fixed ** {lock_N = <> } ;
@@ -510,7 +510,7 @@ oper
-- voolik/vooliku/voolikut -- voolik/vooliku/voolikut
<_ + #c, _ + #v, _ + #v + "t"> => hjk_type_IVb_audit tukk u ; <_ + #c, _ + #v, _ + #v + "t"> => hjk_type_IVb_audit tukk u ;
_ => nForms2 tukk tuku _ => nForms2 tukk tuku
} ; } ;
nForms4 : (_,_,_,_ : Str) -> NForms = \paat,paadi,paati,paate -> nForms4 : (_,_,_,_ : Str) -> NForms = \paat,paadi,paati,paate ->
@@ -518,33 +518,33 @@ oper
-- distinguish between joonis and segadus -- distinguish between joonis and segadus
<_ +("ne"|"s"), _+"se", _+"st", _+"seid"> => hjk_type_Va_otsene paat ; <_ +("ne"|"s"), _+"se", _+"st", _+"seid"> => hjk_type_Va_otsene paat ;
<_ +("ne"|"s"), _+"se", _+"st", _+"si"> => hjk_type_Vb_oluline paat ; <_ +("ne"|"s"), _+"se", _+"st", _+"si"> => hjk_type_Vb_oluline paat ;
<_ +"ne", _+"se", _+"set", _+"seid"> => nForms3 paat paadi paati ; -- -ne adjectives ('algne') are not like 'tõuge' <_ +"ne", _+"se", _+"set", _+"seid"> => nForms3 paat paadi paati ; -- -ne adjectives ('algne') are not like 'tõuge'
--distinguish between kõne and aine --distinguish between kõne and aine
<_ +"e", _+"e", _+"et", _+"sid"> => hjk_type_III_ratsu paat ; <_ +"e", _+"e", _+"et", _+"sid"> => hjk_type_III_ratsu paat ;
<_ +"e", _+"e", _+"et", _+"eid"> => hjk_type_VII_touge2 paat paadi ; <_ +"e", _+"e", _+"et", _+"eid"> => hjk_type_VII_touge2 paat paadi ;
_ => nForms3 paat paadi paati _ => nForms3 paat paadi paati
} ; } ;
{- {-
--Version that uses pl gen instead of pl part --Version that uses pl gen instead of pl part
nForms4 : (_,_,_,_ : Str) -> NForms = \paat,paadi,paati,paatide -> nForms4 : (_,_,_,_ : Str) -> NForms = \paat,paadi,paati,paatide ->
case <paat,paadi,paati,paatide> of { case <paat,paadi,paati,paatide> of {
-- pl gen can't distinguish between joonis and segadus -- pl gen can't distinguish between joonis and segadus
-- <_ +("ne"|"s"), _+"se", _+"st", _+"seid"> => hjk_type_Va_otsene paat ; -- <_ +("ne"|"s"), _+"se", _+"st", _+"seid"> => hjk_type_Va_otsene paat ;
-- <_ +("ne"|"s"), _+"se", _+"st", _+"si"> => hjk_type_Vb_oluline paat ; -- <_ +("ne"|"s"), _+"se", _+"st", _+"si"> => hjk_type_Vb_oluline paat ;
--pl gen can distinguish between kõne and aine --pl gen can distinguish between kõne and aine
--plus side that any noun that is formed with 4-arg, --plus side that any noun that is formed with 4-arg,
--the user given forms are inserted to the paradigm, --the user given forms are inserted to the paradigm,
--and more forms are created from pl gen, none from pl part --and more forms are created from pl gen, none from pl part
<_ +"e", _+"e", _+"et", _+"de"> => hjk_type_III_ratsu paat ; <_ +"e", _+"e", _+"et", _+"de"> => hjk_type_III_ratsu paat ;
<_ +"e", _+"e", _+"et", _+"te"> => hjk_type_VII_touge2 paat paadi ; <_ +"e", _+"e", _+"et", _+"te"> => hjk_type_VII_touge2 paat paadi ;
_ => nForms3 paat paadi paati _ => nForms3 paat paadi paati
} ; } ;
-} -}
mkN2 = overload { mkN2 = overload {
@@ -553,12 +553,12 @@ oper
} ; } ;
mmkN2 : N -> Prep -> N2 = \n,c -> n ** {c2 = c ; isPre = mkIsPre c ; lock_N2 = <>} ; mmkN2 : N -> Prep -> N2 = \n,c -> n ** {c2 = c ; isPre = mkIsPre c ; lock_N2 = <>} ;
mkN3 = \n,c,e -> n ** {c2 = c ; c3 = e ; mkN3 = \n,c,e -> n ** {c2 = c ; c3 = e ;
isPre = mkIsPre c ; -- matka Londonist Pariisi isPre = mkIsPre c ; -- matka Londonist Pariisi
isPre2 = mkIsPre e ; -- Suomen voitto Ruotsista isPre2 = mkIsPre e ; -- Suomen voitto Ruotsista
lock_N3 = <> lock_N3 = <>
} ; } ;
mkIsPre : Prep -> Bool = \p -> case p.c of { mkIsPre : Prep -> Bool = \p -> case p.c of {
NPCase Gen => notB p.isPre ; -- Jussin veli (prep is <Gen,"",True>, isPre becomes False) NPCase Gen => notB p.isPre ; -- Jussin veli (prep is <Gen,"",True>, isPre becomes False)
_ => True -- syyte Jussia vastaan, puhe Jussin puolesta _ => True -- syyte Jussia vastaan, puhe Jussin puolesta
@@ -588,7 +588,7 @@ oper
mkA_1 : Str -> A = \x -> noun2adjDeg (mk1N x) ** {infl = Regular ; lock_A = <>} ; mkA_1 : Str -> A = \x -> noun2adjDeg (mk1N x) ** {infl = Regular ; lock_A = <>} ;
-- auxiliaries -- auxiliaries
mkAdjective : (_,_,_ : Adj) -> A = \hea,parem,parim -> mkAdjective : (_,_,_ : Adj) -> A = \hea,parem,parim ->
{s = table { {s = table {
Posit => hea.s ; Posit => hea.s ;
Compar => parem.s ; Compar => parem.s ;
@@ -601,8 +601,8 @@ oper
-- Adjectives whose comparison forms are explicitly given. -- Adjectives whose comparison forms are explicitly given.
-- The inflection of these forms with the audit-rule always works. -- The inflection of these forms with the audit-rule always works.
regAdjective : Noun -> Str -> Str -> A = \posit,compar,superl -> regAdjective : Noun -> Str -> Str -> A = \posit,compar,superl ->
mkAdjective mkAdjective
(noun2adj posit) (noun2adj posit)
(noun2adjComp False (nForms2N (hjk_type_IVb_audit compar "a"))) (noun2adjComp False (nForms2N (hjk_type_IVb_audit compar "a")))
(noun2adjComp False (nForms2N (hjk_type_IVb_audit superl "a"))) ; (noun2adjComp False (nForms2N (hjk_type_IVb_audit superl "a"))) ;
@@ -637,31 +637,31 @@ oper
mkV : (aru : Str) -> (saama : V) -> V = mkPV ; -- particle verbs mkV : (aru : Str) -> (saama : V) -> V = mkPV ; -- particle verbs
} ; } ;
mk1V : Str -> V = \s -> mk1V : Str -> V = \s ->
let vfs = vforms2V (vForms1 s) in let vfs = vforms2V (vForms1 s) in
vfs ** {sc = NPCase Nom ; lock_V = <>} ; vfs ** {sc = NPCase Nom ; lock_V = <>} ;
mk2V : (_,_ : Str) -> V = \x,y -> mk2V : (_,_ : Str) -> V = \x,y ->
let let
vfs = vforms2V (vForms2 x y) vfs = vforms2V (vForms2 x y)
in vfs ** {sc = NPCase Nom ; lock_V = <>} ; in vfs ** {sc = NPCase Nom ; lock_V = <>} ;
mk3V : (_,_,_ : Str) -> V = \x,y,z -> mk3V : (_,_,_ : Str) -> V = \x,y,z ->
let let
vfs = vforms2V (vForms3 x y z) vfs = vforms2V (vForms3 x y z)
in vfs ** {sc = NPCase Nom ; lock_V = <>} ; in vfs ** {sc = NPCase Nom ; lock_V = <>} ;
mk4V : (x1,_,_,x4 : Str) -> V = \a,b,c,d -> mk4V : (x1,_,_,x4 : Str) -> V = \a,b,c,d ->
let let
vfs = vforms2V (vForms4 a b c d) vfs = vforms2V (vForms4 a b c d)
in vfs ** {sc = NPCase Nom ; lock_V = <>} ; in vfs ** {sc = NPCase Nom ; lock_V = <>} ;
mk8V : (x1,_,_,_,_,_,_,x8 : Str) -> V = \a,b,c,d,e,f,g,h -> mk8V : (x1,_,_,_,_,_,_,x8 : Str) -> V = \a,b,c,d,e,f,g,h ->
let let
vfs = vforms2V (vForms8 a b c d e f g h) vfs = vforms2V (vForms8 a b c d e f g h)
in vfs ** {sc = NPCase Nom ; lock_V = <>} ; in vfs ** {sc = NPCase Nom ; lock_V = <>} ;
mkPV : (aru : Str) -> (saama : V) -> V = \aru,saama -> mkPV : (aru : Str) -> (saama : V) -> V = \aru,saama ->
{s = saama.s ; p = aru ; sc = saama.sc ; lock_V = <> } ; {s = saama.s ; p = aru ; sc = saama.sc ; lock_V = <> } ;
-- This used to be the last case: _ => Predef.error (["expected infinitive, found"] ++ ottaa) -- This used to be the last case: _ => Predef.error (["expected infinitive, found"] ++ ottaa)
-- regexp example: ("" | ?) + ("a" | "e" | "i") + _ + "aa" => -- regexp example: ("" | ?) + ("a" | "e" | "i") + _ + "aa" =>
vForms1 : Str -> VForms = \lugema -> vForms1 : Str -> VForms = \lugema ->
let let
luge = Predef.tk 2 lugema ; luge = Predef.tk 2 lugema ;
@@ -672,7 +672,7 @@ oper
-- Small class of CVVma -- Small class of CVVma
? + ("ä"|"õ"|"i") + "ima" => ? + ("ä"|"õ"|"i") + "ima" =>
cKaima lugema ; --käima,viima,võima cKaima lugema ; --käima,viima,võima
? + ("aa"|"ee"|"ää") + "ma" => ? + ("aa"|"ee"|"ää") + "ma" =>
cSaama lugema ; -- saama,jääma,keema cSaama lugema ; -- saama,jääma,keema
? + ("oo"|"öö"|"üü") + "ma" => ? + ("oo"|"öö"|"üü") + "ma" =>
cJooma lugema ; --jooma,looma,lööma,müüma,pooma,sööma,tooma cJooma lugema ; --jooma,looma,lööma,müüma,pooma,sööma,tooma
@@ -680,30 +680,30 @@ oper
-- TS 53 -- TS 53
_ + #c + #v + "elema" => _ + #c + #v + "elema" =>
cTegelema lugema ; --not aelema cTegelema lugema ; --not aelema
-- TS 54 -- TS 54
-- Small class, just list all members -- Small class, just list all members
("tule"|"sure"|"pane") + "ma" => ("tule"|"sure"|"pane") + "ma" =>
cTulema lugema ; cTulema lugema ;
-- TS 55-57 -- TS 55-57
-- Consonant gradation -- Consonant gradation
-- Regular (55-56)'leppima' and irregular (57) 'lugema' -- Regular (55-56)'leppima' and irregular (57) 'lugema'
-- For reliable results regarding consonant gradation, use mk3V -- For reliable results regarding consonant gradation, use mk3V
_ + "ndima" => _ + "ndima" =>
cLeppima lugema ; cLeppima lugema ;
_ + #lmnr + ("k"|"p"|"t"|"b") + ("ima"|"uma") => _ + #lmnr + ("k"|"p"|"t"|"b") + ("ima"|"uma") =>
cLeppima lugema ; cLeppima lugema ;
_ + ("sk"|"ps"|"ks"|"ts"|"pl") + ("ima") => --|"uma") => _ + ("sk"|"ps"|"ks"|"ts"|"pl") + ("ima") => --|"uma") =>
cLeppima lugema ; cLeppima lugema ;
_ + ("hk"|"hm"|"hn"|"hr"|"ht") + ("ima") => --most *hCuma are TS 51 (muutuma) _ + ("hk"|"hm"|"hn"|"hr"|"ht") + ("ima") => --most *hCuma are TS 51 (muutuma)
cLeppima lugema ; cLeppima lugema ;
_ + #c + "ssima" => --weaker *ss = *ss; should be weaker Css = Cs _ + #c + "ssima" => --weaker *ss = *ss; should be weaker Css = Cs
cLugema lugema ; cLugema lugema ;
_ + ("pp"|"kk"|"tt"|"ss"|"ff"|"nn"|"mm"|"ll"|"rr") + ("ima"|"uma") => _ + ("pp"|"kk"|"tt"|"ss"|"ff"|"nn"|"mm"|"ll"|"rr") + ("ima"|"uma") =>
cLeppima lugema ; cLeppima lugema ;
-- TS 59 (petma, tapma) -- TS 59 (petma, tapma)
-- Use mk4V for TS 60 (jätma, võtma) -- Use mk4V for TS 60 (jätma, võtma)
? + #v + ("tma"|"pma") => ? + #v + ("tma"|"pma") =>
cPetma lugema (luge + "etakse") ; cPetma lugema (luge + "etakse") ;
@@ -714,31 +714,31 @@ oper
-- TS 61 (laulma,kuulma,naerma,möönma) -- TS 61 (laulma,kuulma,naerma,möönma)
-- Default vowel e for lma, a for (r|n)ma. -- Default vowel e for lma, a for (r|n)ma.
-- Other vowel with mk3V. -- Other vowel with mk3V.
_ + "lma" => _ + "lma" =>
cKuulma lugema (loe + "eb") ; cKuulma lugema (loe + "eb") ;
_ + ("r"|"n") + "ma" => _ + ("r"|"n") + "ma" =>
cKuulma lugema (loe + "ab") ; cKuulma lugema (loe + "ab") ;
-- TS 63 (andma,hoidma) -- TS 63 (andma,hoidma)
-- Other vowel than a (tundma~tunneb) with mk3V -- Other vowel than a (tundma~tunneb) with mk3V
_ + "dma" => _ + "dma" =>
cAndma lugema (loe + "ab") ; cAndma lugema (loe + "ab") ;
-- TS 62, 64 (tõusma,mõskma), default vowel e -- TS 62, 64 (tõusma,mõskma), default vowel e
-- 62 alt form (jooksma,joosta) with mk2V -- 62 alt form (jooksma,joosta) with mk2V
-- Other vowel than e with mk3V -- Other vowel than e with mk3V
_ + #c + "ma" => _ + #c + "ma" =>
cLaskma lugema (loe + "eb") ; cLaskma lugema (loe + "eb") ;
-- TS 65 (pesema) -- TS 65 (pesema)
#c + #v + "sema" => #c + #v + "sema" =>
cPesema lugema ; cPesema lugema ;
-- TS 66 (nägema) -- TS 66 (nägema)
-- Small class, just list all members -- Small class, just list all members
("nägema"|"tegema") => ("nägema"|"tegema") =>
cNagema lugema ; cNagema lugema ;
-- TS 67-68 with mk2V -- TS 67-68 with mk2V
-- no 100% way to distinguish from 50-52 that end in ama -- no 100% way to distinguish from 50-52 that end in ama
@@ -754,7 +754,7 @@ oper
-- Default case -- Default case
_ => _ =>
cElama lugema cElama lugema
} ; } ;
vForms2 : (_,_ : Str) -> VForms = \petma,petta -> vForms2 : (_,_ : Str) -> VForms = \petma,petta ->
-- Arguments: ma infinitive, da infinitive -- Arguments: ma infinitive, da infinitive
@@ -781,22 +781,22 @@ oper
-- * Non-detectable gradation (sattuma~satub ; pettuma~pettub) -- * Non-detectable gradation (sattuma~satub ; pettuma~pettub)
-- * Non-default vowel in b for TS 58-64 (laulma~laulab) -- * Non-default vowel in b for TS 58-64 (laulma~laulab)
case <taguma,taguda,taob> of { case <taguma,taguda,taob> of {
--to be sure about vowel in b --to be sure about vowel in b
<_ + "dma", _ + "da", _> => cAndma taguma taob ; <_ + "dma", _ + "da", _> => cAndma taguma taob ;
<_, _ + #vv + #lmnr + "da", _> => cKuulma taguma taob ; <_, _ + #vv + #lmnr + "da", _> => cKuulma taguma taob ;
<_, _ + #c + "ta", _> => cLaskma taguma taob ; <_, _ + #c + "ta", _> => cLaskma taguma taob ;
--irregular gradation --irregular gradation
<_, _, (""|#c) + #c + #v + #v + "b"> => cLugema taguma ; --57 <_, _, (""|#c) + #c + #v + #v + "b"> => cLugema taguma ; --57
--to be sure about consonant gradation --to be sure about consonant gradation
<_ + #c + "lema", _, _> => vForms2 taguma taguda ; --catch "-Clema" first <_ + #c + "lema", _, _> => vForms2 taguma taguda ; --catch "-Clema" first
<_ + #v + "ma", _+"da", _> => cSattumaPettuma taguma taob ; <_ + #v + "ma", _+"da", _> => cSattumaPettuma taguma taob ;
<_,_,_> => vForms2 taguma taguda <_,_,_> => vForms2 taguma taguda
} ; } ;
vForms4 : (x1,_,_,x4 : Str) -> VForms = \jatma,jatta,jatab,jaetakse -> vForms4 : (x1,_,_,x4 : Str) -> VForms = \jatma,jatta,jatab,jaetakse ->
-- 4 forms needed to get full paradigm for regular verbs -- 4 forms needed to get full paradigm for regular verbs
-- (source: http://www.eki.ee/books/ekk09/index.php?p=3&p1=5&id=227) -- (source: http://www.eki.ee/books/ekk09/index.php?p=3&p1=5&id=227)
@@ -804,7 +804,7 @@ oper
-- Filter out known irregularities and give rest to regVForms. -- Filter out known irregularities and give rest to regVForms.
-- Not trying to match TS 49 ; can't separate käima (49) from täima (50), or detect compounds like taaslooma. -- Not trying to match TS 49 ; can't separate käima (49) from täima (50), or detect compounds like taaslooma.
case <jatma,jatta,jatab,jaetakse> of { case <jatma,jatta,jatab,jaetakse> of {
<_, _+("kka"|"ppa"|"tta"), <_, _+("kka"|"ppa"|"tta"),
_, _+"takse"> => cPetma jatma jaetakse ; _, _+"takse"> => cPetma jatma jaetakse ;
<_ + "dma", _, <_ + "dma", _,
_, _+"takse"> => cAndma jatma jatab ; _, _+"takse"> => cAndma jatma jatab ;
@@ -813,15 +813,15 @@ oper
<_, _ + "ha", _, _> => cNagema jatma ; <_, _ + "ha", _, _> => cNagema jatma ;
<_ + #v + "sema", _ + "sta", _, _> => cPesema jatma ; <_ + #v + "sema", _ + "sta", _, _> => cPesema jatma ;
<_,_,_,_> => regVForms jatma jatta jatab jaetakse <_,_,_,_> => regVForms jatma jatta jatab jaetakse
} ; } ;
caseV c v = {s = v.s ; p = v.p; sc = NPCase c ; lock_V = <>} ; caseV c v = {s = v.s ; p = v.p; sc = NPCase c ; lock_V = <>} ;
vOlema = verbOlema ** {sc = NPCase Nom ; lock_V = <>} ; vOlema = verbOlema ** {sc = NPCase Nom ; lock_V = <>} ;
vMinema = verbMinema ** {sc = NPCase Nom ; lock_V = <>} ; vMinema = verbMinema ** {sc = NPCase Nom ; lock_V = <>} ;
mk2V2 : V -> Prep -> V2 = \v,c -> v ** {c2 = c ; lock_V2 = <>} ; mk2V2 : V -> Prep -> V2 = \v,c -> v ** {c2 = c ; lock_V2 = <>} ;
caseV2 : V -> Case -> V2 = \v,c -> mk2V2 v (casePrep c) ; caseV2 : V -> Case -> V2 = \v,c -> mk2V2 v (casePrep c) ;
dirV2 v = mk2V2 v accPrep ; dirV2 v = mk2V2 v accPrep ;
@@ -837,13 +837,13 @@ oper
dirV2 : V -> V2 ; dirV2 : V -> V2 ;
mkV3 = overload { mkV3 = overload {
mkV3 : V -> Prep -> Prep -> V3 = \v,p,q -> v ** {c2 = p ; c3 = q ; lock_V3 = <>} ; mkV3 : V -> Prep -> Prep -> V3 = \v,p,q -> v ** {c2 = p ; c3 = q ; lock_V3 = <>} ;
mkV2 : V -> V3 = \v -> v ** {c2 = accPrep ; mkV2 : V -> V3 = \v -> v ** {c2 = accPrep ;
c3 = (casePrep allative) ; c3 = (casePrep allative) ;
lock_V3 = <>} ; lock_V3 = <>} ;
mkV2 : Str -> V3 = \str -> (mkV str) ** {c2 = accPrep ; mkV2 : Str -> V3 = \str -> (mkV str) ** {c2 = accPrep ;
c3 = (casePrep allative) ; c3 = (casePrep allative) ;
lock_V3 = <>} ; lock_V3 = <>} ;
} ; } ;
dirV3 v p = mkV3 v accPrep (casePrep p) ; dirV3 v p = mkV3 v accPrep (casePrep p) ;
dirdirV3 v = dirV3 v allative ; dirdirV3 v = dirV3 v allative ;
@@ -855,7 +855,7 @@ oper
mkVV = overload { mkVV = overload {
mkVV : V -> VV = \v -> mkVVf v infDa ; mkVV : V -> VV = \v -> mkVVf v infDa ;
mkVV : Str -> VV = \str -> mkVVf (mkV str) infDa ; mkVV : Str -> VV = \str -> mkVVf (mkV str) infDa ;
} ; } ;
mkVVf v f = v ** {vi = f ; lock_VV = <>} ; mkVVf v f = v ** {vi = f ; lock_VV = <>} ;
mkVQ = overload { mkVQ = overload {
mkVQ : V -> VQ = \v -> v ** {lock_VQ = <>} ; mkVQ : V -> VQ = \v -> v ** {lock_VQ = <>} ;
@@ -876,7 +876,7 @@ oper
mkV2V : V -> Prep -> V2V = \v,p -> mkV2Vf v p infMa ; mkV2V : V -> Prep -> V2V = \v,p -> mkV2Vf v p infMa ;
mkV2V : V -> V2V = \v -> mkV2Vf v (casePrep genitive) infMa ; mkV2V : V -> V2V = \v -> mkV2Vf v (casePrep genitive) infMa ;
mkV2V : Str -> V2V = \str -> mkV2Vf (mkV str) (casePrep genitive) infMa ; mkV2V : Str -> V2V = \str -> mkV2Vf (mkV str) (casePrep genitive) infMa ;
} ; } ;
mkV2Vf v p f = mk2V2 v p ** {vi = f ; lock_V2V = <>} ; mkV2Vf v p f = mk2V2 v p ** {vi = f ; lock_V2V = <>} ;
mkVA = overload { mkVA = overload {
@@ -885,13 +885,13 @@ oper
mkVA : Str -> VA = \str -> (mkV str) ** {c2 = casePrep translative ; lock_VA = <>} ; mkVA : Str -> VA = \str -> (mkV str) ** {c2 = casePrep translative ; lock_VA = <>} ;
} ; } ;
mkV2A = overload { mkV2A = overload {
mkV2A : V -> Prep -> Prep -> V2A = \v,p,q -> v ** {c2 = p ; c3 = q ; lock_V2A = <>} ; mkV2A : V -> Prep -> Prep -> V2A = \v,p,q -> v ** {c2 = p ; c3 = q ; lock_V2A = <>} ;
mkV2A : V -> V2A = \v -> v ** {c2 = casePrep genitive ; mkV2A : V -> V2A = \v -> v ** {c2 = casePrep genitive ;
c3 = casePrep translative ; c3 = casePrep translative ;
lock_V2A = <>} ; lock_V2A = <>} ;
mkV2A : Str -> V2A = \str -> (mkV str) ** {c2 = casePrep genitive ; mkV2A : Str -> V2A = \str -> (mkV str) ** {c2 = casePrep genitive ;
c3 = casePrep translative ; c3 = casePrep translative ;
lock_V2A = <>} ; lock_V2A = <>} ;
} ; } ;

View File

@@ -8,16 +8,16 @@ concrete QuestionEst of Question = CatEst ** open ResEst, Prelude in {
s = \\t,a,p => cl.s ! t ! a ! p ! SQuest s = \\t,a,p => cl.s ! t ! a ! p ! SQuest
} ; } ;
QuestVP ip vp = QuestVP ip vp =
let let
cl = mkClause (subjForm (ip ** {isPron = False ; a = agrP3 ip.n}) vp.sc) (agrP3 ip.n) vp cl = mkClause (subjForm (ip ** {isPron = False ; a = agrP3 ip.n}) vp.sc) (agrP3 ip.n) vp
in { in {
s = \\t,a,p => cl.s ! t ! a ! p ! SDecl s = \\t,a,p => cl.s ! t ! a ! p ! SDecl
} ; } ;
QuestSlash ip slash = { QuestSlash ip slash = {
s = \\t,a,p => s = \\t,a,p =>
let let
cls = slash.s ! t ! a ! p ; cls = slash.s ! t ! a ! p ;
who = appCompl True p slash.c2 (ip ** {a = agrP3 ip.n ; isPron = False}) who = appCompl True p slash.c2 (ip ** {a = agrP3 ip.n ; isPron = False})
in in
@@ -29,15 +29,15 @@ concrete QuestionEst of Question = CatEst ** open ResEst, Prelude in {
} ; } ;
QuestIComp icomp np = { QuestIComp icomp np = {
s = \\t,a,p => s = \\t,a,p =>
let let
vp = predV (verbOlema ** {sc = NPCase Nom}) ; vp = predV (verbOlema ** {sc = NPCase Nom}) ;
cl = mkClause (subjForm np vp.sc) np.a vp ; cl = mkClause (subjForm np vp.sc) np.a vp ;
in in
icomp.s ! np.a ++ cl.s ! t ! a ! p ! SDecl icomp.s ! np.a ++ cl.s ! t ! a ! p ! SDecl
} ; } ;
PrepIP p ip = {s = PrepIP p ip = {s =
appCompl True Pos p (ip ** {a = agrP3 ip.n ; isPron = False})} ; appCompl True Pos p (ip ** {a = agrP3 ip.n ; isPron = False})} ;
AdvIP ip adv = { AdvIP ip adv = {
@@ -46,15 +46,15 @@ concrete QuestionEst of Question = CatEst ** open ResEst, Prelude in {
} ; } ;
-- The computation of $ncase$ is a special case of that in $NounEst.DetCN$, -- The computation of $ncase$ is a special case of that in $NounEst.DetCN$,
-- since we don't have possessive suffixes or definiteness. -- since we don't have possessive suffixes or definiteness.
--- It could still be nice to have a common oper... --- It could still be nice to have a common oper...
IdetCN idet cn = let n = idet.n in { IdetCN idet cn = let n = idet.n in {
s = \\c => s = \\c =>
let let
k : Case = npform2case n c ; k : Case = npform2case n c ;
icase : Case = Nom ; --case k of { --mis kassiga icase : Case = Nom ; --case k of { --mis kassiga
-- (Ess|Abess|Comit|Termin) => Gen ; -- (Ess|Abess|Comit|Termin) => Gen ;
-- _ => k -- _ => k
-- } ; -- } ;
ncase : NForm = case <icase,idet.isNum> of { ncase : NForm = case <icase,idet.isNum> of {
@@ -63,33 +63,33 @@ concrete QuestionEst of Question = CatEst ** open ResEst, Prelude in {
_ => NCase n k -- mitkä kytkimet _ => NCase n k -- mitkä kytkimet
} }
in in
idet.s ! icase ++ cn.s ! ncase ; idet.s ! icase ++ cn.s ! ncase ;
n = n n = n
} ; } ;
IdetIP idet = let n = idet.n in { IdetIP idet = let n = idet.n in {
s = \\c => s = \\c =>
let let
k = npform2case n c ; k = npform2case n c ;
in in
idet.s ! k ; idet.s ! k ;
n = n n = n
} ; } ;
IdetQuant idet num = IdetQuant idet num =
let let
n = num.n ; n = num.n ;
isn = num.isNum isn = num.isNum
in { in {
s = \\k => s = \\k =>
let let
ncase = case <k,isn> of { ncase = case <k,isn> 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
_ => NCase n k -- mitkä kytkimet _ => NCase n k -- mitkä kytkimet
} }
in in
idet.s ! n ! k ++ num.s ! Sg ! k ; idet.s ! n ! k ++ num.s ! Sg ! k ;
n = n ; n = n ;
isNum = isn isNum = isn
} ; } ;

View File

@@ -11,14 +11,14 @@ concrete RelativeEst of Relative = CatEst ** open Prelude, ResEst, MorphoEst in
} ; } ;
RelVP rp vp = { RelVP rp vp = {
s = \\t,ant,b,ag => s = \\t,ant,b,ag =>
let let
agr = case rp.a of { agr = case rp.a of {
RNoAg => ag ; RNoAg => ag ;
RAg a => a RAg a => a
} ; } ;
cl = mkClause cl = mkClause
(subjForm {s = rp.s ! (complNumAgr agr) ; (subjForm {s = rp.s ! (complNumAgr agr) ;
a = agr ; isPron = False} vp.sc) agr vp a = agr ; isPron = False} vp.sc) agr vp
in in
cl.s ! t ! ant ! b ! SDecl ; cl.s ! t ! ant ! b ! SDecl ;
@@ -26,8 +26,8 @@ concrete RelativeEst of Relative = CatEst ** open Prelude, ResEst, MorphoEst in
} ; } ;
RelSlash rp slash = { RelSlash rp slash = {
s = \\t,a,p,ag => s = \\t,a,p,ag =>
let let
cls = slash.s ! t ! a ! p ; cls = slash.s ! t ! a ! p ;
who = appCompl True p slash.c2 (rp2np (complNumAgr ag) rp) who = appCompl True p slash.c2 (rp2np (complNumAgr ag) rp)
in in

View File

@@ -15,11 +15,11 @@ resource ResEst = ParamX ** open Prelude in {
-- This is the $Case$ as needed for both nouns and $NP$s. -- This is the $Case$ as needed for both nouns and $NP$s.
param param
Case = Nom | Gen | Part Case = Nom | Gen | Part
| Illat | Iness | Elat | Allat | Adess | Ablat | Illat | Iness | Elat | Allat | Adess | Ablat
| Transl | Ess | Termin | Abess | Comit; | Transl | Ess | Termin | Abess | Comit;
NForm = NCase Number Case ; NForm = NCase Number Case ;
-- Agreement of $NP$ has number*person and the polite second ("te olette valmis"). -- Agreement of $NP$ has number*person and the polite second ("te olette valmis").
@@ -56,13 +56,13 @@ oper
--2 Noun phrases --2 Noun phrases
-- --
-- Two forms of *virtual accusative* are needed for nouns in singular, -- Two forms of *virtual accusative* are needed for nouns in singular,
-- the nominative and the genitive one ("loen raamatu"/"loe raamat"). -- the nominative and the genitive one ("loen raamatu"/"loe raamat").
-- For nouns in plural, only a nominative accusative exists in positive clauses. -- For nouns in plural, only a nominative accusative exists in positive clauses.
-- Pronouns use the partitive as their accusative form ("mind", "sind"), in both -- Pronouns use the partitive as their accusative form ("mind", "sind"), in both
-- positive and negative, indicative and imperative clauses. -- positive and negative, indicative and imperative clauses.
param param
NPForm = NPCase Case | NPAcc ; NPForm = NPCase Case | NPAcc ;
oper oper
@@ -80,14 +80,14 @@ oper
-- A special form is needed for the negated plural imperative. -- A special form is needed for the negated plural imperative.
param param
VForm = VForm =
Inf InfForm Inf InfForm
| Presn Number Person | Presn Number Person
| Impf Number Person | Impf Number Person
| Condit Number Person | Condit Number Person
| ConditPass --loetagu | ConditPass --loetagu
| Imper Number | Imper Number
| ImperP3 | ImperP3
| ImperP1Pl | ImperP1Pl
| ImperPass | ImperPass
| PassPresn Bool | PassPresn Bool
@@ -98,11 +98,11 @@ param
; ;
Voice = Act | Pass ; Voice = Act | Pass ;
InfForm = InfForm =
InfDa -- lugeda InfDa -- lugeda
| InfDes -- lugedes | InfDes -- lugedes
| InfMa -- lugema | InfMa -- lugema
| InfMas -- lugemas | InfMas -- lugemas
| InfMast -- lugemast | InfMast -- lugemast
| InfMata -- lugemata | InfMata -- lugemata
@@ -112,7 +112,7 @@ param
SType = SDecl | SQuest | SInv ; SType = SDecl | SQuest | SInv ;
--2 For $Relative$ --2 For $Relative$
RAgr = RNoAg | RAg Agr ; RAgr = RNoAg | RAg Agr ;
--2 For $Numeral$ --2 For $Numeral$
@@ -122,14 +122,14 @@ param
--2 Transformations between parameter types --2 Transformations between parameter types
oper oper
agrP3 : Number -> Agr = \n -> agrP3 : Number -> Agr = \n ->
Ag n P3 ; Ag n P3 ;
conjAgr : Agr -> Agr -> Agr = \a,b -> case <a,b> of { conjAgr : Agr -> Agr -> Agr = \a,b -> case <a,b> of {
<Ag n p, Ag m q> => Ag (conjNumber n m) (conjPerson p q) ; <Ag n p, Ag m q> => Ag (conjNumber n m) (conjPerson p q) ;
<Ag n p, AgPol> => Ag Pl (conjPerson p P2) ; <Ag n p, AgPol> => Ag Pl (conjPerson p P2) ;
<AgPol, Ag n p> => Ag Pl (conjPerson p P2) ; <AgPol, Ag n p> => Ag Pl (conjPerson p P2) ;
_ => b _ => b
} ; } ;
--- ---
@@ -178,33 +178,33 @@ param
param param
VIForm = VIForm =
VIFin Tense VIFin Tense
| VIInf InfForm | VIInf InfForm
| VIPass Tense | VIPass Tense
| VIPresPart | VIPresPart
| VIImper | VIImper
; ;
oper oper
VP : Type = { VP : Type = {
s : VIForm => Anteriority => Polarity => Agr => {fin, inf : Str} ; s : VIForm => Anteriority => Polarity => Agr => {fin, inf : Str} ;
s2 : Bool => Polarity => Agr => Str ; -- raamat/raamatu/raamatut s2 : Bool => Polarity => Agr => Str ; -- raamat/raamatu/raamatut
adv : Str ; adv : Str ;
p : Str ; --uninflecting component in multi-word verbs p : Str ; --uninflecting component in multi-word verbs
ext : Str ; ext : Str ;
sc : NPForm ; sc : NPForm ;
} ; } ;
predV : (Verb ** {sc : NPForm}) -> VP = \verb -> { predV : (Verb ** {sc : NPForm}) -> VP = \verb -> {
s = \\vi,ant,b,agr0 => s = \\vi,ant,b,agr0 =>
let let
agr = verbAgr agr0 ; agr = verbAgr agr0 ;
verbs = verb.s ; verbs = verb.s ;
part : Str = case vi of { part : Str = case vi of {
VIPass _ => verbs ! (PastPart Pass) ; VIPass _ => verbs ! (PastPart Pass) ;
_ => verbs ! (PastPart Act) _ => verbs ! (PastPart Act)
} ; } ;
einegole : Str * Str * Str = case <vi,agr.n> of { einegole : Str * Str * Str = case <vi,agr.n> of {
<VIFin Pres> => <"ei", verbs ! Imper Sg, "ole"> ; <VIFin Pres> => <"ei", verbs ! Imper Sg, "ole"> ;
<VIFin Fut> => <"ei", verbs ! Imper Sg, "ole"> ; <VIFin Fut> => <"ei", verbs ! Imper Sg, "ole"> ;
@@ -217,23 +217,23 @@ oper
<VIPass Cond> => <"ei", verbs ! ConditPass, "oleks"> ; --# notpresent <VIPass Cond> => <"ei", verbs ! ConditPass, "oleks"> ; --# notpresent
<VIPass Past> => <"ei", verbs ! PassImpf False, "olnud"> ; --# notpresent <VIPass Past> => <"ei", verbs ! PassImpf False, "olnud"> ; --# notpresent
<VIPresPart> => <"ei", verbs ! PresPart Act, "olev"> ; --# notpresent <VIPresPart> => <"ei", verbs ! PresPart Act, "olev"> ; --# notpresent
<VIInf i> => <"ei", verbs ! Inf i, verbOlema.s ! Inf i> <VIInf i> => <"ei", verbs ! Inf i, verbOlema.s ! Inf i>
} ; } ;
ei : Str = einegole.p1 ; ei : Str = einegole.p1 ;
neg : Str = einegole.p2 ; neg : Str = einegole.p2 ;
ole : Str = einegole.p3 ; ole : Str = einegole.p3 ;
olema : VForm => Str = verbOlema.s ; olema : VForm => Str = verbOlema.s ;
vf : Str -> Str -> {fin, inf : Str} = \x,y -> {fin = x ; inf = y} ; vf : Str -> Str -> {fin, inf : Str} = \x,y -> {fin = x ; inf = y} ;
mkvf : VForm -> {fin, inf : Str} = \p -> case <ant,b> of { mkvf : VForm -> {fin, inf : Str} = \p -> case <ant,b> of {
<Simul,Pos> => vf (verbs ! p) [] ; <Simul,Pos> => vf (verbs ! p) [] ;
<Anter,Pos> => vf (olema ! p) part ; <Anter,Pos> => vf (olema ! p) part ;
<Simul,Neg> => vf (ei ++ neg) [] ; <Simul,Neg> => vf (ei ++ neg) [] ;
<Anter,Neg> => vf (ei ++ ole) part <Anter,Neg> => vf (ei ++ ole) part
} ; } ;
passPol = case b of {Pos => True ; Neg => False} ; passPol = case b of {Pos => True ; Neg => False} ;
@@ -256,19 +256,19 @@ oper
adv = [] ; adv = [] ;
ext = [] ; --relative clause ext = [] ; --relative clause
p = verb.p ; --particle verbs p = verb.p ; --particle verbs
sc = verb.sc sc = verb.sc
} ; } ;
insertObj : (Bool => Polarity => Agr => Str) -> VP -> VP = \obj,vp -> insertObj : (Bool => Polarity => Agr => Str) -> VP -> VP = \obj,vp ->
vp ** { s2 = \\fin,b,a => vp.s2 ! fin ! b ! a ++ obj ! fin ! b ! a } ; vp ** { s2 = \\fin,b,a => vp.s2 ! fin ! b ! a ++ obj ! fin ! b ! a } ;
insertObjPre : (Bool => Polarity => Agr => Str) -> VP -> VP = \obj,vp -> insertObjPre : (Bool => Polarity => Agr => Str) -> VP -> VP = \obj,vp ->
vp ** { s2 = \\fin,b,a => obj ! fin ! b ! a ++ vp.s2 ! fin ! b ! a } ; vp ** { s2 = \\fin,b,a => obj ! fin ! b ! a ++ vp.s2 ! fin ! b ! a } ;
insertAdv : Str -> VP -> VP = \adv,vp -> insertAdv : Str -> VP -> VP = \adv,vp ->
vp ** { adv = vp.adv ++ adv } ; vp ** { adv = vp.adv ++ adv } ;
insertExtrapos : Str -> VP -> VP = \obj,vp -> insertExtrapos : Str -> VP -> VP = \obj,vp ->
vp ** { ext = vp.ext ++ obj } ; vp ** { ext = vp.ext ++ obj } ;
-- For $Sentence$. -- For $Sentence$.
@@ -286,12 +286,12 @@ oper
-- declarative sentence with the yes/no-queryword "kas". -- declarative sentence with the yes/no-queryword "kas".
-- SQuest: "kas" + SDecl -- SQuest: "kas" + SDecl
-- It would be also correct to use the Finnish structure, just without the ko-particle. -- It would be also correct to use the Finnish structure, just without the ko-particle.
-- Inari: added a third SType, SInv. -- Inari: added a third SType, SInv.
-- Not sure if SInv is needed, but keeping it for possible future use. -- Not sure if SInv is needed, but keeping it for possible future use.
-- There's need for an inverted word order with auxiliary verbs; infVP handles that. ComplVV calls infVP, which inverts the word order for the complement VP, and puts it into the resulting VP's `compl' field. -- There's need for an inverted word order with auxiliary verbs; infVP handles that. ComplVV calls infVP, which inverts the word order for the complement VP, and puts it into the resulting VP's `compl' field.
-- SInv made by mkClause would be for cases where you just need to construct an inverted word order, and then call it from some other place; application grammar (TODO: api oper for SType) or ExtraEst. -- SInv made by mkClause would be for cases where you just need to construct an inverted word order, and then call it from some other place; application grammar (TODO: api oper for SType) or ExtraEst.
mkClause : (Polarity -> Str) -> Agr -> VP -> Clause = \sub,agr,vp -> mkClause : (Polarity -> Str) -> Agr -> VP -> Clause = \sub,agr,vp ->
{ s = \\t,a,b => { s = \\t,a,b =>
let let
c = (mkClausePlus sub agr vp).s ! t ! a ! b ; c = (mkClausePlus sub agr vp).s ! t ! a ! b ;
-- saan sinust aru 0 -- saan sinust aru 0
@@ -300,51 +300,51 @@ oper
-- [sind näha] 0 tahtnud -- [sind näha] 0 tahtnud
-- täna olen ma sinust aru saanud -- täna olen ma sinust aru saanud
invCl = c.adv ++ c.fin ++ c.subj ++ c.compl ++ c.p ++ c.inf ++ c.ext invCl = c.adv ++ c.fin ++ c.subj ++ c.compl ++ c.p ++ c.inf ++ c.ext
in in
table { table {
SDecl => declCl ; SDecl => declCl ;
SQuest => "kas" ++ declCl ; SQuest => "kas" ++ declCl ;
SInv => invCl SInv => invCl
} }
} ; } ;
existClause : (Polarity -> Str) -> Agr -> VP -> Clause = \sub,agr,vp -> existClause : (Polarity -> Str) -> Agr -> VP -> Clause = \sub,agr,vp ->
{ s = \\t,a,b => { s = \\t,a,b =>
let let
c = (mkClausePlus sub agr vp).s ! t ! a ! b ; c = (mkClausePlus sub agr vp).s ! t ! a ! b ;
-- (mis) on olnud olemas (lammas) -- (mis) on olnud olemas (lammas)
declCl = c.subj ++ c.fin ++ c.inf ++ c.compl ; declCl = c.subj ++ c.fin ++ c.inf ++ c.compl ;
in in
table { table {
SQuest => "kas" ++ declCl ; SQuest => "kas" ++ declCl ;
_ => declCl _ => declCl
} }
} ; } ;
mkClausePlus : (Polarity -> Str) -> Agr -> VP -> ClausePlus = mkClausePlus : (Polarity -> Str) -> Agr -> VP -> ClausePlus =
\sub,agr,vp -> { \sub,agr,vp -> {
s = \\t,a,b => s = \\t,a,b =>
let let
agrfin = case vp.sc of { agrfin = case vp.sc of {
NPCase Nom => <agr,True> ; NPCase Nom => <agr,True> ;
_ => <agrP3 Sg,False> -- minule meeldib, minul on _ => <agrP3 Sg,False> -- minule meeldib, minul on
} ; } ;
verb = vp.s ! VIFin t ! a ! b ! agrfin.p1 ; verb = vp.s ! VIFin t ! a ! b ! agrfin.p1 ;
in {subj = sub b ; in {subj = sub b ;
fin = verb.fin ; fin = verb.fin ;
inf = verb.inf ; inf = verb.inf ;
compl = vp.s2 ! agrfin.p2 ! b ! agr ; compl = vp.s2 ! agrfin.p2 ! b ! agr ;
p = vp.p ; p = vp.p ;
adv = vp.adv ; adv = vp.adv ;
ext = vp.ext ; ext = vp.ext ;
} }
} ; } ;
insertKinClausePlus : Predef.Ints 1 -> ClausePlus -> ClausePlus = \p,cl -> { insertKinClausePlus : Predef.Ints 1 -> ClausePlus -> ClausePlus = \p,cl -> {
s = \\t,a,b => s = \\t,a,b =>
let let
c = cl.s ! t ! a ! b c = cl.s ! t ! a ! b
in in
case p of { case p of {
0 => {subj = c.subj ++ gi ; fin = c.fin ; inf = c.inf ; -- Jussikin nukkuu 0 => {subj = c.subj ++ gi ; fin = c.fin ; inf = c.inf ; -- Jussikin nukkuu
@@ -354,37 +354,37 @@ oper
} }
} ; } ;
insertObjClausePlus : Predef.Ints 1 -> Bool -> (Polarity => Str) -> ClausePlus -> ClausePlus = insertObjClausePlus : Predef.Ints 1 -> Bool -> (Polarity => Str) -> ClausePlus -> ClausePlus =
\p,ifKin,obj,cl -> { \p,ifKin,obj,cl -> {
s = \\t,a,b => s = \\t,a,b =>
let let
c = cl.s ! t ! a ! b ; c = cl.s ! t ! a ! b ;
co = obj ! b ++ if_then_Str ifKin (kin b) [] ; co = obj ! b ++ if_then_Str ifKin (kin b) [] ;
in case p of { in case p of {
0 => {subj = c.subj ; fin = c.fin ; inf = c.inf ; 0 => {subj = c.subj ; fin = c.fin ; inf = c.inf ;
compl = co ; p = c.p ; adv = c.compl ++ c.adv ; ext = c.ext ; h = c.h} ; -- Jussi juo maitoakin compl = co ; p = c.p ; adv = c.compl ++ c.adv ; ext = c.ext ; h = c.h} ; -- Jussi juo maitoakin
1 => {subj = c.subj ; fin = c.fin ; inf = c.inf ; 1 => {subj = c.subj ; fin = c.fin ; inf = c.inf ;
compl = c.compl ; p = c.p ; adv = co ; ext = c.adv ++ c.ext ; h = c.h} -- Jussi nukkuu nytkin compl = c.compl ; p = c.p ; adv = co ; ext = c.adv ++ c.ext ; h = c.h} -- Jussi nukkuu nytkin
} }
} ; } ;
kin : Polarity -> Str = kin : Polarity -> Str =
\p -> case p of {Pos => "gi" ; Neg => "gi"} ; \p -> case p of {Pos => "gi" ; Neg => "gi"} ;
--allomorph "ki", depends only on phonetic rules "üks+ki", "ühe+gi" --allomorph "ki", depends only on phonetic rules "üks+ki", "ühe+gi"
--waiting for post construction in GF :P --waiting for post construction in GF :P
gi : Str = "gi" ; gi : Str = "gi" ;
-- This is used for subjects of passives: therefore isFin in False. -- This is used for subjects of passives: therefore isFin in False.
subjForm : NP -> NPForm -> Polarity -> Str = \np,sc,b -> subjForm : NP -> NPForm -> Polarity -> Str = \np,sc,b ->
appCompl False b {s = [] ; c = sc ; isPre = True} np ; appCompl False b {s = [] ; c = sc ; isPre = True} np ;
infVP : NPForm -> Polarity -> Agr -> VP -> InfForm -> Str = infVPAnt Simul ; infVP : NPForm -> Polarity -> Agr -> VP -> InfForm -> Str = infVPAnt Simul ;
infVPAnt : Anteriority -> NPForm -> Polarity -> Agr -> VP -> InfForm -> Str = infVPAnt : Anteriority -> NPForm -> Polarity -> Agr -> VP -> InfForm -> Str =
\ant,sc,pol,agr,vp,vi -> \ant,sc,pol,agr,vp,vi ->
let let
fin = case sc of { -- subject case fin = case sc of { -- subject case
NPCase Nom => True ; -- mina tahan joosta NPCase Nom => True ; -- mina tahan joosta
_ => False -- minul peab auto olema _ => False -- minul peab auto olema
@@ -399,12 +399,12 @@ oper
--TODO adv placement? --TODO adv placement?
--TODO inf ++ fin or fin ++ inf? does it ever become a case here? --TODO inf ++ fin or fin ++ inf? does it ever become a case here?
-- The definitions below were moved here from $MorphoEst$ so that -- The definitions below were moved here from $MorphoEst$ so that
-- auxiliary of predication can be defined. -- auxiliary of predication can be defined.
verbOlema : Verb = verbOlema : Verb =
let olema = mkVerb let olema = mkVerb
"olema" "olla" "olen" "ollakse" "olema" "olla" "olen" "ollakse"
"olge" "oli" "olnud" "oldud" "olge" "oli" "olnud" "oldud"
in {s = table { in {s = table {
Presn _ P3 => "on" ; Presn _ P3 => "on" ;
@@ -413,9 +413,9 @@ oper
p = [] p = []
} ; } ;
verbMinema : Verb = verbMinema : Verb =
let minema = mkVerb let minema = mkVerb
"minema" "minna" "läheb" "minnakse" "minema" "minna" "läheb" "minnakse"
"minge" "läks" "läinud" "mindud" "minge" "läks" "läinud" "mindud"
in {s = table { in {s = table {
Impf Sg P1 => "läksin" ; Impf Sg P1 => "läksin" ;
@@ -428,20 +428,20 @@ oper
} ; } ;
p = [] p = []
} ; } ;
--3 Verbs --3 Verbs
--Auxiliary for internal use --Auxiliary for internal use
mkVerb : (x1,_,_,_,_,_,_,x8 : Str) -> Verb = mkVerb : (x1,_,_,_,_,_,_,x8 : Str) -> Verb =
\tulema,tulla,tuleb,tullakse,tulge,tuli,tulnud,tuldud -> \tulema,tulla,tuleb,tullakse,tulge,tuli,tulnud,tuldud ->
vforms2V (vForms8 vforms2V (vForms8
tulema tulla tuleb tullakse tulge tuli tulnud tuldud tulema tulla tuleb tullakse tulge tuli tulnud tuldud
) ; ) ;
--below moved here from MorphoEst --below moved here from MorphoEst
VForms : Type = Predef.Ints 7 => Str ; VForms : Type = Predef.Ints 7 => Str ;
vForms8 : (x1,_,_,_,_,_,_,x8 : Str) -> VForms = vForms8 : (x1,_,_,_,_,_,_,x8 : Str) -> VForms =
\tulema,tulla,tuleb,tullakse,tulge,tuli,tulnud,tuldud -> \tulema,tulla,tuleb,tullakse,tulge,tuli,tulnud,tuldud ->
table { table {
@@ -455,34 +455,34 @@ oper
7 => tuldud 7 => tuldud
} ; } ;
vforms2V : VForms -> Verb = \vh -> vforms2V : VForms -> Verb = \vh ->
let let
tulema = vh ! 0 ; tulema = vh ! 0 ;
tulla = vh ! 1 ; tulla = vh ! 1 ;
tuleb = vh ! 2 ; tuleb = vh ! 2 ;
tullakse = vh ! 3 ; --juuakse; loetakse tullakse = vh ! 3 ; --juuakse; loetakse
tulge = vh ! 4 ; --necessary for tulla, surra (otherwise *tulege, *surege) tulge = vh ! 4 ; --necessary for tulla, surra (otherwise *tulege, *surege)
tuli = vh ! 5 ; --necessary for jooma-juua-jõi tuli = vh ! 5 ; --necessary for jooma-juua-jõi
tulnud = vh ! 6 ; tulnud = vh ! 6 ;
tuldud = vh ! 7 ; --necessary for t/d in tuldi; loeti tuldud = vh ! 7 ; --necessary for t/d in tuldi; loeti
tull_ = init tulla ; --juu(a); saad(a); tull(a); tull_ = init tulla ; --juu(a); saad(a); tull(a);
tulles = tull_ + "es" ; --juues; saades; tulles; tulles = tull_ + "es" ; --juues; saades; tulles;
tule_ = init tuleb ; tule_ = init tuleb ;
lask_ = Predef.tk 2 tulema ; lask_ = Predef.tk 2 tulema ;
laulev = case (last lask_) of { --sooma~soov ; laulma~laulev laulev = case (last lask_) of { --sooma~soov ; laulma~laulev
("a"|"e"|"i"|"o"|"u"|"õ"|"ä"|"ö"|"ü") => lask_ + "v" ; ("a"|"e"|"i"|"o"|"u"|"õ"|"ä"|"ö"|"ü") => lask_ + "v" ;
_ => lask_ + "ev" } ; --consonant stem in -ma, add e _ => lask_ + "ev" } ; --consonant stem in -ma, add e
--imperfect stem --imperfect stem
kaisi_ = case (Predef.dp 3 tuli) of { kaisi_ = case (Predef.dp 3 tuli) of {
"sis" => lask_ + "i" ; --tõusin, tõusis "sis" => lask_ + "i" ; --tõusin, tõusis
_ + "i" => tuli ; --jõin, jõi _ + "i" => tuli ; --jõin, jõi
_ => lask_ + "si" --käisin, käis; muutsin, muutis _ => lask_ + "si" --käisin, käis; muutsin, muutis
}; };
tuld_ = Predef.tk 2 tuldud ; --d/t choice for tuldi etc. tuld_ = Predef.tk 2 tuldud ; --d/t choice for tuldi etc.
tulgu = (init tulge) + "u" ; tulgu = (init tulge) + "u" ;
in in
@@ -510,13 +510,13 @@ oper
ConditPass => tuld_ + "aks" ; --# notpresent ConditPass => tuld_ + "aks" ; --# notpresent
Imper Sg => tule_ ; -- tule / ära tule Imper Sg => tule_ ; -- tule / ära tule
Imper Pl => tulge ; -- tulge / ärge tulge Imper Pl => tulge ; -- tulge / ärge tulge
ImperP3 => tulgu ; -- tulgu (ta/nad) ImperP3 => tulgu ; -- tulgu (ta/nad)
ImperP1Pl => tulge + "m" ; -- tulgem ImperP1Pl => tulge + "m" ; -- tulgem
ImperPass => tuld_ + "agu" ; --tuldagu ImperPass => tuld_ + "agu" ; --tuldagu
PassPresn True => tullakse ; PassPresn True => tullakse ;
PassPresn False => tuld_ + "a" ; --da or ta PassPresn False => tuld_ + "a" ; --da or ta
PassImpf True => tuld_ + "i" ; --di or ti PassImpf True => tuld_ + "i" ; --di or ti
PassImpf False => tuldud ; PassImpf False => tuldud ;
Quotative Act => lask_ + "vat" ; Quotative Act => lask_ + "vat" ;
Quotative Pass => tuld_ + "avat" ; --d or t Quotative Pass => tuld_ + "avat" ; --d or t
PresPart Act => laulev ; PresPart Act => laulev ;
@@ -527,10 +527,10 @@ oper
Inf InfMas => tulema + "s" ; Inf InfMas => tulema + "s" ;
Inf InfMast => tulema + "st" ; Inf InfMast => tulema + "st" ;
Inf InfMata => tulema + "ta" ; Inf InfMata => tulema + "ta" ;
Inf InfMaks => tulema + "ks" Inf InfMaks => tulema + "ks"
} ; } ;
sc = NPCase Nom ; sc = NPCase Nom ;
p = [] p = []
} ; } ;
-- For regular verbs, paradigm from 4 base forms -- For regular verbs, paradigm from 4 base forms
@@ -547,12 +547,12 @@ oper
"t" => "k" ; "t" => "k" ;
_ => "g" _ => "g"
} ; } ;
toit_ = case (last vestle_) of { toit_ = case (last vestle_) of {
("t"|"d") => vesteld_ ; --toit(ma) -> toitke; ("t"|"d") => vesteld_ ; --toit(ma) -> toitke;
_ => vestel_ --vestle(ma) -> vestelge _ => vestel_ --vestle(ma) -> vestelge
} ; } ;
laski_ = case (last vestle_) of { laski_ = case (last vestle_) of {
("a"|"e"|"i"|"o"|"u"|"õ"|"ä"|"ö"|"ü") ("a"|"e"|"i"|"o"|"u"|"õ"|"ä"|"ö"|"ü")
=> vestle_ ; --vestle(ma) -> vestles => vestle_ ; --vestle(ma) -> vestles
_ => vestle_ + "i" --lask(ma) -> laskis _ => vestle_ + "i" --lask(ma) -> laskis
} ; } ;
@@ -566,7 +566,7 @@ oper
(laski_ + "s") --ma: kindla kõneviisi lihtmineviku pöörded; (laski_ + "s") --ma: kindla kõneviisi lihtmineviku pöörded;
(toit_ + "nud") --da: isikulise tegumoe mineviku kesksõna (toit_ + "nud") --da: isikulise tegumoe mineviku kesksõna
(jaet_ + "ud"); --takse: ülejäänud umbisikulise tgm vormid (jaet_ + "ud"); --takse: ülejäänud umbisikulise tgm vormid
regVerb : (_,_,_,_ : Str) -> Verb = \kinkima,kinkida,kingib,kingitakse -> regVerb : (_,_,_,_ : Str) -> Verb = \kinkima,kinkida,kingib,kingitakse ->
vforms2V (regVForms kinkima kinkida kingib kingitakse) ; vforms2V (regVForms kinkima kinkida kingib kingitakse) ;
@@ -580,8 +580,8 @@ oper
-- parem -> paremini -- parem -> paremini
-- parim -> kõige paremini | parimalt? -- parim -> kõige paremini | parimalt?
noun2adjComp : Bool -> Noun -> Adj = \isPos,tuore -> noun2adjComp : Bool -> Noun -> Adj = \isPos,tuore ->
let let
tuoreesti = Predef.tk 1 (tuore.s ! NCase Sg Gen) + "sti" ; tuoreesti = Predef.tk 1 (tuore.s ! NCase Sg Gen) + "sti" ;
tuoreemmin = Predef.tk 2 (tuore.s ! NCase Sg Gen) + "in" tuoreemmin = Predef.tk 2 (tuore.s ! NCase Sg Gen) + "in"
in {s = table { in {s = table {
AN f => tuore.s ! f ; AN f => tuore.s ! f ;
@@ -602,21 +602,21 @@ oper
compAP = icompAP [] ; compAP = icompAP [] ;
icompAP : Str -> {s : Bool => NForm => Str} -> {s : Agr => Str} = \kui,ap -> icompAP : Str -> {s : Bool => NForm => Str} -> {s : Agr => Str} = \kui,ap ->
{ s = \\agr => { s = \\agr =>
let n = complNumAgr agr ; let n = complNumAgr agr ;
in kui ++ ap.s ! False ! NCase n Nom } ; in kui ++ ap.s ! False ! NCase n Nom } ;
compCN : Noun -> {s : Agr => Str} = \cn -> compCN : Noun -> {s : Agr => Str} = \cn ->
{ s = \\agr => { s = \\agr =>
let n = complNumAgr agr ; let n = complNumAgr agr ;
in cn.s ! NCase n Nom } ; in cn.s ! NCase n Nom } ;
-- Reflexive pronoun. -- Reflexive pronoun.
--- Possessive could be shared with the more general $NounFin.DetCN$. --- Possessive could be shared with the more general $NounFin.DetCN$.
reflPron : Agr -> NP = \agr -> reflPron : Agr -> NP = \agr ->
let let
ise = nForms2N (nForms6 "ise" "enda" "ennast" "endasse" "endi" "endid") ; ise = nForms2N (nForms6 "ise" "enda" "ennast" "endasse" "endi" "endid") ;
n = case agr of { n = case agr of {
AgPol => Sg ; AgPol => Sg ;
@@ -638,7 +638,7 @@ oper
NForms : Type = Predef.Ints 5 => Str ; NForms : Type = Predef.Ints 5 => Str ;
nForms6 : (x1,_,_,_,_,x6 : Str) -> NForms = nForms6 : (x1,_,_,_,_,x6 : Str) -> NForms =
\jogi,joe,joge,joesse, -- sg nom, gen, part, ill \jogi,joe,joge,joesse, -- sg nom, gen, part, ill
jogede,jogesid -> table { -- pl gen, part, jogede,jogesid -> table { -- pl gen, part,
0 => jogi ; 0 => jogi ;
@@ -646,7 +646,7 @@ oper
2 => joge ; 2 => joge ;
3 => joesse ; 3 => joesse ;
4 => jogede ; 4 => jogede ;
5 => jogesid 5 => jogesid
} ; } ;
n2nforms : Noun -> NForms = \ukko -> table { n2nforms : Noun -> NForms = \ukko -> table {
@@ -655,12 +655,12 @@ oper
2 => ukko.s ! NCase Sg Part ; 2 => ukko.s ! NCase Sg Part ;
3 => ukko.s ! NCase Sg Illat ; 3 => ukko.s ! NCase Sg Illat ;
4 => ukko.s ! NCase Pl Gen ; 4 => ukko.s ! NCase Pl Gen ;
5 => ukko.s ! NCase Pl Part 5 => ukko.s ! NCase Pl Part
} ; } ;
-- Converts 6 given strings (Nom, Gen, Part, Illat, Gen, Part) into Noun -- Converts 6 given strings (Nom, Gen, Part, Illat, Gen, Part) into Noun
-- http://www.eki.ee/books/ekk09/index.php?p=3&p1=5&id=226 -- http://www.eki.ee/books/ekk09/index.php?p=3&p1=5&id=226
nForms2N : NForms -> Noun = \f -> nForms2N : NForms -> Noun = \f ->
let let
jogi = f ! 0 ; jogi = f ! 0 ;
joe = f ! 1 ; joe = f ! 1 ;
@@ -668,7 +668,7 @@ oper
joesse = f ! 3 ; joesse = f ! 3 ;
jogede = f ! 4 ; jogede = f ! 4 ;
jogesid = f ! 5 ; jogesid = f ! 5 ;
in in
{s = table { {s = table {
NCase Sg Nom => jogi ; NCase Sg Nom => jogi ;
NCase Sg Gen => joe ; NCase Sg Gen => joe ;
@@ -698,7 +698,7 @@ oper
NCase Pl Allat => jogede + "le" ; NCase Pl Allat => jogede + "le" ;
NCase Pl Abess => jogede + "ta" ; NCase Pl Abess => jogede + "ta" ;
NCase Pl Comit => jogede + "ga" ; NCase Pl Comit => jogede + "ga" ;
NCase Pl Termin => jogede + "ni" NCase Pl Termin => jogede + "ni"
} --; } --;
-- lock_N = <> -- lock_N = <>
@@ -721,9 +721,9 @@ oper
isDef : Bool isDef : Bool
} ; } ;
heavyQuant : PQuant -> PQuant ** {sp : Number => Case => Str} = \d -> heavyQuant : PQuant -> PQuant ** {sp : Number => Case => Str} = \d ->
d ** {sp = d.s} ; d ** {sp = d.s} ;
PQuant : Type = PQuant : Type =
{s : Number => Case => Str ; isDef : Bool} ; {s : Number => Case => Str ; isDef : Bool} ;
} }

View File

@@ -9,17 +9,17 @@ concrete SentenceEst of Sentence = CatEst ** open Prelude, ResEst in {
PredSCVP sc vp = mkClause (\_ -> sc.s) (agrP3 Sg) vp ; PredSCVP sc vp = mkClause (\_ -> sc.s) (agrP3 Sg) vp ;
ImpVP vp = { ImpVP vp = {
s = \\pol,agr => s = \\pol,agr =>
let let
verb = vp.s ! VIImper ! Simul ! pol ! agr ; verb = vp.s ! VIImper ! Simul ! pol ! agr ;
compl = vp.s2 ! False ! pol ! agr ++ vp.ext --- False = like inf (osta auto) compl = vp.s2 ! False ! pol ! agr ++ vp.ext --- False = like inf (osta auto)
in --(ära) loe raamat(ut) läbi in --(ära) loe raamat(ut) läbi
verb.fin ++ verb.inf ++ compl ++ vp.p ; verb.fin ++ verb.inf ++ compl ++ vp.p ;
} ; } ;
-- The object case is formed at the use site of $c2$, in $Relative$ and $Question$. -- The object case is formed at the use site of $c2$, in $Relative$ and $Question$.
SlashVP np vp = { SlashVP np vp = {
s = \\t,a,p => (mkClause (subjForm np vp.sc) np.a vp).s ! t ! a ! p ! SDecl ; s = \\t,a,p => (mkClause (subjForm np vp.sc) np.a vp).s ! t ! a ! p ! SDecl ;
c2 = vp.c2 c2 = vp.c2
} ; } ;
@@ -30,13 +30,13 @@ concrete SentenceEst of Sentence = CatEst ** open Prelude, ResEst in {
} ; } ;
SlashPrep cl prep = { SlashPrep cl prep = {
s = \\t,a,p => cl.s ! t ! a ! p ! SDecl ; s = \\t,a,p => cl.s ! t ! a ! p ! SDecl ;
c2 = prep c2 = prep
} ; } ;
SlashVS np vs slash = { SlashVS np vs slash = {
s = \\t,a,p => s = \\t,a,p =>
(mkClause (subjForm np vs.sc) np.a (mkClause (subjForm np vs.sc) np.a
(insertExtrapos (etta_Conj ++ slash.s) (insertExtrapos (etta_Conj ++ slash.s)
(predV vs)) (predV vs))
).s ! t ! a ! p ! SDecl ; ).s ! t ! a ! p ! SDecl ;

View File

@@ -29,7 +29,7 @@ lin
SymbNum n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ; SymbNum n = {s = \\_,_ => n.s ; isNum = True ; n = Pl} ;
SymbOrd n = {s = \\_ => glue n.s "."} ; SymbOrd n = {s = \\_ => glue n.s "."} ;
lincat lincat
Symb, [Symb] = SS ; Symb, [Symb] = SS ;

View File

@@ -1,6 +1,6 @@
--# -path=.:../abstract:../common --# -path=.:../abstract:../common
concrete TerminologyEst of Terminology = CatEst ** open concrete TerminologyEst of Terminology = CatEst ** open
ResEst, ResEst,
ParadigmsEst, ParadigmsEst,
(G = GrammarEst), (G = GrammarEst),
@@ -17,9 +17,9 @@ lincat
ParameterType = G.N ; ParameterType = G.N ;
Parameter = G.N ; Parameter = G.N ;
Modifier = G.A ; Modifier = G.A ;
Heading = {s : Str} ; Heading = {s : Str} ;
lin lin
noun_Category = mkN "käändsõna" ; noun_Category = mkN "käändsõna" ;
@@ -59,7 +59,7 @@ lin
active_Parameter = mkN "isikuline tegumood" ; active_Parameter = mkN "isikuline tegumood" ;
passive_Parameter = mkN "umbsikuline tegumood" ; passive_Parameter = mkN "umbsikuline tegumood" ;
imperative_Parameter = mkN "käskiv kõneviis" "käskiva kõneviisi"; imperative_Parameter = mkN "käskiv kõneviis" "käskiva kõneviisi";
indicative_Parameter = mkN "kindel kõneviis" "kindla kõneviisi"; indicative_Parameter = mkN "kindel kõneviis" "kindla kõneviisi";
conjunctive_Parameter = mkN "konjunktiiv" ; conjunctive_Parameter = mkN "konjunktiiv" ;
@@ -67,7 +67,7 @@ lin
present_Parameter = mkN "olevik" ; present_Parameter = mkN "olevik" ;
past_Parameter = mkN "lihtminevik" ; past_Parameter = mkN "lihtminevik" ;
future_Parameter = mkN "futuur" ; ---- ??? future_Parameter = mkN "futuur" ; ---- ???
conditional_Parameter = mkN "tingiv kõneviis" "tingiva kõneviisi"; conditional_Parameter = mkN "tingiv kõneviis" "tingiva kõneviisi";
perfect_Parameter = mkN "täisminevik" ; perfect_Parameter = mkN "täisminevik" ;
quotative_Parameter = mkN "kaudne kõneviis" "kaudse kõneviisi"; quotative_Parameter = mkN "kaudne kõneviis" "kaudse kõneviisi";

View File

@@ -9,17 +9,17 @@ concrete VerbEst of Verb = CatEst ** open Prelude, ResEst in {
SlashV2a v = predV v ** {c2 = v.c2} ; SlashV2a v = predV v ** {c2 = v.c2} ;
Slash2V3 v np = Slash2V3 v np =
insertObj insertObj
(\\fin,b,_ => appCompl fin b v.c2 np) (predV v) ** {c2 = v.c3} ; (\\fin,b,_ => appCompl fin b v.c2 np) (predV v) ** {c2 = v.c3} ;
Slash3V3 v np = Slash3V3 v np =
insertObj insertObj
(\\fin,b,_ => appCompl fin b v.c3 np) (predV v) ** {c2 = v.c2} ; (\\fin,b,_ => appCompl fin b v.c3 np) (predV v) ** {c2 = v.c2} ;
ComplVV v vp = ComplVV v vp =
insertObj insertObj
(\\_,b,a => infVP v.sc b a vp v.vi) (\\_,b,a => infVP v.sc b a vp v.vi)
(predV {s = v.s ; (predV {s = v.s ;
p = v.p ; p = v.p ;
sc = case vp.sc of { sc = case vp.sc of {
NPCase Nom => v.sc ; -- minul tuleb kirjutada (VV 'tulema' determines the subject case) NPCase Nom => v.sc ; -- minul tuleb kirjutada (VV 'tulema' determines the subject case)
@@ -30,47 +30,47 @@ concrete VerbEst of Verb = CatEst ** open Prelude, ResEst in {
ComplVS v s = insertExtrapos (etta_Conj ++ s.s) (predV v) ; ComplVS v s = insertExtrapos (etta_Conj ++ s.s) (predV v) ;
ComplVQ v q = insertExtrapos ( q.s) (predV v) ; ComplVQ v q = insertExtrapos ( q.s) (predV v) ;
ComplVA v ap = ComplVA v ap =
insertObj insertObj
(\\_,b,agr => (\\_,b,agr =>
let n = (complNumAgr agr) in let n = (complNumAgr agr) in
ap.s ! False ! (NCase n (npform2case n v.c2.c))) --- v.cs.s ignored ap.s ! False ! (NCase n (npform2case n v.c2.c))) --- v.cs.s ignored
(predV v) ; (predV v) ;
SlashV2S v s = SlashV2S v s =
insertExtrapos (etta_Conj ++ s.s) (predV v) ** {c2 = v.c2} ; insertExtrapos (etta_Conj ++ s.s) (predV v) ** {c2 = v.c2} ;
SlashV2Q v q = SlashV2Q v q =
insertExtrapos (q.s) (predV v) ** {c2 = v.c2} ; insertExtrapos (q.s) (predV v) ** {c2 = v.c2} ;
SlashV2V v vp = SlashV2V v vp =
insertObj (\\_,b,a => infVP v.sc b a vp v.vi) (predV v) ** {c2 = v.c2} ; insertObj (\\_,b,a => infVP v.sc b a vp v.vi) (predV v) ** {c2 = v.c2} ;
---- different infinitives ---- different infinitives
SlashV2A v ap = SlashV2A v ap =
insertObj insertObj
(\\fin,b,_ => (\\fin,b,_ =>
ap.s ! False ! (NCase Sg (npform2case Sg v.c3.c))) ----agr to obj ap.s ! False ! (NCase Sg (npform2case Sg v.c3.c))) ----agr to obj
(predV v) ** {c2 = v.c2} ; (predV v) ** {c2 = v.c2} ;
ComplSlash vp np = insertObjPre (\\fin,b,_ => appCompl fin b vp.c2 np) vp ; ComplSlash vp np = insertObjPre (\\fin,b,_ => appCompl fin b vp.c2 np) vp ;
UseComp comp = UseComp comp =
insertObj (\\_,_ => comp.s) (predV (verbOlema ** {sc = NPCase Nom})) ; insertObj (\\_,_ => comp.s) (predV (verbOlema ** {sc = NPCase Nom})) ;
SlashVV v vp = SlashVV v vp =
insertObj insertObj
(\\_,b,a => infVP v.sc b a vp v.vi) (\\_,b,a => infVP v.sc b a vp v.vi)
(predV {s = v.s ; (predV {s = v.s ;
p = v.p ; p = v.p ;
sc = case vp.sc of { sc = case vp.sc of {
NPCase Nom => v.sc ; -- minun täytyy pestä auto NPCase Nom => v.sc ; -- minun täytyy pestä auto
c => c -- minulla täytyy olla auto c => c -- minulla täytyy olla auto
} }
} }
) ** {c2 = vp.c2} ; ---- correct ?? ) ** {c2 = vp.c2} ; ---- correct ??
SlashV2VNP v np vp = SlashV2VNP v np vp =
insertObjPre insertObjPre
(\\fin,b,a => appCompl True b v.c2 np ++ ---- fin -> stack overflow (\\fin,b,a => appCompl True b v.c2 np ++ ---- fin -> stack overflow
infVP v.sc b a vp v.vi) infVP v.sc b a vp v.vi)
(predV v) ** {c2 = vp.c2} ; (predV v) ** {c2 = vp.c2} ;
AdvVP vp adv = insertAdv adv.s vp ; AdvVP vp adv = insertAdv adv.s vp ;
@@ -91,7 +91,7 @@ concrete VerbEst of Verb = CatEst ** open Prelude, ResEst in {
----b UseVS, UseVQ = \v -> v ** {c2 = {s = [] ; c = NPAcc ; isPre = True}} ; ----b UseVS, UseVQ = \v -> v ** {c2 = {s = [] ; c = NPAcc ; isPre = True}} ;
CompAP = compAP ; CompAP = compAP ;
CompCN = compCN ; CompCN = compCN ;
CompNP np = {s = \\_ => np.s ! NPCase Nom} ; CompNP np = {s = \\_ => np.s ! NPCase Nom} ;
CompAdv a = {s = \\_ => a.s} ; CompAdv a = {s = \\_ => a.s} ;
@@ -102,17 +102,17 @@ concrete VerbEst of Verb = CatEst ** open Prelude, ResEst in {
--2 The object case --2 The object case
-- --
-- The rules involved are ComplV2 and ComplVV above. -- The rules involved are ComplV2 and ComplVV above.
-- The work is done jointly in ResEst.infVP and appCompl. -- The work is done jointly in ResEst.infVP and appCompl.
-- Cases to test: l -table (to see negated forms) -- Cases to test: l -table (to see negated forms)
--``` --```
-- minun täytyy ostaa auto -- minun täytyy ostaa auto
-- PredVP (UsePron i_Pron) (ComplVV must_VV -- PredVP (UsePron i_Pron) (ComplVV must_VV
-- (ComplV2 buy_V2 (DetCN (DetSg (SgQuant DefArt) NoOrd) (UseN car_N)))) -- (ComplV2 buy_V2 (DetCN (DetSg (SgQuant DefArt) NoOrd) (UseN car_N))))
-- minä tahdon ostaa auton -- minä tahdon ostaa auton
-- PredVP (UsePron i_Pron) (ComplVV want_VV -- PredVP (UsePron i_Pron) (ComplVV want_VV
-- (ComplV2 buy_V2 (DetCN (DetSg (SgQuant DefArt) NoOrd) (UseN car_N)))) -- (ComplV2 buy_V2 (DetCN (DetSg (SgQuant DefArt) NoOrd) (UseN car_N))))
-- minulla täytyy olla auto -- minulla täytyy olla auto
-- PredVP (UsePron i_Pron) (ComplVV must_VV -- PredVP (UsePron i_Pron) (ComplVV must_VV
-- (ComplV2 have_V2 (DetCN (DetSg (SgQuant DefArt) NoOrd) (UseN car_N)))) -- (ComplV2 have_V2 (DetCN (DetSg (SgQuant DefArt) NoOrd) (UseN car_N))))
--``` --```
-- Unfortunately, there is no nice way to say "I want to have a car". -- Unfortunately, there is no nice way to say "I want to have a car".