forked from GitHub/gf-rgl
Merge pull request #288 from inariksit/somali-questions
Somali: questions
This commit is contained in:
@@ -11,14 +11,7 @@ lin
|
|||||||
-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
-- ComparAdvAdjS : CAdv -> A -> S -> Adv ; -- more warmly than he runs
|
||||||
|
|
||||||
-- : Prep -> NP -> Adv ;
|
-- : Prep -> NP -> Adv ;
|
||||||
PrepNP prep np = prep ** {
|
PrepNP = prepNP ;
|
||||||
np = case prep.isPoss of {
|
|
||||||
True => nplite emptyNP ;
|
|
||||||
False => nplite np } ;
|
|
||||||
miscAdv = case prep.isPoss of {
|
|
||||||
True => np.s ! Abs ++ prep.miscAdv ! np.a ;
|
|
||||||
False => prep.miscAdv ! Sg3 Masc }
|
|
||||||
} ;
|
|
||||||
|
|
||||||
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
concrete CatSom of Cat = CommonX - [Adv,IAdv] ** open ResSom, Prelude in {
|
||||||
|
|
||||||
flags optimize=all_subs ;
|
flags optimize=all_subs ;
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
|||||||
-- Constructed in QuestionSom.
|
-- Constructed in QuestionSom.
|
||||||
|
|
||||||
QCl = ResSom.QClause ;
|
QCl = ResSom.QClause ;
|
||||||
IP = ResSom.NounPhrase ;
|
IP = ResSom.NounPhrase ** {contractSTM : Bool} ;
|
||||||
IComp = SS ; -- interrogative complement of copula e.g. "where"
|
IComp = SS ; -- interrogative complement of copula e.g. "where"
|
||||||
IDet = ResSom.Determiner ; -- interrogative determiner e.g. "how many"
|
IDet = ResSom.Determiner ; -- interrogative determiner e.g. "how many"
|
||||||
IQuant = ResSom.Quant ; -- interrogative quantifier e.g. "which"
|
IQuant = ResSom.Quant ; -- interrogative quantifier e.g. "which"
|
||||||
@@ -84,11 +84,7 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
|||||||
-- Constructed in StructuralSom.
|
-- Constructed in StructuralSom.
|
||||||
Conj = {s2 : State => Str ; s1 : Str ; n : Number } ;
|
Conj = {s2 : State => Str ; s1 : Str ; n : Number } ;
|
||||||
Subj = SS ;
|
Subj = SS ;
|
||||||
Prep = ResSom.Prep ** {
|
Prep = ResSom.Prep ;
|
||||||
isPoss : Bool ;
|
|
||||||
c2 : Preposition ;
|
|
||||||
berri, sii, dhex : Str ;
|
|
||||||
miscAdv : Agreement => Str } ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -97,18 +93,18 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
|||||||
-- These are constructed in LexiconSom and in
|
-- These are constructed in LexiconSom and in
|
||||||
-- additional lexicon modules.
|
-- additional lexicon modules.
|
||||||
|
|
||||||
V,
|
|
||||||
VS, -- sentence-complement verb e.g. "claim"
|
VS, -- sentence-complement verb e.g. "claim"
|
||||||
-- TODO: eventually different lincats
|
-- TODO: eventually different lincats
|
||||||
VQ, -- question-complement verb e.g. "wonder"
|
VQ, -- question-complement verb e.g. "wonder"
|
||||||
VA, -- adjective-complement verb e.g. "look"
|
VA, -- adjective-complement verb e.g. "look"
|
||||||
V2V, -- verb with NP and V complement e.g. "cause"
|
V = ResSom.Verb ;
|
||||||
V2S, -- verb with NP and S complement e.g. "tell"
|
|
||||||
V2Q, -- verb with NP and Q complement e.g. "ask"
|
|
||||||
V2A = ResSom.Verb ; -- verb with NP and AP complement e.g. "paint"
|
|
||||||
|
|
||||||
VV = ResSom.VV ; -- verb-phrase-complement verb e.g. "want"
|
VV = ResSom.VV ; -- verb-phrase-complement verb e.g. "want"
|
||||||
|
|
||||||
|
V2A, -- verb with NP and AP complement e.g. "paint"
|
||||||
|
V2V, -- verb with NP and V complement e.g. "cause"
|
||||||
|
V2S, -- verb with NP and S complement e.g. "tell"
|
||||||
|
V2Q, -- verb with NP and Q complement e.g. "ask"
|
||||||
V2 = ResSom.Verb2 ;
|
V2 = ResSom.Verb2 ;
|
||||||
V3 = ResSom.Verb3 ;
|
V3 = ResSom.Verb3 ;
|
||||||
|
|
||||||
@@ -120,11 +116,12 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
|||||||
N3 = ResSom.Noun3 ;
|
N3 = ResSom.Noun3 ;
|
||||||
PN = ResSom.PNoun ;
|
PN = ResSom.PNoun ;
|
||||||
|
|
||||||
Adv = ResSom.Adverb ; -- Preposition of an adverbial can merge with obligatory complements of the verb.
|
Adv,
|
||||||
|
IAdv = ResSom.Adverb ; -- Preposition of an adverbial can merge with obligatory complements of the verb.
|
||||||
|
|
||||||
linref
|
linref
|
||||||
-- Cl = linCl ;
|
-- Cl = linCl ;
|
||||||
VP = infVP ;
|
VP = infVP ;
|
||||||
CN = linCN ;
|
CN = linCN ;
|
||||||
Prep = \prep -> prep.s ! P3_Prep ++ prep.sii ++ prep.dhex ++ prep.miscAdv ! Sg3 Masc ;
|
Prep = \prep -> prep.s ! P3_Prep ++ prep.sii ++ prep.dhex ++ prep.hoostiisa ! Sg3 Masc ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ concrete GrammarSom of Grammar =
|
|||||||
RelativeSom,
|
RelativeSom,
|
||||||
ConjunctionSom,
|
ConjunctionSom,
|
||||||
PhraseSom,
|
PhraseSom,
|
||||||
TextX - [Adv],
|
TextX - [Adv,IAdv],
|
||||||
StructuralSom,
|
StructuralSom,
|
||||||
IdiomSom,
|
IdiomSom,
|
||||||
TenseX - [Adv]
|
TenseX - [Adv,IAdv]
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ lin name_N = mkN "magac" ;
|
|||||||
-- lin oil_N = mkN "" ;
|
-- lin oil_N = mkN "" ;
|
||||||
-- lin old_A = mkA "" ;
|
-- lin old_A = mkA "" ;
|
||||||
-- lin open_V2 = mkV2 "" ;
|
-- lin open_V2 = mkV2 "" ;
|
||||||
-- lin paint_V2A = mkV2 "" ;
|
lin paint_V2A = mkV2 "rinjiyee" ;
|
||||||
-- lin paper_N = mkN "" ;
|
-- lin paper_N = mkN "" ;
|
||||||
-- lin paris_PN = mkPN "Paris" ;
|
-- lin paris_PN = mkPN "Paris" ;
|
||||||
-- lin peace_N = mkN "" ;
|
-- lin peace_N = mkN "" ;
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
possPrep : N -> CatSom.Prep = \dhex -> emptyPrep ** {
|
possPrep : N -> CatSom.Prep = \dhex -> emptyPrep ** {
|
||||||
miscAdv = \\agr =>
|
hoostiisa = \\agr =>
|
||||||
let qnt = PossPron (pronTable ! agr) ;
|
let qnt = PossPron (pronTable ! agr) ;
|
||||||
num = getNum agr ;
|
num = getNum agr ;
|
||||||
art = gda2da dhex.gda ! Sg ;
|
art = gda2da dhex.gda ! Sg ;
|
||||||
@@ -258,7 +258,7 @@ oper
|
|||||||
|
|
||||||
emptyPrep : CatSom.Prep = lin Prep {
|
emptyPrep : CatSom.Prep = lin Prep {
|
||||||
sii,berri,dhex = [] ;
|
sii,berri,dhex = [] ;
|
||||||
miscAdv = \\_ => [] ;
|
hoostiisa = \\_ => [] ;
|
||||||
s = \\_ => [] ;
|
s = \\_ => [] ;
|
||||||
c2 = noPrep ;
|
c2 = noPrep ;
|
||||||
isPoss = False
|
isPoss = False
|
||||||
|
|||||||
@@ -12,11 +12,11 @@ concrete PhraseSom of Phrase = CatSom ** open Prelude, ResSom in {
|
|||||||
UttImpPl = UttImpSg ;
|
UttImpPl = UttImpSg ;
|
||||||
UttImpPol = UttImpSg ;
|
UttImpPol = UttImpSg ;
|
||||||
|
|
||||||
UttIP ip = { s = ip.s ! Abs} ;
|
UttIP ip = {s = ip.s ! Abs} ;
|
||||||
UttIAdv iadv = iadv ;
|
UttNP np = {s = np.s ! Abs} ;
|
||||||
UttNP np = { s = np.s ! Abs} ;
|
UttVP vp = {s = infVP vp} ;
|
||||||
UttVP vp = { s = infVP vp } ;
|
UttAdv,
|
||||||
UttAdv adv = {s = linAdv adv} ;
|
UttIAdv = \adv -> {s = linAdv adv} ;
|
||||||
UttCN n = {s = linCN n} ;
|
UttCN n = {s = linCN n} ;
|
||||||
UttCard n = {s = n.s ! Mid} ;
|
UttCard n = {s = n.s ! Mid} ;
|
||||||
UttAP ap = { s = ap.s ! AF Sg Abs } ;
|
UttAP ap = { s = ap.s ! AF Sg Abs } ;
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
concrete QuestionSom of Question = CatSom ** open
|
concrete QuestionSom of Question = CatSom ** open
|
||||||
Prelude, ResSom, (VS=VerbSom), (NS=NounSom), (AS=AdverbSom) in {
|
Prelude, ResSom, ParadigmsSom, (VS=VerbSom), (NS=NounSom), (AS=AdverbSom) in {
|
||||||
|
|
||||||
-- A question can be formed from a clause ('yes-no question') or
|
-- A question can be formed from a clause ('yes-no question') or
|
||||||
-- with an interrogative.
|
-- with an interrogative.
|
||||||
|
|
||||||
lin
|
lin
|
||||||
-- : Cl -> QCl ;
|
-- : Cl -> QCl ;
|
||||||
QuestCl = cl2qcl ;
|
QuestCl = cl2qcl True;
|
||||||
|
|
||||||
-- : IP -> VP -> QCl ;
|
-- : IP -> VP -> QCl ;
|
||||||
QuestVP ip vp = -- TODO: if we want to contract baa + subj. pronoun, change ResSom.predVP
|
QuestVP ip vp = -- TODO: if we want to contract baa + subj. pronoun, change ResSom.predVP
|
||||||
@@ -16,13 +16,30 @@ concrete QuestionSom of Question = CatSom ** open
|
|||||||
<_,Pos> => "baa" ;
|
<_,Pos> => "baa" ;
|
||||||
_ => clRaw.stm ! clt ! p }
|
_ => clRaw.stm ! clt ! p }
|
||||||
}
|
}
|
||||||
in cl2qcl cl ;
|
in cl2qcl (notB ip.contractSTM) cl ;
|
||||||
|
|
||||||
-- : IP -> ClSlash -> QCl ; -- whom does John love
|
-- : IP -> ClSlash -> QCl ; -- whom does John love
|
||||||
--QuestSlash ip cls = ;
|
QuestSlash ip cls =
|
||||||
|
let clsIPFocus = cls ** {
|
||||||
|
subj = cls.subj ** {noun = ip.s ! Nom} ; -- place IP first in the sentence, keep old subject pronoun.
|
||||||
|
obj2 = cls.obj2 ** {s = cls.subj.noun ++ cls.obj2.s} -- move old subject noun before object.
|
||||||
|
} ;
|
||||||
|
in cl2qcl (notB ip.contractSTM) clsIPFocus ;
|
||||||
|
|
||||||
|
|
||||||
-- : IAdv -> Cl -> QCl ; -- why does John walk
|
-- : IAdv -> Cl -> QCl ; -- why does John walk
|
||||||
-- QuestIAdv iadv cl = { } ;
|
QuestIAdv iadv cls =
|
||||||
|
let clRaw : ClSlash = insertIAdv iadv cls ;
|
||||||
|
sbj = clRaw.subj ;
|
||||||
|
cl : ClSlash = clRaw ** {
|
||||||
|
stm = \\clt,p => case <clt,p> of {
|
||||||
|
-- IAdv is focused with baa, and subject comes after
|
||||||
|
<_,Pos> => "baa" ++ sbj.pron ++ sbj.noun;
|
||||||
|
-- TODO how do negative questions work
|
||||||
|
_ => clRaw.stm ! Question ! p ++ sbj.pron ++ sbj.noun } ;
|
||||||
|
subj = sbj ** {noun, pron = []} -- to force subject after baa
|
||||||
|
} ;
|
||||||
|
in cl2qcl True cl ; -- TODO: add contractSTM field to IAdv as well
|
||||||
|
|
||||||
-- : IComp -> NP -> QCl ; -- where is John?
|
-- : IComp -> NP -> QCl ; -- where is John?
|
||||||
-- QuestIComp icomp np = ;
|
-- QuestIComp icomp np = ;
|
||||||
@@ -31,10 +48,10 @@ concrete QuestionSom of Question = CatSom ** open
|
|||||||
-- determiners, with or without a noun.
|
-- determiners, with or without a noun.
|
||||||
|
|
||||||
-- : IDet -> CN -> IP ; -- which five songs
|
-- : IDet -> CN -> IP ; -- which five songs
|
||||||
IdetCN = NS.DetCN ;
|
IdetCN idet cn = {contractSTM = False} ** NS.DetCN idet cn ;
|
||||||
|
|
||||||
-- : IDet -> IP ; -- which five
|
-- : IDet -> IP ; -- which five
|
||||||
IdetIP = NS.DetNP ;
|
IdetIP idet = {contractSTM = False} ** NS.DetNP idet ;
|
||||||
|
|
||||||
-- They can be modified with adverbs.
|
-- They can be modified with adverbs.
|
||||||
-- : IP -> Adv -> IP ; -- who in Paris
|
-- : IP -> Adv -> IP ; -- who in Paris
|
||||||
@@ -47,21 +64,23 @@ concrete QuestionSom of Question = CatSom ** open
|
|||||||
|
|
||||||
-- Interrogative adverbs can be formed prepositionally.
|
-- Interrogative adverbs can be formed prepositionally.
|
||||||
-- : Prep -> IP -> IAdv ; -- with whom
|
-- : Prep -> IP -> IAdv ; -- with whom
|
||||||
PrepIP prep ip = let a = AS.PrepNP prep ip in a ** {s = a.berri} ;
|
PrepIP prep ip =
|
||||||
|
let ipAbs : Str = ip.s ! Abs
|
||||||
|
in prepNP (mkPrep prep ipAbs [] []) emptyNP ;
|
||||||
|
|
||||||
-- They can be modified with other adverbs.
|
-- They can be modified with other adverbs.
|
||||||
|
|
||||||
-- : IAdv -> Adv -> IAdv ; -- where in Paris
|
-- : IAdv -> Adv -> IAdv ; -- where in Paris
|
||||||
AdvIAdv iadv adv = iadv ** {s = iadv.s ++ adv.berri} ;
|
-- AdvIAdv iadv adv = iadv ** {s = iadv.s ++ adv.berri} ; -- TODO do we need PrepCombination in IAdv?
|
||||||
|
|
||||||
-- Interrogative complements to copulas can be both adverbs and
|
-- Interrogative complements to copulas can be both adverbs and
|
||||||
-- pronouns.
|
-- pronouns.
|
||||||
|
|
||||||
-- : IAdv -> IComp ;
|
-- : IAdv -> IComp ;
|
||||||
CompIAdv iadv = iadv ; -- where (is it)
|
--CompIAdv iadv = iadv ; -- where (is it)
|
||||||
|
|
||||||
-- : IP -> IComp ;
|
-- : IP -> IComp ;
|
||||||
CompIP ip = { s = ip.s ! Abs } ; -- who (is it)
|
--CompIP ip = { s = ip.s ! Abs } ; -- who (is it)
|
||||||
|
|
||||||
{-
|
{-
|
||||||
-- More $IP$, $IDet$, and $IAdv$ are defined in $Structural$.
|
-- More $IP$, $IDet$, and $IAdv$ are defined in $Structural$.
|
||||||
|
|||||||
@@ -170,6 +170,8 @@ oper
|
|||||||
|
|
||||||
impersNP : NounPhrase = pronTable ! Impers ;
|
impersNP : NounPhrase = pronTable ! Impers ;
|
||||||
|
|
||||||
|
indeclNP : Str -> NounPhrase = \s -> emptyNP ** {s = \\c => s} ;
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Pronouns
|
-- Pronouns
|
||||||
|
|
||||||
@@ -344,9 +346,14 @@ oper
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Prepositions
|
-- Prepositions
|
||||||
|
|
||||||
Prep : Type = {s : PrepAgr => Str} ;
|
Prep : Type = {
|
||||||
|
s : PrepAgr => Str ;
|
||||||
|
c2 : Preposition ;
|
||||||
|
isPoss : Bool ;
|
||||||
|
berri, sii, dhex : Str ;
|
||||||
|
hoostiisa : Agreement => Str } ;
|
||||||
|
|
||||||
mkPrep : (x1,_,_,_,_,x6 : Str) -> Prep = \ku,ii,kuu,noo,idiin,isku -> {
|
mkPrep : (x1,_,_,_,_,x6 : Str) -> {s : PrepAgr => Str} = \ku,ii,kuu,noo,idiin,isku -> {
|
||||||
s = table {
|
s = table {
|
||||||
P3_Prep => ku ;
|
P3_Prep => ku ;
|
||||||
Sg1_Prep => ii ;
|
Sg1_Prep => ii ;
|
||||||
@@ -357,9 +364,10 @@ oper
|
|||||||
Reflexive_Prep => isku
|
Reflexive_Prep => isku
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
prep : Preposition -> (Prep ** {c2 : Preposition}) = \p -> prepTable ! p ** {c2 = p} ;
|
prep : Preposition -> {s : PrepAgr => Str ; c2 : Preposition} = \p ->
|
||||||
|
prepTable ! p ** {c2 = p} ;
|
||||||
|
|
||||||
prepTable : Preposition => Prep = table {
|
prepTable : Preposition => {s : PrepAgr => Str} = table {
|
||||||
Ku => mkPrep "ku" "igu" "kugu" "nagu" "idinku" "isku" ;
|
Ku => mkPrep "ku" "igu" "kugu" "nagu" "idinku" "isku" ;
|
||||||
Ka => mkPrep "ka" "iga" "kaa" "naga" "idinka" "iska" ;
|
Ka => mkPrep "ka" "iga" "kaa" "naga" "idinka" "iska" ;
|
||||||
La => mkPrep "la" "ila" "kula" "nala" "idinla" "isla" ;
|
La => mkPrep "la" "ila" "kula" "nala" "idinla" "isla" ;
|
||||||
@@ -675,7 +683,7 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
------------------
|
------------------
|
||||||
-- VP
|
-- Adv
|
||||||
|
|
||||||
BaseAdv : Type = {
|
BaseAdv : Type = {
|
||||||
sii, -- sii, soo, wala, kada go inside VP.
|
sii, -- sii, soo, wala, kada go inside VP.
|
||||||
@@ -689,6 +697,18 @@ oper
|
|||||||
np : NPLite ; -- NP from PrepNP can be promoted into a core argument.
|
np : NPLite ; -- NP from PrepNP can be promoted into a core argument.
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
prepNP : Prep -> NounPhrase -> Adverb = \prep,np -> prep ** {
|
||||||
|
np = case prep.isPoss of {
|
||||||
|
True => nplite emptyNP ;
|
||||||
|
False => nplite np } ;
|
||||||
|
miscAdv = case prep.isPoss of {
|
||||||
|
True => np.s ! Abs ++ prep.hoostiisa ! np.a ;
|
||||||
|
False => prep.hoostiisa ! Sg3 Masc }
|
||||||
|
} ;
|
||||||
|
|
||||||
|
------------------
|
||||||
|
-- VP
|
||||||
|
|
||||||
Complement : Type = {
|
Complement : Type = {
|
||||||
comp : Agreement => {p1,p2 : Str} ; -- Agreement for AP complements
|
comp : Agreement => {p1,p2 : Str} ; -- Agreement for AP complements
|
||||||
stm : STM ; -- to choose right sentence type marker
|
stm : STM ; -- to choose right sentence type marker
|
||||||
@@ -754,28 +774,42 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertComp : VPSlash -> NounPhrase -> VerbPhrase = \vp,np ->
|
insertComp : VPSlash -> NounPhrase -> VerbPhrase = \vp,np ->
|
||||||
insertCompLite vp (nplite np) ;
|
vp ** insertCompLite vp (nplite np) ;
|
||||||
|
|
||||||
insertCompLite : VPSlash -> NPLite -> VerbPhrase = \vp,nplite ->
|
insertCompCl : ClSlash -> NounPhrase -> ClSlash = \cls,np ->
|
||||||
|
cls ** insertCompLite cls (nplite np) ;
|
||||||
|
|
||||||
|
insertAdv : VerbPhrase -> Adverb -> VerbPhrase = \vp,adv ->
|
||||||
|
vp ** insertAdvLite vp adv ;
|
||||||
|
|
||||||
|
insertIAdv : Adverb -> ClSlash -> ClSlash = \adv,cls ->
|
||||||
|
cls ** insertAdvLite cls adv ;
|
||||||
|
|
||||||
|
-- To generalise insertAdv and insertComp
|
||||||
|
VPLite : Type = {
|
||||||
|
c2 : PrepCombination ;
|
||||||
|
obj2 : NPLite ;
|
||||||
|
sii,dhex,berri,miscAdv,secObj : Str} ;
|
||||||
|
|
||||||
|
insertCompLite : VPLite -> NPLite -> VPLite = \vp,nplite ->
|
||||||
case vp.obj2.a of {
|
case vp.obj2.a of {
|
||||||
-- If the old object is 3rd person (or nonexistent), we replace its agreement.
|
-- If the old object is 3rd person (or nonexistent), we replace its agreement.
|
||||||
-- We keep both old and new string (=noun, if there was one) in obj2.s.
|
-- We keep both old and new string (=noun, if there was one) in obj2.s.
|
||||||
P3_Prep =>
|
P3_Prep =>
|
||||||
vp ** {obj2 = nplite ** {
|
vp ** {obj2 = nplite ** {
|
||||||
s = vp.obj2.s ++ nplite.s}
|
s = nplite.s ++ vp.obj2.s}
|
||||||
} ; -- no secObj, because there's ≤1 non-3rd-person pronoun.
|
} ; -- no secObj, because there's ≤1 non-3rd-person pronoun.
|
||||||
|
|
||||||
-- If old object was non-3rd person, we keep its agreement.
|
-- If old object was non-3rd person, we keep its agreement.
|
||||||
-- The new object is put in the secondObject field.
|
-- The new object is put in the secondObject field.
|
||||||
_ =>
|
_ =>
|
||||||
vp ** {obj2 = vp.obj2 ** {
|
vp ** {obj2 = vp.obj2 ** {
|
||||||
s = vp.obj2.s ++ nplite.s
|
s = nplite.s ++ vp.obj2.s
|
||||||
} ;
|
} ;
|
||||||
secObj = vp.secObj ++ secondObject ! nplite.a}
|
secObj = vp.secObj ++ secondObject ! nplite.a}
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
insertAdv : VerbPhrase -> Adverb -> VerbPhrase = \vp,adv ->
|
insertAdvLite : VPLite -> Adverb -> VPLite = \vp,adv ->
|
||||||
case adv.c2 of {
|
case adv.c2 of {
|
||||||
NoPrep => vp ** adv'' ; -- the adverb is not formed with PrepNP, e.g. "tomorrow"
|
NoPrep => vp ** adv'' ; -- the adverb is not formed with PrepNP, e.g. "tomorrow"
|
||||||
_ => case vp.c2 of {
|
_ => case vp.c2 of {
|
||||||
@@ -900,11 +934,10 @@ oper
|
|||||||
in mkClause Subord isRel hasSubjPron hasSTM ;
|
in mkClause Subord isRel hasSubjPron hasSTM ;
|
||||||
|
|
||||||
-- Question clauses: subject pronoun not included, STM is
|
-- Question clauses: subject pronoun not included, STM is
|
||||||
cl2qcl : ClSlash -> Clause =
|
cl2qcl : Bool -> ClSlash -> Clause =
|
||||||
let hasSubjPron : Bool = False ;
|
let hasSubjPron : Bool = False ;
|
||||||
hasSTM : Bool = True ;
|
|
||||||
isRel : Bool = False ;
|
isRel : Bool = False ;
|
||||||
in mkClause Question isRel hasSubjPron hasSTM ;
|
in mkClause Question isRel hasSubjPron ;
|
||||||
|
|
||||||
-- Sentence: include subject pronoun and STM.
|
-- Sentence: include subject pronoun and STM.
|
||||||
-- When subordinate, include "in".
|
-- When subordinate, include "in".
|
||||||
|
|||||||
@@ -15,8 +15,9 @@ lin very_AdA = mkAdA "" ;
|
|||||||
lin as_CAdv = { s = "" ; p = [] } ;
|
lin as_CAdv = { s = "" ; p = [] } ;
|
||||||
lin less_CAdv = { s = "" ; p = [] } ;
|
lin less_CAdv = { s = "" ; p = [] } ;
|
||||||
lin more_CAdv = { s = "" ; p = [] } ;
|
lin more_CAdv = { s = "" ; p = [] } ;
|
||||||
|
-}
|
||||||
lin how_IAdv = ss "" ;
|
lin how_IAdv = prepNP (mkPrep (mkPrep u) "sidee" [] []) emptyNP ;
|
||||||
|
{-
|
||||||
lin how8much_IAdv = ss "" ;
|
lin how8much_IAdv = ss "" ;
|
||||||
lin when_IAdv = ss "" ;
|
lin when_IAdv = ss "" ;
|
||||||
lin where_IAdv = ss "" ;
|
lin where_IAdv = ss "" ;
|
||||||
@@ -151,10 +152,16 @@ lin with_Prep = mkPrep la ;
|
|||||||
lin whatPl_IP = ;
|
lin whatPl_IP = ;
|
||||||
lin whatSg_IP = ;
|
lin whatSg_IP = ;
|
||||||
lin whoPl_IP = ;
|
lin whoPl_IP = ;
|
||||||
lin whoSg_IP = ;
|
|
||||||
|
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
lin whoSg_IP = emptyNP ** {
|
||||||
|
s = table {
|
||||||
|
Nom => "yaa" ; -- together with STM
|
||||||
|
Abs => "ayo" } ; -- alone, no STM (used in UttIP)
|
||||||
|
contractSTM = True ;
|
||||||
|
} ;
|
||||||
|
|
||||||
-------
|
-------
|
||||||
-- Subj
|
-- Subj
|
||||||
|
|
||||||
|
|||||||
@@ -75,12 +75,13 @@ lin
|
|||||||
|
|
||||||
-- : V2Q -> QS -> VPSlash ; -- ask (him) who came
|
-- : V2Q -> QS -> VPSlash ; -- ask (him) who came
|
||||||
SlashV2Q v2q qs = ;
|
SlashV2Q v2q qs = ;
|
||||||
|
|
||||||
-- : V2A -> AP -> VPSlash ; -- paint (it) red
|
|
||||||
SlashV2A v2a ap = slashDObj v2a **
|
|
||||||
{ comp = (CompAP ap).s } ;
|
|
||||||
|
|
||||||
-}
|
-}
|
||||||
|
-- : V2A -> AP -> VPSlash ; -- paint (it) red
|
||||||
|
-- TODO: is "red" plural in "paint them red"?
|
||||||
|
SlashV2A v2a ap = useVc v2a ** {
|
||||||
|
comp = \\_ => (CompAP ap).comp ! Sg3 Masc
|
||||||
|
} ;
|
||||||
|
|
||||||
-- : VPSlash -> NP -> VP
|
-- : VPSlash -> NP -> VP
|
||||||
ComplSlash = insertComp ;
|
ComplSlash = insertComp ;
|
||||||
|
|
||||||
|
|||||||
@@ -82,6 +82,18 @@ Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (RelNP (UseP
|
|||||||
|
|
||||||
-- Question clauses
|
-- Question clauses
|
||||||
|
|
||||||
|
-- to whom did mother give the meat
|
||||||
|
LangSom: yaa siisey hooyo hilib BIND ka
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPast ASimul) PPos (QuestSlash whoSg_IP (SlashVP (MassNP (UseN2 mother_N2)) (Slash3V3 give_V3 (DetCN (DetQuant DefArt NumSg) (UseN meat_N))))))) NoVoc
|
||||||
|
|
||||||
|
-- LangEng: who wants to go
|
||||||
|
LangSom: yaa rabaa in uu tago
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestVP whoSg_IP (ComplVV want_VV (UseV go_V))))) NoVoc
|
||||||
|
|
||||||
-- LangEng: which cat teaches him
|
-- LangEng: which cat teaches him
|
||||||
LangSom: bisad BIND dee baa ku bartaa
|
LangSom: bisad BIND dee baa ku bartaa
|
||||||
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestVP (IdetCN (IdetQuant which_IQuant NumSg) (UseN cat_N)) (ComplSlash (SlashV2a teach_V2) (UsePron he_Pron))))) NoVoc
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestVP (IdetCN (IdetQuant which_IQuant NumSg) (UseN cat_N)) (ComplSlash (SlashV2a teach_V2) (UsePron he_Pron))))) NoVoc
|
||||||
|
|
||||||
|
-- LangEng: how does your mother paint the house black
|
||||||
|
LangSom: sidee baa ay hooya BIND daa madow u rinjiyeysaa guri BIND ga
|
||||||
|
Lang: PhrUtt NoPConj (UttQS (UseQCl (TTAnt TPres ASimul) PPos (QuestIAdv how_IAdv (PredVP (DetCN (DetQuant (PossPron youSg_Pron) NumSg) (UseN2 mother_N2)) (ComplSlash (SlashV2A paint_V2A (PositA black_A)) (DetCN (DetQuant DefArt NumSg) (UseN house_N))))))) NoVoc
|
||||||
|
|||||||
@@ -56,11 +56,11 @@ LangSom: rooti waa uu is siiyey
|
|||||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron he_Pron) (ReflVP (Slash2V3 give_V3 (MassNP (UseN bread_N))))))) NoVoc
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPast ASimul) PPos (PredVP (UsePron he_Pron) (ReflVP (Slash2V3 give_V3 (MassNP (UseN bread_N))))))) NoVoc
|
||||||
|
|
||||||
-- LangEng: one adds salt to the meat
|
-- LangEng: one adds salt to the meat
|
||||||
LangSom: hilib BIND ka cusbo waa lagu daraa
|
LangSom: cusbo hilib BIND ka waa lagu daraa
|
||||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (GenericCl (ComplSlash (Slash3V3 add_V3 (DetCN (DetQuant DefArt NumSg) (UseN meat_N))) (MassNP (UseN salt_N)))))) NoVoc
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (GenericCl (ComplSlash (Slash3V3 add_V3 (DetCN (DetQuant DefArt NumSg) (UseN meat_N))) (MassNP (UseN salt_N)))))) NoVoc
|
||||||
|
|
||||||
-- LangEng: one can add salt to meat
|
-- LangEng: one can add salt to meat
|
||||||
LangSom: hilib cusbo waa lagu dari karaa
|
LangSom: cusbo hilib waa lagu dari karaa
|
||||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (GenericCl (ComplVV can_VV (ComplSlash (Slash3V3 add_V3 (MassNP (UseN meat_N))) (MassNP (UseN salt_N))))))) NoVoc
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (GenericCl (ComplVV can_VV (ComplSlash (Slash3V3 add_V3 (MassNP (UseN meat_N))) (MassNP (UseN salt_N))))))) NoVoc
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
@@ -116,4 +116,3 @@ Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_P
|
|||||||
-- LangEng: my mother lives under the sea
|
-- LangEng: my mother lives under the sea
|
||||||
LangSom: hooya BIND day waa ku nool tahay bad BIND da hoos BIND teed BIND a
|
LangSom: hooya BIND day waa ku nool tahay bad BIND da hoos BIND teed BIND a
|
||||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant (PossPron i_Pron) NumSg) (UseN2 mother_N2)) (AdvVP (UseV live_V) (PrepNP under_Prep (DetCN (DetQuant DefArt NumSg) (UseN sea_N))))))) NoVoc
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (DetCN (DetQuant (PossPron i_Pron) NumSg) (UseN2 mother_N2)) (AdvVP (UseV live_V) (PrepNP under_Prep (DetCN (DetQuant DefArt NumSg) (UseN sea_N))))))) NoVoc
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user