mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
@@ -87,8 +87,13 @@ lincat
|
|||||||
[NP] = {s1,s2 : Case => Str} ** BaseNP ;
|
[NP] = {s1,s2 : Case => Str} ** BaseNP ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
BaseNP x y = twoTable Case x y ** consNP x y ;
|
BaseNP x y =
|
||||||
ConsNP xs x = consrTable Case comma xs x ** consNP xs x ;
|
let x' = np2objpron x ;
|
||||||
|
y' = np2objpron y
|
||||||
|
in twoTable Case x' y' ** consNP x' y' ;
|
||||||
|
ConsNP x xs =
|
||||||
|
let x' = np2objpron x
|
||||||
|
in consrTable Case comma x' xs ** consNP x' xs ;
|
||||||
ConjNP conj xs = conjunctNPTable conj xs ** conjNP xs conj ;
|
ConjNP conj xs = conjunctNPTable conj xs ** conjNP xs conj ;
|
||||||
|
|
||||||
oper
|
oper
|
||||||
@@ -114,6 +119,10 @@ oper
|
|||||||
{s = -- TODO if xs is a pronoun, make them use (pronTable ! xs.a).sp
|
{s = -- TODO if xs is a pronoun, make them use (pronTable ! xs.a).sp
|
||||||
table { cas => co.s1 ++ xs.s1 ! Abs ++ co.s2 ! xs.st ++ xs.s2 ! cas}} ;
|
table { cas => co.s1 ++ xs.s1 ! Abs ++ co.s2 ! xs.st ++ xs.s2 ! cas}} ;
|
||||||
|
|
||||||
|
np2objpron : NounPhrase -> NounPhrase = \np -> np ** {
|
||||||
|
s = objpron np
|
||||||
|
} ;
|
||||||
|
|
||||||
consNP : BaseNP -> BaseNP -> BaseNP = \x,y ->
|
consNP : BaseNP -> BaseNP -> BaseNP = \x,y ->
|
||||||
x ** { agr = conjAgr x.agr (getNum y.agr) } ;
|
x ** { agr = conjAgr x.agr (getNum y.agr) } ;
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ lin bird_N = mkN "shimbir" fem ;
|
|||||||
-- lin bone_N = mkN "" ;
|
-- lin bone_N = mkN "" ;
|
||||||
-- lin boot_N = mkN "" ;
|
-- lin boot_N = mkN "" ;
|
||||||
-- lin boss_N = mkN "" ;
|
-- lin boss_N = mkN "" ;
|
||||||
lin book_N = (mk2N "buug" "buugaag") ** {pl = F TA} ;
|
lin book_N = (mk2N "buug" "buugaag") ** {gda = MF GA TA} ;
|
||||||
lin boy_N = mk2N "wiil" "wiilal" ;
|
lin boy_N = mk2N "wiil" "wiilal" ;
|
||||||
lin bread_N = mkN "rooti" ; --masc/fem
|
lin bread_N = mkN "rooti" ; --masc/fem
|
||||||
-- lin break_V2 = mkV2 "" ;
|
-- lin break_V2 = mkV2 "" ;
|
||||||
@@ -222,7 +222,7 @@ lin language_N = mkN "af" ;
|
|||||||
----
|
----
|
||||||
-- M
|
-- M
|
||||||
|
|
||||||
lin man_N = mkN "nin" ;
|
lin man_N = (mk2N "nin" "niman") ** {gda = MM KA KA} ;
|
||||||
-- lin married_A2 = mkA "" ;
|
-- lin married_A2 = mkA "" ;
|
||||||
lin meat_N = mkN "hilib" "hilbo" masc ;
|
lin meat_N = mkN "hilib" "hilbo" masc ;
|
||||||
-- lin milk_N = mkN "" ;
|
-- lin milk_N = mkN "" ;
|
||||||
|
|||||||
@@ -20,11 +20,14 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
-- special form for fem. nouns
|
-- special form for fem. nouns
|
||||||
<_,Nom,False,Indefinite,Sg> => {nf=NomSg ; c=c} ;
|
<_,Nom,False,Indefinite,Sg> => {nf=NomSg ; c=c} ;
|
||||||
|
|
||||||
-- Definite
|
|
||||||
<_,Nom,False,Definite,n> => {nf=Def n ; c=c} ;
|
|
||||||
|
|
||||||
-- If cn has modifier, Nom ending attaches to the modifier
|
-- If cn has modifier, Nom ending attaches to the modifier
|
||||||
<_,Nom,True,_,_> => {nf=Def det.n ; c=Abs} ;
|
<_,Nom,True,_,_> => {nf=Def det.n ; c=Abs} ;
|
||||||
|
|
||||||
|
-- Definite
|
||||||
|
<_,_,False,Definite,n> => {nf=Def n ; c=c} ;
|
||||||
|
|
||||||
|
<_,_,False,Indefinite,n> => {nf=Indef n ; c=c} ;
|
||||||
|
|
||||||
_ => {nf=Def det.n ; c=c} -- TODO check
|
_ => {nf=Def det.n ; c=c} -- TODO check
|
||||||
} ;
|
} ;
|
||||||
art = gda2da cn.gda ! det.n ;
|
art = gda2da cn.gda ! det.n ;
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ oper
|
|||||||
mkN : overload {
|
mkN : overload {
|
||||||
mkN : (bisad : Str) -> N ; -- Predictable nouns
|
mkN : (bisad : Str) -> N ; -- Predictable nouns
|
||||||
mkN : (shimbir : Str) -> (fem : Gender) -> N ; -- Unpredictable gender
|
mkN : (shimbir : Str) -> (fem : Gender) -> N ; -- Unpredictable gender
|
||||||
|
-- mkN : (nin, niman : Str) -> N ; -- Monosyllable word with unpredictable plural
|
||||||
mkN : (maalin,maalmo : Str) -> Gender -> N ; -- Consonant cluster in stem
|
mkN : (maalin,maalmo : Str) -> Gender -> N ; -- Consonant cluster in stem
|
||||||
--mkN : N -> Gender -> N ; -- Otherwise predictable but not gender (TODO does this even happen?)
|
--mkN : N -> Gender -> N ; -- Otherwise predictable but not gender (TODO does this even happen?)
|
||||||
} ;
|
} ;
|
||||||
@@ -165,7 +166,8 @@ oper
|
|||||||
mkN = overload {
|
mkN = overload {
|
||||||
mkN : Str -> N = \s -> lin N (mkN1 s) ;
|
mkN : Str -> N = \s -> lin N (mkN1 s) ;
|
||||||
mkN : Str -> Gender -> N = \s,g -> lin N (mkNg s g) ;
|
mkN : Str -> Gender -> N = \s,g -> lin N (mkNg s g) ;
|
||||||
mkN : (_,_ : Str) -> Gender -> N = \s,t,g -> lin N (nMaalin s t g) ;
|
mkN : (sg, pl : Str) -> N = \sg,pl -> lin N (mk2N sg pl) ;
|
||||||
|
mkN : (indefsg,defsg : Str) -> Gender -> N = \s,t,g -> lin N (nMaalin s t g) ;
|
||||||
--mkN : N -> Gender -> N = \n,g -> n ** {g = g }
|
--mkN : N -> Gender -> N = \n,g -> n ** {g = g }
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -85,11 +85,11 @@ oper
|
|||||||
mkNoun ul (u + sha) (ul + o) (ul + "aha") Fem ;
|
mkNoun ul (u + sha) (ul + o) (ul + "aha") Fem ;
|
||||||
|
|
||||||
-- 4b) Masculine, plural with ó, 2 syllables
|
-- 4b) Masculine, plural with ó, 2 syllables
|
||||||
nGuri guri = let o = allomorph mO guri ;
|
nGuri guri = let ga = allomorph mKa guri ;
|
||||||
ga = allomorph mKa guri ;
|
|
||||||
gury = case last guri of { -- TODO does this generalise? Or just exception?
|
gury = case last guri of { -- TODO does this generalise? Or just exception?
|
||||||
"i" => init guri + "y" ;
|
"i" => init guri + "y" ;
|
||||||
_ => guri } in
|
_ => guri } ;
|
||||||
|
o = allomorph mO gury in
|
||||||
mkNoun guri (guri + ga) (gury + o) (gury + "aha") Masc ;
|
mkNoun guri (guri + ga) (gury + o) (gury + "aha") Masc ;
|
||||||
|
|
||||||
-- 4c) Masculine, plural with -ó, 3 syllables or longer
|
-- 4c) Masculine, plural with -ó, 3 syllables or longer
|
||||||
|
|||||||
Reference in New Issue
Block a user