mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-06-29 04:46:30 -06:00
make CompoundN more flexible
This commit is contained in:
@@ -73,10 +73,14 @@ concrete ExtendSpa of Extend = CatSpa ** ExtendRomanceFunctor -
|
||||
(predV (mkV "existir"))) ;
|
||||
|
||||
CompoundN noun noun2 = { -- order is different because that's needed for correct translation from english
|
||||
s = \\n => noun2.s ! n
|
||||
++ variants {"de" ; genForms "del" "de la" ! noun.g}
|
||||
++ noun.s ! Sg ;
|
||||
g = noun2.g
|
||||
s = \\n => noun2.s ! n ++
|
||||
case noun2.relType of {
|
||||
NRelPrep p => prepCase (CPrep p) ; -- tasa de suicidio
|
||||
NRelNoPrep => [] -- connessione internet = internet connection
|
||||
} ++
|
||||
noun.s ! Sg ;
|
||||
g = noun2.g ;
|
||||
relType = noun2.relType
|
||||
} ;
|
||||
|
||||
CompoundAP noun adj = {
|
||||
|
||||
@@ -380,11 +380,11 @@ oper
|
||||
} ;
|
||||
|
||||
|
||||
mk2N x y g = mkNounIrreg x y g ** {lock_N = <>} ;
|
||||
regN x = mkNomReg x ** {lock_N = <>} ;
|
||||
compN x y = {s = \\n => x.s ! n ++ y ; g = x.g ; lock_N = <>} ;
|
||||
femN x = {s = x.s ; g = feminine ; lock_N = <>} ;
|
||||
mascN x = {s = x.s ; g = masculine ; lock_N = <>} ;
|
||||
mk2N x y g = mkNounIrreg x y g ** {relType=NRelPrep P_de; lock_N = <>} ;
|
||||
regN x = mkNomReg x ** {relType=NRelPrep P_de; lock_N = <>} ;
|
||||
compN x y = x ** {s = \\n => x.s ! n ++ y} ;
|
||||
femN x = {s = x.s ; g = feminine ; relType=NRelPrep P_de; lock_N = <>} ;
|
||||
mascN x = {s = x.s ; g = masculine ; relType=NRelPrep P_de; lock_N = <>} ;
|
||||
|
||||
mkN2 = \n,p -> n ** {lock_N2 = <> ; c2 = p} ;
|
||||
deN2 n = mkN2 n genitive ;
|
||||
@@ -550,7 +550,7 @@ oper
|
||||
|
||||
mkN = overload {
|
||||
mkN : (luz : Str) -> N = regN ;
|
||||
mkN : Str -> Gender -> N = \s,g -> {s = (regN s).s ; g = g ; lock_N = <>};
|
||||
mkN : Str -> Gender -> N = \s,g -> (regN s) ** {g = g};
|
||||
mkN : (baston,bastones : Str) -> Gender -> N = mk2N ;
|
||||
mkN : N -> Str -> N = compN ;
|
||||
} ;
|
||||
|
||||
Reference in New Issue
Block a user