forked from GitHub/gf-rgl
isPost in Pol AP, used in CompA2
This commit is contained in:
@@ -7,39 +7,41 @@ flags coding=utf8 ;
|
||||
|
||||
lin
|
||||
|
||||
PositA a = { s = mkAtable a.pos; adv = a.advpos};
|
||||
PositA a = { s = mkAtable a.pos; adv = a.advpos ; isPost = False};
|
||||
|
||||
UseComparA a = { s = mkAtable a.comp; adv=a.advcomp};
|
||||
UseComparA a = { s = mkAtable a.comp; adv=a.advcomp ; isPost = False};
|
||||
|
||||
ComparA a np = { s = \\af => (mkAtable a.comp) ! af ++ "niż" ++ np.nom ; adv=a.advcomp };
|
||||
ComparA a np = { s = \\af => (mkAtable a.comp) ! af ++ "niż" ++ np.nom ; adv=a.advcomp ; isPost = False};
|
||||
|
||||
AdjOrd o = {s=o.s; adv="["++o.s!AF MascPersSg Nom ++ [": the adverb form does not exist (fun AdjOrd)]"]};
|
||||
AdjOrd o = {s=o.s; adv="["++o.s!AF MascPersSg Nom ++ [": the adverb form does not exist (fun AdjOrd)]"] ; isPost = False};
|
||||
|
||||
AdAP ada ap = { s = \\af => ada.s ++ ap.s ! af; adv = ada.s ++ ap.adv};
|
||||
AdAP ada ap = { s = \\af => ada.s ++ ap.s ! af; adv = ada.s ++ ap.adv ; isPost = ap.isPost};
|
||||
|
||||
-- CAdvAP : CAdv -> AP -> NP -> AP ; -- as cool as John
|
||||
CAdvAP c a n = {
|
||||
s = \\af=> c.s ++ a.s!af ++ c.p ++ n.nom;
|
||||
adv = c.s ++ a.adv ++ c.p ++ n.nom;
|
||||
isPost = False
|
||||
};
|
||||
|
||||
-- ComplA2 : A2 -> NP -> AP ; -- married to her
|
||||
ComplA2 a n = {
|
||||
s = \\af=>(mkAtable a.pos)!af ++ a.c.s ++ n.dep!a.c.c;
|
||||
adv = a.advpos ++ a.c.s ++ n.dep!a.c.c
|
||||
adv = a.advpos ++ a.c.s ++ n.dep!a.c.c ;
|
||||
isPost = True
|
||||
};
|
||||
|
||||
-- ReflA2 : A2 -> AP ; -- married to itself
|
||||
ReflA2 a = {
|
||||
s = \\af=>(mkAtable a.pos)!af ++ a.c.s ++ siebie!(extract_case!a.c.c);
|
||||
adv = a.advpos ++ a.c.s ++ siebie!(extract_case!a.c.c)
|
||||
adv = a.advpos ++ a.c.s ++ siebie!(extract_case!a.c.c) ; isPost = True
|
||||
};
|
||||
|
||||
-- UseA2 : A2 -> AP ; -- married
|
||||
UseA2 a = { s = mkAtable a.pos; adv=a.advpos};
|
||||
UseA2 a = { s = mkAtable a.pos; adv=a.advpos ; isPost = False};
|
||||
|
||||
-- SentAP : AP -> SC -> AP ; -- good that she is here -- I have bad feelling about this function
|
||||
SentAP a s = {s=\\_=>a.adv ++ s.s; adv=a.adv ++ s.s };
|
||||
SentAP a s = {s=\\_=>a.adv ++ s.s; adv=a.adv ++ s.s ; isPost = True};
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ concrete ConjunctionPol of Conjunction =
|
||||
ConjAP conj list = {
|
||||
adv = conj.s1 ++ list.ap1.adv ++ conj.s2 ++ list.ap2.adv;
|
||||
s = \\af=>conj.s1 ++ list.ap1.s!af ++ conj.s2 ++ list.ap2.s!af;
|
||||
isPost = list.ap2.isPost ---
|
||||
};
|
||||
ConjRS = conjunctDistrTable GenNum;
|
||||
|
||||
@@ -72,18 +73,18 @@ concrete ConjunctionPol of Conjunction =
|
||||
}
|
||||
};
|
||||
|
||||
BaseAP ap1 ap2 = { ap1=ap1; ap2=ap2 };
|
||||
BaseAP ap1 ap2 = { ap1=ap1; ap2=ap2 ; isPost = ap2.isPost};
|
||||
ConsAP ap apl = { ap2=apl.ap2; ap1={
|
||||
s = \\af=> ap.s!af ++ "," ++ apl.ap1.s!af;
|
||||
adv = ap.adv ++ "," ++ apl.ap1.adv
|
||||
} };
|
||||
adv = ap.adv ++ "," ++ apl.ap1.adv ; isPost = apl.isPost
|
||||
} ; isPost = apl.isPost};
|
||||
|
||||
lincat
|
||||
|
||||
[S] = {s1,s2 : Str} ;
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[NP] = {np1,np2 : NounPhrase} ;
|
||||
[AP] = {ap1,ap2 : AdjPhrase} ;
|
||||
[AP] = {ap1,ap2 : AdjPhrase ; isPost : Bool} ;
|
||||
[RS] = {s1,s2 : GenNum => Str} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -54,7 +54,10 @@ concrete NounPol of Noun = CatPol ** open ResPol, Prelude, PronounMorphoPol, Mor
|
||||
};
|
||||
|
||||
AdjCN mily facet = {
|
||||
s = \\n,c => (mily.s ! AF (cast_gennum!<facet.g,n>) c) ++ (facet.s ! n ! c);
|
||||
s = \\n,c => case mily.isPost of {
|
||||
True => (facet.s ! n ! c) ++ (mily.s ! AF (cast_gennum!<facet.g,n>) c) ;
|
||||
_ => (mily.s ! AF (cast_gennum!<facet.g,n>) c) ++ (facet.s ! n ! c)
|
||||
} ;
|
||||
g = facet.g
|
||||
};
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
param AForm = AF GenNum Case;
|
||||
|
||||
oper AdjPhrase = { s : AForm => Str; adv:Str };
|
||||
oper AdjPhrase = { s : AForm => Str; adv:Str ; isPost : Bool };
|
||||
|
||||
--4 Pronoun
|
||||
|
||||
|
||||
Reference in New Issue
Block a user