mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-20 02:09:32 -06:00
176 lines
6.9 KiB
Plaintext
176 lines
6.9 KiB
Plaintext
--# -path=.:../../prelude
|
|
|
|
--1 A Simple English Resource Morphology
|
|
--
|
|
-- Aarne Ranta 2002 -- 2005
|
|
--
|
|
-- This resource morphology contains definitions needed in the resource
|
|
-- syntax. To build a lexicon, it is better to use $ParadigmsEng$, which
|
|
-- gives a higher-level access to this module.
|
|
|
|
resource MorphoBul = ResBul ** open
|
|
Predef,
|
|
Prelude,
|
|
CatBul
|
|
in {
|
|
|
|
flags optimize=all ;
|
|
|
|
oper
|
|
--2 Determiners
|
|
|
|
mkDeterminerSg : Str -> Str -> Str -> {s : DGender => Role => Str; n : Number; countable : Bool ; spec : Species} = \vseki,vsiaka,vsiako ->
|
|
{s = \\g,_ => table DGender [vseki;vseki;vsiaka;vsiako] ! g; n = Sg; countable = False; spec = Indef} ;
|
|
mkDeterminerPl : Str -> {s : DGender => Role => Str ; n : Number; countable : Bool ; spec : Species} = \vsicki ->
|
|
{s = \\_,_ => vsicki; n = Pl; countable = False; spec = Indef} ;
|
|
|
|
mkQuant : Str -> Str -> Str -> Str -> {s : AForm => Str; spec : Species} = \tozi,tazi,towa,tezi -> {
|
|
s = \\aform => case aform of {
|
|
ASg Masc _ => tozi ;
|
|
ASgMascDefNom => tozi ;
|
|
ASg Fem _ => tazi ;
|
|
ASg Neut _ => towa ;
|
|
APl _ => tezi
|
|
};
|
|
spec = Indef
|
|
} ;
|
|
|
|
|
|
--2 Verbs
|
|
|
|
mkVerb : (_,_,_,_,_,_,_,_,_:Str) -> VTable =
|
|
\cheta,chete,chetoh,chetqh,chel,chetql,cheten,chetqst,cheti ->
|
|
table {
|
|
VPres Sg P1 => cheta;
|
|
VPres Sg P2 => chete + "ø";
|
|
VPres Sg P3 => chete;
|
|
VPres Pl P1 => case chete of {
|
|
_ + ("à"|"ÿ") => chete + "ìå";
|
|
_ => chete + "ì"
|
|
};
|
|
VPres Pl P2 => chete + "òå";
|
|
VPres Pl P3 => case cheta of {
|
|
vika + "ì" => case chete of {
|
|
dad + "å" => dad + "àò";
|
|
vika => vika + "ò"
|
|
};
|
|
_ => cheta + "ò"
|
|
};
|
|
VAorist Sg P1 => chetoh;
|
|
VAorist Sg _ => case chetoh of {
|
|
chet+"îõ" => chete;
|
|
zova+ "õ" => zova
|
|
};
|
|
VAorist Pl P1 => chetoh + "ìå";
|
|
VAorist Pl P2 => chetoh + "òå";
|
|
VAorist Pl P3 => chetoh + "à";
|
|
VImperfect Sg P1 => chetqh;
|
|
VImperfect Sg _ => case chete of {
|
|
rabot + "è" => rabot + "eøå";
|
|
_ => chete + "øå"
|
|
};
|
|
VImperfect Pl P1 => chetqh + "ìå";
|
|
VImperfect Pl P2 => chetqh + "òå";
|
|
VImperfect Pl P3 => chetqh + "à";
|
|
VPerfect aform =>let chel1 : Str =
|
|
case chel of {
|
|
pas+"úë" => pas+"ë";
|
|
_ => chel
|
|
}
|
|
in (mkAdjective chel
|
|
(chel+"èÿ")
|
|
(chel+"èÿò")
|
|
(chel1+"a")
|
|
(chel1+"àòà")
|
|
(chel1+"î")
|
|
(chel1+"îòî")
|
|
(ia2e chel1+"è")
|
|
(ia2e chel1+"èòå")).s ! aform ;
|
|
VPluPerfect aform => regAdjective chetql ! aform ;
|
|
VPassive aform => regAdjective cheten ! aform ;
|
|
VPresPart aform => regAdjective chetqst ! aform ;
|
|
VImperative Sg => cheti;
|
|
VImperative Pl => case cheti of {
|
|
chet + "è" => chet + "åòå";
|
|
ela => ela + "òå"
|
|
};
|
|
VGerund => case chete of {
|
|
rabot + "è" => rabot + "åéêè";
|
|
_ => chete + "éêè"
|
|
}
|
|
} ;
|
|
|
|
|
|
--2 Nouns
|
|
|
|
mkNoun : Str -> Str -> Str -> Str -> DGender -> N = \sg,pl,count,voc,g -> {
|
|
s = table {
|
|
NF Sg Indef => sg ;
|
|
NF Sg Def => case sg of {
|
|
_+"à"=>sg+"òà" ;
|
|
_+"ÿ"=>sg+"òà" ;
|
|
_+"î"=>sg+"òî" ;
|
|
_+"å"=>sg+"òî" ;
|
|
_+"è"=>sg+"òî" ;
|
|
s+"é"=>s +"ÿ" ;
|
|
_+("òåë"|"àð"|"ÿð"|"äåí"
|
|
|"ïúò"|"îãúí"|"ñúí"
|
|
|"êîí"|"êðàë"|"öàð"
|
|
|"çåò"|"ëàêúò"|"íîêúò")
|
|
=>sg +"ÿ" ;
|
|
_ =>case g of {
|
|
DFem => sg+"òà" ;
|
|
_ => sg+"à"
|
|
}
|
|
} ;
|
|
NF Pl Indef => pl ;
|
|
NF Pl Def => case pl of {
|
|
_+"à"=>pl+"òà" ;
|
|
_+"å"=>pl+"òå" ;
|
|
_+"è"=>pl+"òå" ;
|
|
s+"ÿ"=>s +"òà" ;
|
|
s =>s +"òå"
|
|
} ;
|
|
NFSgDefNom => case sg of {
|
|
_+"à"=>sg+"òà" ;
|
|
_+"ÿ"=>sg+"òà" ;
|
|
_+"î"=>sg+"òî" ;
|
|
_+"å"=>sg+"òî" ;
|
|
_+"è"=>sg+"òî" ;
|
|
s+"é"=>s +"ÿò" ;
|
|
_+("òåë"|"àð"|"ÿð"|"äåí"
|
|
|"ïúò"|"îãúí"|"ñúí"
|
|
|"êîí"|"êðàë"|"öàð"
|
|
|"çåò"|"ëàêúò"|"íîêúò")
|
|
=>sg+"ÿò" ;
|
|
_ =>case g of {
|
|
DFem => sg+"òà" ;
|
|
_ => sg+"úò"
|
|
}
|
|
} ;
|
|
NFPlCount => count ;
|
|
NFVocative => voc
|
|
} ;
|
|
g = g ;
|
|
lock_N = <>
|
|
} ;
|
|
|
|
|
|
--2 Adjectives
|
|
|
|
mkAdjective : (_,_,_,_,_,_,_,_,_ : Str) -> A =
|
|
\dobyr,dobria,dobriat,dobra,dobrata,dobro,dobroto,dobri,dobrite -> {
|
|
s = table {
|
|
ASg Masc Indef => dobyr ;
|
|
ASg Masc Def => dobria ;
|
|
ASgMascDefNom => dobriat ;
|
|
ASg Fem Indef => dobra ;
|
|
ASg Fem Def => dobrata ;
|
|
ASg Neut Indef => dobro ;
|
|
ASg Neut Def => dobroto ;
|
|
APl Indef => dobri ;
|
|
APl Def => dobrite
|
|
} ;
|
|
lock_A = <>
|
|
} ;
|
|
} |