1
0
forked from GitHub/gf-rgl

(Por) rm (indirect) use of runtime gluing

This commit is contained in:
odanoburu
2019-01-10 09:53:47 -02:00
parent 167e80df97
commit 9376c108ac
3 changed files with 20 additions and 15 deletions

View File

@@ -33,7 +33,10 @@ lin
n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn)))) n_units_AP card cn a = mkAP (lin AdA (mkUtt (mkNP <lin Card card : Card> (lin CN cn))))
(lin A a) ; (lin A a) ;
n_units_of_NP card cn np = mkNP card (mkCN (lin N2 cn) np) ; n_units_of_NP card cn np = mkNP card (mkCN (lin N2 cn) np) ;
n_unit_CN card cn cn = mkCN (invarA ("de" ++ card.s ! cn.g ++ cn.s ! card.n)) cn ; n_unit_CN card cn cn =
let s : Str = "de" ++ card.s ! cn.g ++ cn.s ! card.n ;
adj : A = mkA s s s s s ;
in mkCN adj cn ;
bottle_of_CN np = mkCN (lin N2 (mkN2 (mkN "garrafa" feminine) part_Prep)) np ; bottle_of_CN np = mkCN (lin N2 (mkN2 (mkN "garrafa" feminine) part_Prep)) np ;
cup_of_CN np = mkCN (lin N2 (mkN2 (mkN "copo") part_Prep)) np ; cup_of_CN np = mkCN (lin N2 (mkN2 (mkN "copo") part_Prep)) np ;

View File

@@ -64,7 +64,7 @@ oper
"i" => "í" ; "i" => "í" ;
"o" => "ó" ; "o" => "ó" ;
"u" => "ú" ; "u" => "ú" ;
_ => error ("input '" ++ v ++ "' must be vowel character.") _ => error ("input" ++ v ++ "must be vowel character.")
} ; } ;
diacriticToVowel : Str -> Str = \v -> diacriticToVowel : Str -> Str = \v ->
@@ -74,7 +74,7 @@ oper
"í" => "i" ; "í" => "i" ;
("ó"|"ô"|"õ") => "o" ; ("ó"|"ô"|"õ") => "o" ;
"ú" => "u" ; "ú" => "u" ;
_ => error ("input '" ++ v ++ "' must be a vowel character with an accent.") _ => error ("input" ++ v ++ "must be a vowel character with an accent.")
} ; } ;
-- Common nouns are inflected in number and have an inherent gender. -- Common nouns are inflected in number and have an inherent gender.
@@ -130,7 +130,7 @@ oper
home + "m" => mkNoun (nomNuvem vinho) Masc ; home + "m" => mkNoun (nomNuvem vinho) Masc ;
g + v@("á"|"é"|"í"|"ó"|"ú"|"ê") + "s" => mkNoun (numForms vinho (g + diacriticToVowel v + "ses")) Masc ; g + v@("á"|"é"|"í"|"ó"|"ú"|"ê") + "s" => mkNoun (numForms vinho (g + (diacriticToVowel v) + "ses")) Masc ;
ônibu + "s" => mkNoun (nomAreia vinho) Masc ; ônibu + "s" => mkNoun (nomAreia vinho) Masc ;
@@ -158,19 +158,21 @@ oper
} ; } ;
mkAdj4 : (_,_,_,_ : Str) -> Adj ; mkAdj4 : (_,_,_,_ : Str) -> Adj ;
mkAdj4 ms fs mp fp = { mkAdj4 ms fs mp fp =
s = table { let adv : Str = case fs of {
ASg g _ => genForms ms fs ! g ; exeg + vo@("é"|"á"|"í"|"ó"|"ú"|"ê"|"ô") + tica
APl g => genForms mp fp ! g ; => exeg + (diacriticToVowel vo) + tica ;
AA => case fs of {
exeg + v@("é"|"á"|"í"|"ó"|"ú"|"ê"|"ô") + tica
=> exeg + (diacriticToVowel v) + tica + "mente" ;
comu + "m" => comu + "mente" ; -- for Brazilian Portuguese comu + "m" => comu ; -- for Brazilian Portuguese
_ => fs + "mente" _ => fs
} + "mente" ;
in {
s = table {
ASg g _ => genForms ms fs ! g ;
APl g => genForms mp fp ! g ;
AA => adv
} }
}
} ; } ;
mkAdjFromNouns : Noun -> Noun -> Adj ; mkAdjFromNouns : Noun -> Noun -> Adj ;

View File

@@ -245,7 +245,7 @@ oper
-- One-place adjectives compared with "mais" need five forms in -- One-place adjectives compared with "mais" need five forms in
-- the worst case (masc and fem singular, masc and fem plural, -- the worst case (masc and fem singular, masc and fem plural,
-- adverbial). -- adverbial).
mkA : (bobo,boba,bobos,bobas,bobamente : Str) -> A = mk5A ; mkA : (gabarolas,gabarolas,gabarolas,gabarolas,gabarolamente : Str) -> A = mk5A ;
-- In the worst case, two separate adjectives are given: the positive -- In the worst case, two separate adjectives are given: the positive
-- ("bom"), and the comparative ("melhor"). special comparison with -- ("bom"), and the comparative ("melhor"). special comparison with