1
0
forked from GitHub/gf-rgl

separate independent (NP without CN) forms of IndefArt and DefArt in Romance languages. The choice of words was unsure in some cases, but at least this eliminates the problem of empty NP's translating to "ones".

This commit is contained in:
aarne
2014-09-12 11:59:50 +00:00
parent b05991f5b6
commit 1cd137661d
8 changed files with 66 additions and 34 deletions

View File

@@ -26,7 +26,7 @@ instance DiffFre of DiffRomance - [
CPrep PNul => []
} ;
artDef : Gender -> Number -> Case -> Str = \g,n,c ->
artDef : Bool -> Gender -> Number -> Case -> Str = \isNP,g,n,c ->
case <g,n,c> of {
<Masc,Sg, CPrep P_de> => pre {"du" ; ("de l'" ++ Predef.BIND) / voyelle} ;
<Masc,Sg, CPrep P_a> => pre {"au" ; ("à l'" ++ Predef.BIND) / voyelle} ;
@@ -39,17 +39,17 @@ instance DiffFre of DiffRomance - [
-- In these two, "de de/du/des" becomes "de".
artIndef = \g,n,c -> case <n,c> of {
artIndef = \isNP,g,n,c -> case <n,c> of {
<Sg,_> => prepCase c ++ genForms "un" "une" ! g ;
<Pl,CPrep P_de> => elisDe ;
_ => prepCase c ++ "des"
<Pl,CPrep P_de> => if_then_else Str isNP (prepCase c ++ genForms "quelques-uns" "quelques-unes" ! g) elisDe ;
_ => if_then_else Str isNP (prepCase c ++ genForms "quelques-uns" "quelques-unes" ! g) (prepCase c ++ "des")
} ;
possCase = \_,_,c -> prepCase c ;
partitive = \g,c -> case c of {
CPrep P_de => elisDe ;
_ => prepCase c ++ artDef g Sg (CPrep P_de)
_ => prepCase c ++ artDef False g Sg (CPrep P_de)
} ;
conjunctCase : Case -> Case = \c -> c ;