forked from GitHub/gf-rgl
(Som) Add npcomp field to VP for more fine-grained control of word order
This commit is contained in:
@@ -88,12 +88,15 @@ concrete QuestionSom of Question = CatSom ** open
|
|||||||
|
|
||||||
-- : IAdv -> IComp ;
|
-- : IAdv -> IComp ;
|
||||||
CompIAdv iadv = { -- where (is it)
|
CompIAdv iadv = { -- where (is it)
|
||||||
comp = \\_ => <[], iadv.s> ;
|
comp = \\_ => <[], []> ;
|
||||||
|
npcomp = iadv.s ;
|
||||||
stm = Waa NoCopula ;
|
stm = Waa NoCopula ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : IP -> IComp ;
|
-- : IP -> IComp ;
|
||||||
CompIP ip = { -- who (is it)
|
CompIP ip = { -- who (is it)
|
||||||
comp = \\_ => <[], ip.s ! Abs> ;
|
comp = \\_ => <[], []> ;
|
||||||
|
npcomp = ip.s ! Abs ;
|
||||||
stm = Waa NoCopula ;
|
stm = Waa NoCopula ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
@@ -727,6 +727,7 @@ oper
|
|||||||
|
|
||||||
Complement : Type = {
|
Complement : Type = {
|
||||||
comp : Agreement => {p1,p2 : Str} ; -- Agreement for AP complements
|
comp : Agreement => {p1,p2 : Str} ; -- Agreement for AP complements
|
||||||
|
npcomp : Str ;
|
||||||
stm : STM ; -- to choose right sentence type marker
|
stm : STM ; -- to choose right sentence type marker
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -743,6 +744,7 @@ oper
|
|||||||
|
|
||||||
useV : Verb -> VerbPhrase = \v -> v ** {
|
useV : Verb -> VerbPhrase = \v -> v ** {
|
||||||
comp = \\_ => <[],[]> ;
|
comp = \\_ => <[],[]> ;
|
||||||
|
npcomp = [] ;
|
||||||
stm = case v.isCopula of { -- can change into Waxa in ComplVV
|
stm = case v.isCopula of { -- can change into Waxa in ComplVV
|
||||||
True => Waa Copula ;
|
True => Waa Copula ;
|
||||||
False => Waa NoPred
|
False => Waa NoPred
|
||||||
@@ -860,6 +862,7 @@ oper
|
|||||||
secObj : Str ;
|
secObj : Str ;
|
||||||
c2 : PrepCombination ; -- NB. QuestIAdv can add more prepositions
|
c2 : PrepCombination ; -- NB. QuestIAdv can add more prepositions
|
||||||
comp : {p1,p2 : Str} ;
|
comp : {p1,p2 : Str} ;
|
||||||
|
npcomp : Str ;
|
||||||
vComp : {inf,subcl,subjunc : Str} ;
|
vComp : {inf,subcl,subjunc : Str} ;
|
||||||
|
|
||||||
-- Still open
|
-- Still open
|
||||||
@@ -993,6 +996,18 @@ oper
|
|||||||
PolarQuestion|WhQuestion => obj.p1 ;
|
PolarQuestion|WhQuestion => obj.p1 ;
|
||||||
_ => [] } ;
|
_ => [] } ;
|
||||||
|
|
||||||
|
-- Placement of NP complement varies depending on type of clause
|
||||||
|
statementNPComp = case cltyp of {
|
||||||
|
Statement => cl.npcomp ;
|
||||||
|
_ => [] } ;
|
||||||
|
subordNPComp = case cltyp of {
|
||||||
|
Subord => cl.npcomp ;
|
||||||
|
_ => [] } ;
|
||||||
|
questionNPComp = case cltyp of {
|
||||||
|
PolarQuestion|WhQuestion => cl.npcomp ;
|
||||||
|
_ => [] } ;
|
||||||
|
|
||||||
|
|
||||||
-- Control whether to include subject pronoun and STM
|
-- Control whether to include subject pronoun and STM
|
||||||
subjpron : Str = case <hasSubjPron,p,cl.subj.isP3,isRel> of {
|
subjpron : Str = case <hasSubjPron,p,cl.subj.isP3,isRel> of {
|
||||||
<True,Pos,True,True> => [] ;
|
<True,Pos,True,True> => [] ;
|
||||||
@@ -1000,7 +1015,7 @@ oper
|
|||||||
_ => [] } ;
|
_ => [] } ;
|
||||||
stm : Str = case <hasSTM,p> of {
|
stm : Str = case <hasSTM,p> of {
|
||||||
<True,_> => cl.stm ! cltyp ! p ;
|
<True,_> => cl.stm ! cltyp ! p ;
|
||||||
<_,Neg> => cl.stm ! cltyp ! p ; -- negation overrides hasSTM=False
|
<_,Neg> => cl.stm ! cltyp ! p ; -- negation overrides hasSTM=False. To override the override, set STM to [] in the function that calls this. /IL
|
||||||
_ => [] }
|
_ => [] }
|
||||||
in cl.berri -- AdV
|
in cl.berri -- AdV
|
||||||
++ cl.subj.noun -- subject if it's a noun
|
++ cl.subj.noun -- subject if it's a noun
|
||||||
@@ -1011,13 +1026,16 @@ oper
|
|||||||
++ cl.vComp.subjunc -- "waa in" construction /
|
++ cl.vComp.subjunc -- "waa in" construction /
|
||||||
++ subjpron -- subject pronoun
|
++ subjpron -- subject pronoun
|
||||||
|
|
||||||
|
++ subordNPComp
|
||||||
++ subordNounObj -- noun object if it's subordinate clause: "timir aan /laf/ lahayn" (Saeed p. 210-211)
|
++ subordNounObj -- noun object if it's subordinate clause: "timir aan /laf/ lahayn" (Saeed p. 210-211)
|
||||||
++ obj.p2 -- object if it's a pronoun
|
++ obj.p2 -- object if it's a pronoun
|
||||||
|
++ statementNPComp
|
||||||
++ cl.sii -- restricted set of particles
|
++ cl.sii -- restricted set of particles
|
||||||
++ cl.dhex -- restricted set of nouns/adverbials
|
++ cl.dhex -- restricted set of nouns/adverbials
|
||||||
++ cl.secObj -- "second object"
|
++ cl.secObj -- "second object"
|
||||||
++ cl.vComp.inf -- VV complement, if it's infinitive
|
++ cl.vComp.inf -- VV complement, if it's infinitive
|
||||||
++ cl.pred ! cltyp ! t ! a ! p -- the inflecting verb
|
++ cl.pred ! cltyp ! t ! a ! p -- the inflecting verb
|
||||||
|
++ questionNPComp
|
||||||
++ questionNounObj -- noun object if it's a question
|
++ questionNounObj -- noun object if it's a question
|
||||||
++ cl.vComp.subcl -- VV complement, if it's subordinate clause
|
++ cl.vComp.subcl -- VV complement, if it's subordinate clause
|
||||||
++ cl.miscAdv ---- NB. Only used if there are several adverbs, or for "waa in" construction.
|
++ cl.miscAdv ---- NB. Only used if there are several adverbs, or for "waa in" construction.
|
||||||
|
|||||||
@@ -141,24 +141,28 @@ lin
|
|||||||
-- : AP -> Comp ;
|
-- : AP -> Comp ;
|
||||||
CompAP ap = {
|
CompAP ap = {
|
||||||
comp = \\a => <[], ap.s ! AF (getNum a) Abs> ;
|
comp = \\a => <[], ap.s ! AF (getNum a) Abs> ;
|
||||||
|
npcomp = [] ;
|
||||||
stm = Waa Copula ;
|
stm = Waa Copula ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : CN -> Comp ;
|
-- : CN -> Comp ;
|
||||||
CompCN cn = {
|
CompCN cn = {
|
||||||
comp = \\a => <[], cn2str Sg Abs cn> ;
|
comp = \\a => <[], []> ;
|
||||||
|
npcomp = cn2str Sg Abs cn ;
|
||||||
stm = Waa NoCopula ;
|
stm = Waa NoCopula ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- NP -> Comp ;
|
-- NP -> Comp ;
|
||||||
CompNP np = {
|
CompNP np = {
|
||||||
comp = \\a => <[], np.s ! Abs> ;
|
comp = \\a => <[], []> ;
|
||||||
|
npcomp = np.s ! Abs ;
|
||||||
stm = Waa NoCopula ;
|
stm = Waa NoCopula ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : Adv -> Comp ;
|
-- : Adv -> Comp ;
|
||||||
CompAdv adv = {
|
CompAdv adv = {
|
||||||
comp = \\a => <[], linAdv adv> ;
|
comp = \\a => <[], linAdv adv> ;
|
||||||
|
npcomp = [] ;
|
||||||
stm = Waa Copula ;
|
stm = Waa Copula ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user