mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-05-27 17:08:54 -06:00
@@ -82,7 +82,7 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
|||||||
--2 Structural words
|
--2 Structural words
|
||||||
|
|
||||||
-- Constructed in StructuralSom.
|
-- Constructed in StructuralSom.
|
||||||
Conj = { s1,s2 : Str ; n : Number } ;
|
Conj = {s2 : State => Str ; s1 : Str ; n : Number } ;
|
||||||
Subj = SS ;
|
Subj = SS ;
|
||||||
Prep = ResSom.Prep ** {c2 : Preposition ; berri, sii, dhex : Str} ;
|
Prep = ResSom.Prep ** {c2 : Preposition ; berri, sii, dhex : Str} ;
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ concrete CatSom of Cat = CommonX - [Adv] ** open ResSom, Prelude in {
|
|||||||
V,
|
V,
|
||||||
-- TODO: eventually proper lincats
|
-- TODO: eventually proper lincats
|
||||||
VV, -- verb-phrase-complement verb e.g. "want"
|
VV, -- verb-phrase-complement verb e.g. "want"
|
||||||
VS, -- sentence-complement verb e.g. "claim"
|
VS, -- sentence-complement verb e.g. "claim" -- TODO: VPs that have VS use waxa as stm? see Nilsson p. 68
|
||||||
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"
|
V2V, -- verb with NP and V complement e.g. "cause"
|
||||||
|
|||||||
@@ -37,17 +37,17 @@ lin
|
|||||||
ConsAdv, ConsAdV, ConsIAdv = consrSS comma ;
|
ConsAdv, ConsAdV, ConsIAdv = consrSS comma ;
|
||||||
ConjAdv, ConjAdV, ConjIAdv = conjunctDistrSS ;
|
ConjAdv, ConjAdV, ConjIAdv = conjunctDistrSS ;
|
||||||
|
|
||||||
{-
|
|
||||||
--RS depends on agreement, otherwise exactly like previous.
|
--RS depends on gender and case, otherwise exactly like previous.
|
||||||
lincat
|
lincat
|
||||||
[RS] = {s1,s2 : Agr => Str } ;
|
[RS] = {s1,s2 : Gender => Case => Str} ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
BaseRS x y = twoTable Agr x y ;
|
BaseRS x y = twoTable2 Gender Case x y ;
|
||||||
ConsRS xs x = consrTable Agr comma xs x ;
|
ConsRS xs x = consrTable2 Gender Case comma xs x ;
|
||||||
ConjRS co xs = conjunctDistrTable Agr co xs ;
|
ConjRS co xs = conjunctDistrTable2' Gender Case co xs ;
|
||||||
|
|
||||||
|
|
||||||
|
{-
|
||||||
lincat
|
lincat
|
||||||
[S] = {} ;
|
[S] = {} ;
|
||||||
|
|
||||||
@@ -80,11 +80,11 @@ lin
|
|||||||
BaseDAP x y = x ** { pref2 = y.pref } ;
|
BaseDAP x y = x ** { pref2 = y.pref } ;
|
||||||
ConsDAP xs x = xs ** { pref2 = x.pref } ;
|
ConsDAP xs x = xs ** { pref2 = x.pref } ;
|
||||||
ConjDet conj xs = xs ** { pref = conj.s1 ++ xs.pref ++ conj.s2 ++ xs.pref2 } ;
|
ConjDet conj xs = xs ** { pref = conj.s1 ++ xs.pref ++ conj.s2 ++ xs.pref2 } ;
|
||||||
|
-}
|
||||||
|
|
||||||
-- Noun phrases
|
-- Noun phrases
|
||||||
lincat
|
lincat
|
||||||
[NP] = { s1,s2 : Case => Str } ** NPLight ;
|
[NP] = {s1,s2 : Case => Str} ** BaseNP ;
|
||||||
|
|
||||||
lin
|
lin
|
||||||
BaseNP x y = twoTable Case x y ** consNP x y ;
|
BaseNP x y = twoTable Case x y ** consNP x y ;
|
||||||
@@ -93,24 +93,36 @@ lin
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
|
|
||||||
--NP without the s field; just to avoid copypaste and make things easier to change
|
ConjDistr : Type = {s2 : State => Str ; s1 : Str} ;
|
||||||
NPLight : Type = { } ;
|
|
||||||
|
|
||||||
consNP : NPLight -> NPLight -> NPLight = \x,y ->
|
conjunctDistrSS : ConjDistr -> ListX -> SS = \or,xs ->
|
||||||
x ** { agr = conjAgr x.agr (getNum y.agr) } ;
|
ss (or.s1 ++ xs.s1 ++ or.s2 ! Indefinite ++ xs.s2) ;
|
||||||
|
|
||||||
conjNP : NPLight -> Conj -> NPLight = \xs,conj ->
|
conjunctDistrTable' :
|
||||||
xs ** { agr = conjAgr xs.agr conj.nbr } ;
|
(P : PType) -> ConjDistr -> ListTable P -> {s : P => Str} = \P,or,xs ->
|
||||||
|
{s = table P {p => or.s1 ++ xs.s1 ! p ++ or.s2 ! Indefinite ++ xs.s2 ! p}} ;
|
||||||
|
|
||||||
|
conjunctDistrTable2' :
|
||||||
|
(P,Q : PType) -> ConjDistr -> ListTable2 P Q -> {s : P => Q => Str} =
|
||||||
|
\P,Q,or,xs ->
|
||||||
|
{s =
|
||||||
|
table P {p => table Q {q => or.s1 ++ xs.s1 ! p ! q ++ or.s2 ! Indefinite ++ xs.s2 ! p ! q}}} ;
|
||||||
|
|
||||||
-- Like conjunctTable from prelude/Coordination.gf,
|
-- Like conjunctTable from prelude/Coordination.gf,
|
||||||
-- but forces the first argument into absolutive.
|
-- but forces the first argument into absolutive.
|
||||||
conjunctNPTable : Conj -> ListTable Case -> {s : Case => Str} = \co,xs ->
|
conjunctNPTable : ConjDistr -> ({s1,s2 : Case => Str} ** BaseNP) -> {s : Case => Str ; st : State} = \co,xs -> xs **
|
||||||
{ s = table { cas => co.s1 ++ xs.s1 ! Abs ++ co.s2 ++ xs.s2 ! cas } } ;
|
{s = -- TODO if xs is a pronoun, make them use (pronTable ! xs.a).sp
|
||||||
|
table { cas => co.s1 ++ xs.s1 ! Abs ++ co.s2 ! xs.st ++ xs.s2 ! cas}} ;
|
||||||
|
|
||||||
conjAgr : Agr -> Number -> Agr = \a,n ->
|
consNP : BaseNP -> BaseNP -> BaseNP = \x,y ->
|
||||||
|
x ** { agr = conjAgr x.agr (getNum y.agr) } ;
|
||||||
|
|
||||||
|
conjNP : BaseNP -> Conj -> BaseNP = \xs,conj ->
|
||||||
|
xs ** { agr = conjAgr xs.agr conj.nbr } ;
|
||||||
|
|
||||||
|
conjAgr : Agreement -> Number -> Agreement = \a,n ->
|
||||||
case n of { Pl => plAgr a ; _ => a } ;
|
case n of { Pl => plAgr a ; _ => a } ;
|
||||||
|
|
||||||
conjNbr : Number -> Number -> Number = \n,m ->
|
conjNbr : Number -> Number -> Number = \n,m ->
|
||||||
case n of { Pl => Pl ; _ => m } ;
|
case n of { Pl => Pl ; _ => m } ;
|
||||||
-}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,11 @@ concrete ExtendSom of Extend = CatSom
|
|||||||
|
|
||||||
lin
|
lin
|
||||||
-- : NP -> SSlash -> Utt ; -- her I love -- Sayeed p. 189-
|
-- : NP -> SSlash -> Utt ; -- her I love -- Sayeed p. 189-
|
||||||
FocusObj np sslash =
|
FocusObj np sslash = -- FIXME: preposition disappears in negative sentences
|
||||||
|
let ss = sslash.s ! False ;
|
||||||
|
ssSub = sslash.s ! True ; -- the negative particle is the same as subordinate, but verb forms come from main clause
|
||||||
|
obj = objpron np ! Abs ;
|
||||||
|
in {s = ssSub.beforeSTM ++ "waxa" ++ ssSub.stm ++ ss.afterSTM ++ obj} ;
|
||||||
|
|
||||||
-- FocusAdv : Adv -> S -> Utt ; -- today I will sleep
|
-- FocusAdv : Adv -> S -> Utt ; -- today I will sleep
|
||||||
-- FocusAdV : AdV -> S -> Utt ; -- never will I sleep
|
-- FocusAdV : AdV -> S -> Utt ; -- never will I sleep
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ lin bread_N = mkN "rooti" ; --masc/fem
|
|||||||
-- lin brown_A = mkA "" ;
|
-- lin brown_A = mkA "" ;
|
||||||
-- lin burn_V = mkV "" ;
|
-- lin burn_V = mkV "" ;
|
||||||
-- lin butter_N = mkN "" ;
|
-- lin butter_N = mkN "" ;
|
||||||
lin buy_V2 = mkV2 "iibsa" ;
|
lin buy_V2 = mkV2 "iibso" ;
|
||||||
|
|
||||||
----
|
----
|
||||||
-- C
|
-- C
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
-- : Det -> CN -> NP
|
-- : Det -> CN -> NP
|
||||||
DetCN det cn = useN cn ** {
|
DetCN det cn = useN cn ** {
|
||||||
s = sTable ;
|
s = sTable ;
|
||||||
|
st = det.st ;
|
||||||
a = getAgr det.n (gender cn) } where {
|
a = getAgr det.n (gender cn) } where {
|
||||||
sTable : Case => Str = \\c =>
|
sTable : Case => Str = \\c =>
|
||||||
let nfc : {nf : NForm ; c : Case} =
|
let nfc : {nf : NForm ; c : Case} =
|
||||||
@@ -45,11 +46,12 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
UsePN pn = pn ** {
|
UsePN pn = pn ** {
|
||||||
s = \\c => pn.s ;
|
s = \\c => pn.s ;
|
||||||
isPron = False ;
|
isPron = False ;
|
||||||
|
st = Definite ;
|
||||||
empty = [] ;
|
empty = [] ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- : Pron -> NP ;
|
-- : Pron -> NP ;
|
||||||
UsePron pron = pron ;
|
UsePron pron = pron ** {st = Definite} ;
|
||||||
|
|
||||||
-- : Predet -> NP -> NP ; -- only the man
|
-- : Predet -> NP -> NP ; -- only the man
|
||||||
PredetNP predet np = np ** {
|
PredetNP predet np = np ** {
|
||||||
@@ -70,7 +72,8 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
|
|
||||||
-- : NP -> RS -> NP ; -- Paris, which is here
|
-- : NP -> RS -> NP ; -- Paris, which is here
|
||||||
RelNP np rs = np ** {
|
RelNP np rs = np ** {
|
||||||
s = \\c => np.s ! c ++ rs.s ! npgender np ! c
|
s = \\c => objpron np ! c ++ rs.s ! npgender np ! c ;
|
||||||
|
isPron = False ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
-- Determiners can form noun phrases directly.
|
-- Determiners can form noun phrases directly.
|
||||||
@@ -198,7 +201,7 @@ concrete NounSom of Noun = CatSom ** open ResSom, Prelude in {
|
|||||||
True => qnt.shortPoss ! art ;
|
True => qnt.shortPoss ! art ;
|
||||||
_ => qnt.s ! sg n2.gda ! Abs } ;
|
_ => qnt.s ! sg n2.gda ! Abs } ;
|
||||||
noun = case np.isPron of {
|
noun = case np.isPron of {
|
||||||
True => (pronTable ! np.a).sp ; -- long subject pronoun
|
True => (pronTable ! np.a).sp ! Abs ; -- long subject pronoun
|
||||||
False => np.s ! Abs }
|
False => np.s ! Abs }
|
||||||
in noun ++ cn.s ! Def num ++ BIND ++ det ;
|
in noun ++ cn.s ! Def num ++ BIND ++ det ;
|
||||||
isPoss = True} ;
|
isPoss = True} ;
|
||||||
|
|||||||
@@ -156,6 +156,12 @@ oper
|
|||||||
getNum : Agreement -> Number = \a ->
|
getNum : Agreement -> Number = \a ->
|
||||||
case a of { Sg1|Sg2|Sg3 _ => Sg ; _ => Pl } ;
|
case a of { Sg1|Sg2|Sg3 _ => Sg ; _ => Pl } ;
|
||||||
|
|
||||||
|
plAgr : Agreement -> Agreement = \agr ->
|
||||||
|
case agr of { Sg1 => Pl1 Excl ;
|
||||||
|
Sg2 => Pl2 ;
|
||||||
|
Sg3 _ => Pl3 ;
|
||||||
|
agr => agr } ;
|
||||||
|
|
||||||
agr2pagr : Agreement -> PrepAgr = \a -> case a of {
|
agr2pagr : Agreement -> PrepAgr = \a -> case a of {
|
||||||
Sg1 => Sg1_Prep ;
|
Sg1 => Sg1_Prep ;
|
||||||
Sg2 => Sg2_Prep ;
|
Sg2 => Sg2_Prep ;
|
||||||
@@ -164,6 +170,14 @@ oper
|
|||||||
_ => P3_Prep
|
_ => P3_Prep
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
pagr2agr : PrepAgr -> Agreement = \a -> case a of {
|
||||||
|
Sg1_Prep => Sg1 ;
|
||||||
|
Sg2_Prep => Sg2 ;
|
||||||
|
Pl1_Prep i => Pl1 i ;
|
||||||
|
Pl2_Prep => Pl2 ;
|
||||||
|
_ => Pl3
|
||||||
|
} ;
|
||||||
|
|
||||||
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} ;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ concrete PhraseSom of Phrase = CatSom ** open Prelude, ResSom in {
|
|||||||
UttInterj i = i ;
|
UttInterj i = i ;
|
||||||
|
|
||||||
NoPConj = {s = []} ;
|
NoPConj = {s = []} ;
|
||||||
PConjConj conj = { s = conj.s1 ++ conj.s2 } ;
|
PConjConj conj = {s = conj.s1 ++ conj.s2 ! Indefinite} ;
|
||||||
|
|
||||||
NoVoc = {s = []} ;
|
NoVoc = {s = []} ;
|
||||||
VocNP np = { s = "," ++ np.s ! Abs } ; --TODO: vocative exists
|
VocNP np = { s = "," ++ np.s ! Abs } ; --TODO: vocative exists
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ lin
|
|||||||
{-
|
{-
|
||||||
-- Sayeed p. 95-96 + ch 8
|
-- Sayeed p. 95-96 + ch 8
|
||||||
Reduced present general in relative clauses; as absolutive
|
Reduced present general in relative clauses; as absolutive
|
||||||
1/2SG/3SG M/2PL/3PL sugá -- same as imperative (TODO check if for all conjugations)
|
1/2SG/3SG M/2PL/3PL sugá (VRel Masc)
|
||||||
3 SG F sugtá -- not yet in the grammar
|
3 SG F sugtá (VRel Fem)
|
||||||
1PL sugná -- not yet in the grammar
|
1PL sugná -- not yet in the grammar
|
||||||
|
|
||||||
(18) (a) nimánka buugágga keená men-the books-the bring
|
(18) (a) nimánka buugágga keená men-the books-the bring
|
||||||
|
|||||||
@@ -134,6 +134,7 @@ oper
|
|||||||
BaseNP : Type = {
|
BaseNP : Type = {
|
||||||
a : Agreement ;
|
a : Agreement ;
|
||||||
isPron : Bool ;
|
isPron : Bool ;
|
||||||
|
st : State ;
|
||||||
empty : Str ;
|
empty : Str ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
@@ -145,13 +146,17 @@ oper
|
|||||||
let pagr : PrepAgr = agr2pagr np.a in
|
let pagr : PrepAgr = agr2pagr 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 = pagr} ;
|
||||||
-- <True,True> => {s = np.empty ++ (pronTable ! np.a).sp ; a = pagr} ; -- uncomment if you want to add long object pronoun for 3rd person object
|
-- <True,True> => {s = objpron np ! Abs ; a = pagr} ; -- 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 = pagr} } ; -- no long object for other pronouns
|
||||||
|
|
||||||
|
objpron : NounPhrase -> Case => Str = \np -> case np.isPron of {
|
||||||
|
True => \\c => np.empty ++ (pronTable ! np.a).sp ! c ;
|
||||||
|
False => np.s} ;
|
||||||
|
|
||||||
useN : Noun -> CNoun ** BaseNP = \n -> n **
|
useN : Noun -> CNoun ** BaseNP = \n -> n **
|
||||||
{ mod = \\_,_ => [] ; hasMod = False ;
|
{ mod = \\_,_ => [] ; hasMod = False ;
|
||||||
a = Sg3 (gender n) ; isPron,isPoss = False ;
|
a = Sg3 (gender n) ; isPron,isPoss = False ;
|
||||||
empty = [] ;
|
empty = [] ; st = Indefinite
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
emptyNP : NounPhrase = {
|
emptyNP : NounPhrase = {
|
||||||
@@ -159,6 +164,7 @@ oper
|
|||||||
a = Pl3 ;
|
a = Pl3 ;
|
||||||
isPron = False ;
|
isPron = False ;
|
||||||
empty = [] ;
|
empty = [] ;
|
||||||
|
st = Indefinite
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
impersNP : NounPhrase = emptyNP ** {
|
impersNP : NounPhrase = emptyNP ** {
|
||||||
@@ -175,62 +181,62 @@ oper
|
|||||||
sp : GenNum => Str ; -- independent forms, e.g. M:kayga F:tayda Pl:kuwayga
|
sp : GenNum => Str ; -- independent forms, e.g. M:kayga F:tayda Pl:kuwayga
|
||||||
short : DefArticle => Str -- short possessive suffix: e.g. family members, my/your name
|
short : DefArticle => Str -- short possessive suffix: e.g. family members, my/your name
|
||||||
} ;
|
} ;
|
||||||
sp : Str ;
|
sp : Case => Str ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
pronTable : Agreement => Pronoun = table {
|
pronTable : Agreement => Pronoun = table {
|
||||||
Sg1 => {
|
Sg1 => {
|
||||||
s = table {Nom => "aan" ; Abs => "i"} ;
|
s = table {Nom => "aan" ; Abs => "i"} ;
|
||||||
a = Sg1 ; isPron = True ; sp = "aniga" ;
|
a = Sg1 ; isPron = True ; sp = table {Nom => "anigu" ; _ =>"aniga"} ;
|
||||||
empty = [] ;
|
empty = [] ; st = Definite ;
|
||||||
poss = {s = quantTable "ayg" "ayd" ; short = quantTable "ay" ; sp = gnTable "ayg" "ayd" "uwayg"}
|
poss = {s = quantTable "ayg" "ayd" ; short = quantTable "ay" ; sp = gnTable "ayg" "ayd" "uwayg"}
|
||||||
} ;
|
} ;
|
||||||
Sg2 => {
|
Sg2 => {
|
||||||
s = table {Nom => "aad" ; Abs => "ku"} ;
|
s = table {Nom => "aad" ; Abs => "ku"} ;
|
||||||
a = Sg2 ; isPron = True ; sp ="adiga" ;
|
a = Sg2 ; isPron = True ; sp = table {Nom => "adigu" ; _ => "adiga"} ;
|
||||||
empty = [] ;
|
empty = [] ; st = Definite ;
|
||||||
poss = {s = quantTable "aag" "aad" ; short = quantTable "aa" ; sp = gnTable "aag" "aad" "uwaag"}
|
poss = {s = quantTable "aag" "aad" ; short = quantTable "aa" ; sp = gnTable "aag" "aad" "uwaag"}
|
||||||
} ;
|
} ;
|
||||||
Sg3 Masc => {
|
Sg3 Masc => {
|
||||||
s = table {Nom => "uu" ; Abs => []} ;
|
s = table {Nom => "uu" ; Abs => []} ;
|
||||||
a = Sg3 Masc ; isPron = True ; sp ="isaga" ;
|
a = Sg3 Masc ; isPron = True ; sp = table {Nom => "isagu" ; _ => "isaga"} ;
|
||||||
empty = [] ;
|
empty = [] ; st = Definite ;
|
||||||
poss = {s, short = quantTable "iis" ; sp = gnTable "iis" "iis" "uwiis"}
|
poss = {s, short = quantTable "iis" ; sp = gnTable "iis" "iis" "uwiis"}
|
||||||
} ;
|
} ;
|
||||||
Sg3 Fem => {
|
Sg3 Fem => {
|
||||||
s = table {Nom => "ay" ; Abs => []} ;
|
s = table {Nom => "ay" ; Abs => []} ;
|
||||||
a = Sg3 Fem ; isPron = True ; sp = "iyada" ;
|
a = Sg3 Fem ; isPron = True ; sp = table {Nom => "iyadu" ; _ => "iyada"} ;
|
||||||
empty = [] ;
|
empty = [] ; st = Definite ;
|
||||||
poss = {s, short = quantTable "eed" ; sp = gnTable "eed" "eed" "uweed"}
|
poss = {s, short = quantTable "eed" ; sp = gnTable "eed" "eed" "uweed"}
|
||||||
} ;
|
} ;
|
||||||
Pl1 Excl => {
|
Pl1 Excl => {
|
||||||
s = table {Nom => "aan" ; Abs => "na"} ;
|
s = table {Nom => "aan" ; Abs => "na"} ;
|
||||||
a = Pl1 Excl ; isPron = True ; sp ="annaga" ;
|
a = Pl1 Excl ; isPron = True ; sp = table {Nom => "annagu" ; _ => "annaga"} ;
|
||||||
empty = [] ;
|
empty = [] ; st = Definite ;
|
||||||
poss = {s = quantTable "eenn" ; short = quantTable "een" ; sp = gnTable "eenn" "eenn" "uweenn"}
|
poss = {s = quantTable "eenn" ; short = quantTable "een" ; sp = gnTable "eenn" "eenn" "uweenn"}
|
||||||
} ;
|
} ;
|
||||||
Pl1 Incl => {
|
Pl1 Incl => {
|
||||||
s = table {Nom => "aynu" ; Abs => "ina"} ;
|
s = table {Nom => "aynu" ; Abs => "ina"} ;
|
||||||
a = Pl1 Incl ; isPron = True ; sp ="innaga" ;
|
a = Pl1 Incl ; isPron = True ; sp = table {Nom => "innagu" ; _ => "innaga"} ;
|
||||||
empty = [] ;
|
empty = [] ; st = Definite ;
|
||||||
poss = {s = quantTable "eenn" ; short = quantTable "een" ; sp = gnTable "eenn" "eenn" "uweenn"}
|
poss = {s = quantTable "eenn" ; short = quantTable "een" ; sp = gnTable "eenn" "eenn" "uweenn"}
|
||||||
} ;
|
} ;
|
||||||
Pl2 => {
|
Pl2 => {
|
||||||
s = table {Nom => "aad" ; Abs => "idin"} ;
|
s = table {Nom => "aad" ; Abs => "idin"} ;
|
||||||
a = Pl2 ; isPron = True ; sp ="idinka" ;
|
a = Pl2 ; isPron = True ; sp = table {Nom => "idinku" ; _ => "idinka"} ;
|
||||||
empty = [] ;
|
empty = [] ; st = Definite ;
|
||||||
poss = {s = quantTable "iinn" ; short = quantTable "iin" ; sp = gnTable "iinn" "iinn" "uwiinn"}
|
poss = {s = quantTable "iinn" ; short = quantTable "iin" ; sp = gnTable "iinn" "iinn" "uwiinn"}
|
||||||
} ;
|
} ;
|
||||||
Pl3 => {
|
Pl3 => {
|
||||||
s = table {Nom => "ay" ; Abs => []} ;
|
s = table {Nom => "ay" ; Abs => []} ;
|
||||||
a = Pl3 ; isPron = True ; sp = "iyaga" ;
|
a = Pl3 ; isPron = True ; sp = table {Nom => "iyagu" ; _ => "iyaga"} ;
|
||||||
empty = [] ;
|
empty = [] ; st = Definite ;
|
||||||
poss = {s, short = quantTable "ood" ; sp = gnTable "ood" "ood" "uwood"}
|
poss = {s, short = quantTable "ood" ; sp = gnTable "ood" "ood" "uwood"}
|
||||||
} ;
|
} ;
|
||||||
Impers => {
|
Impers => {
|
||||||
s = table {Nom => "la" ; Abs => "la"} ;
|
s = table {Nom => "la" ; Abs => "la"} ;
|
||||||
a = Impers ; isPron = True ; sp = "" ;
|
a = Impers ; isPron = True ; sp = \\_ => "" ;
|
||||||
empty = [] ;
|
empty = [] ; st = Definite ;
|
||||||
poss = {s, short = quantTable "??" ; sp = gnTable "??" "??" "??"}
|
poss = {s, short = quantTable "??" ; sp = gnTable "??" "??" "??"}
|
||||||
}
|
}
|
||||||
} ;
|
} ;
|
||||||
@@ -798,13 +804,14 @@ oper
|
|||||||
_ => o
|
_ => o
|
||||||
-- object pronoun, prepositions and negation all contract
|
-- object pronoun, prepositions and negation all contract
|
||||||
} ;
|
} ;
|
||||||
stm : Str = case cltyp of {
|
stm : {p1,p2 : Str} = case cltyp of {
|
||||||
Subord => if_then_Pol p [] "aan" ++ subjpron ; -- if we form a ClSlash, no sentence type marker; negation with aan (Sayeed p. 210)
|
Subord => {p1 = if_then_Pol p [] "aan" ; -- if we form a ClSlash, no sentence type marker; negation with aan (Sayeed p. 210)
|
||||||
Question => "ma" ; -- TODO find out how negative questions work
|
p2 = if_then_Pol p subjpron []} ;
|
||||||
|
Question => {p1 = "ma" ; p2 = []} ; -- TODO find out how negative questions work
|
||||||
Statement => case <p,vp.pred,subj.a> of {
|
Statement => case <p,vp.pred,subj.a> of {
|
||||||
<Pos,Copula|NoCopula,Sg3 _|Impers> => "waa" ;
|
<Pos,Copula|NoCopula,Sg3 _|Impers> => {p1 = "waa" ; p2 = []} ;
|
||||||
_ => 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 = case isPassive vps of {
|
||||||
True => complSlash (insertComp vps np) ;
|
True => complSlash (insertComp vps np) ;
|
||||||
@@ -812,13 +819,14 @@ oper
|
|||||||
subj = case isPassive vps of {True => impersNP ; _ => np}
|
subj = case isPassive vps of {True => impersNP ; _ => np}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
wordOrder : (sn,sp,stm : Str) -> {p1,p2 : Str} -> {fin,inf : Str} -> VerbPhrase -> BaseCl =
|
wordOrder : (sn,sp : Str) -> (stm,obj : {p1,p2 : Str}) -> {fin,inf : Str} -> VerbPhrase -> BaseCl =
|
||||||
\subjnoun,subjpron,stm,obj,pred,vp -> {
|
\subjnoun,subjpron,stm,obj,pred,vp -> {
|
||||||
beforeSTM = vp.berri -- AdV
|
beforeSTM = vp.berri -- AdV
|
||||||
++ subjnoun -- subject if it's a noun
|
++ subjnoun -- subject if it's a noun
|
||||||
++ obj.p1 ; -- object if it's a noun
|
++ obj.p1 ; -- object if it's a noun
|
||||||
stm = stm ; -- sentence type marker + possible subj. pronoun
|
stm = stm.p1 ; -- sentence type marker
|
||||||
afterSTM = obj.p2 -- object if it's a pronoun
|
afterSTM = stm.p2 -- possible subj. pronoun
|
||||||
|
++ obj.p2 -- 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
|
||||||
++ vp.secObj -- "second object"
|
++ vp.secObj -- "second object"
|
||||||
@@ -866,10 +874,10 @@ oper
|
|||||||
let stm = if_then_Pol b "w" "m"
|
let stm = if_then_Pol b "w" "m"
|
||||||
in stm + subjpron ! a ;
|
in stm + subjpron ! a ;
|
||||||
|
|
||||||
stmarkerNoContr : Agreement => Polarity => Str = \\a,p =>
|
stmarkerNoContr : Agreement => Polarity => {p1,p2 : Str} = \\a,p =>
|
||||||
case p of {
|
case p of {
|
||||||
Pos => "waa" ++ subjpron ! a ;
|
Pos => {p1 = "waa" ; p2 = subjpron ! a} ;
|
||||||
Neg => "ma" } ;
|
Neg => {p1 = "ma" ; p2 = []} } ;
|
||||||
|
|
||||||
subjpron : Agreement => Str = table {
|
subjpron : Agreement => Str = table {
|
||||||
Sg1|Pl1 Excl => "aan" ;
|
Sg1|Pl1 Excl => "aan" ;
|
||||||
@@ -884,8 +892,9 @@ oper
|
|||||||
|
|
||||||
oper
|
oper
|
||||||
linVP : VForm -> VerbPhrase -> Str = \vf,vp ->
|
linVP : VForm -> VerbPhrase -> Str = \vf,vp ->
|
||||||
let inf = {inf = vp.s ! vf ; fin=[]} ;
|
let vp' = complSlash vp ;
|
||||||
wo = wordOrder [] [] [] (vp.comp ! Pl3) inf vp ;
|
inf = {inf = vp.s ! vf ; fin=[]} ;
|
||||||
|
wo = wordOrder [] [] {p1,p2=[]} (vp'.comp ! pagr2agr vp.obj2.a) inf vp' ;
|
||||||
in wo.beforeSTM ++ wo.afterSTM ;
|
in wo.beforeSTM ++ wo.afterSTM ;
|
||||||
|
|
||||||
linCN : CNoun -> Str = \cn -> cn.s ! NomSg ++ cn.mod ! Sg ! Abs ;
|
linCN : CNoun -> Str = \cn -> cn.s ! NomSg ++ cn.mod ! Sg ! Abs ;
|
||||||
|
|||||||
@@ -27,7 +27,10 @@ lin
|
|||||||
|
|
||||||
-}
|
-}
|
||||||
-- : Temp -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen
|
-- : Temp -> Pol -> ClSlash -> SSlash ; -- (that) she had not seen
|
||||||
--UseSlash t p cls = {s = \\b => t.s ++ p.s ++ cls.s ! b ! t.t ! t.a ! p.p} ;
|
UseSlash t p cls = {s = \\b =>
|
||||||
|
let sent = cls.s ! b ! t.t ! t.a ! p.p in
|
||||||
|
sent ** {beforeSTM = t.s ++ p.s ++ sent.beforeSTM}
|
||||||
|
} ;
|
||||||
|
|
||||||
--2 Imperatives
|
--2 Imperatives
|
||||||
-- : VP -> Imp ;
|
-- : VP -> Imp ;
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ lin there_Adv = ss "" ;
|
|||||||
-------
|
-------
|
||||||
-- Conj
|
-- Conj
|
||||||
|
|
||||||
lin and_Conj = {s1 = "oo" ; s2 = [] ; n = Pl} ;
|
lin and_Conj = {s2 = table {Definite => "ee" ; Indefinite => "oo"} ; s1 = [] ; n = Pl} ;
|
||||||
lin or_Conj = {s1 = "ama" ; s2 = [] ; n = Sg} ; -- mise with interrogatives
|
lin or_Conj = {s2 = \\_ => "ama" ; s1 = [] ; n = Sg} ; -- mise with interrogatives
|
||||||
-- lin if_then_Conj = mkConj
|
-- lin if_then_Conj = mkConj
|
||||||
-- lin both7and_DConj = mkConj "" "" pl ;
|
-- lin both7and_DConj = mkConj "" "" pl ;
|
||||||
-- lin either7or_DConj = mkConj "" "" pl ;
|
-- lin either7or_DConj = mkConj "" "" pl ;
|
||||||
@@ -118,7 +118,7 @@ lin with_Prep = mkPrep la ;
|
|||||||
-- Pron
|
-- Pron
|
||||||
|
|
||||||
-- Pronouns are closed class, no constructor in ParadigmsSom.
|
-- Pronouns are closed class, no constructor in ParadigmsSom.
|
||||||
it_Pron = he_Pron ** {s = \\_ => [] ; sp = [] ; a = Impers} ;
|
it_Pron = he_Pron ** {s = \\_ => [] ; sp = \\_ => [] ; a = Impers} ;
|
||||||
i_Pron = pronTable ! Sg1 ;
|
i_Pron = pronTable ! Sg1 ;
|
||||||
youPol_Pron,
|
youPol_Pron,
|
||||||
youSg_Pron = pronTable ! Sg2 ;
|
youSg_Pron = pronTable ! Sg2 ;
|
||||||
|
|||||||
Reference in New Issue
Block a user