forked from GitHub/gf-rgl
(Pes) Cleanup + automatic whitespace removal
This commit is contained in:
@@ -22,9 +22,9 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
|
|||||||
|
|
||||||
---- Question
|
---- Question
|
||||||
QCl = {s : ResPes.VPHTense => Polarity => QForm => Str} ;
|
QCl = {s : ResPes.VPHTense => Polarity => QForm => Str} ;
|
||||||
|
|
||||||
IP = {s: Str ; n : Number};
|
IP = {s: Str ; n : Number};
|
||||||
|
|
||||||
-- IDet = {s :Number => Str } ;
|
-- IDet = {s :Number => Str } ;
|
||||||
IDet = {s : Str ; n : Number ; isNum : Bool} ;
|
IDet = {s : Str ; n : Number ; isNum : Bool} ;
|
||||||
IQuant = {s : Str ; n : Number } ;
|
IQuant = {s : Str ; n : Number } ;
|
||||||
@@ -32,7 +32,7 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
|
|||||||
---- Relative
|
---- Relative
|
||||||
|
|
||||||
RCl = {
|
RCl = {
|
||||||
s : ResPes.VPHTense => Polarity => Order => AgrPes => Str ;
|
s : ResPes.VPHTense => Polarity => Order => AgrPes => Str ;
|
||||||
-- c : Case
|
-- c : Case
|
||||||
} ;
|
} ;
|
||||||
RP = {s: Str ; a:RAgr};
|
RP = {s: Str ; a:RAgr};
|
||||||
@@ -43,8 +43,8 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
|
|||||||
|
|
||||||
VPSlash = ResPes.VPHSlash ;
|
VPSlash = ResPes.VPHSlash ;
|
||||||
Comp = {s : AgrPes => Str} ;
|
Comp = {s : AgrPes => Str} ;
|
||||||
|
|
||||||
---- Adv
|
---- Adv
|
||||||
Adv = {s : Str} ;
|
Adv = {s : Str} ;
|
||||||
|
|
||||||
---- Adjective
|
---- Adjective
|
||||||
@@ -82,15 +82,15 @@ concrete CatPes of Cat = CommonX - [Adv] ** open ResPes, Prelude in {
|
|||||||
|
|
||||||
V2, V2A, V2Q, V2S = ResPes.Verb ** {c2 : Compl} ;
|
V2, V2A, V2Q, V2S = ResPes.Verb ** {c2 : Compl} ;
|
||||||
V3 = ResPes.Verb ** {c2, c3 : Str} ;
|
V3 = ResPes.Verb ** {c2, c3 : Str} ;
|
||||||
VV = ResPes.Verb ** { isAux : Bool} ;
|
VV = ResPes.Verb ** {isAux : Bool} ;
|
||||||
V2V = ResPes.Verb ** {c1 : Str ; c2 : Str ; isAux : Bool} ;
|
V2V = ResPes.Verb ** {c1 : Str ; c2 : Str ; isAux : Bool} ;
|
||||||
A = ResPes.Adjective ; --- {s : Gender => Number => Case => Str} ;
|
A = ResPes.Adjective ; --- {s : Gender => Number => Case => Str} ;
|
||||||
A2 = ResPes.Adjective ** { c2 : Str} ;
|
A2 = ResPes.Adjective ** { c2 : Str} ;
|
||||||
|
|
||||||
N = {s : Ezafa => Number => Str ; animacy : Animacy ; definitness : Bool} ;
|
|
||||||
|
|
||||||
N2 = {s : Ezafa => Number => Str ; animacy : Animacy ; definitness : Bool} ** {c : Str};
|
N = ResPes.Noun ;
|
||||||
N3 = {s : Ezafa => Number => Str ; animacy : Animacy ; definitness : Bool} ** {c2 : Str ; c3 : Str } ;
|
|
||||||
|
N2 = ResPes.Noun ** {c : Str};
|
||||||
|
N3 = ResPes.Noun ** {c2 : Str ; c3 : Str} ;
|
||||||
PN = {s : Str ; animacy : Animacy} ;
|
PN = {s : Str ; animacy : Animacy} ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
--# -path=.:../abstract:../common:../hindustani
|
--# -path=.:../abstract:../common
|
||||||
|
|
||||||
concrete LangPes of Lang =
|
concrete LangPes of Lang =
|
||||||
GrammarPes,
|
GrammarPes
|
||||||
LexiconPes
|
,LexiconPes
|
||||||
** {
|
** {
|
||||||
|
|
||||||
flags startcat = Phr ; unlexer=unwords ; lexer=words ;
|
flags startcat = Phr ; unlexer=unwords ; lexer=words ;
|
||||||
|
|||||||
@@ -11,34 +11,26 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
|
|||||||
<True,False> => det.s ++ cn.s ! bEzafa ! Sg
|
<True,False> => det.s ++ cn.s ! bEzafa ! Sg
|
||||||
};
|
};
|
||||||
a = agrPesP3 det.n ;
|
a = agrPesP3 det.n ;
|
||||||
animacy = cn.animacy
|
animacy = cn.animacy
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
UsePN pn = {s = \\_ => pn.s ; a = agrPesP3 Sg ; animacy = pn.animacy } ;
|
UsePN pn = {s = \\_ => pn.s ; a = agrPesP3 Sg ; animacy = pn.animacy } ;
|
||||||
UsePron p = {s = \\_ => p.s ; a = p.a ; animacy = Animate} ;
|
UsePron p = {s = \\_ => p.s ; a = p.a ; animacy = Animate} ;
|
||||||
|
|
||||||
PredetNP pred np = {
|
PredetNP pred np = np ** {
|
||||||
s = \\ez => pred.s ++ np.s ! ez ;
|
s = \\ez => pred.s ++ np.s ! ez
|
||||||
a = np.a;
|
|
||||||
animacy = np.animacy
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
PPartNP np v2 = {
|
PPartNP np v2 = np ** {
|
||||||
s = \\ez => np.s ! ez ++ partNP (v2.s ! Root1) ;
|
s = \\ez => np.s ! ez ++ partNP (v2.s ! Root1)
|
||||||
a = np.a ;
|
|
||||||
animacy = np.animacy
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
RelNP np rs = {
|
RelNP np rs = np ** {
|
||||||
s = \\ez => np.s ! ez ++ rs.s ! np.a ;
|
s = \\ez => np.s ! ez ++ rs.s ! np.a
|
||||||
a = np.a ;
|
|
||||||
animacy = np.animacy
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdvNP np adv = {
|
AdvNP np adv = np ** {
|
||||||
s = \\ez => np.s ! NPC aEzafa ++ adv.s ;
|
s = \\ez => np.s ! NPC aEzafa ++ adv.s
|
||||||
a = np.a ;
|
|
||||||
animacy = np.animacy
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
DetQuantOrd quant num ord = {
|
DetQuantOrd quant num ord = {
|
||||||
@@ -84,7 +76,7 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
|
|||||||
MassNP cn = {s =\\c => case c of {
|
MassNP cn = {s =\\c => case c of {
|
||||||
NPC bEzafa => cn.s ! bEzafa ! Sg ;
|
NPC bEzafa => cn.s ! bEzafa ! Sg ;
|
||||||
NPC aEzafa => cn.s ! aEzafa ! Sg ;
|
NPC aEzafa => cn.s ! aEzafa ! Sg ;
|
||||||
NPC enClic => cn.s ! enClic ! Sg
|
NPC enClic => cn.s ! enClic ! Sg
|
||||||
};
|
};
|
||||||
a = agrPesP3 Sg ;
|
a = agrPesP3 Sg ;
|
||||||
animacy = cn.animacy
|
animacy = cn.animacy
|
||||||
@@ -92,7 +84,7 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
|
|||||||
|
|
||||||
UseN n = n ;
|
UseN n = n ;
|
||||||
UseN2 n = n ;
|
UseN2 n = n ;
|
||||||
|
|
||||||
Use2N3 f = {
|
Use2N3 f = {
|
||||||
s = f.s;
|
s = f.s;
|
||||||
c = f.c2;
|
c = f.c2;
|
||||||
@@ -111,30 +103,26 @@ concrete NounPes of Noun = CatPes ** open ResPes, Prelude in {
|
|||||||
s = \\ez,n => f.s ! ez ! n ++ f.c ++ x.s ! NPC ez ;
|
s = \\ez,n => f.s ! ez ! n ++ f.c ++ x.s ! NPC ez ;
|
||||||
animacy = f.animacy;
|
animacy = f.animacy;
|
||||||
definitness = True
|
definitness = True
|
||||||
};
|
};
|
||||||
ComplN3 f x = {
|
ComplN3 f x = {
|
||||||
s = \\ez,n => f.s ! ez ! n ++ f.c2 ++ x.s ! NPC ez ;
|
s = \\ez,n => f.s ! ez ! n ++ f.c2 ++ x.s ! NPC ez ;
|
||||||
c = f.c3;
|
c = f.c3;
|
||||||
animacy = f.animacy;
|
animacy = f.animacy;
|
||||||
definitness = True;
|
definitness = True;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdjCN ap cn = {
|
AdjCN ap cn = cn ** {
|
||||||
s = \\ez,n => cn.s ! aEzafa ! n ++ ap.s ! ez; -- check the form of adjective and also cn.s!ez!n changed from cn.s!aEzafa!n to have correct enclicitic form other wise it creats wrong enclictic form of old man
|
s = \\ez,n => cn.s ! aEzafa ! n ++ ap.s ! ez -- check the form of adjective and also cn.s!ez!n changed from cn.s!aEzafa!n to have correct enclicitic form other wise it creats wrong enclictic form of old man
|
||||||
animacy = cn.animacy ;
|
|
||||||
definitness = cn.definitness
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
RelCN cn rs = {
|
RelCN cn rs = cn ** {
|
||||||
s = \\ez,n => cn.s ! enClic ! n ++ rs.s ! agrPesP3 n ;
|
s = \\ez,n => cn.s ! enClic ! n ++ rs.s ! agrPesP3 n ;
|
||||||
animacy = cn.animacy ;
|
|
||||||
definitness = cn.definitness
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
AdvCN cn ad = {s = \\ez,n => cn.s ! aEzafa ! n ++ ad.s ; animacy = cn.animacy ; definitness = cn.definitness} ;
|
|
||||||
|
|
||||||
SentCN cn sc = {s = \\ez,n => cn.s ! ez ! n ++ sc.s ; animacy = cn.animacy ; definitness = cn.definitness} ;
|
AdvCN cn ad = cn ** {s = \\ez,n => cn.s ! aEzafa ! n ++ ad.s} ;
|
||||||
|
|
||||||
ApposCN cn np = {s = \\ez,n => cn.s ! ez ! n ++ np.s ! NPC aEzafa ; animacy = cn.animacy ; definitness = True} ; -- ezafa form of city to be used
|
SentCN cn sc = cn ** {s = \\ez,n => cn.s ! ez ! n ++ sc.s} ;
|
||||||
|
|
||||||
|
ApposCN cn np = cn ** {s = \\ez,n => cn.s ! ez ! n ++ np.s ! NPC aEzafa ; definitness = True} ; -- ezafa form of city to be used
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,24 +2,24 @@
|
|||||||
--
|
--
|
||||||
----1 Pnbu Lexical Paradigms
|
----1 Pnbu Lexical Paradigms
|
||||||
|
|
||||||
resource ParadigmsPes = open
|
resource ParadigmsPes = open
|
||||||
Predef,
|
Predef,
|
||||||
Prelude,
|
Prelude,
|
||||||
MorphoPes,
|
MorphoPes,
|
||||||
CatPes
|
CatPes
|
||||||
in {
|
in {
|
||||||
|
|
||||||
flags optimize=all ;
|
flags optimize=all ;
|
||||||
coding = utf8;
|
coding = utf8;
|
||||||
|
|
||||||
--2 Parameters
|
--2 Parameters
|
||||||
|
|
||||||
oper
|
oper
|
||||||
animate : Animacy ;
|
animate : Animacy ;
|
||||||
inanimate : Animacy ;
|
inanimate : Animacy ;
|
||||||
singular : Number;
|
singular : Number;
|
||||||
plural : Number;
|
plural : Number;
|
||||||
|
|
||||||
singular = Sg ; plural = Pl;
|
singular = Sg ; plural = Pl;
|
||||||
|
|
||||||
animate = Animate ; inanimate = Inanimate ; --i
|
animate = Animate ; inanimate = Inanimate ; --i
|
||||||
@@ -37,110 +37,111 @@ oper
|
|||||||
|
|
||||||
|
|
||||||
mkN2 : N -> Prep -> Str -> N2;
|
mkN2 : N -> Prep -> Str -> N2;
|
||||||
mkN2 = \n,p,c -> n ** {lock_N2 = <> ; c2 = p.s ; c3 = c } ;
|
mkN2 = \n,p,c -> n ** {lock_N2 = <> ; c2 = p.s ; c3 = c } ;
|
||||||
|
|
||||||
mkN3 : N -> Prep -> Str -> Str-> N3 ;
|
mkN3 : N -> Prep -> Str -> Str-> N3 ;
|
||||||
mkN3 = \n,p,q,r -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q ; c4 = r} ;
|
mkN3 = \n,p,q,r -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q ; c4 = r} ;
|
||||||
-}
|
-}
|
||||||
-- Compound Nouns
|
-- Compound Nouns
|
||||||
|
|
||||||
mkCmpdNoun1 : Str -> N -> N
|
mkCmpdNoun1 : Str -> N -> N
|
||||||
= \s,noun -> {s =\\ez,n => s ++ noun.s ! ez ! n ; animacy = noun.animacy ; definitness = noun.definitness ; lock_N = <>};
|
= \s,noun -> noun ** {s =\\ez,n => s ++ noun.s ! ez ! n};
|
||||||
mkCmpdNoun2 : N -> Str -> N
|
mkCmpdNoun2 : N -> Str -> N
|
||||||
= \noun,s -> {s =\\ez,n => noun.s ! ez ! n ++ s ; animacy = noun.animacy ; definitness =noun.definitness ; lock_N = <>};
|
= \noun,s -> noun ** {s =\\ez,n => noun.s ! ez ! n ++ s};
|
||||||
|
|
||||||
|
|
||||||
-- Proper names
|
-- Proper names
|
||||||
mkPN : Str -> Animacy -> PN =
|
mkPN : Str -> Animacy -> PN
|
||||||
|
= \str,ani -> lin PN {s = str ; animacy = ani} ;
|
||||||
|
|
||||||
\str,ani -> {s = str ; animacy = ani ; lock_PN = <>} ;
|
|
||||||
|
|
||||||
|
-- Personal Pronouns
|
||||||
-- Personal Pronouns
|
personalPN : Str -> Number -> PPerson -> Pron
|
||||||
personalPN : Str -> Number -> PPerson -> Pron =
|
= \str,nn,p -> lin Pron {s = str ; a = AgPes nn p ; ps = str};
|
||||||
\str,nn,p -> {s = str ; a = AgPes nn p ; ps = str ; lock_Pron = <>};
|
|
||||||
{-
|
{-
|
||||||
-- Demonstration Pronouns
|
-- Demonstration Pronouns
|
||||||
demoPN : Str -> Str -> Str -> Quant =
|
demoPN : Str -> Str -> Str -> Quant =
|
||||||
\s1,s2,s3 -> let n = makeDemonPronForm s1 s2 s3 in {s = n.s ; a = defaultAgr ; lock_Quant = <>};
|
\s1,s2,s3 -> let n = makeDemonPronForm s1 s2 s3 in {s = n.s ; a = defaultAgr ; lock_Quant = <>};
|
||||||
-- Determiner
|
-- Determiner
|
||||||
-}
|
-}
|
||||||
mkDet = overload {
|
mkDet = overload {
|
||||||
mkDet : Str -> Number -> Det =
|
mkDet : Str -> Number -> Det
|
||||||
\s1,n -> makeDet s1 n False ** { lock_Det = <>};
|
= \s1,n -> lin Det (makeDet s1 n False);
|
||||||
mkDet : Str -> Number -> Bool -> Det =
|
mkDet : Str -> Number -> Bool -> Det
|
||||||
\s1,n,b -> makeDet s1 n b ** { lock_Det = <>};
|
= \s1,n,b -> lin Det (makeDet s1 n b)
|
||||||
};
|
};
|
||||||
{-
|
{-
|
||||||
-- Intergative pronouns
|
-- Intergative pronouns
|
||||||
mkIP : (x1,x2,x3,x4:Str) -> Number -> Gender -> IP =
|
mkIP : (x1,x2,x3,x4:Str) -> Number -> Gender -> IP =
|
||||||
\s1,s2,s3,s4,n,g -> let p = mkIntPronForm s1 s2 s3 s4 in { s = p.s ; n = n ; g = g ; lock_IP = <>};
|
\s1,s2,s3,s4,n,g -> let p = mkIntPronForm s1 s2 s3 s4 in { s = p.s ; n = n ; g = g ; lock_IP = <>};
|
||||||
|
|
||||||
-- AdN
|
-- AdN
|
||||||
mkAdN : Str -> AdN = \s -> ss s ;
|
mkAdN : Str -> AdN = \s -> ss s ;
|
||||||
-}
|
-}
|
||||||
--2 Adjectives
|
--2 Adjectives
|
||||||
|
|
||||||
mkA = overload {
|
mkA = overload {
|
||||||
mkA : Str-> A
|
mkA : Str -> A
|
||||||
= \str -> mkAdj str str ** { lock_A = <>} ;
|
= \str -> lin A (mkAdj str str);
|
||||||
mkA : Str-> Str -> A
|
mkA : Str-> Str -> A
|
||||||
= \str,adv -> mkAdj str adv ** { lock_A = <>} ;
|
= \str,adv -> lin A (mkAdj str adv);
|
||||||
mkA : Str -> Str -> A2
|
mkA : Str -> Str -> A2
|
||||||
= \a,c -> mkAdj a a ** { c2 = c ; lock_A2 = <>} ;
|
= \a,c -> lin A2 (mkAdj a a ** {c2 = c})
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
--2 Verbs
|
--2 Verbs
|
||||||
mkV : Str -> Str -> V
|
mkV : Str -> Str -> V
|
||||||
= \s1, s2 -> mkVerb s1 s2 ** {lock_V = <>} ;
|
= \s1, s2 -> mkVerb s1 s2 ** {lock_V = <>} ;
|
||||||
-- mkVerb takes both the Infinitive and the present root(root2) and is applied for iregular verbs
|
-- mkVerb takes both the Infinitive and the present root(root2) and is applied for iregular verbs
|
||||||
haveVerb : V = mkHave ;
|
haveVerb : V = mkHave ;
|
||||||
mkV_1 : Str -> V
|
mkV_1 : Str -> V
|
||||||
= \s -> mkVerb1 s ** {lock_V = <>} ;
|
= \s -> mkVerb1 s ** {lock_V = <>} ;
|
||||||
|
|
||||||
mkV_2 : Str -> V
|
|
||||||
= \s -> mkVerb2 s ** {lock_V = <>} ;
|
|
||||||
|
|
||||||
mkV2 = overload {
|
|
||||||
-- mkV2 : Str -> V2
|
|
||||||
-- = \s -> mkV s ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ;
|
|
||||||
mkV2 : V -> V2
|
|
||||||
= \v -> v ** {c2 = {s = [] ; ra = [] ; c = VTrans} ; lock_V2 = <>} ;
|
|
||||||
mkV2 : V -> Str -> V2
|
|
||||||
= \v,ra -> v ** {c2 = {ra = ra ; s = [] ; c = VTrans} ; lock_V2 = <>} ;
|
|
||||||
mkV2 : V -> Str -> Bool -> V2
|
|
||||||
= \v,p,b -> v ** {c2 = {ra = [] ; s = p ; c = VTrans} ; lock_V2 = <>} ;
|
|
||||||
} ;
|
|
||||||
|
|
||||||
mkV3 : V -> Str -> Str -> V3;
|
|
||||||
mkV3 v p q = v ** { c2 = p ; c3 = q ; lock_V3 = <>} ;
|
|
||||||
mkV2V : V -> Str -> Str -> Bool -> V2V ;
|
|
||||||
mkV2V v s1 s2 b = v ** {isAux = b ; c1 = s1 ; c2 = s2 ; lock_V2V = <>} ;
|
|
||||||
|
|
||||||
-- compund verbs
|
|
||||||
compoundV = overload {
|
|
||||||
compoundV : Str -> V -> V = \s,v -> {s = \\vf => s ++ v.s ! vf ; lock_V = <>} ;
|
|
||||||
compoundV : Str -> V2 -> V = \s,v -> {s = \\vf => s ++ v.s ! vf ; lock_V = <>} ;
|
|
||||||
};
|
|
||||||
|
|
||||||
invarV : Str -> V -- for verbs like " بایستن " ("must"), which don't inflect
|
mkV_2 : Str -> V
|
||||||
= \s -> lin V {s = \\_ => s} ;
|
= \s -> mkVerb2 s ** {lock_V = <>} ;
|
||||||
|
|
||||||
|
mkV2 = overload {
|
||||||
|
-- mkV2 : Str -> V2
|
||||||
|
-- = \s -> mkV s ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ;
|
||||||
|
mkV2 : V -> V2
|
||||||
|
= \v -> v ** {c2 = {s = [] ; ra = [] ; c = VTrans} ; lock_V2 = <>} ;
|
||||||
|
mkV2 : V -> Str -> V2
|
||||||
|
= \v,ra -> v ** {c2 = {ra = ra ; s = [] ; c = VTrans} ; lock_V2 = <>} ;
|
||||||
|
mkV2 : V -> Str -> Bool -> V2
|
||||||
|
= \v,p,b -> v ** {c2 = {ra = [] ; s = p ; c = VTrans} ; lock_V2 = <>} ;
|
||||||
|
} ;
|
||||||
|
|
||||||
|
mkV3 : V -> Str -> Str -> V3;
|
||||||
|
mkV3 v p q = lin V3 (v ** {c2 = p ; c3 = q}) ;
|
||||||
|
mkV2V : V -> Str -> Str -> Bool -> V2V ;
|
||||||
|
mkV2V v s1 s2 b = lin V2V (v ** {isAux = b ; c1 = s1 ; c2 = s2}) ;
|
||||||
|
|
||||||
|
-- compund verbs
|
||||||
|
compoundV = overload {
|
||||||
|
compoundV : Str -> V -> V
|
||||||
|
= \s,v -> v ** {s = \\vf => s ++ v.s ! vf} ;
|
||||||
|
compoundV : Str -> V2 -> V
|
||||||
|
= \s,v -> lin V {s = \\vf => s ++ v.s ! vf} ;
|
||||||
|
};
|
||||||
|
|
||||||
|
invarV : Str -> V -- for verbs like " بایستن " ("must"), which don't inflect
|
||||||
|
= \s -> lin V {s = \\_ => s} ;
|
||||||
|
|
||||||
----2 Adverbs
|
----2 Adverbs
|
||||||
mkAdv : Str -> Adv = \str -> {s = str ; lock_Adv = <>};
|
mkAdv : Str -> Adv = \str -> lin Adv {s = str} ;
|
||||||
|
|
||||||
----2 Prepositions
|
----2 Prepositions
|
||||||
|
|
||||||
mkPrep : Str -> Prep ;
|
mkPrep : Str -> Prep ;
|
||||||
mkPrep str = {s = str ; lock_Prep = <>};
|
mkPrep str = lin Prep {s = str};
|
||||||
{-
|
{-
|
||||||
--3 Determiners and quantifiers
|
--3 Determiners and quantifiers
|
||||||
|
|
||||||
-- mkQuant : overload {
|
-- mkQuant : overload {
|
||||||
-- mkQuant : Pron -> Quant ;
|
-- mkQuant : Pron -> Quant ;
|
||||||
-- mkQuant : (no_sg, no_pl, none_sg, : Str) -> Quant ;
|
-- mkQuant : (no_sg, no_pl, none_sg, : Str) -> Quant ;
|
||||||
-- } ;
|
-- } ;
|
||||||
-}
|
-}
|
||||||
mkQuant = overload {
|
mkQuant = overload {
|
||||||
-- mkQuant : Pron -> Quant = \p -> {s = \\_,_,c => p.s!c ;a = p.a ; lock_Quant = <>};
|
-- mkQuant : Pron -> Quant = \p -> {s = \\_,_,c => p.s!c ;a = p.a ; lock_Quant = <>};
|
||||||
mkQuant : Str -> Str -> Quant = \sg,pl -> makeQuant sg pl;
|
mkQuant : Str -> Str -> Quant = \sg,pl -> makeQuant sg pl;
|
||||||
@@ -160,14 +161,14 @@ oper
|
|||||||
mkConj : Str -> Str -> Number -> Conj = mk2Conj ;
|
mkConj : Str -> Str -> Number -> Conj = mk2Conj ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
|
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
|
||||||
lin Conj (sd2 x y ** {n = n}) ;
|
lin Conj (sd2 x y ** {n = n}) ;
|
||||||
|
|
||||||
-- mkV0 : V -> V0 ;
|
-- mkV0 : V -> V0 ;
|
||||||
-- mkVS : V -> VS ;
|
-- mkVS : V -> VS ;
|
||||||
-- mkV2S : V -> Prep -> V2S ;
|
-- mkV2S : V -> Prep -> V2S ;
|
||||||
mkVV : V -> VV = \v -> lin VV (v ** {isAux = False});
|
mkVV : V -> VV = \v -> lin VV (v ** {isAux = False});
|
||||||
|
|
||||||
|
|
||||||
-- mkV2V : V -> Prep -> Prep -> V2V ;
|
-- mkV2V : V -> Prep -> Prep -> V2V ;
|
||||||
-- mkVA : V -> VA ;
|
-- mkVA : V -> VA ;
|
||||||
@@ -179,30 +180,12 @@ oper
|
|||||||
-- mkA2S : A -> Prep -> A2S ;
|
-- mkA2S : A -> Prep -> A2S ;
|
||||||
-- mkAV : A -> AV ;
|
-- mkAV : A -> AV ;
|
||||||
-- mkA2V : A -> Prep -> A2V ;
|
-- mkA2V : A -> Prep -> A2V ;
|
||||||
-- mkA2V a p = a ** {c2 = p.s } ;
|
-- mkA2V a p = a ** {c2 = p.s } ;
|
||||||
--
|
--
|
||||||
---- Notice: Categories $V0, AS, A2S, AV, A2V$ are just $A$.
|
---- Notice: Categories $V0, AS, A2S, AV, A2V$ are just $A$.
|
||||||
---- $V0$ is just $V$; the second argument is treated as adverb.
|
---- $V0$ is just $V$; the second argument is treated as adverb.
|
||||||
--
|
--
|
||||||
-- V0 : Type ;
|
-- V0 : Type ;
|
||||||
-- AS, A2S, AV, A2V : Type ;
|
-- AS, A2S, AV, A2V : Type ;
|
||||||
--
|
--}
|
||||||
----.
|
}
|
||||||
----2 Definitions of paradigms
|
|
||||||
----
|
|
||||||
---- The definitions should not bother the user of the API. So they are
|
|
||||||
---- hidden from the document.
|
|
||||||
--
|
|
||||||
-- Gender = MorphoHin.Gender ;
|
|
||||||
-- Number = MorphoHin.Number ;
|
|
||||||
-- Case = MorphoHin.Case ;
|
|
||||||
-- human = Masc ;
|
|
||||||
-- nonhuman = Neutr ;
|
|
||||||
-- masculine = Masc ;
|
|
||||||
-- feminine = Fem ;
|
|
||||||
-- singular = Sg ;
|
|
||||||
-- plural = Pl ;
|
|
||||||
-- nominative = Nom ;
|
|
||||||
-- genitive = Gen ;
|
|
||||||
-}
|
|
||||||
}
|
|
||||||
@@ -6,33 +6,33 @@ concrete VerbPes of Verb = CatPes ** open ResPes in {
|
|||||||
lin
|
lin
|
||||||
UseV v = predV v ;
|
UseV v = predV v ;
|
||||||
SlashV2a v = predV v ** {c2 = {s = v.c2.s ; ra = v.c2.ra ; c = VTrans}} ;
|
SlashV2a v = predV v ** {c2 = {s = v.c2.s ; ra = v.c2.ra ; c = VTrans}} ;
|
||||||
Slash2V3 v np =
|
Slash2V3 v np =
|
||||||
insertObjc (\\_ => np.s ! NPC bEzafa ++ v.c2 ) (predV v ** {c2 = {s = [] ; ra = v.c3 ; c = VTrans}}) ;
|
insertObjc (\\_ => np.s ! NPC bEzafa ++ v.c2 ) (predV v ** {c2 = {s = [] ; ra = v.c3 ; c = VTrans}}) ;
|
||||||
|
|
||||||
Slash3V3 v np =
|
Slash3V3 v np =
|
||||||
insertObjc (\\_ => v.c3 ++ np.s ! NPC bEzafa) (predV v ** {c2 = {s = [] ; ra = v.c2 ; c = VTrans}}) ;
|
insertObjc (\\_ => v.c3 ++ np.s ! NPC bEzafa) (predV v ** {c2 = {s = [] ; ra = v.c2 ; c = VTrans}}) ;
|
||||||
|
|
||||||
ComplVV v vp = insertVV (infVV v.isAux vp).s (predV v) ;
|
ComplVV v vp = insertVV (infVV v.isAux vp).s (predV v) ;
|
||||||
ComplVS v s = insertObj2 (conjThat ++ s.s) (predV v) ;
|
ComplVS v s = insertObj2 (conjThat ++ s.s) (predV v) ;
|
||||||
ComplVQ v q = insertObj2 (conjThat ++ q.s ! QIndir) (predV v) ;
|
ComplVQ v q = insertObj2 (conjThat ++ q.s ! QIndir) (predV v) ;
|
||||||
ComplVA v ap = insertObj (\\_ => ap.s ! bEzafa) (predV v) ; -- check form of adjective
|
ComplVA v ap = insertObj (\\_ => ap.s ! bEzafa) (predV v) ; -- check form of adjective
|
||||||
SlashV2V v vp = insertVV (infVV v.isAux vp).s (predV v) **{c2 = {s = v.c1 ; ra = [] ; c = VTransPost}} ;
|
SlashV2V v vp = insertVV (infVV v.isAux vp).s (predV v) **{c2 = {s = v.c1 ; ra = [] ; c = VTransPost}} ;
|
||||||
|
|
||||||
SlashV2S v s = insertObjc2 (conjThat ++ s.s) (predV v ** {c2 = {s = v.c2.s ;ra = [] ; c = VTransPost}}) ;
|
SlashV2S v s = insertObjc2 (conjThat ++ s.s) (predV v ** {c2 = {s = v.c2.s ;ra = [] ; c = VTransPost}}) ;
|
||||||
SlashV2Q v q = insertObjc2 ( q.s ! QIndir) (predV v ** {c2 = {s = v.c2.s ; ra = [] ;c = VTransPost}}) ;
|
SlashV2Q v q = insertObjc2 ( q.s ! QIndir) (predV v ** {c2 = {s = v.c2.s ; ra = [] ;c = VTransPost}}) ;
|
||||||
SlashV2A v ap = insertObjc3 ( ap.s ! bEzafa) (predV v ** {c2 = {s = [] ; ra = v.c2.ra ;c = VTransPost}}) ; ---- paint it red , check form of adjective
|
SlashV2A v ap = insertObjc3 ( ap.s ! bEzafa) (predV v ** {c2 = {s = [] ; ra = v.c2.ra ;c = VTransPost}}) ; ---- paint it red , check form of adjective
|
||||||
|
|
||||||
ComplSlash vp np = insertObjPre (\\_ => np.s ! NPC bEzafa ) vp ;
|
ComplSlash vp np = insertObjPre (\\_ => np.s ! NPC bEzafa ) vp ;
|
||||||
SlashVV vv vp =
|
SlashVV vv vp =
|
||||||
-- insertObj (infVV vv.isAux vp).s (predV vv) **
|
-- insertObj (infVV vv.isAux vp).s (predV vv) **
|
||||||
insertVV (infVV vv.isAux vp).s (predV vv) **
|
insertVV (infVV vv.isAux vp).s (predV vv) **
|
||||||
{c2 = vp.c2} ;
|
{c2 = vp.c2} ;
|
||||||
SlashV2VNP vv np vp =
|
SlashV2VNP vv np vp =
|
||||||
insertObjPre (\\_ => np.s ! NPC bEzafa )
|
insertObjPre (\\_ => np.s ! NPC bEzafa )
|
||||||
-- (insertObjc (infVV vv.isAux vp).s (predVc vv)) **
|
-- (insertObjc (infVV vv.isAux vp).s (predVc vv)) **
|
||||||
(insertVVc (infVV vv.isAux vp).s (predVc vv)) **
|
(insertVVc (infVV vv.isAux vp).s (predVc vv)) **
|
||||||
{c2 = vp.c2} ;
|
{c2 = vp.c2} ;
|
||||||
|
|
||||||
UseComp comp = insertObj comp.s (predAux auxBe) ;
|
UseComp comp = insertObj comp.s (predAux auxBe) ;
|
||||||
|
|
||||||
AdvVP vp adv = insertAdV adv.s vp ;
|
AdvVP vp adv = insertAdV adv.s vp ;
|
||||||
|
|||||||
Reference in New Issue
Block a user