mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
ported the change in English NPCase and Polarity to SUMO
This commit is contained in:
@@ -29,8 +29,8 @@ lin
|
|||||||
and f1 f2 = {s = \\f,c => f1.s ! Indep ! c ++ "and" ++ f2.s ! Indep ! c; flag = NothingS; lock_PolSentence = <>};
|
and f1 f2 = {s = \\f,c => f1.s ! Indep ! c ++ "and" ++ f2.s ! Indep ! c; flag = NothingS; lock_PolSentence = <>};
|
||||||
or f1 f2 = {s = \\f,c => f1.s ! Indep ! c ++ "or" ++ f2.s ! Indep ! c; flag = NothingS; lock_PolSentence = <>};
|
or f1 f2 = {s = \\f,c => f1.s ! Indep ! c ++ "or" ++ f2.s ! Indep ! c; flag = NothingS; lock_PolSentence = <>};
|
||||||
not f1 = {s = \\f => table {
|
not f1 = {s = \\f => table {
|
||||||
Neg => "it is not true that" ++ f1.s ! f ! Neg ;
|
CNeg _ => "it is not true that" ++ f1.s ! f ! CPos ;
|
||||||
Pos => f1.s ! Indep ! Neg
|
CPos => f1.s ! Indep ! CNeg False
|
||||||
};
|
};
|
||||||
flag = f1.flag;
|
flag = f1.flag;
|
||||||
lock_PolSentence = <>
|
lock_PolSentence = <>
|
||||||
@@ -45,11 +45,11 @@ lin
|
|||||||
|
|
||||||
exists C f = let np = DetCN (DetQuant IndefArt NumSg) C
|
exists C f = let np = DetCN (DetQuant IndefArt NumSg) C
|
||||||
in { s = \\form,c => case <form, f.flag> of {
|
in { s = \\form,c => case <form, f.flag> of {
|
||||||
<Indep, ExistS _> => "there" ++ "exists" ++ np.s ! Nom ++ f.$0 ++ f.s ! Attrib ! c ;
|
<Indep, ExistS _> => "there" ++ "exists" ++ np.s ! npNom ++ f.$0 ++ f.s ! Attrib ! c ;
|
||||||
<Attrib, ExistS One> => "and" ++ np.s ! Nom ++ f.$0 ++ f.s ! Attrib ! c ;
|
<Attrib, ExistS One> => "and" ++ np.s ! npNom ++ f.$0 ++ f.s ! Attrib ! c ;
|
||||||
<Attrib, ExistS _> => "," ++ np.s ! Nom ++ f.$0 ++ f.s ! Attrib ! c ;
|
<Attrib, ExistS _> => "," ++ np.s ! npNom ++ f.$0 ++ f.s ! Attrib ! c ;
|
||||||
<Indep,_> => "there" ++ "exists" ++ np.s ! Nom ++ f.$0 ++ "such" ++ "that" ++ f.s ! Indep ! c ;
|
<Indep,_> => "there" ++ "exists" ++ np.s ! npNom ++ f.$0 ++ "such" ++ "that" ++ f.s ! Indep ! c ;
|
||||||
_ => "and" ++ np.s ! Nom ++ f.$0 ++ "such" ++ "that" ++ f.s ! Indep ! c
|
_ => "and" ++ np.s ! npNom ++ f.$0 ++ "such" ++ "that" ++ f.s ! Indep ! c
|
||||||
};
|
};
|
||||||
flag = case f.flag of {
|
flag = case f.flag of {
|
||||||
ExistS _ => ExistS Many;
|
ExistS _ => ExistS Many;
|
||||||
@@ -88,8 +88,8 @@ lin
|
|||||||
desc2desc c1 c2 i d = d;
|
desc2desc c1 c2 i d = d;
|
||||||
|
|
||||||
subClassStm c1 c2 sc = lin StmtS (ss (c1. s ! Sg ! Nom ++ "is a subclass of" ++ c2.s ! Sg ! Nom)) ;
|
subClassStm c1 c2 sc = lin StmtS (ss (c1. s ! Sg ! Nom ++ "is a subclass of" ++ c2.s ! Sg ! Nom)) ;
|
||||||
instStm c i = lin StmtS (ss (i.s ! Nom ++ "is an instance of" ++ c.s ! Sg ! Nom)) ;
|
instStm c i = lin StmtS (ss (i.s ! npNom ++ "is an instance of" ++ c.s ! Sg ! Nom)) ;
|
||||||
formStm f = lin StmtS (ss (f.s ! Indep ! Pos)) ;
|
formStm f = lin StmtS (ss (f.s ! Indep ! CPos)) ;
|
||||||
|
|
||||||
lindef
|
lindef
|
||||||
Ind = \x -> {s = \\_ => x; a = agrP3 Sg; lock_NP = <>} ;
|
Ind = \x -> {s = \\_ => x; a = agrP3 Sg; lock_NP = <>} ;
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ concrete ExtensionEng of Extension = open CatEng, MorphoEng, ResEng, Conjunction
|
|||||||
|
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
PolSentence = {s : SentForm => Polarity => Str ; flag : Flag};
|
PolSentence = {s : SentForm => CPolarity => Str ; flag : Flag};
|
||||||
[CN] = {s1,s2 : Number => Case => Str ; g : Gender} ;
|
[CN] = {s1,s2 : Number => ResEng.Case => Str ; g : Gender} ;
|
||||||
StmtS = {s : Str};
|
StmtS = {s : Str};
|
||||||
NP = CatEng.NP;
|
NP = CatEng.NP;
|
||||||
CN = CatEng.CN;
|
CN = CatEng.CN;
|
||||||
@@ -30,21 +30,21 @@ VerbToGerundA v = {s = \\_ => v.s ! VPresPart; lock_A=<>};
|
|||||||
VerbToParticipeA v = {s = \\_ => v.s ! VPPart; lock_A=<>};
|
VerbToParticipeA v = {s = \\_ => v.s ! VPPart; lock_A=<>};
|
||||||
|
|
||||||
mkPolSent cl = {s = \\f,b => case b of
|
mkPolSent cl = {s = \\f,b => case b of
|
||||||
{Pos => cl.s ! Pres ! Simul ! CPos ! ODir;
|
{CPos => cl.s ! Pres ! Simul ! CPos ! ODir;
|
||||||
_ => cl.s ! Pres ! Simul ! CNeg False ! ODir};
|
_ => cl.s ! Pres ! Simul ! CNeg False ! ODir};
|
||||||
flag = NothingS ;
|
flag = NothingS ;
|
||||||
lock_PolSentence = <>};
|
lock_PolSentence = <>};
|
||||||
|
|
||||||
sentToNoun ps = {s = \\_ => "\"" ++ ps.s ! Indep ! Pos ++ "\"";
|
sentToNoun ps = {s = \\_ => "\"" ++ ps.s ! Indep ! CPos ++ "\"";
|
||||||
a = agrP3 Sg; lock_NP=<>};
|
a = agrP3 Sg; lock_NP=<>};
|
||||||
|
|
||||||
ConjCN conj ss = conjunctDistrTable2 Number Case conj ss ** {g = ss.g;lock_CN=<>};
|
ConjCN conj ss = conjunctDistrTable2 Number ResEng.Case conj ss ** {g = ss.g;lock_CN=<>};
|
||||||
|
|
||||||
BaseCN x y ={s1 = \\n,c => x.s ! n ! c ;
|
BaseCN x y ={s1 = \\n,c => x.s ! n ! c ;
|
||||||
s2 = \\n,c => y.s ! n ! c ;
|
s2 = \\n,c => y.s ! n ! c ;
|
||||||
g = x.g} ;
|
g = x.g} ;
|
||||||
|
|
||||||
ConsCN xs x = consrTable2 Number Case comma xs x ** {g = Masc} ;
|
ConsCN xs x = consrTable2 Number ResEng.Case comma xs x ** {g = Masc} ;
|
||||||
|
|
||||||
|
|
||||||
UsePolSentence p ps = {s = ps.s ! Indep ! p.p};
|
UsePolSentence p ps = {s = ps.s ! Indep ! p.p};
|
||||||
|
|||||||
Reference in New Issue
Block a user