1
0
forked from GitHub/gf-rgl

(Som) Rename internal opers, update adp.comb. list

source: Morgan Nilsson's list, add ?? for those that aren't there
This commit is contained in:
Inari Listenmaa
2023-03-11 22:37:16 +08:00
parent 0e09cf9b4a
commit 8a12362649
8 changed files with 154 additions and 136 deletions

View File

@@ -120,11 +120,11 @@ concrete CatSom of Cat = CommonX - [Adv,IAdv] ** open ResSom, Prelude in {
N3 = ResSom.Noun3 ; N3 = ResSom.Noun3 ;
GN, SN, PN = ResSom.PNoun ; GN, SN, PN = ResSom.PNoun ;
Adv = ResSom.Adverb ; -- Preposition of an adverbial can merge with obligatory complements of the verb. Adv = ResSom.Adverb ; -- Adposition 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.hoostiisa ! Sg3 Masc ; Prep = \prep -> prep.s ! ZeroObj ++ prep.sii ++ prep.dhex ++ prep.hoostiisa ! Sg3 Masc ;
} }

View File

@@ -4,7 +4,7 @@ concrete LexiconSom of Lexicon = CatSom **
---- ----
-- A -- A
lin add_V3 = mkV3 "dar" ku NoPrep ; lin add_V3 = mkV3 "dar" ku noPrep ;
-- lin airplane_N = mkN "" ; -- lin airplane_N = mkN "" ;
-- lin alas_Interj = mkInterj "" ; -- lin alas_Interj = mkInterj "" ;
-- lin already_Adv = mkA "" ; -- lin already_Adv = mkA "" ;

View File

@@ -25,6 +25,7 @@ oper
masc : Gender ; masc : Gender ;
fem : Gender ; fem : Gender ;
-- Export the adposition type with the more usual/mainstream name Preposition
Preposition : Type ; Preposition : Type ;
ka : Preposition ; ka : Preposition ;
ku : Preposition ; ku : Preposition ;
@@ -141,7 +142,7 @@ oper
mkAdv : Str -> Adv = \s -> lin Adv { mkAdv : Str -> Adv = \s -> lin Adv {
berri = s ; berri = s ;
c2 = noPrep ; c2 = noPrep ;
np = {s = [] ; a = P3_Prep} ; np = {s = [] ; a = ZeroObj} ;
sii,dhex,miscAdv = [] sii,dhex,miscAdv = []
} ; } ;
@@ -172,12 +173,12 @@ oper
masc = Masc ; masc = Masc ;
fem = Fem ; fem = Fem ;
Preposition = ResSom.Preposition ; Preposition = ResSom.Adposition ;
ka = ResSom.Ka ; ka = ResSom.Ka ;
ku = ResSom.Ku ; ku = ResSom.Ku ;
la = ResSom.La ; la = ResSom.La ;
u = ResSom.U ; u = ResSom.U ;
noPrep = ResSom.NoPrep ; noPrep = ResSom.NoAdp ;
VVForm = ResSom.VVForm ; VVForm = ResSom.VVForm ;
infinitive = Infinitive ; infinitive = Infinitive ;
@@ -229,14 +230,14 @@ oper
mkV2 = overload { mkV2 = overload {
mkV2 : Str -> V2 = \s -> lin V2 (regV s ** {c2 = noPrep}) ; mkV2 : Str -> V2 = \s -> lin V2 (regV s ** {c2 = noPrep}) ;
mkV2 : Str -> Preposition -> V2 = \s,p -> lin V2 (regV s ** {c2 = p}) ; mkV2 : Str -> Adposition -> V2 = \s,p -> lin V2 (regV s ** {c2 = p}) ;
mkV2 : V -> Preposition -> V2 = \v,p -> lin V2 (v ** {c2 = p}) ; mkV2 : V -> Adposition -> V2 = \v,p -> lin V2 (v ** {c2 = p}) ;
} ; } ;
mkV3 = overload { mkV3 = overload {
mkV3 : (sug : Str) -> V3 = \s -> lin V3 (regV s ** {c2,c3 = noPrep}) ; mkV3 : (sug : Str) -> V3 = \s -> lin V3 (regV s ** {c2,c3 = noPrep}) ;
mkV3 : (sug : Str) -> (_,_ : Preposition) -> V3 = \s,p,q -> lin V3 (regV s ** {c2 = p ; c3 = q}) ; mkV3 : (sug : Str) -> (_,_ : Adposition) -> V3 = \s,p,q -> lin V3 (regV s ** {c2 = p ; c3 = q}) ;
mkV3 : V -> (_,_ : Preposition) -> V2 = \v,p,q -> lin V3 (v ** {c2 = p ; c3 = q}) ; mkV3 : V -> (_,_ : Adposition) -> V2 = \v,p,q -> lin V3 (v ** {c2 = p ; c3 = q}) ;
} ; } ;
mkVV = overload { mkVV = overload {
@@ -252,11 +253,11 @@ oper
} ; } ;
mkV2S = overload { mkV2S = overload {
mkV2S : Str -> V2S -- Predictable verb, no preposition. mkV2S : Str -> V2S -- Predictable verb, no Adposition.
= \s -> lin V2S (regV s ** {c2 = noPrep}) ; = \s -> lin V2S (regV s ** {c2 = noPrep}) ;
mkV2S : Str -> Preposition -> V2S -- Predictable verb, preposition given as second argument. mkV2S : Str -> Adposition -> V2S -- Predictable verb, Adposition given as second argument.
= \s,pr -> lin V2S (regV s ** {c2 = pr}) ; = \s,pr -> lin V2S (regV s ** {c2 = pr}) ;
mkV2S : V -> Preposition -> V2S -- Unpredictable verb, preposition. mkV2S : V -> Adposition -> V2S -- Unpredictable verb, Adposition.
= \v,pr -> lin V2S (v ** {c2 = pr}) = \v,pr -> lin V2S (v ** {c2 = pr})
} ; } ;

