forked from GitHub/gf-rgl
Merge pull request #227 from inariksit/extend
(Extend) Rename WhatSSC to EmbedSSlash and change type to SSlash -> SC
This commit is contained in:
@@ -148,9 +148,11 @@ abstract Extend = Cat ** {
|
|||||||
|
|
||||||
PredIAdvVP : IAdv -> VP -> QCl ; -- how to walk?
|
PredIAdvVP : IAdv -> VP -> QCl ; -- how to walk?
|
||||||
|
|
||||||
-- alternative SC, with "what"
|
-- alternative to EmbedQS. For English, EmbedQS happens to work,
|
||||||
|
-- because "what" introduces question and relative. The default linearization
|
||||||
|
-- could be e.g. "the thing we did (was fun)".
|
||||||
|
|
||||||
WhatSSC : S -> SC ; -- what we did (was fun)
|
EmbedSSlash : SSlash -> SC ; -- what we did (was fun)
|
||||||
|
|
||||||
-- reflexive noun phrases: a generalization of Verb.ReflVP, which covers just reflexive pronouns
|
-- reflexive noun phrases: a generalization of Verb.ReflVP, which covers just reflexive pronouns
|
||||||
-- This is necessary in languages like Swedish, which have special reflexive possessives.
|
-- This is necessary in languages like Swedish, which have special reflexive possessives.
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ concrete ExtendAra of Extend =
|
|||||||
GenNP, ApposNP, ICompAP, DetNPMasc, DetNPFem,
|
GenNP, ApposNP, ICompAP, DetNPMasc, DetNPFem,
|
||||||
EmptyRelSlash, PredAPVP,
|
EmptyRelSlash, PredAPVP,
|
||||||
ComplDirectVS, ComplDirectVQ, -- because of Utt
|
ComplDirectVS, ComplDirectVQ, -- because of Utt
|
||||||
VPS, MkVPS, PredVPS, BaseVPS, ConsVPS, ConjVPS
|
VPS, MkVPS, PredVPS, BaseVPS, ConsVPS, ConjVPS,
|
||||||
|
EmbedSSlash
|
||||||
]
|
]
|
||||||
with (Grammar=GrammarAra)
|
with (Grammar=GrammarAra)
|
||||||
** open
|
** open
|
||||||
@@ -46,6 +47,9 @@ lin
|
|||||||
-- : ClSlash -> RCl -- he lives in
|
-- : ClSlash -> RCl -- he lives in
|
||||||
EmptyRelSlash = RelSlash (IdRP ** {s = \\_ => []}) ;
|
EmptyRelSlash = RelSlash (IdRP ** {s = \\_ => []}) ;
|
||||||
|
|
||||||
|
-- : SSlash -> SC
|
||||||
|
EmbedSSlash = Grammar.EmbedS ;
|
||||||
|
|
||||||
lincat
|
lincat
|
||||||
VPS = {s : PerGenNum => Str} ; -- finite VP's with tense and polarity
|
VPS = {s : PerGenNum => Str} ; -- finite VP's with tense and polarity
|
||||||
[VPS] = {s1,s2 : PerGenNum => Str} ;
|
[VPS] = {s1,s2 : PerGenNum => Str} ;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ concrete SentenceAra of Sentence = CatAra ** open
|
|||||||
|
|
||||||
-- SlashVS np vs sslash = TODO
|
-- SlashVS np vs sslash = TODO
|
||||||
|
|
||||||
EmbedS s = {s = "أَنْ" ++ s.s ! Verbal} ;
|
EmbedS s = {s = "مَا" ++ s.s ! Verbal} ;
|
||||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||||
EmbedVP vp = {s = uttVP VPPerf vp ! Masc} ; -- TODO: use VPGer once it's more stable
|
EmbedVP vp = {s = uttVP VPPerf vp ! Masc} ; -- TODO: use VPGer once it's more stable
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ lin
|
|||||||
FrontComplDirectVQ = variants {} ; -- NP -> VQ -> Utt -> Cl ; -- "where", she asked
|
FrontComplDirectVQ = variants {} ; -- NP -> VQ -> Utt -> Cl ; -- "where", she asked
|
||||||
PredAPVP ap vp = ImpersCl (UseComp (CompAP (SentAP ap (EmbedVP vp)))) ; -- DEFAULT it is (good to walk)
|
PredAPVP ap vp = ImpersCl (UseComp (CompAP (SentAP ap (EmbedVP vp)))) ; -- DEFAULT it is (good to walk)
|
||||||
PredIAdvVP iadv vp = QuestIAdv iadv (GenericCl vp) ; -- DEFAULT how does one walk
|
PredIAdvVP iadv vp = QuestIAdv iadv (GenericCl vp) ; -- DEFAULT how does one walk
|
||||||
WhatSSC = EmbedS ; -- DEFAULT that we did (was fun)
|
EmbedSSlash = variants {} ; -- SSlash -> SC ; -- what we did (was fun)
|
||||||
AdjAsCN = variants {} ; -- AP -> CN ; -- a green one ; en grön (Swe)
|
AdjAsCN = variants {} ; -- AP -> CN ; -- a green one ; en grön (Swe)
|
||||||
AdjAsNP = variants {} ; -- AP -> NP ; -- green (is good)
|
AdjAsNP = variants {} ; -- AP -> NP ; -- green (is good)
|
||||||
ReflRNP = variants {} ; -- VPSlash -> RNP -> VP ; -- love my family and myself
|
ReflRNP = variants {} ; -- VPSlash -> RNP -> VP ; -- love my family and myself
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ concrete ExtendEng of Extend =
|
|||||||
FocusAP, FocusAdV, FocusAdv, FocusObj, GenIP, GenModIP, GenModNP, GenNP, GenRP,
|
FocusAP, FocusAdV, FocusAdv, FocusObj, GenIP, GenModIP, GenModNP, GenNP, GenRP,
|
||||||
GerundAdv, GerundCN, GerundNP, IAdvAdv, ICompAP, InOrderToVP, MkVPS, NominalizeVPSlashNP,
|
GerundAdv, GerundCN, GerundNP, IAdvAdv, ICompAP, InOrderToVP, MkVPS, NominalizeVPSlashNP,
|
||||||
PassAgentVPSlash, PassVPSlash, PastPartAP, PastPartAgentAP, PositAdVAdj, PredVPS, PredVPSVV, PredetRNP, PrepCN,
|
PassAgentVPSlash, PassVPSlash, PastPartAP, PastPartAgentAP, PositAdVAdj, PredVPS, PredVPSVV, PredetRNP, PrepCN,
|
||||||
WhatSSC, PredIAdvVP, PresPartAP, PurposeVP, ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash,
|
EmbedSSlash, PredIAdvVP, PresPartAP, PurposeVP, ReflPoss, ReflPron, ReflRNP, SlashBareV2S, SlashV2V, StrandQuestSlash, StrandRelSlash,
|
||||||
UncontractedNeg, UttAccIP, UttAccNP, UttAdV, UttDatIP, UttDatNP, UttVPShort, WithoutVP, BaseVPS2, ConsVPS2, ConjVPS2, ComplVPS2, MkVPS2
|
UncontractedNeg, UttAccIP, UttAccNP, UttAdV, UttDatIP, UttDatNP, UttVPShort, WithoutVP, BaseVPS2, ConsVPS2, ConjVPS2, ComplVPS2, MkVPS2
|
||||||
]
|
]
|
||||||
with
|
with
|
||||||
@@ -193,7 +193,7 @@ concrete ExtendEng of Extend =
|
|||||||
|
|
||||||
PredIAdvVP iadv vp = {s = \\t,a,p,q => iadv.s ++ infVP VVInf vp False Simul CPos (agrP3 Sg)} ;
|
PredIAdvVP iadv vp = {s = \\t,a,p,q => iadv.s ++ infVP VVInf vp False Simul CPos (agrP3 Sg)} ;
|
||||||
|
|
||||||
WhatSSC s = {s = \\_ => "what" ++ s.s} ;
|
EmbedSSlash s = {s = \\_ => "what" ++ s.s ++ s.c2} ;
|
||||||
|
|
||||||
NominalizeVPSlashNP vpslash np =
|
NominalizeVPSlashNP vpslash np =
|
||||||
let vp : ResEng.VP = insertObjPre (\\_ => vpslash.c2 ++ np.s ! NPAcc) vpslash ;
|
let vp : ResEng.VP = insertObjPre (\\_ => vpslash.c2 ++ np.s ! NPAcc) vpslash ;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ concrete ExtendFin of Extend =
|
|||||||
VPI2,VPS2,MkVPS,MkVPS2,ConjVPS2,ComplVPS2, ConsVPS, BaseVPS, ListVPS, VPS, ConjVPS,PredVPS,
|
VPI2,VPS2,MkVPS,MkVPS2,ConjVPS2,ComplVPS2, ConsVPS, BaseVPS, ListVPS, VPS, ConjVPS,PredVPS,
|
||||||
MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV
|
MkVPI2,ConjVPI2,ComplVPI2,ComplVPIVV
|
||||||
,ExistCN, ExistMassCN, ICompAP, ByVP
|
,ExistCN, ExistMassCN, ICompAP, ByVP
|
||||||
,CompoundN, GenNP, GenIP, AdvIsNP
|
,CompoundN, GenNP, GenIP, AdvIsNP, EmbedSSlash
|
||||||
]
|
]
|
||||||
with
|
with
|
||||||
(Grammar = GrammarFin) **
|
(Grammar = GrammarFin) **
|
||||||
@@ -149,4 +149,15 @@ lin
|
|||||||
ByVP vp = lin Adv {s = S.infVP vp.s.sc Pos (Ag Sg P3) vp Inf3Adess} ; ---- Agr ?
|
ByVP vp = lin Adv {s = S.infVP vp.s.sc Pos (Ag Sg P3) vp Inf3Adess} ; ---- Agr ?
|
||||||
|
|
||||||
AdvIsNP adv np = S.mkClause (\_ -> adv.s) np.a (UseComp (CompNP np)) ;
|
AdvIsNP adv np = S.mkClause (\_ -> adv.s) np.a (UseComp (CompNP np)) ;
|
||||||
|
|
||||||
|
-- : SSlash -> SC
|
||||||
|
EmbedSSlash ss =
|
||||||
|
let it_NP : NP = UsePron it_Pron ;
|
||||||
|
thatWhich : NP = it_NP ** {
|
||||||
|
s = \\nc => it_NP.s ! NPSep ++ case nc of {
|
||||||
|
NPCase c => mikaInt ! Sg ! c ;
|
||||||
|
NPAcc => mikaInt ! Sg ! Gen ;
|
||||||
|
NPSep => mikaInt ! Sg ! Nom }
|
||||||
|
} ;
|
||||||
|
in {s = appCompl True Pos ss.c2 thatWhich ++ ss.s} ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
concrete ExtendPes of Extend =
|
concrete ExtendPes of Extend =
|
||||||
CatPes ** ExtendFunctor - [
|
CatPes ** ExtendFunctor - [
|
||||||
GenNP, ApposNP, ICompAP, AdvIsNP, InOrderToVP, ByVP
|
GenNP, ApposNP, ICompAP, AdvIsNP, InOrderToVP, ByVP
|
||||||
,GerundNP,GerundCN,GerundAdv,EmbedPresPart
|
,GerundNP,GerundCN,GerundAdv,EmbedPresPart,EmbedSSlash
|
||||||
]
|
]
|
||||||
with (Grammar=GrammarPes)
|
with (Grammar=GrammarPes)
|
||||||
** open Prelude, ResPes in {
|
** open Prelude, ResPes in {
|
||||||
@@ -33,6 +33,9 @@ lin
|
|||||||
-- : VP -> SC ;
|
-- : VP -> SC ;
|
||||||
EmbedPresPart vp = lin SC {s = showVPH Inf defaultAgr vp} ;
|
EmbedPresPart vp = lin SC {s = showVPH Inf defaultAgr vp} ;
|
||||||
|
|
||||||
|
-- : SSlash -> SC
|
||||||
|
EmbedSSlash ss = {s = conjThat ++ ss.s ! Indic ++ ss.c2.s} ;
|
||||||
|
|
||||||
-- : Adv -> NP -> Cl -- here is the car / here are the cars
|
-- : Adv -> NP -> Cl -- here is the car / here are the cars
|
||||||
AdvIsNP adv np = mkClause (indeclNP adv.s ** {a = np.a}) (UseComp (CompNP np)) ;
|
AdvIsNP adv np = mkClause (indeclNP adv.s ** {a = np.a}) (UseComp (CompNP np)) ;
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ concrete ExtendSpa of Extend = CatSpa ** ExtendRomanceFunctor -
|
|||||||
s = "qué tan" ++ adv.s
|
s = "qué tan" ++ adv.s
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
WhatSSC s = {s = \\_ => "lo que" ++ s.s ! Indic} ; --- mood
|
EmbedSSlash s = {s = \\_ => "lo que" ++ s.s ! {g=Masc ; n=Sg} ! Indic} ;
|
||||||
|
|
||||||
ExistsNP np =
|
ExistsNP np =
|
||||||
mkClause [] True False np.a
|
mkClause [] True False np.a
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ concrete ExtendSwe of Extend = CatSwe **
|
|||||||
PassVPSlash, PassAgentVPSlash, UttVPShort, ByVP, InOrderToVP,
|
PassVPSlash, PassAgentVPSlash, UttVPShort, ByVP, InOrderToVP,
|
||||||
MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
MkVPI, BaseVPI, ConsVPI, ConjVPI, ComplVPIVV,
|
||||||
MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
|
MkVPS, BaseVPS, ConsVPS, ConjVPS, PredVPS,
|
||||||
ICompAP,ProDrop,WhatSSC,
|
ICompAP,ProDrop,EmbedSSlash,
|
||||||
AdAdV, PositAdVAdj, GerundCN, GerundNP, GerundAdv, PresPartAP, PastPartAP, PastPartAgentAP,
|
AdAdV, PositAdVAdj, GerundCN, GerundNP, GerundAdv, PresPartAP, PastPartAP, PastPartAgentAP,
|
||||||
RNP, RNPList, ReflRNP, ReflPron, ReflPoss, PredetRNP, ConjRNP,
|
RNP, RNPList, ReflRNP, ReflPron, ReflPoss, PredetRNP, ConjRNP,
|
||||||
Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP,
|
Base_rr_RNP, Base_nr_RNP, Base_rn_RNP, Cons_rr_RNP, Cons_nr_RNP,
|
||||||
@@ -231,5 +231,5 @@ concrete ExtendSwe of Extend = CatSwe **
|
|||||||
|
|
||||||
AdvIsNP adv np = PredVP {s = \\_ => adv.s ; a = np.a ; isPron = False} (UseComp (CompNP np)) ;
|
AdvIsNP adv np = PredVP {s = \\_ => adv.s ; a = np.a ; isPron = False} (UseComp (CompNP np)) ;
|
||||||
|
|
||||||
WhatSSC s = {s = "det" ++ s.s ! Main} ;
|
EmbedSSlash ss = {s = "det" ++ ss.s ! Main ++ ss.c2.s ++ ss.n3 ! agrUSgP3} ;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user