make CompoundN more flexible

This commit is contained in:
Krasimir Angelov
2023-10-25 11:19:00 +02:00
parent fa8cef4112
commit 01e5165537
13 changed files with 68 additions and 38 deletions
+8 -4
View File
@@ -67,10 +67,14 @@ concrete ExtendPor of Extend = CatPor ** ExtendRomanceFunctor -
lin
CompoundN noun noun2 = { -- order is different because that's needed for correct translation from english
s = \\n => noun2.s ! n
++ variants {"de" ; genForms "do" "da" ! noun.g}
++ noun.s ! Sg ;
g = noun2.g
s = \\n => noun2.s ! n ++
case noun2.relType of {
NRelPrep p => artDef True noun.g Sg (CPrep p) ; -- tasa de suicidio
NRelNoPrep => [] -- connessione internet = internet connection
} ++
noun.s ! Sg ;
g = noun2.g ;
relType = noun2.relType
} ;
CompoundAP noun adj = {
+2 -2
View File
@@ -102,7 +102,7 @@ oper
--2 Nouns
regN : Str -> N ; --%
regN x = lin N (mkNomReg x) ;
regN x = lin N (mkNomReg x ** {relType=NRelPrep P_de}) ;
femN : N -> N ; --%
femN n = n ** {g = feminine} ;
@@ -111,7 +111,7 @@ oper
mascN n = n ** {g = masculine} ;
mk2N : (bastão, bastões : Str) -> Gender -> N ; --%
mk2N x y g = lin N (mkNounIrreg x y g) ;
mk2N x y g = lin N (mkNounIrreg x y g ** {relType=NRelPrep P_de}) ;
-- The regular function takes the singular form and the gender, and
-- computes the plural and the gender by a heuristic (see MorphoPor