forked from GitHub/gf-rgl
(Som) Fix Preps formed from nouns with possessives
This commit is contained in:
@@ -12,21 +12,16 @@ lin
|
|||||||
|
|
||||||
-- : Prep -> NP -> Adv ;
|
-- : Prep -> NP -> Adv ;
|
||||||
PrepNP prep np = prep ** {
|
PrepNP prep np = prep ** {
|
||||||
s = [] ;
|
-- s = [] ;
|
||||||
np = case prep.c2 of { -- isPoss of {
|
|
||||||
NoPrep => nplite emptyNP ; -- TODO check
|
|
||||||
_ => nplite np } ;
|
|
||||||
|
|
||||||
dhex = case prep.c2 of {
|
np = case prep.isPoss of {
|
||||||
NoPrep => [] ;
|
True => nplite emptyNP ;
|
||||||
_ => prep.dhex ! Sg3 Masc } ;
|
False => nplite np } ;
|
||||||
|
|
||||||
miscAdv = case prep.c2 of {
|
miscAdv = case prep.isPoss of {
|
||||||
NoPrep => np.s ! Abs ++ prep.dhex ! np.a ;
|
True => np.s ! Abs ++ prep.miscAdv ! np.a ;
|
||||||
_ => [] }
|
False => prep.miscAdv ! Sg3 Masc }
|
||||||
} ;
|
} ;
|
||||||
--ResSom.Prep ** {c2 : Preposition ; berri, sii, dhex : Str} ;
|
|
||||||
|
|
||||||
|
|
||||||
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
-- Adverbs can be modified by 'adadjectives', just like adjectives.
|
||||||
|
|
||||||
|
|||||||
@@ -85,9 +85,10 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
|||||||
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 ;
|
c2 : Preposition ;
|
||||||
berri, sii, miscAdv : Str ;
|
berri, sii, dhex : Str ;
|
||||||
dhex : Agreement => Str } ;
|
miscAdv : Agreement => Str } ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -124,6 +125,6 @@ linref
|
|||||||
-- Cl = linCl ;
|
-- Cl = linCl ;
|
||||||
VP = linVP VInf ;
|
VP = linVP VInf ;
|
||||||
CN = linCN ;
|
CN = linCN ;
|
||||||
Prep = \prep -> prep.s ! P3_Prep ++ prep.sii ++ prep.dhex ! Sg3 Masc ;
|
Prep = \prep -> prep.s ! P3_Prep ++ prep.sii ++ prep.dhex ++ prep.miscAdv ! Sg3 Masc ;
|
||||||
S = \s -> linBaseCl (s.s ! False) ;
|
S = \s -> linBaseCl (s.s ! False) ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ lin car_N = mkN "baabuur" masc ;
|
|||||||
-- lin carpet_N = mkN "" ;
|
-- lin carpet_N = mkN "" ;
|
||||||
lin cat_N = mkN "bisad" ;
|
lin cat_N = mkN "bisad" ;
|
||||||
-- lin ceiling_N = mkN "" ;
|
-- lin ceiling_N = mkN "" ;
|
||||||
-- lin chair_N = mkN "" ;
|
lin chair_N = mkN "kursi" ;
|
||||||
-- lin cheese_N = mkN "" ;
|
-- lin cheese_N = mkN "" ;
|
||||||
-- lin child_N = mkN "" ;
|
-- lin child_N = mkN "" ;
|
||||||
-- lin church_N = mkN "" ;
|
-- lin church_N = mkN "" ;
|
||||||
@@ -211,7 +211,7 @@ lin language_N = mkN "af" ;
|
|||||||
-- lin lie_V = mkV "" ;
|
-- lin lie_V = mkV "" ;
|
||||||
-- lin like_V2 = mkV2 "" ;
|
-- lin like_V2 = mkV2 "" ;
|
||||||
-- lin listen_V2 = mkV2 "" ;
|
-- lin listen_V2 = mkV2 "" ;
|
||||||
-- lin live_V = mkV "" ;
|
lin live_V = copula ** {sii = "nool"} ;
|
||||||
-- lin liver_N = mkN "" ;
|
-- lin liver_N = mkN "" ;
|
||||||
-- lin long_A = mkA "" ;
|
-- lin long_A = mkA "" ;
|
||||||
-- lin lose_V2 = mkV2 "" ;
|
-- lin lose_V2 = mkV2 "" ;
|
||||||
@@ -304,7 +304,7 @@ lin salt_N = mkN "cusbo" ;
|
|||||||
-- lin school_N = mkN "" ;
|
-- lin school_N = mkN "" ;
|
||||||
-- lin science_N = mkN "" ;
|
-- lin science_N = mkN "" ;
|
||||||
-- lin scratch_V2 = mkV2 "" ;
|
-- lin scratch_V2 = mkV2 "" ;
|
||||||
-- lin sea_N = mkN "" ;
|
lin sea_N = mkN "bad" fem ;
|
||||||
lin see_V2 = mkV2 "ark" ;
|
lin see_V2 = mkV2 "ark" ;
|
||||||
-- lin seed_N = mkN "" ;
|
-- lin seed_N = mkN "" ;
|
||||||
-- lin seek_V2 = mkV2 "" ;
|
-- lin seek_V2 = mkV2 "" ;
|
||||||
|
|||||||
@@ -105,14 +105,12 @@ oper
|
|||||||
mkPrep = overload {
|
mkPrep = overload {
|
||||||
mkPrep : Str -> CatSom.Prep = \s ->
|
mkPrep : Str -> CatSom.Prep = \s ->
|
||||||
emptyPrep ** (ResSom.mkPrep s s s s s s) ; -- ** {
|
emptyPrep ** (ResSom.mkPrep s s s s s s) ; -- ** {
|
||||||
-- c2=noPrep ; sii,berri=[] ; dhex = \\_=> [] ; isPoss=False}) ;
|
|
||||||
mkPrep : (x1,_,_,_,_,x6 : Str) -> CatSom.Prep = \a,b,c,d,e,f ->
|
mkPrep : (x1,_,_,_,_,x6 : Str) -> CatSom.Prep = \a,b,c,d,e,f ->
|
||||||
emptyPrep ** (ResSom.mkPrep a b c d e f) ; --
|
emptyPrep ** (ResSom.mkPrep a b c d e f) ; --
|
||||||
-- c2=noPrep ; sii,berri=[] ; dhex = \\_=> [] ; isPoss=False}) ;
|
|
||||||
mkPrep : Preposition -> CatSom.Prep = \p ->
|
mkPrep : Preposition -> CatSom.Prep = \p ->
|
||||||
emptyPrep ** (prep p) ; -- ** {sii,berri=[] ; dhex = \\_=> [] ; isPoss=False}) ;
|
emptyPrep ** (prep p) ;
|
||||||
mkPrep : CatSom.Prep -> (x1,x2,x3 : Str) -> CatSom.Prep = \p,s,t,u ->
|
mkPrep : CatSom.Prep -> (x1,x2,x3 : Str) -> CatSom.Prep = \p,s,t,u ->
|
||||||
p ** {berri = s ; sii = t ; dhex = \\_ => u} ;
|
p ** {berri = s ; sii = t ; dhex = u} ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
possPrep : N -> CatSom.Prep ; -- Nouns like dhex that are used with possessive suffix to form adverbials
|
possPrep : N -> CatSom.Prep ; -- Nouns like dhex that are used with possessive suffix to form adverbials
|
||||||
@@ -220,19 +218,21 @@ oper
|
|||||||
} ;
|
} ;
|
||||||
|
|
||||||
possPrep : N -> CatSom.Prep = \dhex -> emptyPrep ** {
|
possPrep : N -> CatSom.Prep = \dhex -> emptyPrep ** {
|
||||||
dhex = \\agr =>
|
miscAdv = \\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 ;
|
||||||
det = qnt.s ! art ! Abs ; -- this includes BIND
|
det = qnt.s ! art ! Abs ; -- this includes BIND
|
||||||
in dhex.s ! Def Sg ++ det
|
in dhex.s ! Def Sg ++ det ;
|
||||||
|
isPoss = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
emptyPrep : CatSom.Prep = lin Prep {
|
emptyPrep : CatSom.Prep = lin Prep {
|
||||||
sii,berri,miscAdv = [] ;
|
sii,berri,dhex = [] ;
|
||||||
dhex = \\_ => [] ;
|
miscAdv = \\_ => [] ;
|
||||||
s = \\_ => [] ;
|
s = \\_ => [] ;
|
||||||
c2 = noPrep ;
|
c2 = noPrep ;
|
||||||
|
isPoss = False
|
||||||
} ;
|
} ;
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ oper
|
|||||||
s = \\_ => [] ; -- the string `la' comes from Passive (: PrepCombination)
|
s = \\_ => [] ; -- the string `la' comes from Passive (: PrepCombination)
|
||||||
a = Impers ; isPron = True ; sp = \\_ => "" ;
|
a = Impers ; isPron = True ; sp = \\_ => "" ;
|
||||||
empty = [] ; st = Definite ;
|
empty = [] ; st = Definite ;
|
||||||
poss = {s, short = quantTable "??" ; sp = gnTable "??" "??" "??"}
|
poss = {s, short = quantTable "iis" ; sp = gnTable "iis" "iis" "uwiis"}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -467,10 +467,11 @@ oper
|
|||||||
Verb : Type = BaseVerb ** {
|
Verb : Type = BaseVerb ** {
|
||||||
sii : Str ; -- closed class of particles: sii, soo, kala, wada (Saeed 171)
|
sii : Str ; -- closed class of particles: sii, soo, kala, wada (Saeed 171)
|
||||||
dhex : Str ; -- closed class of adverbials: hoos, kor, dul, dhex, …
|
dhex : Str ; -- closed class of adverbials: hoos, kor, dul, dhex, …
|
||||||
|
isCopula : Bool ;
|
||||||
} ;
|
} ;
|
||||||
Verb2 : Type = Verb ** {c2 : Preposition} ;
|
Verb2 : Type = Verb ** {c2 : Preposition} ;
|
||||||
Verb3 : Type = Verb2 ** {c3 : Preposition} ;
|
Verb3 : Type = Verb2 ** {c3 : Preposition} ;
|
||||||
|
VerbS : Type = Verb ; -- TODO: VPs that have VS use waxa as stm? see Nilsson p. 68
|
||||||
|
|
||||||
-- Saeed page 79:
|
-- Saeed page 79:
|
||||||
-- "… the reference form is the imperative singular form
|
-- "… the reference form is the imperative singular form
|
||||||
@@ -566,6 +567,7 @@ oper
|
|||||||
|
|
||||||
} ;
|
} ;
|
||||||
sii, dhex = [] ;
|
sii, dhex = [] ;
|
||||||
|
isCopula = False ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-------------------------
|
-------------------------
|
||||||
@@ -637,7 +639,8 @@ oper
|
|||||||
VImp Pl pol => if_then_Pol pol "ahaada" "ahaanina" ;
|
VImp Pl pol => if_then_Pol pol "ahaada" "ahaanina" ;
|
||||||
VPres _ _ _ => nonExist -- use presCopula instead
|
VPres _ _ _ => nonExist -- use presCopula instead
|
||||||
} ;
|
} ;
|
||||||
sii, dhex = []
|
sii, dhex = [] ;
|
||||||
|
isCopula = True
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
have_V : Verb =
|
have_V : Verb =
|
||||||
@@ -697,7 +700,7 @@ oper
|
|||||||
|
|
||||||
useV : Verb -> VerbPhrase = \v -> v ** {
|
useV : Verb -> VerbPhrase = \v -> v ** {
|
||||||
comp = \\_ => <[],[]> ;
|
comp = \\_ => <[],[]> ;
|
||||||
pred = NoPred ;
|
pred = case v.isCopula of {True => Copula ; _ => NoPred} ;
|
||||||
vComp,berri,miscAdv,refl = [] ;
|
vComp,berri,miscAdv,refl = [] ;
|
||||||
c2 = Single NoPrep ;
|
c2 = Single NoPrep ;
|
||||||
obj2 = {s = [] ; a = P3_Prep} ;
|
obj2 = {s = [] ; a = P3_Prep} ;
|
||||||
@@ -840,10 +843,10 @@ oper
|
|||||||
_ => stmarkerNoContr ! subj.a ! p }} ;
|
_ => stmarkerNoContr ! subj.a ! p }} ;
|
||||||
in (wordOrder subjnoun subjpron stm obj pred vp) ;
|
in (wordOrder subjnoun subjpron stm obj pred vp) ;
|
||||||
} where {
|
} where {
|
||||||
vp = case isPassive vps of {
|
vp : VerbPhrase = case isPassive vps of {
|
||||||
True => complSlash (insertComp vps np) ;
|
True => complSlash (insertComp vps np) ;
|
||||||
_ => complSlash vps } ;
|
_ => complSlash vps } ;
|
||||||
subj = case isPassive vps of {True => impersNP ; _ => np}
|
subj : NounPhrase = case isPassive vps of {True => impersNP ; _ => np}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
wordOrder : (sn,sp : Str) -> (stm,obj : {p1,p2 : Str}) -> {fin,inf : Str} -> VerbPhrase -> BaseCl =
|
wordOrder : (sn,sp : Str) -> (stm,obj : {p1,p2 : Str}) -> {fin,inf : Str} -> VerbPhrase -> BaseCl =
|
||||||
@@ -863,7 +866,7 @@ oper
|
|||||||
++ vp.miscAdv } ; ---- NB. Only used if there are several adverbs.
|
++ vp.miscAdv } ; ---- NB. Only used if there are several adverbs.
|
||||||
---- Primary places for adverbs are obj, sii or dhex.
|
---- Primary places for adverbs are obj, sii or dhex.
|
||||||
|
|
||||||
VFun : Type = Tense -> Anteriority -> Polarity -> Agreement -> Verb
|
VFun : Type = Tense -> Anteriority -> Polarity -> Agreement -> BaseVerb
|
||||||
-> {fin : Str ; inf : Str} ;
|
-> {fin : Str ; inf : Str} ;
|
||||||
|
|
||||||
vf : ClType -> VFun = \clt -> case clt of {
|
vf : ClType -> VFun = \clt -> case clt of {
|
||||||
@@ -882,13 +885,13 @@ oper
|
|||||||
}
|
}
|
||||||
where {
|
where {
|
||||||
agrPol : {agr:Agreement ; pol:Polarity} = {agr=agr; pol=p} ;
|
agrPol : {agr:Agreement ; pol:Polarity} = {agr=agr; pol=p} ;
|
||||||
pastV : Verb -> Str = \v ->
|
pastV : BaseVerb -> Str = \v ->
|
||||||
case p of { Neg => v.s ! VNegPast Simple ;
|
case p of { Neg => v.s ! VNegPast Simple ;
|
||||||
Pos => v.s ! VPast Simple (agr2vagr agr) } ;
|
Pos => v.s ! VPast Simple (agr2vagr agr) } ;
|
||||||
|
|
||||||
presV : Verb -> Str = \v -> v.s ! VPres Simple (agr2vagr agr) p ;
|
presV : BaseVerb -> Str = \v -> v.s ! VPres Simple (agr2vagr agr) p ;
|
||||||
|
|
||||||
condNegV : Verb -> Str = \v -> case agr of {
|
condNegV : BaseVerb -> Str = \v -> case agr of {
|
||||||
Sg2|Sg3 Fem
|
Sg2|Sg3 Fem
|
||||||
|Pl2 => v.s ! VNegCond SgFem ;
|
|Pl2 => v.s ! VNegCond SgFem ;
|
||||||
Pl1 _ => v.s ! VNegCond PlInv ;
|
Pl1 _ => v.s ! VNegCond PlInv ;
|
||||||
|
|||||||
@@ -127,7 +127,9 @@ lin on_Prep = mkPrep ku ;
|
|||||||
-- lin possess_Prep = mkPrep ;
|
-- lin possess_Prep = mkPrep ;
|
||||||
-- lin through_Prep = mkPrep ;
|
-- lin through_Prep = mkPrep ;
|
||||||
-- lin to_Prep = mkPrep ;
|
-- lin to_Prep = mkPrep ;
|
||||||
lin under_Prep = possPrep (nUl "hoos") ;
|
lin under_Prep =
|
||||||
|
let hoos : CatSom.Prep = possPrep (nUl "hoos")
|
||||||
|
in hoos ** {c2 = Ku} ;
|
||||||
lin with_Prep = mkPrep la ;
|
lin with_Prep = mkPrep la ;
|
||||||
-- lin without_Prep = mkPrep ;
|
-- lin without_Prep = mkPrep ;
|
||||||
|
|
||||||
|
|||||||
@@ -80,4 +80,13 @@ Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_P
|
|||||||
|
|
||||||
-- LangEng: I am taught in front of my mother
|
-- LangEng: I am taught in front of my mother
|
||||||
LangSom: waa laygu baraa hooya BIND day hor BIND teed BIND a
|
LangSom: waa laygu baraa hooya BIND day hor BIND teed BIND a
|
||||||
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (AdvVP (PassV2 teach_V2) (PrepNP in8front_Prep (DetCN (DetQuant (PossPron i_Pron) NumSg) (UseN2 mother_N2))))))) NoVoc
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (AdvVP (PassV2 teach_V2) (PrepNP in8front_Prep (DetCN (DetQuant (PossPron i_Pron) NumSg) (UseN2 mother_N2))))))) NoVoc
|
||||||
|
|
||||||
|
-- LangEng: I see a cat under the chair
|
||||||
|
LangSom: bisad waa aan ku arkaa kursi BIND ga hoos BIND tiis BIND a
|
||||||
|
Lang: PhrUtt NoPConj (UttS (UseCl (TTAnt TPres ASimul) PPos (PredVP (UsePron i_Pron) (AdvVP (ComplSlash (SlashV2a see_V2) (DetCN (DetQuant IndefArt NumSg) (UseN cat_N))) (PrepNP under_Prep (DetCN (DetQuant DefArt NumSg) (UseN chair_N))))))) NoVoc
|
||||||
|
|
||||||
|
-- LangEng: my mother lives under the sea
|
||||||
|
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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user