View File

@@ -136,15 +136,15 @@ param
| Pl1 Inclusion | Pl1 Inclusion
| Pl2 | Pl2
| Pl3 | Pl3
| Impers ; -- Verb agrees with Sg3, but needed for preposition contraction | Impers ; -- Verb agrees with Sg3, but needed for contractions
PrepAgr = AdpObjAgr =
Sg1_Prep Sg1Obj
| Sg2_Prep | Sg2Obj
| Pl1_Prep Inclusion | Pl1Obj Inclusion
| Pl2_Prep | Pl2Obj
| Reflexive_Prep | ReflexiveObj
| P3_Prep ; | ZeroObj ;
State = Definite | Indefinite ; State = Definite | Indefinite ;
@@ -164,27 +164,27 @@ oper
Sg3 _ => Pl3 ; Sg3 _ => Pl3 ;
agr => agr } ; agr => agr } ;
agr2pagr : Agreement -> PrepAgr = \a -> case a of { agr2objAgr : Agreement -> AdpObjAgr = \a -> case a of {
Sg1 => Sg1_Prep ; Sg1 => Sg1Obj ;
Sg2 => Sg2_Prep ; Sg2 => Sg2Obj ;
Pl1 i => Pl1_Prep i ; Pl1 i => Pl1Obj i ;
Pl2 => Pl2_Prep ; Pl2 => Pl2Obj ;
_ => P3_Prep _ => ZeroObj
} ; } ;
pagr2agr : PrepAgr -> Agreement = \a -> case a of { objAgr2agr : AdpObjAgr -> Agreement = \a -> case a of {
Sg1_Prep => Sg1 ; Sg1Obj => Sg1 ;
Sg2_Prep => Sg2 ; Sg2Obj => Sg2 ;
Pl1_Prep i => Pl1 i ; Pl1Obj i => Pl1 i ;
Pl2_Prep => Pl2 ; Pl2Obj => Pl2 ;
_ => Sg3 Masc _ => Sg3 Masc
} ; } ;
isP3 = overload { isP3 = overload {
isP3 : Agreement -> Bool = \agr -> isP3 : Agreement -> Bool = \agr ->
case agr of {Sg3 _ | Pl3 => True ; _ => False} ; case agr of {Sg3 _ | Pl3 => True ; _ => False} ;
isP3 : PrepAgr -> Bool = \agr -> isP3 : AdpObjAgr -> Bool = \agr ->
case agr of {P3_Prep => True ; _ => False} ; case agr of {ZeroObj => True ; _ => False} ;
} ; } ;
@@ -234,18 +234,20 @@ oper
} ; } ;
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Prepositions -- Adpositions
param param
Preposition = U | Ku | Ka | La | NoPrep ; Adposition = U | Ku | Ka | La | NoAdp ;
PrepCombination = Ugu | Uga | Ula | Kaga | Kula | Kala AdpCombination =
| Passive | Loo | Lagu | Laga | Lala -- TODO all combinations with impersonal la: Loogu, Looga, Loola, Lagaga, Lagula, Lagala Single Adposition -- 0-1 adpositions (0 = NoAdp)
| Single Preposition ; | ImpersSubj Adposition -- impersonal subject + 0-1 adpositions
| Ugu | Uga | Ula
| Kaga | Kula | Kala ;
oper oper
combine : Preposition -> Preposition -> PrepCombination = \p1,p2 -> combine : Adposition -> Adposition -> AdpCombination = \p1,p2 ->
let oneWay : Preposition => Preposition => PrepCombination = \\x,y => let oneWay : Adposition => Adposition => AdpCombination = \\x,y =>
case <x,y> of { case <x,y> of {
<U,U|Ku> => Ugu ; <U,U|Ku> => Ugu ;
<U,Ka> => Uga ; <U,Ka> => Uga ;
@@ -254,25 +256,16 @@ oper
Ku|Ka> => Kaga ; Ku|Ka> => Kaga ;
<Ku,La> => Kula ; <Ku,La> => Kula ;
<Ka,La> => Kala ; <Ka,La> => Kala ;
<NoPrep,p> => Single p ; <NoAdp,p> => Single p ;
<p,NoPrep> => Single x ; <p,NoAdp> => Single x ;
<p,_> => Single x } -- for trying both ways <p,_> => Single x } -- for trying both ways
in case oneWay ! p2 ! p1 of { in case oneWay ! p2 ! p1 of {
Single _ => oneWay ! p1 ! p2 ; Single _ => oneWay ! p1 ! p2 ;
z => z } ; z => z } ;
combinePassive : Preposition -> PrepCombination = \p -> isPassive : {c2 : AdpCombination} -> Bool = \vp ->
case p of {
U => Loo ;
Ku => Lagu ;
Ka => Laga ;
La => Lala ;
_ => Passive
} ;
isPassive : {c2 : PrepCombination} -> Bool = \vp ->
case vp.c2 of { case vp.c2 of {
Passive | Lagu | Laga | Loo | Lala => True ; ImpersSubj _ => True ;
_ => False _ => False
} ; } ;

