forked from GitHub/gf-rgl
Animacy is now stored and used in Mophology but not yet in syntax
This commit is contained in:
@@ -17,7 +17,7 @@ lincat
|
|||||||
AP = {s : Species => Gender => Case => Number => Str} ;
|
AP = {s : Species => Gender => Case => Number => Str} ;
|
||||||
|
|
||||||
-- Noun
|
-- Noun
|
||||||
CN = {s : Species => Case => Number => Str; g : Gender} ;
|
CN = {s : Species => Case => Number => Str; g : AGender} ;
|
||||||
NP = {s : Case => Str ; a : Agr} ;
|
NP = {s : Case => Str ; a : Agr} ;
|
||||||
|
|
||||||
Pron = {s : Case => Str; poss : Gender => Case => Number => Str; a : Agr} ;
|
Pron = {s : Case => Str; poss : Gender => Case => Number => Str; a : Agr} ;
|
||||||
@@ -42,7 +42,7 @@ lincat
|
|||||||
|
|
||||||
A = {s : AForm => Str};
|
A = {s : AForm => Str};
|
||||||
|
|
||||||
N = {s : Case => Number => Str; g : Gender};
|
N = {s : Case => Number => Str; g : AGender};
|
||||||
PN = {s : Case => Number => Str; g : Gender};
|
PN = {s : Case => Number => Str; g : AGender};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,12 +2,12 @@ concrete NounSlv of Noun = CatSlv ** open ResSlv in {
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
DetCN det cn = {
|
DetCN det cn = {
|
||||||
s = \\c => det.s ! cn.g ! c ++
|
s = \\c => det.s ! agender2gender cn.g ! c ++
|
||||||
case det.n of {
|
case det.n of {
|
||||||
UseNum n => cn.s ! det.spec ! c ! n ;
|
UseNum n => cn.s ! det.spec ! c ! n ;
|
||||||
UseGen => cn.s ! det.spec ! Gen ! Pl
|
UseGen => cn.s ! det.spec ! Gen ! Pl
|
||||||
} ;
|
} ;
|
||||||
a = {g = cn.g ;
|
a = {g = agender2gender cn.g ;
|
||||||
n = case det.n of {
|
n = case det.n of {
|
||||||
UseNum n => n ;
|
UseNum n => n ;
|
||||||
UseGen => Pl
|
UseGen => Pl
|
||||||
@@ -53,13 +53,13 @@ concrete NounSlv of Noun = CatSlv ** open ResSlv in {
|
|||||||
|
|
||||||
MassNP n = {
|
MassNP n = {
|
||||||
s = \\c => n.s ! Indef ! c ! Sg ;
|
s = \\c => n.s ! Indef ! c ! Sg ;
|
||||||
a = {g=n.g; n=Sg; p=P3}
|
a = {g=agender2gender n.g; n=Sg; p=P3}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UseN n = {s = \\_ => n.s; g = n.g} ;
|
UseN n = {s = \\_ => n.s; g = n.g} ;
|
||||||
|
|
||||||
AdjCN ap cn = {
|
AdjCN ap cn = {
|
||||||
s = \\spec,c,n => ap.s ! spec ! cn.g ! c ! n ++ cn.s ! Indef ! c ! n ;
|
s = \\spec,c,n => ap.s ! spec ! agender2gender cn.g ! c ! n ++ cn.s ! Indef ! c ! n ;
|
||||||
g = cn.g
|
g = cn.g
|
||||||
} ;
|
} ;
|
||||||
AdvCN cn ad = {s = \\spec,c,n => cn.s ! spec ! c ! n ++ ad.s ; g = cn.g} ;
|
AdvCN cn ad = {s = \\spec,c,n => cn.s ! spec ! c ! n ++ ad.s ; g = cn.g} ;
|
||||||
|
|||||||
@@ -11,27 +11,30 @@ oper
|
|||||||
mkPrep : Str -> Case -> Prep =
|
mkPrep : Str -> Case -> Prep =
|
||||||
\s,c -> lin Prep {s=s; c=c};
|
\s,c -> lin Prep {s=s; c=c};
|
||||||
|
|
||||||
masculine = Masc;
|
animate = AMasc Animate;
|
||||||
feminine = Fem;
|
masculine = AMasc Inanimate;
|
||||||
neuter = Neut;
|
feminine = AFem;
|
||||||
|
neuter = ANeut;
|
||||||
|
|
||||||
mkN = overload {
|
mkN = overload {
|
||||||
mkN : (noun : Str) -> N = smartN ;
|
mkN : (noun : Str) -> N = smartN ;
|
||||||
mkN : (noun : Str) -> Gender -> N = regNouns ;
|
mkN : (noun : Str) -> AGender -> N = regNouns ;
|
||||||
mkN : (noun,gensg : Str) -> Gender -> N = irregNouns ;
|
mkN : (noun,gensg : Str) -> AGender -> N = irregNouns ;
|
||||||
mkN : (noun,gensg,nompl : Str) -> N = irregMasc ;
|
mkN : (noun,gensg,nompl : Str) -> N = irregMasc ;
|
||||||
mkN : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> N = worstN ;
|
mkN : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> AGender -> N = worstN ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--All masculine forms (except those with long pluralstem) are formed here.
|
--All masculine forms (except those with long pluralstem) are formed here.
|
||||||
--Takes the baseform + the genitive singular form + animacy.
|
--Takes the baseform + the genitive singular form + animacy.
|
||||||
--In case the genitive singular has an extra vowel in the end, it is dropped before coming here.
|
--In case the genitive singular has an extra vowel in the end, it is dropped before coming here.
|
||||||
|
|
||||||
mascAll : (_,_ : Str) -> N = \oce,ocet ->
|
mascAll : (_,_ : Str) -> Animacy -> N = \oce,ocet,anim ->
|
||||||
worstN oce (ocet + "a") (ocet + "u") oce (ocet + "u") (ocet + "om") -- Singular
|
let accsg = case anim of {Animate => ocet + "a"; _ => oce}; --Special case: Masc Sg Acc Animate
|
||||||
|
in
|
||||||
|
worstN oce (ocet + "a") (ocet + "u") accsg (ocet + "u") (ocet + "om") -- Singular
|
||||||
(ocet + "a") (ocet + "ov") (ocet + "oma") (ocet + "a") (ocet + "ih") (ocet + "oma") -- Dual
|
(ocet + "a") (ocet + "ov") (ocet + "oma") (ocet + "a") (ocet + "ih") (ocet + "oma") -- Dual
|
||||||
(ocet + "i") (ocet + "ov") (ocet + "om") (ocet + "e") (ocet + "ih") (ocet + "i") -- Plural
|
(ocet + "i") (ocet + "ov") (ocet + "om") (ocet + "e") (ocet + "ih") (ocet + "i") -- Plural
|
||||||
masculine ;
|
(AMasc anim) ;
|
||||||
|
|
||||||
--All neuter forms are formed here, long or normal.
|
--All neuter forms are formed here, long or normal.
|
||||||
--It takes the baseform + the genitive singular form.
|
--It takes the baseform + the genitive singular form.
|
||||||
@@ -60,30 +63,30 @@ oper
|
|||||||
_ + "a" => regFem noun ;
|
_ + "a" => regFem noun ;
|
||||||
_ + ("ev" | "ost") => regFem noun ;
|
_ + ("ev" | "ost") => regFem noun ;
|
||||||
_ + ("o"| "e") => let nou = init noun in neutAll noun nou ;
|
_ + ("o"| "e") => let nou = init noun in neutAll noun nou ;
|
||||||
_ + #consonant => mascAll noun noun; --Base form used in the rest of the paradigm.
|
_ + #consonant => mascAll noun noun Inanimate; --Base form used in the rest of the paradigm.
|
||||||
_ => let nou = init noun in mascAll noun nou -- Drops the last vowel for the rest of the paradigm.
|
_ => let nou = init noun in mascAll noun nou Inanimate -- Drops the last vowel for the rest of the paradigm.
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--Send the masculine and neutral nouns with long stem off to the right paradigm.
|
--Send the masculine and neutral nouns with long stem off to the right paradigm.
|
||||||
|
|
||||||
irregNouns : (noun,longform : Str) -> Gender -> N = \noun,longform,gen ->
|
irregNouns : (noun,longform : Str) -> AGender -> N = \noun,longform,gen ->
|
||||||
case gen of {
|
case gen of {
|
||||||
Masc => let longfor = init longform in mascAll noun longfor ;
|
AMasc anim => let longfor = init longform in mascAll noun longfor anim ;
|
||||||
Neut => let longfor = init longform in neutAll noun longfor ;
|
ANeut => let longfor = init longform in neutAll noun longfor ;
|
||||||
Fem => regFem noun --There are actually no feminine nouns with long stem.
|
AFem => regFem noun --There are actually no feminine nouns with long stem.
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--Regular masculine nouns that do not end with a consonant, drops the vowel in all conjugated forms.
|
--Regular masculine nouns that do not end with a consonant, drops the vowel in all conjugated forms.
|
||||||
--Takes the baseform + animacy.
|
--Takes the baseform + animacy.
|
||||||
|
|
||||||
regNouns : (noun : Str) -> Gender -> N = \noun,gen ->
|
regNouns : (noun : Str) -> AGender -> N = \noun,gen ->
|
||||||
case gen of {
|
case gen of {
|
||||||
Masc => case noun of {
|
AMasc anim => case noun of {
|
||||||
_ + #consonant => mascAll noun noun ;
|
_ + #consonant => mascAll noun noun anim ;
|
||||||
_ + #vowel => let nou = init noun in mascAll noun nou
|
_ + #vowel => let nou = init noun in mascAll noun nou anim
|
||||||
};
|
};
|
||||||
Neut => let nou = init noun in neutAll noun nou ;
|
ANeut => let nou = init noun in neutAll noun nou ;
|
||||||
Fem => regFem noun --There are actually no feminine nouns with long stem.
|
AFem => regFem noun --There are actually no feminine nouns with long stem.
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--Irregular masculine nouns with long stem has no special ending in genitive dual and plural, so need a special paradigm.
|
--Irregular masculine nouns with long stem has no special ending in genitive dual and plural, so need a special paradigm.
|
||||||
@@ -96,7 +99,7 @@ oper
|
|||||||
bogovi bogov (bogov + "om") (bogov + "e") (bogov + "ih") (bogov + "i") -- Plural
|
bogovi bogov (bogov + "om") (bogov + "e") (bogov + "ih") (bogov + "i") -- Plural
|
||||||
masculine ;
|
masculine ;
|
||||||
|
|
||||||
worstN : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> N =
|
worstN : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> AGender -> N =
|
||||||
\nomsg,gensg,datsg,accsg,locsg,instrsg,nomdl,gendl,datdl,accdl,locdl,instrdl,nompl,genpl,datpl,accpl,locpl,instrpl,g -> lin N {
|
\nomsg,gensg,datsg,accsg,locsg,instrsg,nomdl,gendl,datdl,accdl,locdl,instrdl,nompl,genpl,datpl,accpl,locpl,instrpl,g -> lin N {
|
||||||
s = table {
|
s = table {
|
||||||
Nom => table {Sg=>nomsg; Dl=>nomdl; Pl=>nompl};
|
Nom => table {Sg=>nomsg; Dl=>nomdl; Pl=>nompl};
|
||||||
@@ -109,7 +112,7 @@ oper
|
|||||||
g = g
|
g = g
|
||||||
};
|
};
|
||||||
|
|
||||||
mkPN : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> Gender -> PN =
|
mkPN : (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_ : Str) -> AGender -> PN =
|
||||||
\nomsg,nomdl,nompl,gensg,gendl,genpl,datsg,datdl,datpl,accsg,accdl,accpl,locsg,locdl,locpl,instrsg,instrdl,instrpl,g -> lin PN {
|
\nomsg,nomdl,nompl,gensg,gendl,genpl,datsg,datdl,datpl,accsg,accdl,accpl,locsg,locdl,locpl,instrsg,instrdl,instrpl,g -> lin PN {
|
||||||
s = table {
|
s = table {
|
||||||
Nom => table {Sg=>nomsg; Dl=>nomdl; Pl=>nompl};
|
Nom => table {Sg=>nomsg; Dl=>nomdl; Pl=>nompl};
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ param
|
|||||||
Gender = Masc | Fem | Neut ;
|
Gender = Masc | Fem | Neut ;
|
||||||
Person = P1 | P2 | P3 ;
|
Person = P1 | P2 | P3 ;
|
||||||
Species = Indef | Def ;
|
Species = Indef | Def ;
|
||||||
|
Animacy = Animate | Inanimate ;
|
||||||
|
AGender = AMasc Animacy | AFem | ANeut ;
|
||||||
|
|
||||||
NumAgr = UseNum Number | UseGen;
|
NumAgr = UseNum Number | UseGen;
|
||||||
DForm = Unit Gender | Teen | Ten | Hundred;
|
DForm = Unit Gender | Teen | Ten | Hundred;
|
||||||
@@ -113,5 +115,12 @@ oper
|
|||||||
|
|
||||||
numAgr2num : NumAgr => Number =
|
numAgr2num : NumAgr => Number =
|
||||||
table {UseNum n => n; UseGen => Pl} ;
|
table {UseNum n => n; UseGen => Pl} ;
|
||||||
|
|
||||||
|
agender2gender : AGender -> Gender = \ag ->
|
||||||
|
case ag of {
|
||||||
|
AMasc _ => Masc ;
|
||||||
|
AFem => Fem ;
|
||||||
|
ANeut => Neut
|
||||||
|
} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user