(Pes) Make poss.suff. attach to the head for N2,N3

This commit is contained in:
Inari Listenmaa
2019-02-22 11:16:49 +01:00
parent d175b1eedf
commit c25a236585
5 changed files with 34 additions and 27 deletions
+24 -20
View File
@@ -3,13 +3,14 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
flags optimize=all_subs ;
lin
DetCN det cn = cn ** {s = \\mod =>
case <det.isNum,det.mod> of {
<False,Bare> => det.s ++ cn.s ! det.n ! mod ; -- det is not from Pron, retain NPForm.
<False,X> => cn.s ! det.n ! X ++ det.s ; -- det is from Pron, cn is in Ezafe.
<True,Bare> => det.s ++ cn.s ! Sg ! mod ; -- noun modified by a number is invariably singular
<True,X> => cn.s ! Sg ! X ++ det.s
} ;
DetCN det cn = cn ** {
s = \\m =>
let num : Number = case det.isNum of {
True => Sg ; -- noun modified by a number is invariably singular
False => det.n } ;
in case det.mod of {
Bare => det.s ++ cn.s ! num ! m ++ cn.compl ; -- det doesn't require a special form, keep the Mod=>Str table
x => cn.s ! num ! x ++ det.s ++ cn.compl } ; -- det requires a special form
a = agrP3 det.n ;
} ;
@@ -29,7 +30,7 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
} ;
AdvNP np adv = np ** {
s = \\ez => np.s ! Ezafe ++ adv.s
s = \\ez => np.s ! Ezafe ++ adv.s
} ;
DetQuantOrd quant num ord = {
@@ -71,39 +72,40 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
OrdSuperl a = {s = a.s ! Bare ++ taryn; n = Sg ; isNum=False} ; -- check the form of adjective
DefArt = {s = \\_ => [] ; a = defaultAgr ; mod = Bare} ;
IndefArt = {s = table { Sg => IndefArticle ; Pl => []} ; a =defaultAgr ; mod = Bare} ;
IndefArt = {s = table {Sg => IndefArticle ; Pl => []} ; a = defaultAgr ; mod = Bare} ;
MassNP cn = cn ** {
s = cn.s ! Sg ;
a = agrP3 Sg
} ;
UseN n = n ** {hasAdj=False};
UseN2 n = n ** {hasAdj=False};
UseN n = n ** {hasAdj=False; compl=[]};
UseN2 n = n ** {hasAdj=False; compl=[]};
Use2N3 f = f ** {
c = f.c2;
definitness = True
compl = []
} ;
Use3N3 f = f ** {
c = f.c3;
definitness = True
compl = []
} ;
ComplN2 n2 np = n2 ** {
s = \\n,m => n2.s ! n ! Ezafe ++ n2.c ++ np.s ! m ;
s = \\n,m => n2.s ! n ! Ezafe ;
compl = n2.compl ++ n2.c ++ np.s ! Bare ;
hasAdj = False
};
ComplN3 f x = f ** {
s = \\n,ez => f.s ! n ! Ezafe ++ f.c2 ++ x.s ! ez ;
c = f.c3;
definitness = True;
ComplN3 n3 np = n3 ** {
s = \\n,m => n3.s ! n ! Ezafe ;
compl = n3.c2 ++ np.s ! Bare ;
c = n3.c3;
} ;
AdjCN ap cn = cn ** {
s = \\n,ez => cn.s ! n ! Ezafe ++ ap.s ! ez ; -- check the form of adjective and also cn.s!ez!n changed from cn.s!Ezafe!n to have correct enclicitic form other wise it creats wrong enclictic form of old man
s = \\n,ez => cn.s ! n ! Ezafe ++ ap.s ! ez ;
hasAdj = True
} ;
@@ -115,6 +117,8 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
SentCN cn sc = cn ** {s = \\n,m => cn.s ! n ! m ++ sc.s} ;
ApposCN cn np = cn ** {s = \\n,m => cn.s ! n ! Ezafe ++ np.s ! m ; definitness = True} ;
-- correct for /city Paris/, incorrect for /king John/
-- ApposNP in ExtendPes works for /king John/ (no ezafe).
ApposCN cn np = cn ** {s = \\n,m => cn.s ! n ! Ezafe ++ np.s ! m} ;
}