View File

@@ -81,7 +81,7 @@ concrete QuestionSom of Question = CatSom ** open
-- 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} ; -- TODO do we need PrepCombination in IAdv? -- AdvIAdv iadv adv = iadv ** {s = iadv.s ++ adv.berri} ; -- TODO do we need AdpCombination in IAdv?
-- Interrogative complements to copulas can be both adverbs and -- Interrogative complements to copulas can be both adverbs and
-- pronouns. -- pronouns.

View File

@@ -145,14 +145,14 @@ oper
NounPhrase : Type = BaseNP ** {s : Case => Str} ; NounPhrase : Type = BaseNP ** {s : Case => Str} ;
NPLite : Type = {s : Str ; a : PrepAgr} ; -- Used in Adv and as an object in VP NPLite : Type = {s : Str ; a : AdpObjAgr} ; -- Used in Adv and as an object in VP
nplite : NounPhrase -> NPLite = \np -> nplite : NounPhrase -> NPLite = \np ->
let pagr : PrepAgr = agr2pagr np.a in let objAgr : AdpObjAgr = agr2objAgr np.a in
case <np.isPron,isP3 np.a> of { case <np.isPron,isP3 np.a> of {
<False,_> => {s = np.s ! Abs ; a = pagr} ; <False,_> => {s = np.s ! Abs ; a = objAgr} ;
-- <True,True> => {s = objpron np ! Abs ; a = pagr} ; -- uncomment if you want to add long object pronoun for 3rd person object -- <True,True> => {s = objpron np ! Abs ; a = objAgr} ; -- uncomment if you want to add long object pronoun for 3rd person object
_ => {s = np.empty ; a = pagr} } ; -- no long object for other pronouns _ => {s = np.empty ; a = objAgr} } ; -- no long object for other pronouns
objpron : NounPhrase -> Case => Str = \np -> case np.isPron of { objpron : NounPhrase -> Case => Str = \np -> case np.isPron of {
True => \\c => np.empty ++ (pronTable ! np.a).sp ! c ; True => \\c => np.empty ++ (pronTable ! np.a).sp ! c ;
@@ -250,19 +250,19 @@ oper
poss = {s, short = quantTable "ood" ; sp = gnTable "ood" "ood" "uwood"} poss = {s, short = quantTable "ood" ; sp = gnTable "ood" "ood" "uwood"}
} ; } ;
Impers => { Impers => {
s = \\_ => [] ; -- the string `la' comes from Passive (: PrepCombination) s = \\_ => [] ; -- the string `la' comes from the AdpCombination value `ImpersSubj Adposition`
a = Impers ; isPron = True ; sp = \\_ => "" ; a = Impers ; isPron = True ; sp = \\_ => "" ;
empty = [] ; st = Definite ; empty = [] ; st = Definite ;
poss = {s, short = quantTable "iis" ; sp = gnTable "iis" "iis" "uwiis"} poss = {s, short = quantTable "iis" ; sp = gnTable "iis" "iis" "uwiis"}
} }
} ; } ;
secondObject : PrepAgr => Str = table { secondObject : AdpObjAgr => Str = table {
Sg1_Prep => "kay" ; Sg1Obj => "kay" ;
Sg2_Prep => "kaa" ; Sg2Obj => "kaa" ;
Pl1_Prep Excl => "kayo" ; Pl1Obj Excl => "kayo" ;
Pl1_Prep Incl => "keen" ; Pl1Obj Incl => "keen" ;
Pl2_Prep => "kiin" ; Pl2Obj => "kiin" ;
_ => [] _ => []
} ; } ;
@@ -350,30 +350,30 @@ oper
} ; } ;
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Prepositions -- Adpositions
Prep : Type = { Prep : Type = {
s : PrepAgr => Str ; s : AdpObjAgr => Str ;
c2 : Preposition ; c2 : Adposition ;
isPoss : Bool ; isPoss : Bool ;
berri, sii, dhex : Str ; berri, sii, dhex : Str ;
hoostiisa : Agreement => Str } ; hoostiisa : Agreement => Str } ;
mkPrep : (x1,_,_,_,_,x6 : Str) -> {s : PrepAgr => Str} = \ku,ii,kuu,noo,idiin,isku -> { mkPrep : (x1,_,_,_,_,x6 : Str) -> {s : AdpObjAgr => Str} = \ku,ii,kuu,noo,idiin,isku -> {
s = table { s = table {
P3_Prep => ku ; ZeroObj => ku ;
Sg1_Prep => ii ; Sg1Obj => ii ;
Sg2_Prep => kuu ; Sg2Obj => kuu ;
Pl2_Prep => idiin ; Pl2Obj => idiin ;
Pl1_Prep Excl => noo ; Pl1Obj Excl => noo ;
Pl1_Prep Incl => "i" + noo ; Pl1Obj Incl => "i" + noo ;
Reflexive_Prep => isku ReflexiveObj => isku
} }
} ; } ;
prep : Preposition -> {s : PrepAgr => Str ; c2 : Preposition} = \p -> prep : Adposition -> {s : AdpObjAgr => Str ; c2 : Adposition} = \p ->
prepTable ! p ** {c2 = p} ; prepTable ! p ** {c2 = p} ;
prepTable : Preposition => {s : PrepAgr => Str} = table { prepTable : Adposition => {s : AdpObjAgr => 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" ;
@@ -381,45 +381,68 @@ oper
_ => mkPrep [] "i" "ku" "na" "idin" "is" _ => mkPrep [] "i" "ku" "na" "idin" "is"
} ; } ;
prepCombTable : PrepAgr => PrepCombination => Str = table { allContractions : AdpObjAgr => AdpCombination => Str = table {
Sg1_Prep => table { Sg1Obj => table {
Ugu => "iigu" ; Uga => "iiga" ; Ula => "iila" ; Ugu => "iigu" ; Uga => "iiga" ; Ula => "iila" ;
Kaga => "igaga" ; Kula => "igula" ; Kala => "igala" ; Kaga => "igaga" ; Kula => "igula" ; Kala => "igala" ;
Passive => "la i" ; Loo => "la ii" ; Lala => "la ila" ; ImpersSubj NoAdp => "lay" ;
Lagu => "laygu" ; Laga => "layga" ; ImpersSubj U => "la ii" ;
Single p => (prepTable ! p).s ! Sg1_Prep } ; ImpersSubj La => "??la ila" ; ---- not in morgan's table
Sg2_Prep => table { Ugu => "kuugu" ; Uga => "kaaga" ; Ula => "kuula" ; ImpersSubj Ku => "laygu" ;
ImpersSubj Ka => "layga" ;
Single p => (prepTable ! p).s ! Sg1Obj } ;
Sg2Obj => table {
Ugu => "kuugu" ; Uga => "kaaga" ; Ula => "kuula" ;
Kaga => "kaaga" ; Kula => "kugula" ; Kala => "kaala" ; Kaga => "kaaga" ; Kula => "kugula" ; Kala => "kaala" ;
Passive => "lagu" ; Loo => "laguu" ; Lala => "lagula" ; ImpersSubj NoAdp => "lagu" ; -- Lagu 1: ku = Sg2Obj
Lagu => "lagugu" ; Laga => "lagaa" ; ImpersSubj U => "??laguu" ; ---- not in morgan's table
Single p => (prepTable ! p).s ! Sg2_Prep } ; ImpersSubj La => "lagula" ;
Pl1_Prep Excl => ImpersSubj Ku => "??lagugu" ; ---- not in morgan's table
ImpersSubj Ka => "??lagaa" ; ---- not in morgan's table
Single p => (prepTable ! p).s ! Sg2Obj } ;
Pl1Obj Excl =>
table { Ugu => "noogu" ; Uga => "nooga" ; Ula => "noola" ; table { Ugu => "noogu" ; Uga => "nooga" ; Ula => "noola" ;
Kaga => "nagaga" ; Kula => "nagula" ; Kala => "nagala" ; Kaga => "nagaga" ; Kula => "nagula" ; Kala => "nagala" ;
Passive => "nala" ; Loo => "???" ; Lala => "???" ; ImpersSubj NoAdp => "nala" ;
Lagu => "nalagu" ; Laga => "nalaga" ; ImpersSubj U => "??la noo" ; ---- not in morgan's table
Single p => (prepTable ! p).s ! Pl1_Prep Excl } ; ImpersSubj La => "??la nala" ; ---- not in morgan's table
Pl1_Prep Incl => ImpersSubj Ku => "??la nagu" ; ---- not in morgan's table
ImpersSubj Ka => "??la naga" ; ---- not in morgan's table
Single p => (prepTable ! p).s ! Pl1Obj Excl } ;
Pl1Obj Incl =>
table { Ugu => "inoogu" ; Uga => "inooga" ; Ula => "inoola" ; table { Ugu => "inoogu" ; Uga => "inooga" ; Ula => "inoola" ;
Kaga => "inagaga" ; Kula => "inagula" ; Kala => "inagala" ; Kaga => "inagaga" ; Kula => "inagula" ; Kala => "inagala" ;
Passive => "inala" ; Loo => "???" ; Lala => "???" ; ImpersSubj NoAdp => "??inala" ; ---- none of following in morgan's table
Lagu => "inalagu" ; Laga => "inalaga" ; ImpersSubj U => "??la inoo" ;
Single p => (prepTable ! p).s ! Pl1_Prep Incl } ; ImpersSubj La => "??la inala" ;
Pl2_Prep => table { Ugu => "idiinku" ; Uga => "idiinka" ; Ula => "idiinla" ; ImpersSubj Ku => "??la inagu" ;
ImpersSubj Ka => "??la inaga" ;
Single p => (prepTable ! p).s ! Pl1Obj Incl } ;
Pl2Obj =>
table { Ugu => "idiinku" ; Uga => "idiinka" ; Ula => "idiinla" ;
Kaga => "idinkaga" ; Kula => "idinkula" ; Kala => "idinkala" ; Kaga => "idinkaga" ; Kula => "idinkula" ; Kala => "idinkala" ;
Passive => "laydin" ; Loo => "laydiin" ; Lala => "laydinla" ; ImpersSubj NoAdp => "laydin" ; ---- none of following in morgan's table
Lagu => "laydinku" ; Laga => "laydinka" ; ImpersSubj U => "??laydiin" ;
Single p => (prepTable ! p).s ! Pl2_Prep } ; ImpersSubj La => "??laydinla" ;
Reflexive_Prep => -- TODO check every form ImpersSubj Ku => "??laydinku" ;
table { Ugu => "isugu" ; Uga => "isuga" ; Ula => "isula" ; ImpersSubj Ka => "??laydinka" ;
Kaga => "iskaga" ; Kula => "iskula" ; Kala => "iskala" ; Single p => (prepTable ! p).s ! Pl2Obj } ;
Passive => "lays" ; Loo => "???" ; Lala => "???" ; ReflexiveObj =>
Lagu => "laysku" ; Laga => "layska" ; table { Ugu => "isugu" ; Uga => "isaga" ;
Single p => (prepTable ! p).s ! Reflexive_Prep } ; Ula => "??isula" ; Kaga => "??iskaga" ; Kula => "??iskula" ; Kala => "??iskala" ; ---- not in morgan's table
ImpersSubj NoAdp => "lays" ;
ImpersSubj U => "laysu" ;
ImpersSubj La => "laysla" ;
ImpersSubj Ku => "laysku" ;
ImpersSubj Ka => "layska" ;
Single p => (prepTable ! p).s ! ReflexiveObj } ;
a => table { Ugu => "ugu" ; Uga => "uga" ; Ula => "ula" ; a => table { Ugu => "ugu" ; Uga => "uga" ; Ula => "ula" ;
Kaga => "kaga" ; Kula => "kula" ; Kala => "kala" ; Kaga => "kaga" ; Kula => "kula" ; Kala => "kala" ;
Passive => "la" ; Loo => "loo" ; Lala => "lala" ; ImpersSubj NoAdp => "la" ;
Lagu => "lagu" ; Laga => "laga" ; ImpersSubj U => "loo" ;
ImpersSubj La => "lala" ;
ImpersSubj Ku => "lagu" ; -- Lagu 2: ku = Adp
ImpersSubj Ka => "laga" ;
Single p => (prepTable ! p).s ! a } Single p => (prepTable ! p).s ! a }
} ; } ;
@@ -429,7 +452,7 @@ oper
-- Sequences of adjectives follow the rules for restrictive relatives clauses, i.e. are linked by oo 'and' on an indefinite head NounPhrase and by ee 'and' on a definite NounPhrase (8.1). -- Sequences of adjectives follow the rules for restrictive relatives clauses, i.e. are linked by oo 'and' on an indefinite head NounPhrase and by ee 'and' on a definite NounPhrase (8.1).
Adjective : Type = {s : AForm => Str} ; Adjective : Type = {s : AForm => Str} ;
Adjective2 : Type = Adjective ** {c2 : Preposition} ; Adjective2 : Type = Adjective ** {c2 : Adposition} ;
duplA : Str -> Adjective = \yar -> duplA : Str -> Adjective = \yar ->
let yaryar = duplicate yar let yaryar = duplicate yar
@@ -474,8 +497,8 @@ oper
dhex : Str ; -- closed class of adverbials: hoos, kor, dul, dhex, … dhex : Str ; -- closed class of adverbials: hoos, kor, dul, dhex, …
isCopula : Bool ; isCopula : Bool ;
} ; } ;
Verb2 : Type = Verb ** {c2 : Preposition} ; Verb2 : Type = Verb ** {c2 : Adposition} ;
Verb3 : Type = Verb2 ** {c3 : Preposition} ; Verb3 : Type = Verb2 ** {c3 : Adposition} ;
VV : Type = Verb ** {vvtype : VVForm} ; VV : Type = Verb ** {vvtype : VVForm} ;
@@ -704,7 +727,7 @@ oper
} ; } ;
Adverb : Type = BaseAdv ** { Adverb : Type = BaseAdv ** {
c2 : Preposition ; -- adverbs can contribute to preposition contraction. c2 : Adposition ; -- adverbs can contribute to Adposition contraction.
np : NPLite ; -- NP from PrepNP can be promoted into a core argument. np : NPLite ; -- NP from PrepNP can be promoted into a core argument.
} ; } ;
@@ -733,8 +756,8 @@ oper
} ; } ;
VerbPhrase : Type = BaseVerb ** Complement ** BaseAdv ** { VerbPhrase : Type = BaseVerb ** Complement ** BaseAdv ** {
c2 : PrepCombination ; -- Prepositions can combine together and with object pronoun. c2 : AdpCombination ; -- Adpositions can combine together and with object pronoun.
obj : NPLite ; -- {s : Str ; a : PrepAgr} obj : NPLite ; -- {s : Str ; a : AdpObjAgr}
obj2 : Str ; -- if two overt pronoun objects obj2 : Str ; -- if two overt pronoun objects
vComp : {subjunc : Str ; -- "waa in" or subjunctive construction: "in" is placed here vComp : {subjunc : Str ; -- "waa in" or subjunctive construction: "in" is placed here
inf : Str ; -- auxiliary VV with infinitive argument inf : Str ; -- auxiliary VV with infinitive argument
@@ -754,8 +777,8 @@ oper
vComp = {subjunc, inf = [] ; vComp = {subjunc, inf = [] ;
subcl = \\_ => []} ; subcl = \\_ => []} ;
berri,miscAdv = [] ; berri,miscAdv = [] ;
c2 = Single NoPrep ; c2 = Single NoAdp ;
obj = {s = [] ; a = P3_Prep} ; obj = {s = [] ; a = ZeroObj} ;
obj2 = [] obj2 = []
} ; } ;
@@ -771,12 +794,12 @@ oper
passVP : VerbPhrase -> VerbPhrase = \vp -> vp ** { passVP : VerbPhrase -> VerbPhrase = \vp -> vp ** {
c2 = case vp.c2 of { c2 = case vp.c2 of {
Single p => combinePassive p ; Single p => ImpersSubj p ;
_ => vp.c2 } _ => vp.c2 } -- TODO: do combinations of La + 2 adpositions exist?
} ; } ;
insertRefl : VPSlash -> VPSlash = \vps -> vps ** { insertRefl : VPSlash -> VPSlash = \vps -> vps ** {
obj = vps.obj ** {a = Reflexive_Prep} ; obj = vps.obj ** {a = ReflexiveObj} ;
-- If old obj was something else than P3, it is now shown in obj2 -- If old obj was something else than P3, it is now shown in obj2
obj2 = vps.obj2 ++ secondObject ! vps.obj.a ; obj2 = vps.obj2 ++ secondObject ! vps.obj.a ;
@@ -796,7 +819,7 @@ oper
-- To generalise insertAdv and insertComp -- To generalise insertAdv and insertComp
VPLite : Type = { VPLite : Type = {
c2 : PrepCombination ; c2 : AdpCombination ;
obj : NPLite ; obj : NPLite ;
sii,dhex,berri,miscAdv,obj2 : Str} ; sii,dhex,berri,miscAdv,obj2 : Str} ;
@@ -804,7 +827,7 @@ oper
case vp.obj.a of { case vp.obj.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 obj.s. -- We keep both old and new string (=noun, if there was one) in obj.s.
P3_Prep => ZeroObj =>
vp ** {obj = nplite ** { vp ** {obj = nplite ** {
s = nplite.s ++ vp.obj.s} s = nplite.s ++ vp.obj.s}
} ; -- no obj2, because there's ≤1 non-3rd-person pronoun. } ; -- no obj2, because there's ≤1 non-3rd-person pronoun.
@@ -820,12 +843,13 @@ oper
insertAdvLite : VPLite -> Adverb -> VPLite = \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" NoAdp => vp ** adv'' ; -- the adverb is not formed with PrepNP, e.g. "tomorrow"
_ => case vp.c2 of { _ => case vp.c2 of {
-- if free complement slots, introduce adv.np with insertComp -- if free complement slots, introduce adv.np with insertComp
Single NoPrep => insertCompLite (vp ** {c2 = Single adv.c2}) adv.np ** adv' ; Single NoAdp => insertCompLite (vp ** {c2 = Single adv.c2}) adv.np ** adv' ;
Single p => insertCompLite (vp ** {c2 = combine p adv.c2}) adv.np ** adv' ; Single p => insertCompLite (vp ** {c2 = combine p adv.c2}) adv.np ** adv' ;
Passive => insertCompLite (vp ** {c2 = combinePassive adv.c2}) adv.np ** adv' ; ImpersSubj NoAdp => insertCompLite (vp ** {c2 = ImpersSubj adv.c2}) adv.np ** adv' ;
-- ImpersSubj p => insertCompLite (vp ** {c2 = ??? }) adv.np ** adv' ; -- TODO: is this allowed?
-- if complement slots are full, just insert strings. -- if complement slots are full, just insert strings.
_ => vp ** adv'' _ => vp ** adv''
@@ -852,7 +876,7 @@ oper
subj : {noun, pron : Str ; isP3 : Bool} ; -- noun and subject pronoun if applicable subj : {noun, pron : Str ; isP3 : Bool} ; -- noun and subject pronoun if applicable
obj : NPLite ; obj : NPLite ;
obj2 : Str ; obj2 : Str ;
c2 : PrepCombination ; -- NB. QuestIAdv can add more prepositions c2 : AdpCombination ; -- NB. QuestIAdv can add more Adpositions
aComp : Str ; aComp : Str ;
nComp : Str ; nComp : Str ;
vComp : {inf,subcl,subjunc : Str} ; vComp : {inf,subcl,subjunc : Str} ;
@@ -930,12 +954,12 @@ oper
s = \\t,a,p => s = \\t,a,p =>
let -- Put all arguments in their right place let -- Put all arguments in their right place
--cl : ClSlash = complCl incomplCl ; --cl : ClSlash = complCl incomplCl ;
prepComb = prepCombTable ! cl.obj.a ! cl.c2 ; prepComb = allContractions ! cl.obj.a ! cl.c2 ;
-- Contractions -- Contractions
bind : Str = case <isPassive cl, cl.obj.a, cl.c2> of { bind : Str = case <isPassive cl, cl.obj.a, cl.c2> of {
<False,P3_Prep,Single NoPrep> => [] ; -- nothing to attach to the STM <False,ZeroObj,Single NoAdp> => [] ; -- nothing to attach to the STM
_ => BIND } ; -- something to attach, use BIND _ => BIND } ; -- something to attach, use BIND
prepCombNeg : Str = case <cltyp,p> of { prepCombNeg : Str = case <cltyp,p> of {
<Statement,Neg> => prepComb ++ bind ; <Statement,Neg> => prepComb ++ bind ;
_ => [] _ => []
@@ -975,7 +999,7 @@ oper
++ cl.subj.noun -- subject if it's a noun ++ cl.subj.noun -- subject if it's a noun
++ statementNounObj -- noun object if it's a statement ++ statementNounObj -- noun object if it's a statement
++ prepCombNeg -- prepositions and pron. objects in negative statement ++ prepCombNeg -- Adpositions and pron. objects in negative statement
++ stm ++ stm
++ cl.vComp.subjunc -- "waa in" construction / ++ cl.vComp.subjunc -- "waa in" construction /
@@ -985,7 +1009,7 @@ oper
++ cl.aComp -- AP complement, regardless of cltype ++ cl.aComp -- AP complement, regardless of cltype
++ statementNounComp -- NP complement if it's direct statement ++ statementNounComp -- NP complement if it's direct statement
++ prepCombPos -- prepositions + pron. objects in positive sentence ++ prepCombPos -- Adpositions + pron. objects in positive sentence
++ 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
@@ -1095,7 +1119,7 @@ oper
linVP : VForm -> ClType -> VerbPhrase -> Str = \vf,cltyp,vp -> linVP : VForm -> ClType -> VerbPhrase -> Str = \vf,cltyp,vp ->
let pred = vp.s ! vf ; let pred = vp.s ! vf ;
pr = prepCombTable ! vp.obj.a ! vp.c2 ; pr = allContractions ! vp.obj.a ! vp.c2 ;
neg = case <cltyp,isNeg vf> of { neg = case <cltyp,isNeg vf> of {
<Subord,True> => "aan" ; <Subord,True> => "aan" ;
_ => [] _ => []
@@ -1114,7 +1138,7 @@ oper
++ case cltyp of { ++ case cltyp of {
Subord => vp.obj.s ; -- noun object if it's subordinate clause Subord => vp.obj.s ; -- noun object if it's subordinate clause
_ => [] } _ => [] }
++ vp.aComp ! pagr2agr vp.obj.a -- AP complement agreeing with object ++ vp.aComp ! objAgr2agr vp.obj.a -- AP complement agreeing with object
++ pr -- object if it's a pronoun ++ pr -- object if it's a pronoun
++ vp.sii -- restricted set of particles ++ vp.sii -- restricted set of particles
++ vp.dhex -- restricted set of nouns/adverbials ++ vp.dhex -- restricted set of nouns/adverbials

View File

@@ -189,7 +189,7 @@ lin want_VV = mkVV (mkV "rabid" "rab" "rab") subjunctive ;
lin please_Voc = ss "" ; lin please_Voc = ss "" ;
-} -}
oper oper
mkIAdv : Preposition -> Str -> Bool -> ResSom.IAdv = \pr -> mkIAdv : Adposition -> Str -> Bool -> ResSom.IAdv = \pr ->
let pr' : Prep = ParadigmsSom.mkPrep pr ; let pr' : Prep = ParadigmsSom.mkPrep pr ;
in prepIP pr' ; in prepIP pr' ;

View File

@@ -46,7 +46,7 @@ lin
ComplVS vs s = ComplVS vs s =
let vps = useV vs ; let vps = useV vs ;
subord = SubjS {s="in"} s ; subord = SubjS {s="in"} s ;
in vps ** {obj = {s = subord.berri ; a = P3_Prep}} ; in vps ** {obj = {s = subord.berri ; a = ZeroObj}} ;
{- {-
-- : VQ -> QS -> VP ; -- : VQ -> QS -> VP ;
@@ -71,7 +71,7 @@ lin
SlashV2S v2s s = SlashV2S v2s s =
let vps = useVc v2s ; let vps = useVc v2s ;
subord = SubjS {s="in"} s ; subord = SubjS {s="in"} s ;
in vps ** {obj = {s = subord.berri ; a = P3_Prep}} ; in vps ** {obj = {s = subord.berri ; a = ZeroObj}} ;
{- {-
-- : V2V -> VP -> VPSlash ; -- beg (her) to go -- : V2V -> VP -> VPSlash ; -- beg (her) to go