mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-17 08:49:31 -06:00
FixedRon
This commit is contained in:
@@ -47,7 +47,8 @@ concrete CatRon of Cat =
|
||||
|
||||
-- Noun
|
||||
|
||||
CN = {s : Number => Species => ACase => Str; g : NGender; a : Animacy ; isComp : Bool} ;
|
||||
CN = {s : Number => Species => ACase => Str; g : NGender;
|
||||
a : Animacy; isComp : Bool; needsRefForm : Bool} ;
|
||||
|
||||
Pron = {s : NCase => Str ;
|
||||
c1, c2 : Clitics => Str ;
|
||||
|
||||
@@ -3,7 +3,10 @@ concrete ExtraRon of ExtraRonAbs = CatRon **
|
||||
open ResRon, ParadigmsRon, Prelude, MorphoRon in {
|
||||
|
||||
lin
|
||||
at_Prep = mkPrep "la" Ac True;
|
||||
at_Prep = mkPrep "la" Ac True;
|
||||
DatSubjCompCl np vp np2 = let ss = if_then_Str np.isPronoun "" (np.s ! Dat).comp
|
||||
in
|
||||
mkClause ss np.isPol np2.a (insertClit (insertSimpObj (\\_ => (np2.s ! Nom).comp) vp) np);
|
||||
DatSubjCl np vp = let ss = if_then_Str np.isPronoun "" (np.s ! Da).comp
|
||||
in mkClause ss np.isPol (agrP3 Masc Sg) (insertClit vp np);
|
||||
i8fem_Pron = mkPronoun "eu" "mine" "mie" [] [] "meu" "mea" "mei" "mele" Fem Sg P1 ;
|
||||
@@ -13,7 +16,8 @@ youPol8fem_Pron = let dvs = mkPronoun "dumneavoastră" "dumneavoastră" "dumneav
|
||||
in
|
||||
{s = dvs.s; c1 = dvs.c1;
|
||||
c2 = dvs.c2; a = dvs.a; isPol = True; poss = dvs.poss} ;
|
||||
|
||||
|
||||
refCN n = n ** {isComp = False; needsRefForm = True};
|
||||
|
||||
oper
|
||||
insertClit : VerbPhrase -> NounPhrase -> VerbPhrase = \vp, np ->
|
||||
|
||||
@@ -4,13 +4,15 @@ abstract ExtraRonAbs = Cat **{
|
||||
|
||||
fun
|
||||
DatSubjCl : NP -> VP -> Cl ;
|
||||
DatSubjCompCl : NP -> VP -> NP -> Cl ;
|
||||
at_Prep : Prep ;
|
||||
refCN : N -> CN ;
|
||||
|
||||
i8fem_Pron : Pron ;
|
||||
youSg8fem_Pron : Pron ;
|
||||
youPl8fem_Pron : Pron ;
|
||||
youPol8fem_Pron : Pron ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ concrete NounRon of Noun =
|
||||
n = det.n;
|
||||
gg = agrGender cn.g n ;
|
||||
ag = agrP3 gg n ;
|
||||
hr = orB (andB (getClit cn.a) det.hasRef) (andB det.isDef cn.isComp);
|
||||
hr = orB cn.needsRefForm (orB (andB (getClit cn.a) det.hasRef) (andB det.isDef cn.isComp));
|
||||
nf = if_then_else NForm hr HasClit (HasRef False);
|
||||
st= if_then_else Species det.isDef Def Indef;
|
||||
rs = if_then_else Species det.hasRef Def Indef
|
||||
@@ -233,7 +233,7 @@ in {
|
||||
|
||||
-- This is based on record subtyping.
|
||||
|
||||
UseN, UseN2 = \noun -> noun ** {isComp = False};
|
||||
UseN, UseN2 = \noun -> noun ** {isComp = False; needsRefForm = False};
|
||||
|
||||
Use2N3 f = f ;
|
||||
|
||||
@@ -243,6 +243,7 @@ in {
|
||||
s = \\n,sp,c => f.s ! n ! sp ! c ++ appCompl f.c2 x ;
|
||||
g = f.g ;
|
||||
a = f.a ;
|
||||
needsRefForm = False ;
|
||||
isComp = getClit f.a
|
||||
} ;
|
||||
|
||||
@@ -251,6 +252,7 @@ in {
|
||||
g = f.g ;
|
||||
c2 = f.c3;
|
||||
a = f.a ;
|
||||
needsRefForm = False ;
|
||||
isComp = getClit f.a
|
||||
} ;
|
||||
|
||||
@@ -266,6 +268,7 @@ in {
|
||||
};
|
||||
g = g ;
|
||||
a = cn.a ;
|
||||
needsRefForm = cn.needsRefForm ;
|
||||
isComp = getClit cn.a
|
||||
} ;
|
||||
|
||||
@@ -274,6 +277,7 @@ in {
|
||||
s = \\n,sp,c => cn.s ! n ! sp ! c ++ rs.s ! Indic ! agrP3 (agrGender cn.g n) n ;
|
||||
g = cn.g ;
|
||||
a = cn.a ;
|
||||
needsRefForm = cn.needsRefForm;
|
||||
isComp = False
|
||||
} ;
|
||||
|
||||
@@ -281,6 +285,7 @@ in {
|
||||
s = \\n,sp,c => cn.s ! n ! sp ! c ++ sc.s ;
|
||||
g = g ;
|
||||
a = cn.a ;
|
||||
needsRefForm = cn.needsRefForm;
|
||||
isComp = False
|
||||
} ;
|
||||
|
||||
@@ -288,6 +293,7 @@ in {
|
||||
s = \\n,sp,c => cn.s ! n ! sp ! c ++ sc.s ;
|
||||
g = g;
|
||||
a = cn.a ;
|
||||
needsRefForm = cn.needsRefForm;
|
||||
isComp = False
|
||||
} ;
|
||||
|
||||
@@ -295,6 +301,7 @@ in {
|
||||
s = \\n,sp,c => cn.s ! n ! sp ! c ++ (np.s ! No).comp ;
|
||||
g = g;
|
||||
a = cn.a ;
|
||||
needsRefForm = cn.needsRefForm;
|
||||
isComp = False
|
||||
} ;
|
||||
|
||||
|
||||
@@ -54,7 +54,9 @@ oper
|
||||
Acc : NCase ;
|
||||
Dat : NCase ;
|
||||
Gen : NCase ;
|
||||
mkPrep : overload {
|
||||
Nom : NCase ;
|
||||
|
||||
mkPrep : overload {
|
||||
mkPrep : Str -> NCase-> Bool -> Prep ;
|
||||
mkPrep : Str -> NCase -> Prep;
|
||||
};
|
||||
@@ -173,7 +175,7 @@ lock_PN = <>
|
||||
Acc = Ac ;
|
||||
Dat = Da ;
|
||||
Gen = Ge ;
|
||||
|
||||
Nom = No ;
|
||||
|
||||
Preposition = Compl ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user