mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 08:58:55 -06:00
Hrv masc noun declensions done
This commit is contained in:
@@ -24,7 +24,6 @@ param
|
|||||||
-- phonology
|
-- phonology
|
||||||
|
|
||||||
oper
|
oper
|
||||||
hardConsonant : pattern Str = #("d"|"t"|"g"|"h"|"k"|"n"|"r") ; ----
|
|
||||||
softConsonant : pattern Str = #("c"|"č"|"ć"|"đ"|"j"|"lj"|"nj"|"š"|"ž"|"št") ;
|
softConsonant : pattern Str = #("c"|"č"|"ć"|"đ"|"j"|"lj"|"nj"|"š"|"ž"|"št") ;
|
||||||
--- wiki "and sometimes r"; BCMS slightly different
|
--- wiki "and sometimes r"; BCMS slightly different
|
||||||
|
|
||||||
@@ -34,6 +33,8 @@ oper
|
|||||||
_ => shard
|
_ => shard
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
animate = Masc Anim ;
|
||||||
|
inanimate = Masc Inanim ;
|
||||||
|
|
||||||
palatalize : Str -> Str = \s -> case s of {
|
palatalize : Str -> Str = \s -> case s of {
|
||||||
x + "ki" => x + "ci" ;
|
x + "ki" => x + "ci" ;
|
||||||
@@ -42,7 +43,7 @@ palatalize : Str -> Str = \s -> case s of {
|
|||||||
x + "ge" => x + "že" ;
|
x + "ge" => x + "že" ;
|
||||||
x + "hi" => x + "si" ;
|
x + "hi" => x + "si" ;
|
||||||
x + "he" => x + "še" ;
|
x + "he" => x + "še" ;
|
||||||
x + "ce" => x + "če" ; ---- TODO stric but check sins: stricem, klincem, pacc klince
|
x + "ce" => x + "če" ;
|
||||||
_ => s
|
_ => s
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -58,7 +59,7 @@ palatalize : Str -> Str = \s -> case s of {
|
|||||||
|
|
||||||
-- so this is the lincat of N
|
-- so this is the lincat of N
|
||||||
|
|
||||||
NounForms : Type = {snom,sgen,sdat,sacc,svoc,sins,pnom,pgen,pdat,pacc : Str ; g : Gender} ;
|
NounForms : Type = {snom,sgen,sdat,sacc,svoc,sins,pnom,pgen,pdat,pacc : Str} ;
|
||||||
|
|
||||||
-- But traditional tables make agreement easier to handle in syntax
|
-- But traditional tables make agreement easier to handle in syntax
|
||||||
-- so this is the lincat of CN
|
-- so this is the lincat of CN
|
||||||
@@ -67,14 +68,17 @@ palatalize : Str -> Str = \s -> case s of {
|
|||||||
|
|
||||||
-- this is used in UseN
|
-- this is used in UseN
|
||||||
|
|
||||||
nounFormsNoun : NounForms -> Noun
|
nounFormsNoun : NounForms -> Gender -> Noun
|
||||||
= \forms -> {
|
= \forms, g -> {
|
||||||
s = table {
|
s = table {
|
||||||
Sg => table {
|
Sg => table {
|
||||||
Nom => forms.snom ;
|
Nom => forms.snom ;
|
||||||
Gen => forms.sgen ;
|
Gen => forms.sgen ;
|
||||||
Dat => forms.sdat ;
|
Dat => forms.sdat ;
|
||||||
Acc => forms.sacc ;
|
Acc => case g of {
|
||||||
|
Masc Anim | Fem => forms.sacc ;
|
||||||
|
_ => forms.snom
|
||||||
|
} ;
|
||||||
Voc => forms.svoc ;
|
Voc => forms.svoc ;
|
||||||
Loc => forms.sdat ;
|
Loc => forms.sdat ;
|
||||||
Ins => forms.sins
|
Ins => forms.sins
|
||||||
@@ -89,7 +93,7 @@ palatalize : Str -> Str = \s -> case s of {
|
|||||||
Ins => forms.pdat
|
Ins => forms.pdat
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
g = forms.g
|
g = g
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|
||||||
@@ -144,24 +148,20 @@ palatalize : Str -> Str = \s -> case s of {
|
|||||||
|
|
||||||
-}
|
-}
|
||||||
|
|
||||||
ifAnim : Animacy -> (anim, inanim : Str) -> Str = \anim, sanim, sinanim ->
|
|
||||||
case anim of {
|
|
||||||
Anim => sanim ;
|
|
||||||
Inanim => sinanim
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- the traditional declensions, following Wiki
|
-- the traditional declensions, following Wiki
|
||||||
-- they are also exported in ParadigmsHrv with names izvorN etc
|
-- they are also exported in ParadigmsHrv with names izvorN etc
|
||||||
|
|
||||||
izvorN : Animacy -> DeclensionType = \anim, izvor ->
|
izvorN : DeclensionType = \izvor ->
|
||||||
{
|
{
|
||||||
snom = izvor ;
|
snom = izvor ;
|
||||||
sgen = izvor + "a" ;
|
sgen = izvor + "a" ;
|
||||||
sdat = izvor + "u" ;
|
sdat = izvor + "u" ;
|
||||||
sacc = ifAnim anim (izvor + "a") izvor ;
|
sacc = izvor + "a" ;
|
||||||
svoc = palatalize (izvor + "e") ;
|
svoc = ifSoft izvor
|
||||||
|
(izvor + "u")
|
||||||
|
(palatalize (izvor + "e")) ;
|
||||||
sins = ifSoft izvor
|
sins = ifSoft izvor
|
||||||
(palatalize (izvor + "e") + "m")
|
(izvor + "em")
|
||||||
(izvor + "om") ;
|
(izvor + "om") ;
|
||||||
|
|
||||||
pnom = palatalize (izvor + "i") ;
|
pnom = palatalize (izvor + "i") ;
|
||||||
@@ -170,38 +170,100 @@ palatalize : Str -> Str = \s -> case s of {
|
|||||||
ifSoft izvor
|
ifSoft izvor
|
||||||
(palatalize (izvor + "e") + "vima")
|
(palatalize (izvor + "e") + "vima")
|
||||||
(palatalize (izvor + "i") + "ma") ;
|
(palatalize (izvor + "i") + "ma") ;
|
||||||
pacc = palatalize (izvor + "e") ;
|
pacc = izvor + "e" ;
|
||||||
g = Masc anim
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
nokatN : Animacy -> DeclensionType = \anim, nokat ->
|
nokatN : DeclensionType = \nokat ->
|
||||||
let
|
let
|
||||||
nokt = Predef.tk 2 nokat + last nokat
|
nokt = Predef.tk 2 nokat + last nokat
|
||||||
in izvorN anim nokt ** {
|
in izvorN nokt ** {
|
||||||
snom = nokat ;
|
snom = nokat ;
|
||||||
sacc = ifAnim anim (nokt + "a") nokat ;
|
sacc = nokt + "a" ;
|
||||||
pgen = nokat + "a" ;
|
pgen = nokat + "a" ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
gradaninN : Animacy -> DeclensionType = \anim, gradanin ->
|
gradaninN : DeclensionType = \gradanin ->
|
||||||
let
|
let
|
||||||
gradan = Predef.tk 2 gradanin ;
|
gradan = Predef.tk 2 gradanin ;
|
||||||
gradanN = izvorN anim gradan
|
gradanN = izvorN gradan
|
||||||
in izvorN anim gradanin ** {
|
in numbersNounForms (izvorN gradanin) gradanN ;
|
||||||
pnom = gradanN.pnom ;
|
|
||||||
pgen = gradanN.pgen ;
|
numbersNounForms : (sg, pl : NounForms) -> NounForms =
|
||||||
pdat = gradanN.pdat ;
|
\sg, pl -> sg ** {
|
||||||
pacc = gradanN.pacc ;
|
pnom = pl.pnom ;
|
||||||
|
pgen = pl.pgen ;
|
||||||
|
pdat = pl.pdat ;
|
||||||
|
pacc = pl.pacc ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- vojnik, bubreg, trbuh, stric by izvorN, čvórak, klinac by nokatN
|
vojnikN : DeclensionType = izvorN ;
|
||||||
---- TODO
|
bubregN : DeclensionType = izvorN ;
|
||||||
|
trbuhN : DeclensionType = izvorN ;
|
||||||
|
cvorakN : DeclensionType = nokatN ;
|
||||||
|
|
||||||
|
panjN : DeclensionType = \panj ->
|
||||||
|
numbersNounForms (izvorN panj) (izvorN (palatalize (panj + "e") + "v")) ;
|
||||||
|
|
||||||
|
suzanjN : DeclensionType = \suzanj ->
|
||||||
|
let
|
||||||
|
suznj = Predef.tk 3 suzanj + Predef.dp 2 suzanj
|
||||||
|
in
|
||||||
|
numbersNounForms
|
||||||
|
(izvorN suzanj)
|
||||||
|
(izvorN suznj ** {
|
||||||
|
pgen = "sužanja" ;
|
||||||
|
pdat = "sužnjima"
|
||||||
|
}) ;
|
||||||
|
|
||||||
|
pristN : DeclensionType = panjN ;
|
||||||
|
|
||||||
|
stricN : DeclensionType = \stric ->
|
||||||
|
panjN stric ** {
|
||||||
|
svoc = palatalize (stric + "e")
|
||||||
|
} ;
|
||||||
|
|
||||||
|
klinacN : DeclensionType = \klinac ->
|
||||||
|
let
|
||||||
|
klinc = Predef.tk 2 klinac + last klinac
|
||||||
|
in nokatN klinac ** {
|
||||||
|
svoc = palatalize (klinc + "e") ;
|
||||||
|
pdat = klinc + "ima" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
posjetilacN : DeclensionType = \posjetilac ->
|
||||||
|
let
|
||||||
|
posjetioc = Predef.tk 3 posjetilac + "oc"
|
||||||
|
in izvorN posjetioc ** {
|
||||||
|
snom = posjetilac ;
|
||||||
|
svoc = palatalize (posjetioc + "e") ;
|
||||||
|
sins = palatalize (posjetioc + "e") + "m" ;
|
||||||
|
pgen = posjetilac + "a" ;
|
||||||
|
pdat = palatalize (posjetioc + "i") + "ma" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
pepeoN : DeclensionType = \pepeo ->
|
||||||
|
let
|
||||||
|
pepel = init pepeo + "l"
|
||||||
|
in izvorN pepel ** {snom = pepeo} ;
|
||||||
|
|
||||||
|
ugaoN : DeclensionType = \ugao ->
|
||||||
|
let
|
||||||
|
ugal = init ugao + "l" ;
|
||||||
|
ugl = Predef.tk 2 ugal + last ugal
|
||||||
|
in numbersNounForms
|
||||||
|
(nokatN ugal ** {snom = ugao})
|
||||||
|
(izvorN (ugl + "ov")) ;
|
||||||
|
|
||||||
|
bifeN : DeclensionType = \bife ->
|
||||||
|
izvorN bife ** {svoc = bife + "u"} ;
|
||||||
|
|
||||||
|
ziriN : DeclensionType = \ziri ->
|
||||||
|
bifeN (ziri + "j") ** {
|
||||||
|
snom = ziri ;
|
||||||
|
pdat = ziri + "jima" ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
taksiN : DeclensionType = ziriN ;
|
||||||
|
|
||||||
|
|
||||||
{-
|
{-
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ s . Sg => Voc => prištu
|
|||||||
s . Sg => Loc => prištu
|
s . Sg => Loc => prištu
|
||||||
s . Sg => Ins => prištem
|
s . Sg => Ins => prištem
|
||||||
s . Pl => Nom => prištevi
|
s . Pl => Nom => prištevi
|
||||||
s . Pl => Gen => prištava
|
s . Pl => Gen => prišteva
|
||||||
s . Pl => Dat => prištevima
|
s . Pl => Dat => prištevima
|
||||||
s . Pl => Acc => prišteve
|
s . Pl => Acc => prišteve
|
||||||
s . Pl => Voc => prištevi
|
s . Pl => Voc => prištevi
|
||||||
@@ -245,7 +245,7 @@ s . Sg => Acc => žiri
|
|||||||
s . Sg => Voc => žiriju
|
s . Sg => Voc => žiriju
|
||||||
s . Sg => Loc => žiriju
|
s . Sg => Loc => žiriju
|
||||||
s . Sg => Ins => žirijem
|
s . Sg => Ins => žirijem
|
||||||
s . Pl => Nom => žirji
|
s . Pl => Nom => žiriji
|
||||||
s . Pl => Gen => žirija
|
s . Pl => Gen => žirija
|
||||||
s . Pl => Dat => žirijima
|
s . Pl => Dat => žirijima
|
||||||
s . Pl => Acc => žirije
|
s . Pl => Acc => žirije
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
cc -table -unqual nounFormsNoun (izvorN Inanim "izvor")
|
cc -table -unqual nounFormsNoun (izvorN "izvor") inanimate
|
||||||
cc -table -unqual nounFormsNoun (nokatN Inanim "nokat")
|
cc -table -unqual nounFormsNoun (nokatN "nokat") inanimate
|
||||||
cc -table -unqual nounFormsNoun (gradaninN Anim "građanin")
|
cc -table -unqual nounFormsNoun (gradaninN "građanin") animate
|
||||||
cc -table -unqual nounFormsNoun (izvorN Anim "vojnik")
|
cc -table -unqual nounFormsNoun (vojnikN "vojnik") animate
|
||||||
cc -table -unqual nounFormsNoun (izvorN Anim "bubreg")
|
cc -table -unqual nounFormsNoun (bubregN "bubreg") animate
|
||||||
cc -table -unqual nounFormsNoun (izvorN Anim "trbuh")
|
cc -table -unqual nounFormsNoun (trbuhN "trbuh") animate
|
||||||
cc -table -unqual nounFormsNoun (nokatN Anim "čvorak")
|
cc -table -unqual nounFormsNoun (cvorakN "čvorak") animate
|
||||||
cc -table -unqual nounFormsNoun (izvorN Inanim "panj")
|
cc -table -unqual nounFormsNoun (panjN "panj") inanimate
|
||||||
cc -table -unqual nounFormsNoun (nokatN Inanim "sužanj")
|
cc -table -unqual nounFormsNoun (suzanjN "sužanj") inanimate
|
||||||
cc -table -unqual nounFormsNoun (izvorN Inanim "prišt")
|
cc -table -unqual nounFormsNoun (pristN "prišt") inanimate
|
||||||
cc -table -unqual nounFormsNoun (izvorN Anim "stric")
|
cc -table -unqual nounFormsNoun (stricN "stric") animate
|
||||||
cc -table -unqual nounFormsNoun (nokatN Inanim "klinac")
|
cc -table -unqual nounFormsNoun (klinacN "klinac") inanimate
|
||||||
cc -table -unqual nounFormsNoun (nokatN Anim "posjetilac")
|
cc -table -unqual nounFormsNoun (posjetilacN "posjetilac") animate
|
||||||
cc -table -unqual nounFormsNoun (izvorN Inanim "pepeo")
|
cc -table -unqual nounFormsNoun (pepeoN "pepeo") inanimate
|
||||||
cc -table -unqual nounFormsNoun (izvorN Inanim "ugao")
|
cc -table -unqual nounFormsNoun (ugaoN "ugao") inanimate
|
||||||
cc -table -unqual nounFormsNoun (izvorN Inanim "bife")
|
cc -table -unqual nounFormsNoun (bifeN "bife") inanimate
|
||||||
cc -table -unqual nounFormsNoun (izvorN Inanim "žiri")
|
cc -table -unqual nounFormsNoun (ziriN "žiri") inanimate
|
||||||
cc -table -unqual nounFormsNoun (izvorN Inanim "taksi")
|
cc -table -unqual nounFormsNoun (taksiN "taksi") inanimate
|
||||||
|
|||||||
Reference in New Issue
Block a user