mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-11 22:09:32 -06:00
Sindhi-resource-grammar
This commit is contained in:
6
lib/src/api/CombinatorsSnd.gf
Normal file
6
lib/src/api/CombinatorsSnd.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsSnd = Combinators with
|
||||
(Cat = CatSnd),
|
||||
(Structural = StructuralSnd),
|
||||
(Constructors = ConstructorsSnd) ;
|
||||
3
lib/src/api/ConstructorsSnd.gf
Normal file
3
lib/src/api/ConstructorsSnd.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsSnd = Constructors with (Grammar = GrammarSnd) ;
|
||||
5
lib/src/api/SymbolicSnd.gf
Normal file
5
lib/src/api/SymbolicSnd.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicSnd = Symbolic with
|
||||
(Symbol = SymbolSnd),
|
||||
(Grammar = GrammarSnd) ;
|
||||
5
lib/src/api/SyntaxSnd.gf
Normal file
5
lib/src/api/SyntaxSnd.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:./alltenses:../prelude
|
||||
|
||||
instance SyntaxSnd of Syntax =
|
||||
ConstructorsSnd, CatSnd, StructuralSnd, CombinatorsSnd ;
|
||||
|
||||
22
lib/src/api/TrySnd.gf
Normal file
22
lib/src/api/TrySnd.gf
Normal file
@@ -0,0 +1,22 @@
|
||||
--# -path=.:alltenses:prelude:/users/shafqat/www.grammaticalframework.org_4/lib/src/sindhi
|
||||
|
||||
resource TrySnd = SyntaxSnd - [mkAdN] , LexiconSnd, ParadigmsSnd - [mkAdv,mkDet,mkIP,mkAdN] **
|
||||
open (P = ParadigmsSnd) in {
|
||||
|
||||
oper
|
||||
|
||||
mkAdv = overload SyntaxSnd {
|
||||
mkAdv : Str -> Adv = P.mkAdv ;
|
||||
} ;
|
||||
|
||||
mkAdN = overload {
|
||||
mkAdN : CAdv -> AdN = SyntaxSnd.mkAdN ;
|
||||
--- mkAdN : Str -> AdN = P.mkAdN ;
|
||||
} ;
|
||||
|
||||
-- mkOrd = overload SyntaxSnd {
|
||||
-- mkOrd : A -> Ord = SyntaxSnd.OrdSuperl ;
|
||||
-- } ;
|
||||
|
||||
|
||||
}
|
||||
40
lib/src/sindhi/AdjectiveSnd.gf
Normal file
40
lib/src/sindhi/AdjectiveSnd.gf
Normal file
@@ -0,0 +1,40 @@
|
||||
concrete AdjectiveSnd of Adjective = CatSnd ** open ResSnd, Prelude in {
|
||||
|
||||
flags coding = utf8;
|
||||
lin
|
||||
|
||||
PositA a = a ;
|
||||
UseComparA a = a;
|
||||
|
||||
ComparA a np = {
|
||||
-- s = \\n,g,c => np.s ! NPC Obl ++ "کان" ++ a.s ! n ! g ! c ;
|
||||
s = \\n,g,c => np.s ! NPC Abl ++ "کان" ++ a.s ! n ! g ! c ;
|
||||
} ;
|
||||
|
||||
---- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||
|
||||
ComplA2 a np = {
|
||||
s = \\n,g,c => np.s ! NPC Obl ++ a.c2 ++ a.s ! n ! g ! c ;
|
||||
} ;
|
||||
|
||||
ReflA2 a = {
|
||||
s = \\n,g,c => a.s ! n ! g ! c ++ RefPron ++ "سان" ;
|
||||
} ;
|
||||
|
||||
SentAP ap sc = {
|
||||
s = \\n,g,c => ap.s ! n ! g ! c ++ sc.s ;
|
||||
} ;
|
||||
|
||||
AdAP ada ap = {
|
||||
s = \\n,g,c => ada.s ++ ap.s ! n ! g ! c ;
|
||||
} ;
|
||||
|
||||
UseA2 a = a ;
|
||||
|
||||
CAdvAP cadv ap np = {
|
||||
s = \\n,g,c => cadv.s ++ ap.s ! n ! g ! c ++ cadv.p ++ np.s ! NPC Dir ;
|
||||
};
|
||||
|
||||
AdjOrd ord = { s = \\_,_,_ => ord.s ; };
|
||||
|
||||
}
|
||||
20
lib/src/sindhi/AdverbSnd.gf
Normal file
20
lib/src/sindhi/AdverbSnd.gf
Normal file
@@ -0,0 +1,20 @@
|
||||
concrete AdverbSnd of Adverb = CatSnd ** open ResSnd, Prelude in {
|
||||
|
||||
flags coding = utf8;
|
||||
lin
|
||||
PositAdvAdj a = {s = \\g => a.s ! Sg ! g ! Obl } ;
|
||||
ComparAdvAdj cadv a np = {
|
||||
s = \\g => np.s ! NPObj ++ cadv.p ++ cadv.s ++ a.s ! Sg ! g ! Obl ;
|
||||
} ;
|
||||
ComparAdvAdjS cadv a s = {
|
||||
s = \\g => cadv.p ++ cadv.s ++ a.s ! Sg ! g ! Obl ++ s.s;
|
||||
} ;
|
||||
|
||||
PrepNP prep np = {s = \\_ => np.s ! NPObj ++ prep.s } ;
|
||||
|
||||
AdAdv ada adv = { s = \\g => ada.s ++ adv.s ! g} ;
|
||||
|
||||
SubjS sub snt = {s = \\_ => sub.s ++ snt.s } ;
|
||||
AdnCAdv cadv = {s = "سان گڏ " ++ cadv.s} ;
|
||||
|
||||
}
|
||||
6
lib/src/sindhi/AllSnd.gf
Normal file
6
lib/src/sindhi/AllSnd.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:../abstract:../common:../prelude
|
||||
|
||||
concrete AllSnd of AllSndAbs =
|
||||
LangSnd,
|
||||
ExtraSnd
|
||||
** {} ;
|
||||
4
lib/src/sindhi/AllSndAbs.gf
Normal file
4
lib/src/sindhi/AllSndAbs.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
abstract AllSndAbs =
|
||||
Lang,
|
||||
ExtraSndAbs
|
||||
** {} ;
|
||||
100
lib/src/sindhi/CatSnd.gf
Normal file
100
lib/src/sindhi/CatSnd.gf
Normal file
@@ -0,0 +1,100 @@
|
||||
concrete CatSnd of Cat = CommonX - [Adv] ** open ResSnd, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lincat
|
||||
------ Tensed/Untensed
|
||||
|
||||
S = {s : Str} ;
|
||||
QS = {s : QForm => Str} ;
|
||||
RS = {s : Agr => Str ; c : Case} ; -- c for it clefts
|
||||
SSlash = {s : Str ; c2 : ResSnd.Compl} ;
|
||||
|
||||
---- Sentence
|
||||
|
||||
Cl = ResSnd.Clause ;
|
||||
ClSlash = {
|
||||
s : ResSnd.VPHTense => Polarity => Order => Str ;
|
||||
c2 : ResSnd.Compl
|
||||
} ;
|
||||
Imp = {s : CPolarity => ImpForm => Str} ;
|
||||
|
||||
---- Question
|
||||
QCl = {s : ResSnd.VPHTense => Polarity => QForm => Str} ;
|
||||
|
||||
IP = {s: Case => Str ; g : Gender ; n : Number};
|
||||
|
||||
IDet = {s :Gender => Str ; n : Number} ;
|
||||
|
||||
IQuant = {s : Number => Gender => Str} ;
|
||||
|
||||
---- Relative
|
||||
|
||||
RCl = {
|
||||
s : ResSnd.VPHTense => Polarity => Order => Agr => Str ;
|
||||
c : Case
|
||||
} ;
|
||||
RP = {s: Number => Gender => Case => Str ; a:RAgr};
|
||||
|
||||
---- Verb
|
||||
|
||||
VP = ResSnd.VPH ;
|
||||
VPSlash = ResSnd.VPHSlash ;
|
||||
Comp = {s : Agr => Str} ;
|
||||
|
||||
---- Adv
|
||||
Adv = {s : Gender => Str} ;
|
||||
---- Adjective
|
||||
|
||||
AP = ResSnd.Adjective1 ;
|
||||
|
||||
---- Noun
|
||||
|
||||
CN = ResSnd.Noun ;
|
||||
NP = ResSnd.NP ;
|
||||
|
||||
Pron = {s : Case => Str ; ps : Str ; a : Agr};
|
||||
|
||||
Det = ResSnd.Determiner ;
|
||||
|
||||
Predet = {s : Str} ;
|
||||
|
||||
Num = {s : Str ; n : Number} ;
|
||||
Card = {s : Str; n : Number} ;
|
||||
Ord = {s : Str; n : Number} ;
|
||||
|
||||
Quant = {s:Number => Gender => Case => Str ; a:Agr};
|
||||
|
||||
Art = {s : Str} ;
|
||||
|
||||
---- Numeral
|
||||
|
||||
Numeral = {s : CardOrd => Str ; n : Number} ;
|
||||
Digits = {s : CardOrd => Str ; n : Number } ;
|
||||
|
||||
---- Structural
|
||||
|
||||
Conj = {s1,s2 : Str ; n : Number} ;
|
||||
-----b Conj = {s : Str ; n : Number} ;
|
||||
-----b DConj = {s1,s2 : Str ; n : Number} ;
|
||||
|
||||
|
||||
Subj = {s : Str} ;
|
||||
|
||||
Prep = ResSnd.Preposition;
|
||||
---- Open lexical classes, e.g. Lexicon
|
||||
|
||||
V, VS, VQ, VA = ResSnd.Verb ; -- = {s : VForm => Str} ;
|
||||
V2, V2A, V2Q, V2S = ResSnd.Verb ** {c2 : Compl} ;
|
||||
V3 = ResSnd.Verb ** {c2, c3 : Str} ;
|
||||
VV = ResSnd.Verb ** { isAux : Bool} ;
|
||||
V2V = ResSnd.Verb ** {c1 : Str ; c2 : Str ; isAux : Bool} ;
|
||||
A = ResSnd.Adjective1 ; --- {s : Gender => Number => Case => Str} ;
|
||||
A2 = ResSnd.Adjective1 ** { c2 : Str} ;
|
||||
|
||||
N = {s : Number => Case => Str ; g : Gender} ;
|
||||
N2 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str ; c3 : Str } ;
|
||||
N3 = {s : Number => Case => Str ; g : Gender} ** {c2 : Str ; c3 : Str ; c4 : Str} ;
|
||||
PN = {s : Case => Str ; g : Gender} ;
|
||||
|
||||
}
|
||||
47
lib/src/sindhi/ConjunctionSnd.gf
Normal file
47
lib/src/sindhi/ConjunctionSnd.gf
Normal file
@@ -0,0 +1,47 @@
|
||||
--concrete Conjunctionsnd of Conjunction =
|
||||
-- Catsndu ** open Ressnd, Coordination, Prelude in {
|
||||
|
||||
concrete ConjunctionSnd of Conjunction =
|
||||
CatSnd ** open ResSnd, Coordination, Prelude in {
|
||||
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
|
||||
ConjS = conjunctDistrSS ;
|
||||
|
||||
-- ConjAdv = conjunctDistrSS ;
|
||||
ConjAdv conj advs = conjunctDistrTable Gender conj advs ;
|
||||
|
||||
ConjNP conj ss = conjunctDistrTable NPCase conj ss ** {
|
||||
a = conjAgr (agrP3 Masc conj.n) ss.a ;
|
||||
isPron = ss.isPron ;
|
||||
} ;
|
||||
|
||||
ConjAP conj ss = conjunctDistrTable3 Number Gender Case conj ss ;
|
||||
ConjRS conj rs = conjunctDistrTable Agr conj rs ** { c = rs.c};
|
||||
|
||||
---- These fun's are generated from the list cat's.
|
||||
|
||||
BaseS = twoSS ;
|
||||
ConsS = consrSS comma ;
|
||||
-- BaseAdv = twoSS ;
|
||||
BaseAdv x y = twoTable Gender x y ;
|
||||
-- ConsAdv = consrSS comma ;
|
||||
ConsAdv xs x = consrTable Gender comma xs x ;
|
||||
BaseNP x y = twoTable NPCase x y ** {a = conjAgr x.a y.a ; isPron = andB x.isPron y.isPron} ;
|
||||
BaseRS x y = twoTable Agr x y ** {c = x.c};
|
||||
ConsNP xs x = consrTable NPCase comma xs x ** {a = conjAgr xs.a x.a ; isPron = andB xs.isPron x.isPron} ;
|
||||
ConsRS xs x = consrTable Agr comma xs x ** { c = xs.c};
|
||||
BaseAP x y = twoTable3 Number Gender Case x y ; -- ** {isPre = andB x.isPre y.isPre} ;
|
||||
ConsAP xs x = consrTable3 Number Gender Case comma xs x ;-- ** {isPre = andB xs.isPre x.isPre} ;
|
||||
|
||||
lincat
|
||||
[S] = {s1,s2 : Str} ;
|
||||
[Adv] = {s1,s2 : Gender => Str} ;
|
||||
[NP] = {s1,s2 : NPCase => Str ; a : Agr ; isPron : Bool} ;
|
||||
[AP] = {s1,s2 : Number => Gender => Case => Str} ;
|
||||
[RS] = {s1,s2 : Agr => Str ; c : Case};
|
||||
|
||||
}
|
||||
170
lib/src/sindhi/Coordination.gf
Normal file
170
lib/src/sindhi/Coordination.gf
Normal file
@@ -0,0 +1,170 @@
|
||||
resource Coordination = open Prelude in {
|
||||
|
||||
param
|
||||
ListSize = TwoElem | ManyElem ;
|
||||
|
||||
oper
|
||||
ListX = {s1,s2 : Str} ;
|
||||
|
||||
twoStr : (x,y : Str) -> ListX = \x,y ->
|
||||
{s1 = x ; s2 = y} ;
|
||||
consStr : Str -> ListX -> Str -> ListX = \comma,xs,x ->
|
||||
{s1 = xs.s1 ++ comma ++ xs.s2 ; s2 = x } ;
|
||||
|
||||
twoSS : (_,_ : SS) -> ListX = \x,y ->
|
||||
twoStr x.s y.s ;
|
||||
consSS : Str -> ListX -> SS -> ListX = \comma,xs,x ->
|
||||
consStr comma xs x.s ;
|
||||
|
||||
Conjunction : Type = SS ;
|
||||
ConjunctionDistr : Type = {s1 : Str ; s2 : Str} ;
|
||||
|
||||
conjunctX : Conjunction -> ListX -> Str = \or,xs ->
|
||||
xs.s1 ++ or.s ++ xs.s2 ;
|
||||
|
||||
conjunctDistrX : ConjunctionDistr -> ListX -> Str = \or,xs ->
|
||||
or.s1 ++ xs.s1 ++ or.s2 ++ xs.s2 ;
|
||||
|
||||
conjunctSS : Conjunction -> ListX -> SS = \or,xs ->
|
||||
ss (xs.s1 ++ or.s ++ xs.s2) ;
|
||||
|
||||
conjunctDistrSS : ConjunctionDistr -> ListX -> SS = \or,xs ->
|
||||
ss (or.s1 ++ xs.s1 ++ or.s2 ++ xs.s2) ;
|
||||
|
||||
-- all this lifted to tables
|
||||
|
||||
ListTable : Type -> Type = \P -> {s1,s2 : P => Str} ;
|
||||
|
||||
twoTable : (P : Type) -> (_,_ : {s : P => Str}) -> ListTable P = \_,x,y ->
|
||||
{s1 = x.s ; s2 = y.s} ;
|
||||
|
||||
consTable : (P : Type) -> Str -> ListTable P -> {s : P => Str} -> ListTable P =
|
||||
\P,c,xs,x ->
|
||||
{s1 = table P {o => xs.s1 ! o ++ c ++ xs.s2 ! o} ; s2 = x.s} ;
|
||||
|
||||
conjunctTable : (P : Type) -> Conjunction -> ListTable P -> {s : P => Str} =
|
||||
\P,or,xs ->
|
||||
{s = table P {p => xs.s1 ! p ++ or.s ++ xs.s2 ! p}} ;
|
||||
|
||||
conjunctDistrTable :
|
||||
(P : Type) -> ConjunctionDistr -> ListTable P -> {s : P => Str} = \P,or,xs ->
|
||||
{s = table P {p => or.s1++ xs.s1 ! p ++ or.s2 ++ xs.s2 ! p}} ;
|
||||
|
||||
-- ... and to two- and three-argument tables: how clumsy! ---
|
||||
|
||||
ListTable2 : Type -> Type -> Type = \P,Q ->
|
||||
{s1,s2 : P => Q => Str} ;
|
||||
|
||||
twoTable2 : (P,Q : Type) -> (_,_ : {s : P => Q => Str}) -> ListTable2 P Q =
|
||||
\_,_,x,y ->
|
||||
{s1 = x.s ; s2 = y.s} ;
|
||||
|
||||
consTable2 :
|
||||
(P,Q : Type) -> Str -> ListTable2 P Q -> {s : P => Q => Str} -> ListTable2 P Q =
|
||||
\P,Q,c,xs,x ->
|
||||
{s1 = table P {p => table Q {q => xs.s1 ! p ! q ++ c ++ xs.s2 ! p! q}} ;
|
||||
s2 = x.s
|
||||
} ;
|
||||
|
||||
conjunctTable2 :
|
||||
(P,Q : Type) -> Conjunction -> ListTable2 P Q -> {s : P => Q => Str} =
|
||||
\P,Q,or,xs ->
|
||||
{s = table P {p => table Q {q => xs.s1 ! p ! q ++ or.s ++ xs.s2 ! p ! q}}} ;
|
||||
|
||||
conjunctDistrTable2 :
|
||||
(P,Q : Type) -> ConjunctionDistr -> 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 ++ xs.s2 ! p ! q}}} ;
|
||||
|
||||
ListTable3 : Type -> Type -> Type -> Type = \P,Q,R ->
|
||||
{s1,s2 : P => Q => R => Str} ;
|
||||
|
||||
twoTable3 : (P,Q,R : Type) -> (_,_ : {s : P => Q => R => Str}) ->
|
||||
ListTable3 P Q R =
|
||||
\_,_,_,x,y ->
|
||||
{s1 = x.s ; s2 = y.s} ;
|
||||
|
||||
consTable3 :
|
||||
(P,Q,R : Type) -> Str -> ListTable3 P Q R -> {s : P => Q => R => Str} ->
|
||||
ListTable3 P Q R =
|
||||
\P,Q,R,c,xs,x ->
|
||||
{s1 = \\p,q,r => xs.s1 ! p ! q ! r ++ c ++ xs.s2 ! p ! q ! r ;
|
||||
s2 = x.s
|
||||
} ;
|
||||
|
||||
conjunctTable3 :
|
||||
(P,Q,R : Type) -> Conjunction -> ListTable3 P Q R -> {s : P => Q => R => Str} =
|
||||
\P,Q,R,or,xs ->
|
||||
{s = \\p,q,r => xs.s1 ! p ! q ! r ++ or.s ++ xs.s2 ! p ! q ! r} ;
|
||||
|
||||
conjunctDistrTable3 :
|
||||
(P,Q,R : Type) -> ConjunctionDistr -> ListTable3 P Q R ->
|
||||
{s : P => Q => R => Str} =
|
||||
\P,Q,R,or,xs ->
|
||||
{s = \\p,q,r => or.s1++ xs.s1 ! p ! q ! r ++ or.s2 ++ xs.s2 ! p ! q ! r} ;
|
||||
|
||||
---------
|
||||
ListTable4 : Type -> Type -> Type -> Type -> Type = \P,Q,R,T ->
|
||||
{s1,s2 : P => Q => R => T => Str} ;
|
||||
|
||||
twoTable4 : (P,Q,R,T : Type) -> (_,_ : {s : P => Q => R => T => Str}) ->
|
||||
ListTable4 P Q R T =
|
||||
\_,_,_,_,x,y ->
|
||||
{s1 = x.s ; s2 = y.s} ;
|
||||
|
||||
consTable4 :
|
||||
(P,Q,R,T : Type) -> Str -> ListTable4 P Q R T -> {s : P => Q => R => T => Str} ->
|
||||
ListTable4 P Q R T =
|
||||
\P,Q,R,T,c,xs,x ->
|
||||
{s1 = \\p,q,r,t => xs.s1 ! p ! q ! r ! t ++ c ++ xs.s2 ! p ! q ! r ! t ;
|
||||
s2 = x.s
|
||||
} ;
|
||||
|
||||
conjunctTable4 :
|
||||
(P,Q,R,T : Type) -> Conjunction -> ListTable4 P Q R T -> {s : P => Q => R => T => Str} =
|
||||
\P,Q,R,T,or,xs ->
|
||||
{s = \\p,q,r,t => xs.s1 ! p ! q ! r ! t ++ or.s ++ xs.s2 ! p ! q ! r ! t} ;
|
||||
|
||||
conjunctDistrTable4 :
|
||||
(P,Q,R,T : Type) -> ConjunctionDistr -> ListTable4 P Q R T ->
|
||||
{s : P => Q => R => T => Str} =
|
||||
\P,Q,R,T,or,xs ->
|
||||
{s = \\p,q,r,t => or.s1++ xs.s1 ! p ! q ! r ! t ++ or.s2 ++ xs.s2 ! p ! q ! r ! t} ;
|
||||
--------------
|
||||
|
||||
comma = "," ;
|
||||
|
||||
-- you can also do this to right-associative lists:
|
||||
|
||||
consrStr : Str -> Str -> ListX -> ListX = \comma,x,xs ->
|
||||
{s1 = x ++ comma ++ xs.s1 ; s2 = xs.s2 } ;
|
||||
|
||||
consrSS : Str -> SS -> ListX -> ListX = \comma,x,xs ->
|
||||
consrStr comma x.s xs ;
|
||||
|
||||
consrTable : (P : Type) -> Str -> {s : P => Str} -> ListTable P -> ListTable P =
|
||||
\P,c,x,xs ->
|
||||
{s1 = table P {o => x.s ! o ++ c ++ xs.s1 ! o} ; s2 = xs.s2} ;
|
||||
|
||||
consrTable2 : (P,Q : Type) -> Str -> {s : P => Q => Str} ->
|
||||
ListTable2 P Q -> ListTable2 P Q =
|
||||
\P,Q,c,x,xs ->
|
||||
{s1 = table P {p => table Q {q => x.s ! p ! q ++ c ++ xs.s1 ! p ! q}} ;
|
||||
s2 = xs.s2
|
||||
} ;
|
||||
consrTable4 : (P,Q,R,T : Type) -> Str -> {s : P => Q => R => T => Str} ->
|
||||
ListTable4 P Q R T -> ListTable4 P Q R T =
|
||||
\P,Q,R,T,c,x,xs ->
|
||||
{s1 = table P {p => table Q {q => table R { r => table T {t => x.s ! p ! q ! r ! t ++ c ++ xs.s1 ! p ! q ! r ! t}}}} ;
|
||||
s2 = xs.s2
|
||||
} ;
|
||||
consrTable3 : (P,Q,R : Type) -> Str -> {s : P => Q => R => Str} ->
|
||||
ListTable3 P Q R -> ListTable3 P Q R =
|
||||
\P,Q,R,c,x,xs ->
|
||||
{s1 = table P {p => table Q {q => table R {t => x.s ! p ! q ! t ++ c ++ xs.s1 ! p ! q ! t }}} ;
|
||||
s2 = xs.s2
|
||||
} ;
|
||||
|
||||
|
||||
} ;
|
||||
19
lib/src/sindhi/ExtraSnd.gf
Normal file
19
lib/src/sindhi/ExtraSnd.gf
Normal file
@@ -0,0 +1,19 @@
|
||||
concrete ExtraSnd of ExtraSndAbs = CatSnd **
|
||||
open ResSnd, Coordination, Prelude, MorphoSnd, ParadigmsSnd in {
|
||||
|
||||
flags coding = utf8;
|
||||
|
||||
lin
|
||||
GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "ڪا" ; a = np.a} ;
|
||||
|
||||
each_Det = mkDet "hر ڪwی" "hر ڪwی" "hر ڪwی" "hر ڪwی" Sg ;
|
||||
have_V = mkV "راڪھنا";
|
||||
IAdvAdv adv = {s = "ڪتنی" ++ adv.s!Masc} ;
|
||||
ICompAP ap = {s = "ڪتنE" ++ ap.s ! Sg ! Masc ! Dir} ;
|
||||
cost_V = mkV "قیمت" ;
|
||||
|
||||
-- added for causitives
|
||||
make_CV = mkVerb "نoتhiنگ" ** {c2 = "" };
|
||||
|
||||
-- for VP conjunction
|
||||
}
|
||||
9
lib/src/sindhi/ExtraSndAbs.gf
Normal file
9
lib/src/sindhi/ExtraSndAbs.gf
Normal file
@@ -0,0 +1,9 @@
|
||||
abstract ExtraSndAbs = Extra ** {
|
||||
|
||||
-- uncontracted negations; contracted are the default
|
||||
fun
|
||||
|
||||
each_Det : Det ;
|
||||
have_V : V;
|
||||
cost_V : V;
|
||||
}
|
||||
24
lib/src/sindhi/GrammarSnd.gf
Normal file
24
lib/src/sindhi/GrammarSnd.gf
Normal file
@@ -0,0 +1,24 @@
|
||||
--# -path=.:../abstract:../common:../prelude
|
||||
|
||||
concrete GrammarSnd of Grammar =
|
||||
NounSnd,
|
||||
VerbSnd,
|
||||
AdjectiveSnd,
|
||||
AdverbSnd,
|
||||
NumeralSnd,
|
||||
SentenceSnd,
|
||||
QuestionSnd,
|
||||
RelativeSnd,
|
||||
ConjunctionSnd,
|
||||
PhraseSnd,
|
||||
TextX - [Adv],
|
||||
StructuralSnd,
|
||||
TenseX - [Adv],
|
||||
IdiomSnd
|
||||
** {
|
||||
|
||||
flags startcat = Phr ; unlexer = text ; lexer = text ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
40
lib/src/sindhi/IdiomSnd.gf
Normal file
40
lib/src/sindhi/IdiomSnd.gf
Normal file
@@ -0,0 +1,40 @@
|
||||
concrete IdiomSnd of Idiom = CatSnd ** open Prelude,Predef, ResSnd in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
flags coding = utf8;
|
||||
|
||||
lin
|
||||
ImpersCl vp = mkSClause " " (agrP3 Masc Sg) vp ;
|
||||
GenericCl vp = mkSClause "ڪو۶ی" (agrP3 Masc Sg) vp ;
|
||||
|
||||
CleftNP np rs =
|
||||
let cl = mkSClause (np.s ! NPC rs.c) (np.a) (predAux auxBe);
|
||||
in
|
||||
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
|
||||
|
||||
CleftAdv ad ss = { s = \\t,b,o => ad.s ! Masc ++ ss.s};
|
||||
|
||||
ExistNP np =
|
||||
mkSClause "ھتی" (agrP3 (fromAgr np.a).g (fromAgr np.a).n)
|
||||
(insertObj (\\_ => np.s ! NPC Dir) (predAux auxBe)) ;
|
||||
|
||||
ExistIP ip =
|
||||
let cl = mkSClause ("ھتی" ++ ip.s ! Dir) (agrP3 ip.g ip.n) (predAux auxBe);
|
||||
in {
|
||||
s = \\t,p,qf => case qf of {
|
||||
QDir => cl.s ! t ! p ! ODir;
|
||||
QIndir => cl.s ! t! p ! ODir
|
||||
}
|
||||
};
|
||||
|
||||
ProgrVP vp = (predProg vp) ;
|
||||
|
||||
|
||||
ImpPl1 vp = {s = "اچ" ++ (vp.s ! VPReq).inf} ;
|
||||
-- ImpP3 np vp = {s = np.s!NPC Dir ++ "کی" ++ (vp.s ! VPImp ).inf ++ "ڏی"}; here VPImp form is not correct e.g jan ko sw do, rather jan ko swnE do, and swnE is stored in vp.VPInf.fin
|
||||
ImpP3 np vp = {s = np.s!NPC Dir ++ "کی" ++ (vp.s ! VPInf ).fin ++ "ڏیو"};
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
10
lib/src/sindhi/LangSnd.gf
Normal file
10
lib/src/sindhi/LangSnd.gf
Normal file
@@ -0,0 +1,10 @@
|
||||
--# -path=.:../abstract:../common:../sindhi
|
||||
|
||||
concrete LangSnd of Lang =
|
||||
GrammarSnd,
|
||||
LexiconSnd
|
||||
** {
|
||||
|
||||
flags startcat = Phr ; unlexer=unwords ; lexer=words ;
|
||||
|
||||
}
|
||||
362
lib/src/sindhi/LexiconSnd.gf
Normal file
362
lib/src/sindhi/LexiconSnd.gf
Normal file
@@ -0,0 +1,362 @@
|
||||
--# -path=.:prelude:alltenses
|
||||
|
||||
concrete LexiconSnd of Lexicon = CatSnd **
|
||||
--open ResSnd, Prelude in {
|
||||
open ParadigmsSnd,MorphoSnd, Prelude in {
|
||||
|
||||
flags
|
||||
optimize=values ;
|
||||
coding = utf8;
|
||||
|
||||
lin
|
||||
|
||||
airplane_N = mkN03 "جھاج" ;
|
||||
answer_V2S = mkV2 (compoundV "جواب" (mkV "ڏیڻ ")) ;
|
||||
apple_N = mkN03 "سوف" ;
|
||||
art_N = mkN13 "فن" ;
|
||||
ask_V2Q = mkV2 (mkV "پڇڻ ");
|
||||
baby_N = mkN05 "ٻار" ;
|
||||
bad_A = mkAdj3 "ڪراب" ;
|
||||
bank_N = mkN03 "بانڪ" ;
|
||||
beautiful_A = mkAdj1 "پیارو" ;
|
||||
become_VA = mkV "ٿیڻ ";
|
||||
beer_N = mkN03 "شراب" ;
|
||||
--beg_V2V = mkV "پنڻ " ;
|
||||
big_A = mkAdj1 "وڏو" ;
|
||||
bike_N = mkN03 "سایچl" ;
|
||||
bird_N = mkN01 "پکی" ;
|
||||
black_A = mkAdj1 "ڪارو" ;
|
||||
blue_A = mkAdj1 "نیرو" ;
|
||||
boat_N = mkN04 "ڀیری" ;
|
||||
book_N = mkN03 "ڪتاب" ;
|
||||
boot_N = mkN01 "جوتو" ;
|
||||
boss_N = mkN03 "بالادست" ;
|
||||
boy_N = mkN01 "چوڪرو" ;
|
||||
bread_N = mkN03 "مانی" ;
|
||||
break_V2 = mkV2 "ٽورڻ " ;
|
||||
broad_A = mkAdj1 "ویڪرو" ;
|
||||
--brother_N2 = mkN10 "ڀا۶ " "جo " ; --not correct
|
||||
brown_A = mkAdj3 "ناسی" ;
|
||||
butter_N = mkN13 "مکڻ" ;
|
||||
buy_V2 = mkV2(compoundV "ئرید " do_V2);
|
||||
camera_N = mkN01 "ڪیمیرا";
|
||||
cap_N = mkN03 "ڻوپY" ;
|
||||
car_N = mkN03 "گاڏی" ;
|
||||
carpet_N = mkN01 "تڏو" ;
|
||||
cat_N = mkN09 "ٻلی" ;
|
||||
ceiling_N = mkN01 "ڇت" ;
|
||||
chair_N = mkN09 "ڪرسی" ;
|
||||
cheese_N = mkN14 "پنیر" ;
|
||||
child_N = mkN01 "ٻار" ;
|
||||
--church_N = mkN03 "گرجا" (mkN "گرجا") ;
|
||||
clean_A = mkAdj3 "ساف" ;
|
||||
clever_A = mkAdj3 "hوشیار" ;
|
||||
close_V2 = mkV2 (compoundV "بند" do_V2);
|
||||
coat_N = mkN03 "ڪوٽ" ;
|
||||
cold_A = mkAdj1 "ٿڌو" ;
|
||||
computer_N = mkN03 "ڪمپیوٽر" ;
|
||||
country_N = mkN03 "مlڪ" ;
|
||||
cousin_N = mkN03 "س۶وٽ" ; -- a compund noun made of two nouns
|
||||
cow_N = mkN09 "گان" ;
|
||||
die_V = mkV "مرڻ " ;
|
||||
dirty_A = mkAdj1 "میرو" ;
|
||||
--distance_N3 = mkN3 (mkN "پنڌ") (mkPrep "دا") "دE" "توN" ;
|
||||
doctor_N = mkN03 "ڊاڪتر" ;
|
||||
dog_N = mkN01 "ڪتو" ;
|
||||
door_N = mkN01 "دروزو" ;
|
||||
drink_V2 = mkV2 "پی۶ڻ ";
|
||||
easy_A2V = mkA "سولو" "" ;
|
||||
eat_V2 = mkV2( mkV "کا۶ڻ ");
|
||||
empty_A = mkAdj3 "ئالی" ;
|
||||
enemy_N = mkN03 "دشمن" ;
|
||||
factory_N = mkN02 "ڪارئانو" ;
|
||||
father_N2 = mkN2 (mkN06 "پی") (mkPrep "جو") "جی" ;
|
||||
fear_VS = mkV "ڊڄڻ ";
|
||||
fish_N = mkN09 "مڇی" ;
|
||||
floor_N = mkN03 "فرش" ;
|
||||
fridge_N = mkN03 "گرج" ;
|
||||
friend_N = mkN05 "دوست" ;
|
||||
fruit_N = mkN13 "ثمر" ;
|
||||
--fun_AV = mkAdj1V (regA "مزو") ;
|
||||
garden_N = mkN03 "باغ" ;
|
||||
girl_N = mkN09 "ڇوڪری" ;
|
||||
glove_N = mkN01 "دستانو" ;
|
||||
gold_N = mkN13 "سون" ;
|
||||
good_A = mkAdj1 "سٺو" ;
|
||||
-- go_V = mkIrrgV "وڃڻ" "" ;
|
||||
green_A = mkAdj1 "ساعو" ;
|
||||
harbour_N = mkN08 "پاناگاھ" ;
|
||||
hate_V2 = mkV2 (compoundV "نفرت" do_V2) ;
|
||||
hat_N = mkN01 "توپlو" ;
|
||||
--have_V = dirV2 (mk5V "ha?ع" "hاس" "hاد" "hاد" "ھجڻ ") ;
|
||||
hear_V2 = mkV2 (mkV "ٻڌڻ ") ;
|
||||
hill_N = mkN09 "ٽڪری" ;
|
||||
hope_VS = (compoundV "امید" do_V2);
|
||||
horse_N = mkN01 "گورو" ;
|
||||
hot_A = mkAdj1 "ڪوسو" ;
|
||||
house_N = mkN03 "گھر" ;
|
||||
important_A = mkAdj3 "ضروری" ;
|
||||
industry_N = mkN01 "دندو" ;
|
||||
iron_N = mkN09 "لوھ " ;
|
||||
king_N = mkN01 "بادشاھ" ;
|
||||
know_V2 = mkV2 (mkV "Jاڻڻ") ;
|
||||
know_VS = (mkV "ڄاڻڻ ") ;
|
||||
know_VQ = (mkV "ڄاڻڻ ") ;
|
||||
lake_N = mkN09 "ڍنڍ" ;
|
||||
lamp_N = mkN09 "بتی " ;
|
||||
learn_V2 = mkV2 ( mkV "سK'ڻ ") ;
|
||||
leather_N = mkN01 "چمڙو" ;
|
||||
leave_V2 = mkV2 (mkV "چڏڻ") ;
|
||||
like_V2 = mkV2 (compoundV "پصند" do_V2);
|
||||
listen_V2 = mkV2 (mkV "ئن ڍیڻ ") ;
|
||||
live_V = mkV "رhڻ " ; ---- touch
|
||||
long_A = mkAdj1 "ڊگو" ;
|
||||
lose_V2= mkV2 "hارا۶ڻ " ;
|
||||
love_N = mkN08 "مھبت" ;
|
||||
love_V2 = mkV2 (compoundV "عشق" do_V2) "سان";
|
||||
man_N = mkN03 "ماڻھو" ;--not correct according to rules should be discussed
|
||||
--married_A2 = mkAdj1 "پرڻیل" ;
|
||||
meat_N = mkN01 "کادو" ;
|
||||
milk_N = mkN13 "کیر" ;
|
||||
moon_N = mkN13 "چنڊ" ;
|
||||
--mother_N2 = mkN2(mkN07 "ما۶ " "جو" "جی" );--not covered need to be discussed
|
||||
mountain_N = mkN03 "جبل" ;
|
||||
music_N = mkN14 "موسیقی" ;
|
||||
narrow_A = mkAdj1 "سوڙھو" ;
|
||||
new_A = mkAdj1 "ن۶ون" ;
|
||||
newspaper_N = mkN04 "ائبار" ;
|
||||
oil_N = mkN03 "تیل" ;
|
||||
old_A = mkAdj1 "پوڙھی" ;
|
||||
-- open_V2 = mkV2 (mkIrrgV "ئولڻ" "ئوl") ;
|
||||
paint_V2A = mkV2 (compoundV "رنگ" do_V2) ;
|
||||
paper_N = mkN01 "پنو" ;
|
||||
--paris_PN = mkN13 "پیرس" masculine;
|
||||
peace_N = mkN13 "امن" ;
|
||||
pen_N = mkN14 "قلم" ;
|
||||
planet_N = mkN01 "سیارو" ;
|
||||
plastic_N = mkN13 "مڙندڙ" ;
|
||||
play_V2 = mkV2 (mkV "راند") ;
|
||||
policeman_N = mkN05 "سپاھی" ;
|
||||
priest_N = mkN05 "پیغمبر" ;
|
||||
--probable_AS = mkAdj1S (regA "امڪان" ) ;
|
||||
queen_N = mkN09 "شھزادی" ;
|
||||
radio_N = mkN01 "باجو" ;
|
||||
--rain_V0 = compoundV "مینھن" "";
|
||||
red_A = mkAdj1 "ڳاڙھو" ; -- worst case
|
||||
religion_N = mkN03 "مزھب" ;
|
||||
restaurant_N = mkN05 "ھوٽl" ;
|
||||
river_N = mkN12 "دریا" ;
|
||||
rock_N = mkN08 "ٽڪری" ;
|
||||
roof_N = mkN14 "ڇت" ;
|
||||
rubber_N = mkN13 "ربڙ" ;
|
||||
run_V = mkV "ڊوڙڻ " ;
|
||||
say_VS = mkV "چوڻ " ;
|
||||
school_N = mkN03 "اسڪول" ;
|
||||
science_N = mkN13 "ساعنص" ;
|
||||
sea_N = mkN14 "سمنڊ" ;
|
||||
seek_V2 = mkV2 (compoundV "تlاش" do_V2) ;
|
||||
see_V2 = mkV2 (mkV "ڏسڻ ") ;
|
||||
sell_V = mkV "وڪڻڻ ";
|
||||
send_V= mkV "موڪلڻ ";
|
||||
sheep_N = mkN09 "رڍ" ;
|
||||
ship_N = mkN03 "جhاز" ;
|
||||
shirt_N = mkN01 "چولو";
|
||||
shoe_N = mkN01 "جوتو" ;
|
||||
shop_N = mkN03 "دوڪان" ;
|
||||
short_A = mkAdj1 "ننڍو " ;
|
||||
silver_N = mkN14 "چاندی" ;
|
||||
sister_N = mkN11 "ٻیڻ " ;
|
||||
sleep_V = mkV "سمھڻ " ;
|
||||
small_A = mkAdj1 "ننڍو" ;
|
||||
snake_N = mkN03 "نانگ" ;
|
||||
sock_N = mkN04 "جوراب" ;
|
||||
speak_V2 = mkV2 (mkV "غالh۶ڻ ") ;
|
||||
star_N = mkN01 "شروعات" ;
|
||||
steel_N = mkN13 "استیل" ;
|
||||
stone_N = mkN05 "پٽر" ;
|
||||
stove_N = mkN01 "چلھو" ;
|
||||
student_N = mkN05 "شاگرد" ;
|
||||
stupid_A = mkAdj1 "چریو" ;
|
||||
sun_N = mkN13 "سج" ;
|
||||
switch8off_V2 = mkV2 (mkV "ھلاعت") ;
|
||||
switch8on_V2 = mkV2 (compoundV "بند" do_V2) ;
|
||||
table_N = mkN04 "میز" ;
|
||||
talk_V = mkV "غالhاعڻ ";
|
||||
teacher_N = mkN05 "استاد" ;
|
||||
teach_V = mkV "سیکارڻ ";
|
||||
television_N = mkN14 "تیلیوزن" ;
|
||||
thick_A = mkAdj1 "موتو" ;
|
||||
thin_A = mkAdj1 "سنھو" ;
|
||||
train_N = mkN09 "ریل" ;
|
||||
travel_V = (compoundV "سفر" do_V2) ;
|
||||
tree_N = mkN13 "وڻ " ;
|
||||
trousers_N = mkN01 "پاجامو" ;
|
||||
ugly_A = mkAdj3 "بدسورت" ;
|
||||
understand_V = mkV "سمجھڻ ";
|
||||
university_N = mkN09 "یونیورسٽY" ;
|
||||
village_N = mkN03 "غوٺ " ;
|
||||
wait_V2 = mkV2 (compoundV "انتظار" (mkV "انتظار")) ;
|
||||
walk_V = mkV "ھلڻ " ;
|
||||
warm_A = mkAdj3 "گرم" ;
|
||||
war_N = mkN03 "جنگ" ;
|
||||
watch_V2 = mkV2 (mkV "ڍسڻ ") ;
|
||||
water_N = mkN14 "پاڻی" ; -- not covered masculine ending with y
|
||||
white_A = mkAdj1 "اڇو" ;
|
||||
window_N = mkN09 "دری" ;
|
||||
wine_N = mkN04 "شراب";
|
||||
win_V = mkV"کٽڻ " ;
|
||||
woman_N = mkN09 "استری" ;
|
||||
wonder_VQ = compoundV "ھیران"(mkV "ٿیڻ ") ;
|
||||
wood_N = mkN13 "ڪاٺ" ;
|
||||
write_V = mkV "لئڻ " ;
|
||||
yellow_A = mkAdj1 "پیلو" ;
|
||||
young_A = mkAdj3 "جوان" ;
|
||||
do_V2 = mkV2 (mkV "ڪرڻ ") ;
|
||||
now_Adv = mkAdv "ھاڻی" ;
|
||||
--already_Adv = mkAdj1dv "پھریاعین" ;
|
||||
song_N = mkN01 "گانو" ;
|
||||
-- number_N = mkN03 "انگ" ;
|
||||
put_V = mkV "وجڻ " ;
|
||||
stop_V = mkV "بیھڻ " ;
|
||||
jump_V = compoundV "ٽپو " (mkV "") ; -- here
|
||||
left_Ord = {s = "کابو" ; n = singular};
|
||||
right_Ord = {s= "سڄو" ; n = singular};
|
||||
--far_Adv = mkAdj1dv "پری" ;
|
||||
correct_A = mkAdj3 "سھی" ;
|
||||
dry_A = mkAdj3 "ئشڪ" ;
|
||||
dull_A = mkAdj1 "جڏو" ;
|
||||
full_A = mkAdj3 "ٻریل" ;
|
||||
heavy_A = mkAdj1 "گرو" ;
|
||||
near_A = mkAdj1 "ویجھو" ;
|
||||
rotten_A = mkAdj3 "ئراب" ;
|
||||
round_A = mkAdj3 "گول" ;
|
||||
sharp_A = mkAdj3 "تیز" ;
|
||||
smooth_A = mkAdj3 "hموار" ;
|
||||
straight_A = mkAdj1 "سڌو" ;
|
||||
wet_A = mkAdj1 "االو";
|
||||
wide_A = mkAdj1 "ویڪرو" ;
|
||||
animal_N = mkN03 "جانور" ;
|
||||
ashes_N = mkN14 "راک " ; -- FIXME: plural only?
|
||||
back_N = mkN09 "پٺ " ;
|
||||
bark_N = mkN13 "ٻ۶ونڪڻ " ;
|
||||
belly_N = mkN14 "پیٽ" ;
|
||||
blood_N = mkN13 "رت" ;
|
||||
bone_N = mkN09 "hڏی" ;
|
||||
breast_N = mkN09 "ڇاتی" ;
|
||||
cloud_N = mkN03 "جھڙ" ;
|
||||
day_N = mkN13 "ڏینھن" ;
|
||||
dust_N = mkN14"ڌوڙ" ;
|
||||
ear_N = mkN03 "ڪن" ;
|
||||
earth_N = mkN08 "زمین" ;
|
||||
egg_N = mkN01 "بیدو" ;
|
||||
eye_N = mkN09 "اک " ;
|
||||
fat_N = mkN09 "چرٻی" ;
|
||||
feather_N = mkN13 "کنڀ" ;
|
||||
fingernail_N = mkN03 "نھ " ;
|
||||
fire_N = mkN14 "باھ" ;
|
||||
flower_N = mkN03 "گل" ;
|
||||
fog_N = mkN13 "ماڪ" ;
|
||||
foot_N = mkN03 "پیر" ; -- not properly covered need to be discussed
|
||||
forest_N = mkN01 "ٻیلو" ;
|
||||
grass_N = mkN04 "گاh" ;
|
||||
--guts_N = mkN "g?ت" ; -- FIXME: no singular
|
||||
hair_N = mkN03 "وار" ;
|
||||
hand_N = mkN03 "hٿ ";
|
||||
head_N = mkN01 "مٿو" ;
|
||||
heart_N = mkN09 "دل";
|
||||
horn_N = mkN13 "سڱ " ;
|
||||
husband_N = mkN03 "مڙس" ;
|
||||
ice_N = mkN09 "برف" ;
|
||||
nee_N = mkN01 "گوڏو" ;
|
||||
leaf_N = mkN03 "پن" ;
|
||||
leg_N = mkN09 "ٽنگ" ;
|
||||
liver_N = mkN03 "جیرو" ;
|
||||
louse_N = mkN14 "جون۶ " ;
|
||||
mouth_N = mkN03 "وات" ;
|
||||
name_N = mkN01 "نالو";
|
||||
neck_N = mkN04 "ڪنڌ " ;
|
||||
night_N = mkN09 "رات" ;
|
||||
nose_N = mkN03 "نڪ" ;
|
||||
person_N = mkN03 "شئس" ;
|
||||
rain_N = mkN14 "مینhن" ;
|
||||
road_N = mkN01 "رستو" ;
|
||||
root_N = mkN09 "پاڙ" ;
|
||||
rope_N = mkN09 "رسی";
|
||||
salt_N = mkN14 "لوڻ " ;
|
||||
sand_N = mkN14 "واری" ;
|
||||
seed_N = mkN03 "ٻج" ;
|
||||
skin_N = mkN09 "چمڙی" ;
|
||||
sky_N = mkN03 "ااسمان";
|
||||
smoke_N = mkN13 "دونھو"; -- singular masc nouns ending with aN,wN yet to be implemented
|
||||
snow_N = mkN13 "برف" ;
|
||||
stick_N = mkN09 "ڏنڊی" ;
|
||||
tail_N = mkN13 "پڇ " ;
|
||||
tongue_N = mkN08 "زبان" ;
|
||||
tooth_N = mkN03 "ڏاند";
|
||||
wife_N = mkN09 "زال" ;
|
||||
wind_N = mkN08 "ھوا" ;
|
||||
wing_N = mkN05 "پر" ;
|
||||
worm_N = mkN01 "ڪینعون" ;
|
||||
year_N = mkN03 "سال" ;
|
||||
blow_V = mkV "وڄڻ " ;
|
||||
breathe_V = compoundV "ساh " (mkV "K'ڻڻ " ) ;
|
||||
burn_V = mkV "سڙڻ " ;
|
||||
dig_V = mkV "K'ٽڻ " ;
|
||||
fall_V = mkV "ڪرڻ " ;
|
||||
float_V = mkV "ترڻ " ;
|
||||
flow_V = mkV "وھڻ " ;
|
||||
fly_V = mkV "اڏڻ ";
|
||||
freeze_V = mkV "ڄمڻ " ;
|
||||
give_V3= mkV3 (mkV "ڏیڻ ") "" "" ; -- here
|
||||
laugh_V = mkV "کلڻ " ;
|
||||
lie_N = mkN01 "ڪوڙ" ;
|
||||
lie_V = compoundV "ڪوڙ " ( mkV "غالhاعڻ ") ;
|
||||
play_V = mkV "کیڍڻ " ;
|
||||
sew_V = mkV "سبڻ " ;
|
||||
sing_V = mkV "گا۶ڻ " ;
|
||||
sit_V = mkV "ویھڻ ";
|
||||
smell_V = mkV "سنگڻ " ;
|
||||
spit_V = mkV "ٿڪڻ " ;
|
||||
stand_V = mkV "باھڻ ";
|
||||
swell_V = mkV "سبڻ" ;
|
||||
swim_V = mkV "ترڻ " ;
|
||||
think_V = mkV "سوچڻ " ;
|
||||
turn_V = mkV "مڙڻ ";
|
||||
vomit_V = compoundV "الٽی" (mkV "ڪرڻ ") ;
|
||||
bite_V2 = mkV2 (mkV "چئ پا۶ڻ ") ;
|
||||
count_V = mkV "غڻڻ ";
|
||||
cut_V = mkV "ڪٽڻ ";
|
||||
fear_V = mkV "ڊڄڻ " ;
|
||||
fight_V = mkV "وڙھڻ " ;
|
||||
hit_V = mkV "مارڻ " ;
|
||||
hold_V = mkV "جھلڻ " ;
|
||||
hunt_V2 = mkV2 (compoundV "شڪار" do_V2);
|
||||
kill_V = mkV "مارن" ;
|
||||
pull_V = mkV "چڪڻ ";
|
||||
push_V = mkV "ڌڪڻ " ;
|
||||
rub_V = mkV "مھٽڻ " ;
|
||||
scratch_V= mkV "ئرچڻ " ;
|
||||
split_V= mkV "ھارڻ " ;
|
||||
--squeeze_V2 = dirV2 (regV "سq?ععزع") ;
|
||||
--stab_V2 = dirV2 (regDuplV "ستاب") ;
|
||||
suck_V = mkV "چوسڻ " ;
|
||||
throw_V = mkV "اڇلڻ " ;
|
||||
tie_V = mkV "ٻڌڻ " ;
|
||||
wash_V = mkV "ڌو۶ڻ" ;
|
||||
wipe_V= mkV "اگھڻ ";
|
||||
--other_A = regA "ٻیا";
|
||||
grammar_N = mkN03 "گردان" ;
|
||||
language_N = mkN09 "ٻولی" ;
|
||||
rule_N = mkN03 "اصول" ;
|
||||
|
||||
---- added 4/6/2007
|
||||
john_PN = mkPN "جان" masculine ;
|
||||
question_N = mkN03 "سواl" ;
|
||||
--ready_A = regA "تیار" ;
|
||||
reason_N = mkN03 "سبب" ;
|
||||
today_Adv = mkAdv "اڄ " ;
|
||||
uncertain_A = mkAdj3 ["اچانڪ"] ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
14
lib/src/sindhi/MakeStructuralSnd.gf
Normal file
14
lib/src/sindhi/MakeStructuralSnd.gf
Normal file
@@ -0,0 +1,14 @@
|
||||
--# -path=.:../common:../abstract
|
||||
|
||||
resource MakeStructuralsnd = open Catsnd, Paradigmssnd, Ressnd, Morphosnd, Nounsnd, Prelude in {
|
||||
|
||||
oper
|
||||
mkSubj : Str -> CatPnb.Subj = \x ->
|
||||
lin Subj {s = x} ;
|
||||
mkNP : Str -> Number -> ResPnb.NP = \s,n ->
|
||||
MassNP (UseN (ParadigmsPnb.mkN s));
|
||||
-- lin NP (regNP s n) ;
|
||||
mkIDet : Str -> Number -> IDet = \s,n ->
|
||||
lin IDet {s = \\_ => s ; n = n} ;
|
||||
|
||||
}
|
||||
393
lib/src/sindhi/MorphoSnd.gf
Normal file
393
lib/src/sindhi/MorphoSnd.gf
Normal file
@@ -0,0 +1,393 @@
|
||||
--# -path=.:../../prelude
|
||||
--
|
||||
----1 A Simple Sindhi Resource Morphology
|
||||
----
|
||||
---- by Jherna Devi, Shafqat Virk,2012
|
||||
----
|
||||
---- This resource morphology contains definitions needed in the resource
|
||||
---- syntax. To build a lexicon, it is better to use $ParadigmsSnd$, which
|
||||
---- gives a higher-level access to this module.
|
||||
--
|
||||
resource MorphoSnd = ResSnd ** open Prelude,Predef in {
|
||||
|
||||
|
||||
flags optimize=all ;
|
||||
coding = utf8;
|
||||
|
||||
----2 Nouns
|
||||
oper
|
||||
|
||||
mkN : (x1,_,_,_,_,_,_,x8 : Str) -> Gender -> Noun =
|
||||
\sd,so,sv,sa, pd,po,pv,pa, g -> {
|
||||
s = table {
|
||||
Sg => table {
|
||||
Dir => sd ;
|
||||
Obl => so ;
|
||||
Voc => sv ;
|
||||
Abl => sa
|
||||
} ;
|
||||
Pl => table {
|
||||
Dir => pd ;
|
||||
Obl => po ;
|
||||
Voc => pv ;
|
||||
Abl => pa
|
||||
}
|
||||
} ;
|
||||
|
||||
g = g
|
||||
} ;
|
||||
|
||||
|
||||
-- 1. msculine: chokro, kuto, hat
|
||||
mkN01 : Str -> Noun ;
|
||||
mkN01 chokro = let chokr = (tk 1 chokro)
|
||||
in mkN (chokro) (chokr+"ی") (chokr+"ا") (chokr+"ا")
|
||||
(chokr+"ا") (chokr+"ن") (chokr+"ا") (chokr+"ا")
|
||||
Masc ;
|
||||
|
||||
|
||||
-- 2. karkhano
|
||||
mkN02 : Str -> Noun ;
|
||||
mkN02 karkhano =let karkhan = (tk 1 karkhano)
|
||||
in mkN (karkhano) (karkhan+"ی") (karkhan+"ا") (karkhano)
|
||||
(karkhan+"ا") (karkhan+"ن") (karkhan+"و") (karkhan+"ا")
|
||||
Fem ;
|
||||
|
||||
-- 3. gher, shehar
|
||||
mkN03 : Str -> Noun ;
|
||||
mkN03 gher = mkN (gher) (gher) (gher) (gher)
|
||||
(gher) (gher+"ن") (gher+"و") (gher)
|
||||
Masc ;
|
||||
|
||||
-- 4. paki, mez, gah
|
||||
mkN04 : Str -> Noun ;
|
||||
mkN04 paki = mkN (paki) (paki) (paki) (paki)
|
||||
(paki) (paki+"ن") (paki) (paki)
|
||||
Fem ;
|
||||
|
||||
-- 5. msculine: bar, hotel, pathar
|
||||
mkN05 : Str -> Noun ;
|
||||
mkN05 bar = mkN (bar) (bar) (bar) (bar)
|
||||
(bar) (bar+"ن") (bar+"و") (bar)
|
||||
Masc ;
|
||||
|
||||
-- 6. pe
|
||||
mkN06 : Str -> Noun ;
|
||||
mkN06 pe = mkN (pe) (pe) (pe) (pe)
|
||||
(pe+"۶ر") (pe+"۶رن") (pe+"۶رو") (pe+"۶ر")
|
||||
Masc ;
|
||||
|
||||
-- 7. Feminine : ma
|
||||
mkN07 : Str -> Noun ;
|
||||
mkN07 ma = mkN (ma) (ma) (ma) (ma)
|
||||
(ma+"۶ر") (ma+"۶رن") (ma+"۶رو") (ma+"۶ر")
|
||||
Fem ;
|
||||
|
||||
-- 8. msculine: topi, takre
|
||||
mkN08 : Str -> Noun ;
|
||||
mkN08 topi = mkN (topi) (topi) (topi) (topi)
|
||||
(topi+"ون") (topi+"ن") (topi+"و") (topi+"ون")
|
||||
Masc ;
|
||||
|
||||
-- 9. Feminine: bere, bili, kurse
|
||||
mkN09 : Str -> Noun ;
|
||||
mkN09 bili = mkN (bili) (bili) (bili) (bili)
|
||||
(bili+"ون") (bili+"ن") (bili+"ن") (bili+"ون")
|
||||
Fem ;
|
||||
|
||||
-- 10. msculine: bha
|
||||
mkN010 : Str -> Noun ;
|
||||
mkN010 bha = mkN (bha) (bha) (bha) (bha)
|
||||
(bha+"ر") (bha+"رن") (bha+"رو") (bha+"ر")
|
||||
Masc ;
|
||||
|
||||
-- 11. Feminine: bhen
|
||||
mkN11 : Str -> Noun ;
|
||||
mkN11 bhen = let bhe= (tk 1 bhen)
|
||||
in mkN (bhen) (bhen) (bhen) (bhen)
|
||||
(bhe+"نر") (bhe+"نرن") (bhen+"ون") (bhe+"نر")
|
||||
Fem ;
|
||||
|
||||
--12. msculine: raja, darya
|
||||
mkN12 : Str -> Noun ;
|
||||
mkN12 raja = mkN (raja) (raja) (raja) (raja)
|
||||
(raja) (raja+"۶ن") (raja+"۶و") (raja)
|
||||
Masc ;
|
||||
|
||||
-- 13. msculine: fan, son, kher,
|
||||
mkN13 : Str -> Noun ;
|
||||
mkN13 son = mkN (son) (son) (son) (son)
|
||||
(son) (son) (son) (son)
|
||||
Masc ;
|
||||
|
||||
-- 14. Feminine: pen, samand
|
||||
mkN14 : Str -> Noun ;
|
||||
mkN14 pen = mkN (pen) (pen) (pen) (pen)
|
||||
(pen) (pen) pen ""
|
||||
Fem ;
|
||||
|
||||
|
||||
|
||||
----2 Determiners
|
||||
|
||||
IDeterminer = {s:Gender => Str ; n : Number};
|
||||
|
||||
makeDet : Str -> Str -> Str -> Str -> Number -> Determiner = \s1,s2,s3,s4,n -> {
|
||||
s = table {
|
||||
Sg => table {
|
||||
Masc => s1 ;
|
||||
Fem => s2
|
||||
} ;
|
||||
Pl => table {
|
||||
Masc => s3 ;
|
||||
Fem => s4
|
||||
}
|
||||
} ;
|
||||
|
||||
n = n
|
||||
};
|
||||
|
||||
makeIDet : Str -> Str -> Number -> IDeterminer = \s1,s2,n -> {
|
||||
s = table {
|
||||
Masc => s1;
|
||||
Fem => s2
|
||||
};
|
||||
n = n
|
||||
};
|
||||
|
||||
makeIQuant : Str -> Str -> Str -> Str -> {s:Number => Gender => Str} = \s1,s2,s3,s4 -> {
|
||||
s = table {
|
||||
Sg => table {
|
||||
Masc => s1 ;
|
||||
Fem => s2
|
||||
} ;
|
||||
Pl => table {
|
||||
Masc => s3 ;
|
||||
Fem => s4
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
-- Proposition
|
||||
|
||||
makePrep : Str -> Preposition = \str -> {s = str } ** { lock_Prep = <>};
|
||||
|
||||
----2 Pronouns
|
||||
--PronForm = {s:Pronoun => Str};
|
||||
|
||||
DemonPronForm = {s:DemPronForm => Str};
|
||||
mkDemonPronForm : (x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:Str) -> DemPronForm =
|
||||
\y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16 -> {
|
||||
s = table {
|
||||
Sg => table {
|
||||
Masc => table {
|
||||
Dir => y1 ;
|
||||
Obl => y2 ;
|
||||
Voc => y3 ;
|
||||
Abl => y4
|
||||
};
|
||||
Fem => table {
|
||||
Dir => y5 ;
|
||||
Obl => y6 ;
|
||||
Voc => y7 ;
|
||||
Abl => y8
|
||||
}
|
||||
};
|
||||
Pl => table {
|
||||
Masc => table {
|
||||
Dir => y9 ;
|
||||
Obl => y10 ;
|
||||
Voc => y11 ;
|
||||
Abl => y12
|
||||
};
|
||||
Fem => table {
|
||||
Dir => y13 ;
|
||||
Obl => y14 ;
|
||||
Voc => y15 ;
|
||||
Abl => y16
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
makeDemonPronForm : Str -> Str -> Str -> DemPronForm ;
|
||||
makeDemonPronForm yeh is inn = mkDemonPronForm yeh is "" yeh is "" yeh inn "" yeh inn "" "" "" "" "";
|
||||
-- makePossPronForm myra myry hmara hmary = mkDemonPronForm myra myra myra myry myry myry hmara hmara hmara hmary hmary hmary;
|
||||
|
||||
mkPron : (x1,x2,x3,x4:Str) -> {s:Case => Str} =
|
||||
\y1,y2,y3,y4 -> { s =
|
||||
table {
|
||||
Dir => y1;
|
||||
Obl => y2;
|
||||
Voc => y3;
|
||||
Abl => y4
|
||||
}
|
||||
};
|
||||
|
||||
------- PossPronForm yet to be implemented
|
||||
|
||||
|
||||
-- IntPronForm = {s:InterrPronForm => Str};
|
||||
IntPronForm = {s: Case => Str};
|
||||
mkIntPronForm : (x1,x2,x3,x4:Str) -> IntPronForm =
|
||||
\y1,y2,y3,y4 -> {
|
||||
s =
|
||||
table {
|
||||
Dir => y1;
|
||||
Obl => y2;
|
||||
Voc => y3;
|
||||
Abl => y4
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
----2 Adjectives
|
||||
-- defined in ResSnd
|
||||
|
||||
------------------------------------------------------------------
|
||||
----Verbs
|
||||
------------------------------------------------------------------
|
||||
|
||||
--1. Basic stem form, direct & indirect causatives exists
|
||||
-- v1 nechna nechaana nechwana
|
||||
|
||||
mkVerb : (_: Str) -> Verb = \inf ->
|
||||
let root = (tk 1 inf) ;
|
||||
inf = inf ;
|
||||
root2 = (tk 2 inf) ;
|
||||
in {
|
||||
s = table {
|
||||
|
||||
Root => root ;
|
||||
|
||||
Inf => inf ;
|
||||
Inf_Fem => ((tk 1 root) + "ی") ;
|
||||
Inf_Obl => (tk 1 root) ;
|
||||
Ablative => ((tk 1 root) + "وN") ;
|
||||
|
||||
|
||||
VF tense person number gender => (mkCmnVF root root2 tense person number gender).s
|
||||
}
|
||||
} ;
|
||||
|
||||
mkIrrgVerb : (inf,root: Str) -> Verb = \inf,root ->
|
||||
let root = root ;
|
||||
in {
|
||||
s = table {
|
||||
|
||||
Root => root ;
|
||||
|
||||
Inf => inf ;
|
||||
Inf_Fem => ((tk 1 inf) + "ی") ;
|
||||
Inf_Obl => (tk 1 inf) ;
|
||||
Ablative => ((tk 1 inf) + "وN") ;
|
||||
|
||||
|
||||
VF tense person number gender => (mkCmnVF (root+"ی") (root+"ی") tense person number gender).s
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
mkCmnVF : Str -> Str -> VTense -> PPerson -> Number -> Gender -> {s:Str}= \root,root2,t,p,n,g ->
|
||||
{s = case (last root) of {
|
||||
("ا"|"۽"|"ی") => (mkCmnVF1 root t p n g).s ;
|
||||
_ => (mkCmnVF1 root t p n g).s
|
||||
}
|
||||
};
|
||||
|
||||
mkCmnVF1 : Str -> VTense -> PPerson -> Number -> Gender -> {s:Str}= \root,t,p,n,g ->
|
||||
{s = let nadaa = root + "ندو" ; --root + variants{"ندا";"وندا"};
|
||||
nadii = root + "ون" ; --root + variants{"ندی";"وندی"} ;
|
||||
nade = root + "ندی" ; --root + variants{"ندی";"یندین"} ;
|
||||
nadiiaaN = root + "ندو"; --root + variants{"ندیاN";"وندیاN"};
|
||||
ndi = root + "ندی";
|
||||
nda = root + "ندا" ;
|
||||
ndywn = root + "ندیون" ;
|
||||
ndyn = root + "ندین" ;
|
||||
|
||||
in
|
||||
case <t,p,n,g> of {
|
||||
<Subj,Pers1, Sg,_> => root + "ان" ;
|
||||
<Subj,Pers1, Sg,_> => root + "ان" ;
|
||||
<subj, Pers1, pl,Masc> => root + "ون" ;
|
||||
<subj, Pers1, pl,Fem> => root + "ون" ;
|
||||
<Subj,Pers2_Casual, Sg,_> => root +"ین";
|
||||
<Subj,Pers2_Casual, Pl,_> => root + "و" ;
|
||||
<Subj,Pers2_Respect, _, _> => root + "و" ;
|
||||
|
||||
<Subj,Pers3_Near, Sg,Masc> => root +"ی";
|
||||
<Subj,Pers3_Near, sg,Fem> => root +"ی";
|
||||
<Subj,Pers3_Near, pl,Masc> => root +"ن";
|
||||
<Subj,Pers3_Near, pl,Fem> => root +"ن";
|
||||
<Subj,Pers3_Distant,Sg,Masc> => root +"ی";
|
||||
<Subj,Pers3_Distant,Sg,Fem> => root +"ی";
|
||||
<Subj,Pers3_Distant,Pl,Masc> => root +"ن";
|
||||
<Subj,Pers3_Distant,Pl,Fem> => root +"ن";
|
||||
|
||||
|
||||
<Perf, Pers1,Sg,Masc> => root + "یل" ;
|
||||
<Perf, Pers1,Sg,Fem> => root + "یل" ;
|
||||
<Perf, Pers1,Pl,Masc> => root + "یل" ;
|
||||
<Perf, Pers1,Pl,Fem> => root + "یل" ;
|
||||
<Perf, Pers2_Casual,Sg,Masc> => root + "یل" ;
|
||||
<Perf, Pers2_Casual,Sg,Fem> => root + "یل" ;
|
||||
<Perf, Pers2_Casual,Pl,Masc> => root + "یل" ;
|
||||
<Perf, Pers2_Casual,Pl,Fem> => root + "یل" ;
|
||||
<Perf, Pers2_Respect,Sg,Masc> => root + "یل" ;
|
||||
<Perf, Pers2_Respect,Sg,Fem> => root + "یل" ;
|
||||
<Perf, Pers2_Respect,Pl,Masc> => root + "یل" ;
|
||||
<Perf, Pers2_Respect,Pl,Fem> => root + "یل" ;
|
||||
|
||||
<Perf, _, Sg,Masc> => root + "یل" ;
|
||||
<Perf, _, Sg,Fem> => root + "یل" ;
|
||||
<Perf, _, Pl,Masc> => root + "یل" ;
|
||||
<Perf, _, Pl,Fem> => root + "یل" ;
|
||||
|
||||
<Imperf, Pers1,Sg, Masc> => root + "ندو" ;
|
||||
<Imperf, Pers1,Sg, Fem> => root + "ندی" ;
|
||||
<Imperf, Pers1,Pl, Masc> => root + "ندا" ;
|
||||
<Imperf, Pers1,Pl, Fem> => root + "ندیون" ;
|
||||
|
||||
<Imperf, Pers2_Casual, Sg, Masc> => root + "ندو" ;
|
||||
<Imperf, Pers2_Casual, Sg, Fem> => root + "ندی" ;
|
||||
<Imperf, Pers2_Casual, Pl, Masc> => root + "ندا" ;
|
||||
<Imperf, Pers2_Casual, Pl, Fem> => root + "ندیون" ;
|
||||
|
||||
<Imperf, Pers2_Respect, Sg, Masc> => root + "ندا" ;
|
||||
<Imperf, Pers2_Respect, Sg, Fem> => root + "ندیون" ;
|
||||
<Imperf, Pers2_Respect, Pl, Masc> => root + "ندا" ;
|
||||
<Imperf, Pers2_Respect, Pl, Fem> => root + "ندیون" ;
|
||||
|
||||
<Imperf, _, Sg, Masc> => root + "ندو" ;
|
||||
<Imperf, _, Sg, Fem> => root + "ندی" ;
|
||||
<Imperf, _, Pl, Masc> => root + "ندا" ;
|
||||
<Imperf, _, Pl, Fem> => root + "ندیون"
|
||||
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
mkCmnVF2 : Str -> VTense -> PPerson -> Number -> Gender -> {s:Str}= \inf,t,p,n,g ->
|
||||
{s =
|
||||
case <t,p,n,g> of {
|
||||
<_, _, _,_> => inf
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
138
lib/src/sindhi/NounSnd.gf
Normal file
138
lib/src/sindhi/NounSnd.gf
Normal file
@@ -0,0 +1,138 @@
|
||||
concrete NounSnd of Noun = CatSnd ** open ResSnd, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
DetCN det cn = {
|
||||
s = \\c => detcn2NP det cn c det.n ;
|
||||
a = agrP3 cn.g det.n ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
UsePN pn = {s = \\c => toNP pn.s c ; a = agrP3 pn.g Sg ; isPron = False} ;
|
||||
UsePron p = {s = \\c => np2pronCase p.s c p.a ; a = p.a ; isPron = True} ;
|
||||
|
||||
PredetNP pred np = {
|
||||
s = \\c => pred.s ++ np.s ! c ;
|
||||
a = np.a;
|
||||
isPron = np.isPron
|
||||
} ;
|
||||
|
||||
PPartNP np v2 = {
|
||||
s = \\c => v2.s ! VF Perf (fromAgr np.a).p (fromAgr np.a).n (fromAgr np.a).g ++ np.s ! c ;
|
||||
a = np.a ;
|
||||
isPron = np.isPron
|
||||
} ;
|
||||
|
||||
RelNP np rs = {
|
||||
s = \\c => np.s ! c ++ rs.s ! np.a ;
|
||||
a = np.a ;
|
||||
isPron = np.isPron
|
||||
} ;
|
||||
|
||||
AdvNP np adv = {
|
||||
s = \\c => np.s ! c ++ adv.s ! (fromAgr np.a).g ;
|
||||
a = np.a ;
|
||||
isPron = np.isPron
|
||||
} ;
|
||||
|
||||
DetQuantOrd quant num ord = {
|
||||
-- s = \\ c => detquant2det quant.s num.s c ++ ord.s ;
|
||||
s = \\n,g => quant.s!n!g!Dir ++ num.s ++ ord.s;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
DetQuant quant num = {
|
||||
-- s = \\c => detquant2det quant.s num.s c;
|
||||
s = \\n,g => quant.s!n!g!Dir ++ num.s;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
DetNP det = {
|
||||
s = \\c => det2NP det c ; ---- case
|
||||
a = agrP3 Masc Sg ;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
PossPron p = {s = \\_,_,_ => p.ps ; a = p.a} ;
|
||||
|
||||
NumSg = {s = []; n = Sg} ;
|
||||
NumPl = {s = []; n = Pl} ;
|
||||
|
||||
NumCard n = n ** {hasCard = True} ;
|
||||
|
||||
NumDigits n = {s = n.s ! NCard ; n = n.n} ;
|
||||
OrdDigits n = {s = n.s ! NOrd; n = n.n} ;
|
||||
|
||||
NumNumeral numeral = {s = numeral.s ! NCard; n = numeral.n} ;
|
||||
OrdNumeral numeral = {s = numeral.s ! NOrd ; n = numeral.n} ;
|
||||
|
||||
AdNum adn num = {s = adn.s ++ num.s ; n = num.n} ;
|
||||
|
||||
OrdSuperl a = {s = a.s ! Sg ! Masc ! Dir ; n = Sg} ;
|
||||
|
||||
|
||||
|
||||
DetArtSg art cn = {
|
||||
s = \\c => art.s ++ toNP (cn.s ! Sg) c ;
|
||||
a = agrP3 cn.g Sg
|
||||
} ;
|
||||
|
||||
DetArtPl art cn = {
|
||||
s = \\c => art.s ++ toNP (cn.s ! Pl) c ;
|
||||
a = agrP3 cn.g Pl
|
||||
} ;
|
||||
|
||||
DefArt = {s = \\_,_,_ => [] ; a = defaultAgr} ;
|
||||
IndefArt = {s = \\_,_,_ => [] ; a =defaultAgr } ;
|
||||
|
||||
MassNP cn = {s = \\c => toNP (cn.s ! Sg) c ; a = agrP3 cn.g Sg ; isPron = False} ;
|
||||
|
||||
UseN n = n ;
|
||||
UseN2 n = { s = n.s ; g = n.g };
|
||||
|
||||
Use2N3 f = {
|
||||
s = f.s;
|
||||
g = f.g ;
|
||||
c2 = f.c2;
|
||||
c3 = f.c3
|
||||
} ;
|
||||
|
||||
Use3N3 f = {
|
||||
s = f.s ;
|
||||
g = f.g ;
|
||||
c2 = f.c2;
|
||||
c3 = f.c3
|
||||
} ;
|
||||
|
||||
ComplN2 f x = {s = \\n,c => case c of {
|
||||
Dir => x.s ! NPC c ++ f.c2 ++ f.s ! n ! c ;
|
||||
Obl => x.s ! NPC c ++ f.c3 ++ f.s ! n ! c ;
|
||||
Abl => x.s ! NPC c ++ f.c3 ++ f.s ! n ! c ;
|
||||
ResSnd.Voc => x.s ! NPC c ++ f.c3 ++ f.s ! n ! c
|
||||
};
|
||||
g = f.g;
|
||||
};
|
||||
ComplN3 f x = {
|
||||
s = \\n,c => x.s ! NPObj ++ f.c4 ++ f.s ! n ! Dir ;
|
||||
g = f.g ;
|
||||
c2 = f.c2;
|
||||
c3 = f.c3
|
||||
} ;
|
||||
|
||||
AdjCN ap cn = {
|
||||
s = \\n,c => ap.s ! n ! cn.g ! c ++ cn.s ! n ! c ;
|
||||
g = cn.g
|
||||
} ;
|
||||
|
||||
RelCN cn rs = {
|
||||
s = \\n,c => cn.s ! n ! c ++ rs.s ! agrP3 cn.g n ;
|
||||
g = cn.g
|
||||
} ;
|
||||
AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s ! cn.g ; g = cn.g} ;
|
||||
|
||||
SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g} ;
|
||||
|
||||
ApposCN cn np = {s = \\n,c => cn.s ! n ! Dir ++ np.s ! NPC c ; g = cn.g} ;
|
||||
|
||||
}
|
||||
126
lib/src/sindhi/NumeralSnd.gf
Normal file
126
lib/src/sindhi/NumeralSnd.gf
Normal file
@@ -0,0 +1,126 @@
|
||||
concrete NumeralSnd of Numeral = CatSnd ** open ResSnd, Prelude in {
|
||||
-- By Harald Hammarstroem
|
||||
-- Modification for Punjabi by Shafqat Virk
|
||||
flags coding=utf8 ;
|
||||
|
||||
|
||||
|
||||
param DForm = unit | ten ;
|
||||
param DSize = sg | r2 | r3 | r4 | r5 | r6 | r7 | r8 | r9 ;
|
||||
param Size = singl | less100 | more100 ;
|
||||
|
||||
oper LinDigit = {s : DForm => Str ; size : DSize ; n : Number} ;
|
||||
|
||||
|
||||
lincat Dig = { s:Str ; n : Number};
|
||||
lincat Digit = LinDigit ;
|
||||
lincat Sub10 = {s : DForm => Str ; size : DSize ; n : Number} ;
|
||||
lincat Sub100 = {s : Str ; size : Size ; n : Number} ;
|
||||
lincat Sub1000 = {s : Str ; s2 : Str ; size : Size ; n : Number } ;
|
||||
lincat Sub1000000 = { s : Str ; n : Number } ;
|
||||
|
||||
lin num x0 =
|
||||
{s = table {
|
||||
NCard => x0.s ;
|
||||
NOrd => Prelude.glue x0.s "ون" -- (mkOrd x0.s) need to use mkOrd which will make irregular ordinals but it gives path error
|
||||
};
|
||||
n = x0.n
|
||||
} ;
|
||||
oper mkOrd : Str -> Str =
|
||||
\s -> case s of {
|
||||
"ھڪ" => "پھریون";
|
||||
"ٻ" => "ٻیون";
|
||||
"ٽی" => "ٽیون";
|
||||
"چار" => "چواٿون";
|
||||
_ => s ++ "وN"
|
||||
};
|
||||
-- {s = \\_ => x0.s ; n = x0.n} ;
|
||||
|
||||
|
||||
oper mkNum : Str -> Str -> DSize -> LinDigit =
|
||||
\do -> \bis -> \sz ->
|
||||
{s = table {unit => do ; ten => bis } ;
|
||||
size = sz ; n = Pl} ;
|
||||
|
||||
lin n2 = mkNum "ٻ" "ویھ" r2 ;
|
||||
lin n3 = mkNum "ٽی" "ٽیھ" r3 ;
|
||||
lin n4 = mkNum "چار" "چاlیھ" r4 ;
|
||||
lin n5 = mkNum "پنج" "پنجاھ" r5 ;
|
||||
lin n6 = mkNum "ڇھ" "سٺھ " r6 ;
|
||||
lin n7 = mkNum "ست" "ستر" r7;
|
||||
lin n8 = mkNum "اٺ '" "اسی" r8;
|
||||
lin n9 = mkNum "نو" "نوی" r9 ;
|
||||
|
||||
oper mkR : Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> DSize => Str = \a1 -> \a2 -> \a3 -> \a4 -> \a5 -> \a6 -> \a7 -> \a8 -> \a9 -> table {
|
||||
sg => a1 + "نھن" ;
|
||||
r2 => a2 + "یھ " ;
|
||||
r3 => a3 + "یھ " ;
|
||||
r4 => a4 + "اlیھ " ;
|
||||
r5 => a5 + "ونجاھ " ;
|
||||
r6 => a6 + "ھٺ" ;
|
||||
r7 => a7 + "تر" ;
|
||||
r8 => a8 + "اسی" ;
|
||||
r9 => a9 + "انوی"
|
||||
} ;
|
||||
|
||||
oper rows : DSize => DSize => Str = table {
|
||||
sg => mkR "یار " "ایڪ " "اڪٽ" "ایڪیت " "ایڪ" "ایڪ" "ایڪ" "ایڪ" "ایڪ" ;
|
||||
r2 => mkR "ٻای " "ٻاو" "ٻٽ" "ٻا۶ت" "ٻا" "ٻا" "ٻاھ " "ٻیی" "ٻیی" ;
|
||||
r3 => mkR "ٽیر " "ٽیو " "ٽیٽ" "ٽیت" "ٽی" "ٽی" "ٽیھ " "ٽی" "تی" ;
|
||||
r4 => mkR "چوڏ " "چوو " "چوٽ" "چو۶ت " "چو" "چو" "چوھ " "چور " "چور" ;
|
||||
r5 => mkR "پنڌر " "پنجو " "پنجٽ" "پنجیت" "پنج" "پنج" "پنجھ" "پنج" "پنج" ;
|
||||
r6 => mkR "سور " "ڇو" "ڇٽی" "ڇا۶ت" "ڇا" "ڇا" "ڇاھ" "ڇ" "ڇ" ;
|
||||
r7 => mkR "ستر" "ستاو" "ستٽ " "ستیت" "ست" "ست" "ست" "ست" "ست" ;
|
||||
r8 => mkR "ارڙ" "اٺاو " "اٺٽ" "اٺی" "اٺ" "اٺ" "اٺا" "اٺ" "اٺ" ;
|
||||
r9 => table {sg => "اڻویھ " ; r2 => "اڻٽیھ " ; r3 => "اڻیتاlیھ " ;
|
||||
r4 => "اڻونجاھ " ; r5 => "اڻھٺ " ; r6 => "اڻتر " ;
|
||||
r7 => "اڻاسی " ;
|
||||
r8 => "اڻانوی " ; r9 => "نوانوی" }
|
||||
} ;
|
||||
|
||||
oper ss : Str -> {s : Str} = \s -> {s = s} ;
|
||||
|
||||
lin pot01 = {s = table {unit => "ھڪ" ; _ => "دمی" } ; size = sg ; n = Sg} ;
|
||||
lin pot0 d = d ;
|
||||
lin pot110 = {s = "ڏھ " ; size = less100 ; n = Pl} ;
|
||||
lin pot111 = {s = rows ! sg ! sg ; size = less100 ; n = Pl} ;
|
||||
lin pot1to19 d = {s = rows ! d.size ! sg ; size = less100 ; n = d.n} ;
|
||||
lin pot0as1 n = {s = n.s ! unit ; size = table {sg => singl ; _ => less100} ! n.size ; n = n.n } ;
|
||||
|
||||
lin pot1 d = {s = d.s ! ten ; size = less100 ; n = d.n} ;
|
||||
lin pot1plus d e = {s = rows ! e.size ! d.size ; size = less100 ; n = d.n} ;
|
||||
|
||||
lin pot1as2 n = {s = n.s ; s2 = "دمی" ; size = n.size ; n = n.n} ;
|
||||
lin pot2 d = {s = (mksau (d.s ! unit) d.size) ;
|
||||
s2 = d.s ! unit ++ "lک " ; size = more100 ; n = d.n} ;
|
||||
lin pot2plus d e =
|
||||
{s = (mksau (d.s ! unit) d.size) ++ e.s ;
|
||||
s2 = (d.s ! unit) ++ "lک " ++ (mkhazar e.s e.size) ;
|
||||
size = more100 ; n = d.n} ;
|
||||
|
||||
lin pot2as3 n = {s = n.s ; n = n.n} ;
|
||||
lin pot3 n = {s = table { singl => ekhazar ;
|
||||
less100 => n.s ++ "ھزار" ;
|
||||
more100 => n.s2 } ! n.size ; n = n.n} ;
|
||||
lin pot3plus n m =
|
||||
{s = table {singl => ekhazar ;
|
||||
less100 => n.s ++ "ھزار" ;
|
||||
more100 => n.s2 } ! n.size ++ m.s ; n = n.n} ;
|
||||
|
||||
lin D_0 = { s = "۰" ; n = Sg};
|
||||
lin D_1 = { s = "۱" ; n = Sg};
|
||||
lin D_2 = { s = "۲" ; n = Pl};
|
||||
lin D_3 = { s = "۳" ; n = Pl};
|
||||
lin D_4 = { s = "۴" ; n = Pl};
|
||||
lin D_5 = { s = "۵" ; n = Pl};
|
||||
lin D_6 = { s = "۶" ; n = Pl};
|
||||
lin D_7 = { s = "۷" ; n = Pl};
|
||||
lin D_8 = { s = "۸" ; n = Pl};
|
||||
lin D_9 = { s = "۹" ; n = Pl};
|
||||
lin IDig d = { s = \\_ => d.s ; n = d.n} ;
|
||||
lin IIDig d dg = { s = \\df => Prelude.glue (dg.s ! df) d.s ; n = Pl };
|
||||
|
||||
oper ekhazar : Str = variants {"ھزار" ; "ھڪ" ++ "ھزار"} ;
|
||||
oper mkhazar : Str -> Size -> Str = \s -> \sz -> table {singl => ekhazar ; _ => s ++ "ھزار"} ! sz ;
|
||||
oper mksau : Str -> DSize -> Str = \s -> \sz -> table {sg => "ھڪ" ++ "سو" ; _ => s ++ "سو"} ! sz ;
|
||||
}
|
||||
181
lib/src/sindhi/ParadigmsSnd.gf
Normal file
181
lib/src/sindhi/ParadigmsSnd.gf
Normal file
@@ -0,0 +1,181 @@
|
||||
--# -path=.:../abstract:../../prelude:../common
|
||||
--
|
||||
----1 Sndu Lexical Paradigms
|
||||
|
||||
resource ParadigmsSnd = open
|
||||
Predef,
|
||||
Prelude,
|
||||
MorphoSnd,
|
||||
CatSnd
|
||||
in {
|
||||
|
||||
--2 Parameters
|
||||
|
||||
oper
|
||||
masculine : Gender ;
|
||||
feminine : Gender ;
|
||||
singular : Number;
|
||||
plural : Number;
|
||||
|
||||
singular = Sg ; plural = Pl;
|
||||
|
||||
masculine = Masc ; feminine = Fem ; --i
|
||||
|
||||
|
||||
--2 Nouns
|
||||
|
||||
|
||||
mkN2 : N -> Prep -> Str -> N2;
|
||||
mkN2 = \n,p,c -> n ** {lock_N2 = <> ; c2 = p.s ; c3 = c } ;
|
||||
|
||||
mkN3 : N -> Prep -> Str -> Str-> N3 ;
|
||||
mkN3 = \n,p,q,r -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q ; c4 = r} ;
|
||||
|
||||
-- Compound Nouns
|
||||
|
||||
mkCmpdNoun : Str -> N -> N
|
||||
= \s,noun -> {s =\\n,c => s ++ noun.s ! n ! c ; g = noun.g ; lock_N = <>};
|
||||
|
||||
|
||||
-- Proper names
|
||||
mkPN = overload {
|
||||
mkPN : Str -> PN =
|
||||
\s -> let n = mkN11 s in {s = n.s ! Sg ; g = n.g ; lock_PN = <>} ;
|
||||
mkPN : Str -> Gender -> PN =
|
||||
\s,g -> let n = mkN11 s in {s = n.s ! Sg ; g = g ; lock_PN = <>} ;
|
||||
};
|
||||
-- Personal Pronouns
|
||||
personalPN : Str -> Str -> Str -> Str -> Str -> Number -> Gender -> PPerson -> Pron =
|
||||
\s1,s2,s3,s4,sp,nn,g,p -> let n = mkPron s1 s2 s3 s4 in {s = n.s ; a = toAgr nn p g ; ps = sp ; lock_Pron = <>};
|
||||
-- Demonstration Pronouns
|
||||
demoPN : Str -> Str -> Str -> Quant =
|
||||
\s1,s2,s3 -> let n = makeDemonPronForm s1 s2 s3 in {s = n.s ; a = defaultAgr ; lock_Quant = <>};
|
||||
|
||||
-- Determiner
|
||||
mkDet : Str -> Str -> Str -> Str -> Number -> Det =
|
||||
\s1,s2,s3,s4,nb -> let dt = makeDet s1 s2 s3 s4 nb in {s = dt.s ; n = nb ; lock_Det = <>};
|
||||
|
||||
-- Intergative pronouns
|
||||
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 = <>};
|
||||
|
||||
-- AdN
|
||||
mkAdN : Str -> AdN = \s -> ss s ;
|
||||
|
||||
--2 Adjectives
|
||||
|
||||
mkA = overload {
|
||||
mkA : Str-> A
|
||||
= \s -> mkAdj1 s ** {lock_A = <>} ;
|
||||
mkA : Str -> Str -> A2
|
||||
= \a,c -> let n = mkAdj1 a in {s = n.s; c2 = c} ** {lock_A2 = <>} ;
|
||||
} ;
|
||||
|
||||
--2 Verbs
|
||||
|
||||
mkV : Str -> V
|
||||
= \s -> mkVerb s ** {lock_V = <>} ;
|
||||
|
||||
mkV2 = overload {
|
||||
mkV2 : Str -> V2
|
||||
= \s -> mkVerb s ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ;
|
||||
mkV2 : V -> V2
|
||||
= \v -> v ** {c2 = {s = [] ; c = VTrans} ; lock_V2 = <>} ;
|
||||
mkV2 : V -> Str -> V2
|
||||
= \v,p -> v ** {c2 = {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 = <>} ;
|
||||
};
|
||||
|
||||
|
||||
----2 Adverbs
|
||||
mkAdv : Str -> Adv = \str -> {s =\\ _ => str ; lock_Adv = <>};
|
||||
|
||||
----2 Prepositions
|
||||
|
||||
mkPrep : Str -> Prep ;
|
||||
mkPrep str = makePrep str ** {lock_Prep = <>};
|
||||
|
||||
--3 Determiners and quantifiers
|
||||
|
||||
-- mkQuant : overload {
|
||||
mkQuant1 : Pron -> Quant ;
|
||||
-- mkQuant : (no_sg, no_pl, none_sg, non_pl : Str) -> Quant ;
|
||||
-- } ;
|
||||
mkIQuant : Str -> Str -> Str -> Str -> IQuant ;
|
||||
mkIQuant s1 s2 s3 s4 = let n = makeIQuant s1 s2 s3 s4 in {s = n.s; lock_IQuant = <>} ;
|
||||
|
||||
-- mkQuant = overload {
|
||||
mkQuant1 : Pron -> Quant = \p -> {s = \\_,_,c => p.s!c ;a = p.a ; lock_Quant = <>};
|
||||
-- mkQuant : (no_sg, no_pl, none_sg, non_pl : Str) -> Quant = mkQuantifier;
|
||||
-- } ;
|
||||
|
||||
--2 Conjunctions
|
||||
mkConj : overload {
|
||||
mkConj : Str -> Conj ; -- and (plural agreement)
|
||||
mkConj : Str -> Number -> Conj ; -- or (agrement number given as argument)
|
||||
mkConj : Str -> Str -> Conj ; -- both ... and (plural)
|
||||
mkConj : Str -> Str -> Number -> Conj ; -- either ... or (agrement number given as argument)
|
||||
} ;
|
||||
mkConj = overload {
|
||||
mkConj : Str -> Conj = \y -> mk2Conj [] y plural ;
|
||||
mkConj : Str -> Number -> Conj = \y,n -> mk2Conj [] y n ;
|
||||
mkConj : Str -> Str -> Conj = \x,y -> mk2Conj x y plural ;
|
||||
mkConj : Str -> Str -> Number -> Conj = mk2Conj ;
|
||||
} ;
|
||||
|
||||
mk2Conj : Str -> Str -> Number -> Conj = \x,y,n ->
|
||||
lin Conj (sd2 x y ** {n = n}) ;
|
||||
|
||||
-- mkV0 : V -> V0 ;
|
||||
-- mkVS : V -> VS ;
|
||||
-- mkV2S : V -> Prep -> V2S ;
|
||||
mkVV : V -> VV = \v -> lin VV (v ** {isAux = False});
|
||||
|
||||
|
||||
-- mkV2V : V -> Prep -> Prep -> V2V ;
|
||||
-- mkVA : V -> VA ;
|
||||
-- mkV2A : V -> Prep -> V2A ;
|
||||
-- mkVQ : V -> VQ ;
|
||||
-- mkV2Q : V -> Prep -> V2Q ;
|
||||
--
|
||||
-- mkAS : A -> AS ;
|
||||
-- mkA2S : A -> Prep -> A2S ;
|
||||
-- mkAV : A -> AV ;
|
||||
-- mkA2V : A -> Prep -> A2V ;
|
||||
-- mkA2V a p = a ** {c2 = p.s } ;
|
||||
--
|
||||
---- Notice: Categories $V0, AS, A2S, AV, A2V$ are just $A$.
|
||||
---- $V0$ is just $V$; the second argument is treated as adverb.
|
||||
--
|
||||
-- V0 : 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 ;
|
||||
|
||||
}
|
||||
27
lib/src/sindhi/PhraseSnd.gf
Normal file
27
lib/src/sindhi/PhraseSnd.gf
Normal file
@@ -0,0 +1,27 @@
|
||||
concrete PhraseSnd of Phrase = CatSnd ** open Prelude, ResSnd in {
|
||||
|
||||
lin
|
||||
PhrUtt pconj utt voc = {s = pconj.s ++ utt.s ++ voc.s} ;
|
||||
|
||||
UttS s = s ;
|
||||
UttQS qs = {s = qs.s ! QDir} ;
|
||||
UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg False} ;
|
||||
UttImpPl pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Pl False } ;
|
||||
UttImpPol pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg True} ;
|
||||
|
||||
UttIP ip = {s = ip.s ! Dir} ; --- Acc also
|
||||
UttIAdv iadv = iadv ;
|
||||
UttNP np = {s = np.s ! NPC Dir} ;
|
||||
UttVP vp = {s = infVP False vp (agrP3 Masc Sg) ++ vp.embComp} ;
|
||||
UttAdv adv = {s = adv.s ! Masc } ;
|
||||
UttCN cn = {s = cn.s ! Sg ! Dir};
|
||||
UttCard n = n ;
|
||||
UttAP ap = {s = ap.s ! Sg ! Masc ! Dir} ;
|
||||
|
||||
NoPConj = {s = []} ;
|
||||
PConjConj conj = {s = conj.s2} ; ---
|
||||
|
||||
NoVoc = {s = []} ;
|
||||
VocNP np = {s = np.s ! NPC Voc} ;
|
||||
|
||||
}
|
||||
75
lib/src/sindhi/QuestionSnd.gf
Normal file
75
lib/src/sindhi/QuestionSnd.gf
Normal file
@@ -0,0 +1,75 @@
|
||||
concrete QuestionSnd of Question = CatSnd ** open ResSnd, Prelude in {
|
||||
flags optimize=all_subs ;
|
||||
coding = utf8;
|
||||
|
||||
lin
|
||||
|
||||
QuestCl cl = {
|
||||
s = \\t,p,qf => case qf of {
|
||||
QDir => cl.s ! t ! p ! OQuest;
|
||||
QIndir => "جیڪڏھن" ++ cl.s ! t! p ! ODir
|
||||
}
|
||||
};
|
||||
|
||||
QuestVP qp vp =
|
||||
let cl = mkSClause ("") (Ag qp.g qp.n Pers3_Near) vp;
|
||||
qp1 = qp.s ! Dir;
|
||||
qp2 = qp.s ! Obl ++ "جی"
|
||||
in { s = \\t,p,o => case t of {
|
||||
VPImpPast => case vp.subj of {VIntrans => qp1 ++ cl.s ! t ! p ! ODir; _ => qp2 ++ cl.s ! t ! p ! ODir};
|
||||
_ => qp1 ++ cl.s ! t ! p ! ODir
|
||||
}
|
||||
};
|
||||
QuestSlash ip slash =
|
||||
let ip1 = ip.s ! Dir;
|
||||
ip2 = ip.s ! Obl ++ "جی"
|
||||
in {
|
||||
s = \\t,p,o => case t of {
|
||||
VPImpPast => ip2 ++ slash.s ! t ! p ! ODir;
|
||||
_ => ip1 ++ slash.s ! t ! p ! ODir
|
||||
}
|
||||
};
|
||||
|
||||
QuestIAdv iadv cl = {
|
||||
s = \\t,p,_ => iadv.s ++ cl.s ! t ! p ! ODir;
|
||||
};
|
||||
|
||||
QuestIComp icomp np =
|
||||
let cl = mkSClause (np.s ! NPC Dir ++ icomp.s) np.a (predAux auxBe);
|
||||
in {
|
||||
s = \\t,p,qf => case qf of {
|
||||
QDir => cl.s ! t ! p ! ODir;
|
||||
QIndir => cl.s ! t! p ! ODir
|
||||
}
|
||||
};
|
||||
|
||||
PrepIP p ip = {s = ip.s ! ResSnd. Voc ++ p.s } ;
|
||||
|
||||
AdvIP ip adv = {
|
||||
s = \\c => adv.s ! ip.g ++ ip.s ! c ;
|
||||
n = ip.n;
|
||||
g = ip.g;
|
||||
} ;
|
||||
|
||||
IdetCN idet cn = {
|
||||
s = \\c => idet.s ! cn.g ++ cn.s ! idet.n ! c ;
|
||||
g = cn.g;
|
||||
n = idet.n;
|
||||
} ;
|
||||
|
||||
IdetIP idet = {
|
||||
s = \\_ => idet.s ! Masc ;
|
||||
n = idet.n;
|
||||
g = Masc;
|
||||
} ;
|
||||
|
||||
IdetQuant iqant num = {
|
||||
s = \\g => iqant.s ! num.n ! g ++ num.s ;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
CompIAdv a = a ;
|
||||
CompIP p = ss (p.s ! Dir) ;
|
||||
AdvIAdv i a = {s = i.s ++ a.s ! Masc} ;
|
||||
|
||||
}
|
||||
90
lib/src/sindhi/RelativeSnd.gf
Normal file
90
lib/src/sindhi/RelativeSnd.gf
Normal file
@@ -0,0 +1,90 @@
|
||||
concrete RelativeSnd of Relative = CatSnd ** open ResSnd in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
coding = utf8;
|
||||
|
||||
lin
|
||||
|
||||
RelCl cl = {
|
||||
s = \\t,p,o,agr => case <t,giveNumber agr,giveGender agr> of {
|
||||
<VPImpPast,Sg,_> => "جھنکی" ++ cl.s ! t ! p ! o ;
|
||||
<VPImpPast,Pl,_> => "جھنجو" ++ cl.s ! t ! p ! o ;
|
||||
<_,Sg,Masc> => "جیھڙو" ++ cl.s ! t ! p ! o ;
|
||||
<_,Sg,Fem> => "جیھڙا" ++ cl.s ! t ! p ! o ;
|
||||
<_,Pl,Masc> => "جیھڙا" ++ cl.s ! t ! p ! o ;
|
||||
<_,Pl,Fem> => "جیھڙیون" ++ cl.s ! t ! p ! o
|
||||
};
|
||||
c = Dir
|
||||
} ;
|
||||
-- RelVP and RelSlash slows the linking process a lot this is why it is commented for test purposes
|
||||
|
||||
RelVP rp vp = {
|
||||
s = \\t,p,o,ag =>
|
||||
let
|
||||
agr = case rp.a of {
|
||||
RNoAg => ag ;
|
||||
RAg a => a
|
||||
} ;
|
||||
cl = mkSClause (rp.s ! (giveNumber agr) ! (giveGender agr) ! Dir) agr vp;
|
||||
|
||||
-- cl = case t of {
|
||||
-- VPImpPast => mkSClause (rp.s ! (giveNumber agr) ! Obl) agr vp;
|
||||
-- _ => mkSClause (rp.s ! (giveNumber agr) ! Dir) agr vp
|
||||
-- };
|
||||
in
|
||||
cl.s ! t ! p ! ODir ;
|
||||
c = Dir
|
||||
} ;
|
||||
|
||||
|
||||
---- Pied piping: "ات whiچh wع ارع looڪiنگ". Stranding and empty
|
||||
---- relative are defined in $ExtraHin.gf$ ("تhات wع ارع looڪiنگ ات",
|
||||
---- "wع ارع looڪiنگ ات").
|
||||
--
|
||||
RelSlash rp slash = {
|
||||
s = \\t,p,o,agr => rp.s ! (giveNumber agr) ! (giveGender agr) ! Obl ++ slash.c2.s ++ slash.s ! t ! p ! o ;
|
||||
c = Dir
|
||||
} ;
|
||||
|
||||
FunRP p np rp = {
|
||||
s = \\n,g,c => rp.s ! n ! g ! c ++ np.s ! NPC c ++ p.s ;
|
||||
a = RAg np.a
|
||||
} ;
|
||||
|
||||
IdRP = {
|
||||
s = table {
|
||||
Sg => table {
|
||||
Masc => table {
|
||||
|
||||
ResSnd.Dir => "جھڙا" ;
|
||||
ResSnd.Obl => "جنھن" ;
|
||||
ResSnd.Voc => "جھڙی" ;
|
||||
ResSnd.Abl => "جھڙی"
|
||||
};
|
||||
Fem => table {
|
||||
|
||||
ResSnd.Dir => "جھڙی" ;
|
||||
ResSnd.Obl => "جنھن" ;
|
||||
ResSnd.Voc => "جھڙی" ;
|
||||
ResSnd.Abl => "جھڙی"
|
||||
}
|
||||
};
|
||||
Pl => table {
|
||||
Masc => table {
|
||||
ResSnd.Dir => "جھڙی" ;
|
||||
ResSnd.Obl => "جھڙی" ;
|
||||
ResSnd.Voc => "جھڙی" ;
|
||||
ResSnd.Abl => "جھڙی"
|
||||
};
|
||||
Fem => table {
|
||||
ResSnd.Dir => "جھڙی" ;
|
||||
ResSnd.Obl => "جھڙی" ;
|
||||
ResSnd.Voc => "جھڙی" ;
|
||||
ResSnd.Abl => "جھڙی"
|
||||
}
|
||||
}
|
||||
};
|
||||
a = RNoAg
|
||||
} ;
|
||||
|
||||
}
|
||||
673
lib/src/sindhi/ResSnd.gf
Normal file
673
lib/src/sindhi/ResSnd.gf
Normal file
@@ -0,0 +1,673 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
--
|
||||
--1 Sndu auxiliary operations.
|
||||
--
|
||||
-- This module contains operations that are needed to make the
|
||||
-- resource syntax work.
|
||||
|
||||
resource ResSnd = ParamX ** open Prelude,Predef in {
|
||||
|
||||
flags optimize=all ;
|
||||
coding = utf8;
|
||||
|
||||
param
|
||||
Case = Dir | Obl | Voc | Abl ;
|
||||
Gender = Masc | Fem ;
|
||||
VTense = Subj | Perf | Imperf;
|
||||
PPerson = Pers1
|
||||
| Pers2_Casual
|
||||
| Pers2_Respect
|
||||
| Pers3_Near
|
||||
| Pers3_Distant;
|
||||
|
||||
Order = ODir | OQuest ;
|
||||
|
||||
--2 For $Relative$
|
||||
|
||||
RAgr = RNoAg | RAg Agr ;
|
||||
RCase = RC Number Case ;
|
||||
|
||||
-- for Numerial
|
||||
|
||||
CardOrd = NCard | NOrd ;
|
||||
|
||||
VerbForm4 =
|
||||
VF VTense PPerson Number Gender
|
||||
| Inf | Inf_Fem | Inf_Obl | Ablative
|
||||
| Root ;
|
||||
|
||||
oper
|
||||
Noun = {s : Number => Case => Str ; g : Gender} ;
|
||||
Verb = {s : VerbForm4 => Str} ;
|
||||
Preposition = {s : Str};
|
||||
DemPronForm = {s : Number => Gender => Case => Str};
|
||||
-- PossPronForm = {s : Number => Gender => Case => Str};
|
||||
Determiner = {s : Number => Gender => Str ; n : Number};
|
||||
|
||||
-----------------------------------------------
|
||||
-- Snd Adjectives
|
||||
-----------------------------------------------
|
||||
Adjective1 = {s : Number => Gender => Case => Str} ;
|
||||
|
||||
mkAdj1 : Str -> Adjective1 ;
|
||||
mkAdj1 nyrw = let end = last (nyrw) ;
|
||||
--nyr = if_then_else Str (eq end "ی") nyrw (tk 1 nyrw)
|
||||
nyr = (tk 1 nyrw)
|
||||
in adj1 (nyrw) (nyr+"ی") ( nyr+"ا") (nyr+"ا") (nyrw) (nyr+"ی") (nyr+"ی") (nyr+"ی")
|
||||
(nyr+"ا") (nyr+"ن") ( nyr+"ا") (nyr+"ا") (nyr+"یون") (nyr+"ین") (nyr+"ین") (nyr+"یون") ;
|
||||
|
||||
|
||||
|
||||
adj1 :(x1,_,_,_,_,_,_, _,_,_,_,_,_,_,_, x16 : Str) -> {s : Number => Gender => Case => Str} =
|
||||
\msd,mso,msv,msa, fsd,fso,fsv,fsa, mpd,mpo,mpv,mpa, fpd,fpo,fpv,fpa -> {
|
||||
s = table {
|
||||
Sg => (cmnAdj msd mso msv msa fsd fso fsv fsa).s ;
|
||||
Pl => (cmnAdj mpd mpo mpv mpa fpd fpo fpv fpa).s
|
||||
}
|
||||
};
|
||||
|
||||
mkAdj2 : Str -> Adjective1 ;
|
||||
mkAdj2 young = adj1 (young) (young) (young ) (young) (young) (young) (young) (young)
|
||||
(young) (young) (young ) (young) (young+"ین") (young+"ین") (young+"ین") (young+"ین") ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
mkAdj3 : Str -> Adjective1 ;
|
||||
mkAdj3 acank = adj1 acank acank acank acank acank acank acank acank acank acank acank acank acank acank acank acank ;
|
||||
|
||||
|
||||
cmnAdj : (x1,_,_,_,_,_,_,x8 : Str) -> {s : Gender => Case => Str} =
|
||||
\sd,so,sv,sa, pd,po,pv,pa -> {
|
||||
s = table {
|
||||
Masc => table {
|
||||
Dir => sd ;
|
||||
Obl => so ;
|
||||
Voc => sv ;
|
||||
Abl => sa
|
||||
} ;
|
||||
Fem => table {
|
||||
Dir => pd ;
|
||||
Obl => po ;
|
||||
Voc => pv ;
|
||||
Abl => pa
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
RefPron : Str;
|
||||
RefPron = "پاڻ";
|
||||
|
||||
----------------------------------------------------------
|
||||
-- Grammar part
|
||||
----------------------------------------------------------
|
||||
|
||||
param
|
||||
Agr = Ag Gender Number PPerson ;
|
||||
NPCase = NPC Case | NPObj | NPErg ;
|
||||
|
||||
oper
|
||||
np2pronCase : (Case => Str) -> NPCase -> Agr -> Str = \ppf,npc,a -> case npc of {
|
||||
NPC c => ppf ! c;
|
||||
NPObj => ppf ! Obl ;
|
||||
NPErg => case (fromAgr a).p of {
|
||||
(Pers3_Near|Pers3_Distant) => ppf ! Dir ++ "جی" ;
|
||||
_ => ppf ! Dir
|
||||
}
|
||||
} ;
|
||||
|
||||
toNP : ( Case => Str) -> NPCase -> Str = \pn, npc -> case npc of {
|
||||
NPC c => pn ! c ;
|
||||
NPObj => pn ! Dir ;
|
||||
NPErg => pn ! Obl
|
||||
} ;
|
||||
|
||||
detcn2NP : (Determiner) -> Noun -> NPCase -> Number -> Str = \dt,cn,npc,nn -> case npc of {
|
||||
NPC c => dt.s ! Sg ! Masc ++ cn.s ! nn ! c ;
|
||||
NPObj => dt.s ! Sg ! Masc ++ cn.s ! nn ! Dir ;
|
||||
NPErg => dt.s ! Sg ! Masc ++ cn.s ! nn ! Obl
|
||||
} ;
|
||||
|
||||
det2NP : (Determiner) -> NPCase -> Str = \dt,npc -> case npc of {
|
||||
NPC c => dt.s ! Sg ! Masc ;
|
||||
NPObj => dt.s ! Sg ! Masc ;
|
||||
NPErg => dt.s ! Sg ! Masc
|
||||
} ;
|
||||
|
||||
|
||||
oper
|
||||
------------------------------------------
|
||||
-- Agreement transformations
|
||||
-----------------------------------------
|
||||
|
||||
toAgr : Number -> PPerson -> Gender -> Agr = \n,p,g ->
|
||||
Ag g n p;
|
||||
|
||||
|
||||
fromAgr : Agr -> {n : Number ; p : PPerson ; g : Gender} = \a -> case a of {
|
||||
Ag g n p => {n = n ; p = p ; g = g}
|
||||
} ;
|
||||
|
||||
conjAgr : Agr -> Agr -> Agr = \a0,b0 ->
|
||||
let a = fromAgr a0 ; b = fromAgr b0
|
||||
in
|
||||
toAgr
|
||||
(conjNumber a.n b.n)
|
||||
b.p a.g;
|
||||
|
||||
giveNumber : Agr -> Number =\a -> case a of {
|
||||
Ag _ n _ => n
|
||||
};
|
||||
giveGender : Agr -> Gender =\a -> case a of {
|
||||
Ag g _ _ => g
|
||||
};
|
||||
|
||||
defaultAgr : Agr = agrP3 Masc Sg ;
|
||||
agrP3 : Gender -> Number -> Agr = \g,n -> Ag g n Pers3_Distant ;
|
||||
|
||||
personalAgr : Agr = agrP1 Masc Sg ;
|
||||
agrP1 : Gender -> Number -> Agr = \g,n -> Ag g n Pers1 ;
|
||||
|
||||
param
|
||||
CPolarity =
|
||||
CPos
|
||||
| CNeg Bool ; -- contracted or not
|
||||
|
||||
oper
|
||||
contrNeg : Bool -> Polarity -> CPolarity = \b,p -> case p of {
|
||||
Pos => CPos ;
|
||||
Neg => CNeg b
|
||||
} ;
|
||||
|
||||
NP : Type = {s : NPCase => Str ; a : Agr ; isPron : Bool} ;
|
||||
|
||||
param
|
||||
CTense = CPresent | CPast | CFuture | CContinuous;
|
||||
|
||||
oper
|
||||
copula : CTense -> Number -> PPerson -> Gender -> Str = \t,n,p,g ->
|
||||
case <t,n,p,g> of {
|
||||
<CPresent,Sg,Pers1,Masc > => "ٿو";
|
||||
<CPresent,Sg,Pers1,Fem > => "ٿی" ;
|
||||
<CPresent,Sg,Pers2_Casual,Masc > => "ٿو" ;
|
||||
<CPresent,Sg,Pers2_Casual,Fem > => "ٿی" ;
|
||||
<CPresent,Sg,Pers2_Respect,Masc > => "ٿا" ;
|
||||
<CPresent,Sg,Pers2_Respect,Fem > => "ٿیون" ;
|
||||
<CPresent,Sg,Pers3_Near,Masc > => "ٿو" ;
|
||||
<CPresent,Sg,Pers3_Near,Fem > => "ٿی" ;
|
||||
<CPresent,Sg,Pers3_Distant,Masc > => "ٿو" ;
|
||||
<CPresent,Sg,Pers3_Distant,Fem > => "ٿی" ;
|
||||
<CPresent,Pl,Pers1,Masc > => "ٿا" ;
|
||||
<CPresent,Pl,Pers1,Fem > => "ٿیون" ;
|
||||
<CPresent,Pl,Pers2_Casual,Masc > => "ٿا" ;
|
||||
<CPresent,Pl,Pers2_Casual,Fem > => "ٿی" ;
|
||||
<CPresent,Pl,Pers2_Respect,Masc > => "ٿا" ;
|
||||
<CPresent,Pl,Pers2_Respect,Fem > => "ٿیون" ;
|
||||
<CPresent,Pl,Pers3_Near,Masc > => "ٿا" ;
|
||||
<CPresent,Pl,Pers3_Near,Fem > => "ٿیون" ;
|
||||
<CPresent,Pl,Pers3_Distant,Masc > => "ٿا" ;
|
||||
<CPresent,Pl,Pers3_Distant,Fem > => "ٿیون" ;
|
||||
<CPast,Sg,Pers1,Masc > => "ھیم" ;
|
||||
<CPast,Sg,Pers1,Fem > => "ھیم" ;
|
||||
<CPast,Sg,Pers2_Casual,Masc > => "ھ۶ین" ;
|
||||
<CPast,Sg,Pers2_Casual,Fem > => "ھ۶ین" ;
|
||||
<CPast,Sg,Pers2_Respect,Masc > => "ھ۶و" ;
|
||||
<CPast,Sg,Pers2_Respect,Fem > => "ھ۶یون" ;
|
||||
<CPast,Sg,Pers3_Near,_ > => "اھی" ;
|
||||
-- <CPast,Sg,Pers3_Near,Fem > => "اھ۶" ;
|
||||
<CPast,Sg,Pers3_Distant,Masc > => "ھیو" ;
|
||||
<CPast,Sg,Pers3_Distant,Fem > => "ھ۶ی" ;
|
||||
|
||||
<CPast,Pl,Pers1,Masc > => "ھ۶اسین" ;
|
||||
<CPast,Pl,Pers1,Fem > => "ھیوسین" ;
|
||||
<CPast,Pl,Pers2_Casual,_ > => "ھ۶ا" ;
|
||||
<CPast,Pl,Pers2_Respect,_ > => "ھیو" ;
|
||||
<CPast,Pl,Pers3_Near,Masc > => "ھ۶ا" ;
|
||||
<CPast,Pl,Pers3_Near,Fem > => "ھ۶یون" ;
|
||||
<CPast,Pl,Pers3_Distant,Masc > => "ھ۶ا" ;
|
||||
<CPast,Pl,Pers3_Distant,Fem > => "ھیون" ;
|
||||
|
||||
<CFuture,Sg,Pers1,Masc > => "ھوندس" ;
|
||||
<CFuture,Sg,Pers1,Fem > => "ھوندس" ;
|
||||
<CFuture,Sg,Pers2_Casual,Masc > => "ھوندین" ;
|
||||
<CFuture,Sg,Pers2_Casual,Fem > => "ھوندین" ;
|
||||
<CFuture,Sg,Pers2_Respect,Masc > => "ھوندو۶ " ;
|
||||
<CFuture,Sg,Pers2_Respect,Fem > => "ھوندو۶ " ;
|
||||
<CFuture,Sg,Pers3_Near,Masc > => "ھوندو " ;
|
||||
<CFuture,Sg,Pers3_Near,Fem > => "ھوندی" ;
|
||||
<CFuture,Sg,Pers3_Distant,Masc > => "ھوندو " ;
|
||||
<CFuture,Sg,Pers3_Distant,Fem > => "ھوندی" ;
|
||||
<CFuture,Pl,Pers1,Masc > => "ھونداسین" ;
|
||||
<CFuture,Pl,Pers1,Fem > => "ھوندیونسین" ;
|
||||
<CFuture,Pl,Pers2_Casual,Masc > => "ھوندو۶ " ;
|
||||
<CFuture,Pl,Pers2_Casual,Fem > => "ھوندیوین" ;
|
||||
<CFuture,Pl,Pers2_Respect,Masc > => "ھوندو۶ " ;
|
||||
<CFuture,Pl,Pers2_Respect,Fem > => "ھوندیوین" ;
|
||||
<CFuture,Pl,Pers3_Near,Masc > => "ھوندا" ;
|
||||
<CFuture,Pl,Pers3_Near,Fem > => "ھوندیون" ;
|
||||
<CFuture,Pl,Pers3_Distant,Masc > => "ھوندا" ;
|
||||
<CFuture,Pl,Pers3_Distant,Fem > => "ھوندیون" ;
|
||||
|
||||
<CContinuous,Sg,Pers1,Masc > => "اھیان" ;
|
||||
<CContinuous,Sg,Pers1,Fem > => "اھیان" ;
|
||||
<CContinuous,Sg,Pers2_Casual,Masc > => "اھین" ;
|
||||
<CContinuous,Sg,Pers2_Casual,Fem > => "اھین" ;
|
||||
<CContinuous,Sg,Pers2_Respect,Masc > => "اھیو " ;
|
||||
<CContinuous,Sg,Pers2_Respect,Fem > => "اھیو " ;
|
||||
<CContinuous,Sg,Pers3_Near,Masc > => "اھی " ;
|
||||
<CContinuous,Sg,Pers3_Near,Fem > => "اھی" ;
|
||||
<CContinuous,Sg,Pers3_Distant,Masc > => "اھی " ;
|
||||
<CContinuous,Sg,Pers3_Distant,Fem > => "اھی" ;
|
||||
<CContinuous,Pl,Pers1,Masc > => "اھیون" ;
|
||||
<CContinuous,Pl,Pers1,Fem > => "اھیون" ;
|
||||
<CContinuous,Pl,Pers2_Casual,Masc > => "اھیو " ;
|
||||
<CContinuous,Pl,Pers2_Casual,Fem > => "اھیو " ;
|
||||
<CContinuous,Pl,Pers2_Respect,Masc > => "اھیو " ;
|
||||
<CContinuous,Pl,Pers2_Respect,Fem > => "اھیو " ;
|
||||
<CContinuous,Pl,Pers3_Near,Masc > => "اھن" ;
|
||||
<CContinuous,Pl,Pers3_Near,Fem > => "اھن" ;
|
||||
<CContinuous,Pl,Pers3_Distant,Masc > => "اھن" ;
|
||||
<CContinuous,Pl,Pers3_Distant,Fem > => "اھن"
|
||||
|
||||
|
||||
} ;
|
||||
param
|
||||
VPPTense =
|
||||
VPPres
|
||||
|VPPast
|
||||
|VPFutr
|
||||
|VPPerf;
|
||||
|
||||
VPHTense =
|
||||
VPGenPres -- impf hum nahim "I گo"
|
||||
| VPImpPast -- impf Ta nahim "I wعنت"
|
||||
| VPFut -- fut na/nahim "I سhاll گo"
|
||||
| VPContPres -- stem raha hum nahim "I ام گoiنگ"
|
||||
| VPContPast -- stem raha Ta nahim "I wاس گoiنگ"
|
||||
| VPContFut
|
||||
| VPPerfPres -- perf hum na/nahim "I hاvع گoنع"
|
||||
| VPPerfPast -- perf Ta na/nahim "I hاد گoنع"
|
||||
| VPPerfFut
|
||||
| VPPerfPresCont
|
||||
| VPPerfPastCont
|
||||
| VPPerfFutCont
|
||||
| VPSubj -- subj na "I مای گo"
|
||||
;
|
||||
|
||||
VPHForm =
|
||||
VPTense VPPTense Agr -- 9 * 12
|
||||
| VPReq
|
||||
| VPImp
|
||||
| VPReqFut
|
||||
| VPInf
|
||||
| VPStem
|
||||
;
|
||||
|
||||
VType = VIntrans | VTrans | VTransPost ;
|
||||
|
||||
oper
|
||||
|
||||
objVType : VType -> NPCase = \vt -> case vt of {
|
||||
VTrans => NPObj ;
|
||||
_ => NPC Obl
|
||||
} ;
|
||||
|
||||
VPH : Type = {
|
||||
s : VPHForm => {fin, inf : Str} ;
|
||||
obj : {s : Str ; a : Agr} ;
|
||||
subj : VType ;
|
||||
comp : Agr => Str;
|
||||
inf : Str;
|
||||
ad : Str;
|
||||
embComp : Str ;
|
||||
prog : Bool ;
|
||||
} ;
|
||||
|
||||
VPHSlash = VPH ** {c2 : Compl} ;
|
||||
|
||||
oper
|
||||
Compl : Type = {s : Str ; c : VType} ;
|
||||
|
||||
predV : Verb -> VPH = \verb -> {
|
||||
s = \\vh =>
|
||||
case vh of {
|
||||
VPTense VPPres (Ag g n p) => {fin = copula CPresent n p g ; inf = verb.s ! VF Subj p n g } ;
|
||||
VPTense VPPast (Ag g n p) => {fin = copula CPast n p g ; inf =verb.s ! VF Perf p n g} ;
|
||||
VPTense VPFutr (Ag g n p) => {fin = copula CFuture n p g ; inf = verb.s ! VF Imperf p n g } ;
|
||||
VPTense VPPerf (Ag g n p) => { fin = [] ; inf = verb.s ! Root ++ cka g n } ;
|
||||
VPStem => {fin = [] ; inf = verb.s ! Root};
|
||||
VPInf => {fin = verb.s!Inf_Obl ; inf = verb.s ! Root};
|
||||
VPImp => {fin = verb.s!VF Subj Pers3_Near Pl Masc ; inf = verb.s ! Root};
|
||||
VPReq => {fin = [] ; inf = verb.s!VF Subj Pers1 Pl Masc};
|
||||
_ => {fin = [] ; inf = verb.s ! Root}
|
||||
};
|
||||
obj = {s = [] ; a = defaultAgr} ;
|
||||
subj = VIntrans ;
|
||||
inf = verb.s ! Inf;
|
||||
ad = [];
|
||||
embComp = [];
|
||||
prog = False ;
|
||||
comp = \\_ => []
|
||||
} ;
|
||||
|
||||
predVc : (Verb ** {c2,c1 : Str}) -> VPHSlash = \verb ->
|
||||
predV verb ** {c2 = {s = verb.c1 ; c = VTrans} } ;
|
||||
-------------------------
|
||||
-- added for cauitives
|
||||
predVcc : (Verb **{c2:Compl}) -> VPHSlash = \verb ->
|
||||
predV verb ** {c2 = {s = "" ; c = VTrans} } ;
|
||||
------------------------
|
||||
|
||||
raha : Gender -> Number -> Str = \g,n ->
|
||||
(mkAdj1 "ریا").s ! n ! g ! Dir ;
|
||||
rahanDa : Gender -> Number -> Str = \g,n ->
|
||||
(mkAdj1 "رھندا").s ! n ! g ! Dir ;
|
||||
|
||||
pya : Gender -> Number -> Str = \g,n ->
|
||||
(mkAdj1 "پیا").s ! n ! g ! Dir ;
|
||||
|
||||
cka : Gender -> Number -> Str = \g,n ->
|
||||
(mkAdj1 "گیا").s ! n ! g ! Dir ;
|
||||
|
||||
hw : PPerson -> Number -> Str = \pp,n ->
|
||||
case <pp,n> of {
|
||||
<Pers1,_> => "hwwاN";
|
||||
<Pers2_Casual,Sg> => "hwwیN";
|
||||
<Pers2_Casual,Pl> => "hww";
|
||||
<Pers2_Respect,_> => "hww";
|
||||
<Pers3_Distant,Sg> => "hwwE";
|
||||
<Pers3_Distant,Pl> => "hwن";
|
||||
<Pers3_Near,Sg> => "hwwE";
|
||||
<Pers3_Near,Pl> => "hwن"
|
||||
|
||||
};
|
||||
|
||||
predAux : Aux -> VPH = \verb -> {
|
||||
s = \\vh =>
|
||||
let
|
||||
|
||||
inf = verb.inf ;
|
||||
part = verb.ppart ;
|
||||
|
||||
in
|
||||
case vh of {
|
||||
VPTense VPPres (Ag g n p) => {fin = copula CContinuous n p g ; inf = part } ;
|
||||
VPTense VPPast (Ag g n p) => {fin = copula CPast n p g ; inf = part } ;
|
||||
VPTense VPFutr (Ag g n p) => {fin = copula CFuture n p g ; inf = part ++ hw p n } ;
|
||||
VPStem => {fin = [] ; inf = "رh" };
|
||||
_ => {fin = part ; inf = inf }
|
||||
};
|
||||
obj = {s = [] ; a = defaultAgr} ;
|
||||
subj = VIntrans ;
|
||||
inf = verb.inf;
|
||||
ad = [];
|
||||
embComp = [];
|
||||
prog = False ;
|
||||
comp = \\_ => []
|
||||
} ;
|
||||
|
||||
Aux = {
|
||||
inf,ppart,prpart : Str
|
||||
} ;
|
||||
|
||||
auxBe : Aux = {
|
||||
inf = "" ;
|
||||
ppart = "" ;
|
||||
prpart = ""
|
||||
} ;
|
||||
|
||||
predProg : VPH -> VPH = \verb -> {
|
||||
s = \\vh =>
|
||||
case vh of {
|
||||
VPTense VPPres (Ag g n p) => {fin = copula CPresent n p g ; inf = (verb.s!VPTense VPPres (Ag g n p)).inf ++ pya g n} ;
|
||||
VPTense VPPast (Ag g n p) => {fin = copula CPast n p g ; inf = (verb.s!VPTense VPPres (Ag g n p)).inf ++ pya g n} ;
|
||||
VPTense VPFutr (Ag g n p) => {fin = copula CFuture n p g ; inf = (verb.s!VPTense VPPres (Ag g n p)).inf } ;
|
||||
VPTense VPPerf (Ag g n p) => {fin = copula CPast n p g ; inf = (verb.s!VPTense VPPres (Ag g n p)).inf ++ raha g n } ;
|
||||
VPStem => {fin = [] ; inf = (verb.s!VPStem).inf };
|
||||
_ => {fin = [] ; inf = [] }
|
||||
};
|
||||
obj = verb.obj ;
|
||||
subj = VIntrans ;
|
||||
inf = verb.inf;
|
||||
ad = verb.ad;
|
||||
embComp = verb.embComp;
|
||||
prog = True ;
|
||||
comp = verb.comp
|
||||
} ;
|
||||
|
||||
Clause : Type = {s : VPHTense => Polarity => Order => Str} ;
|
||||
mkClause : NP -> VPH -> Clause = \np,vp -> {
|
||||
s = \\vt,b,ord =>
|
||||
let
|
||||
subjagr : NPCase * Agr = case vt of {
|
||||
VPImpPast => case vp.subj of {
|
||||
VTrans => <NPErg, vp.obj.a> ;
|
||||
VTransPost => <NPErg, defaultAgr> ;
|
||||
_ => <NPC Dir, np.a>
|
||||
} ;
|
||||
_ => <NPC Dir, np.a>
|
||||
} ;
|
||||
subj = subjagr.p1 ;
|
||||
agr = subjagr.p2 ;
|
||||
n = (fromAgr agr).n;
|
||||
p = (fromAgr agr).p;
|
||||
g = (fromAgr agr).g;
|
||||
vps = case vt of {
|
||||
|
||||
VPGenPres => vp.s ! VPTense VPPres agr ;
|
||||
VPImpPast => vp.s ! VPTense VPPast agr ;
|
||||
|
||||
VPFut => case vp.prog of { True => {fin = (vp.s ! VPTense VPFutr agr).fin ; inf = (vp.s ! VPTense VPFutr agr).inf ++ hw p n} ;
|
||||
_ => vp.s ! VPTense VPFutr agr } ;
|
||||
VPContPres =>
|
||||
{fin = copula CContinuous n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
||||
VPContPast =>
|
||||
{fin = copula CPast n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
||||
VPContFut =>
|
||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
||||
VPPerfPres =>
|
||||
{fin = copula CContinuous n p g ; inf = (vp.s ! VPTense VPPast agr).inf } ;
|
||||
-- {fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
||||
VPPerfPast =>
|
||||
-- {fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
||||
{fin = copula CPast n p g ; inf = (vp.s ! VPTense VPPast agr).inf } ;
|
||||
VPPerfFut =>
|
||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPTense VPPast agr).inf } ;
|
||||
VPPerfPresCont =>
|
||||
{fin = copula CContinuous n p g ; inf = (vp.s ! VPTense VPFutr agr).inf ++ raha g n} ;
|
||||
VPPerfPastCont =>
|
||||
{fin = copula CPast n p g ; inf = (vp.s ! VPTense VPFutr agr).inf ++ rahanDa g n} ;
|
||||
VPPerfFutCont =>
|
||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPTense VPFutr agr).inf ++ rahanDa g n} ;
|
||||
VPSubj => case vp.prog of { True => {fin = (vp.s ! VPTense VPFutr agr).inf ++ hw p n ; inf = "شاید" } ;
|
||||
_ => {fin = (vp.s ! VPTense VPFutr agr).inf ; inf = "شاید" } }
|
||||
|
||||
};
|
||||
|
||||
|
||||
quest =
|
||||
case ord of
|
||||
{ ODir => [];
|
||||
OQuest => "ڇا" };
|
||||
na =
|
||||
case b of
|
||||
{ Pos => [];
|
||||
Neg => "ن" };
|
||||
nahim =
|
||||
case b of
|
||||
{ Pos => [];
|
||||
Neg => "ن" };
|
||||
in
|
||||
case vt of {
|
||||
VPSubj => quest ++ np.s ! subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! np.a ++ vps.inf ++ na ++ vps.fin ++ vp.embComp ;
|
||||
_ => quest ++ np.s ! subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! np.a ++ vps.inf ++ nahim ++ vps.fin ++ vp.embComp};
|
||||
|
||||
} ;
|
||||
|
||||
mkSClause : Str -> Agr -> VPH -> Clause =
|
||||
\subj,agr,vp -> {
|
||||
s = \\t,b,ord =>
|
||||
let
|
||||
n = (fromAgr agr).n;
|
||||
p = (fromAgr agr).p;
|
||||
g = (fromAgr agr).g;
|
||||
vps = case t of {
|
||||
VPGenPres => vp.s ! VPTense VPPres agr ;
|
||||
VPImpPast => vp.s ! VPTense VPPast agr ;
|
||||
VPFut => vp.s ! VPTense VPFutr agr ;
|
||||
VPContPres =>
|
||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ pya g n } ;
|
||||
VPContPast =>
|
||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ pya g n } ;
|
||||
VPContFut =>
|
||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ pya g n ++ hw p n } ;
|
||||
VPPerfPres =>
|
||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
||||
VPPerfPast =>
|
||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
||||
VPPerfFut =>
|
||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ cka g n ++ hw p n } ;
|
||||
VPPerfPresCont =>
|
||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ pya g n } ;
|
||||
VPPerfPastCont =>
|
||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ pya g n } ;
|
||||
VPPerfFutCont =>
|
||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ pya g n ++ hw p n } ;
|
||||
VPSubj => {fin = (vp.s ! VPTense VPPres agr).inf ; inf = "شاید" }
|
||||
|
||||
};
|
||||
|
||||
quest =
|
||||
case ord of
|
||||
{ ODir => [];
|
||||
OQuest => "ڇا" };
|
||||
na =
|
||||
case b of
|
||||
{ Pos => [];
|
||||
Neg => "ن" };
|
||||
nahim =
|
||||
case b of
|
||||
{ Pos => [];
|
||||
Neg => "ن" };
|
||||
in
|
||||
case t of {
|
||||
VPSubj => quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ vps.inf ++ na ++ vps.fin ++ vp.embComp;
|
||||
_ => quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ vps.inf ++ nahim ++ vps.fin ++ vp.embComp};
|
||||
} ;
|
||||
|
||||
insertSubj : PPerson -> Str -> Str = \p,s ->
|
||||
case p of { Pers1 => s ++ "wN" ; _ => s ++ ""};
|
||||
|
||||
insertObj : (Agr => Str) -> VPH -> VPH = \obj1,vp -> {
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
subj = vp.subj ;
|
||||
inf = vp.inf;
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp;
|
||||
prog = vp.prog ;
|
||||
comp = \\a => vp.comp ! a ++ obj1 ! a
|
||||
} ;
|
||||
insertVV : Str -> VPH -> Str -> VPH -> VPH = \obj1,vp,emb,vp2 -> {
|
||||
s = vp.s ;
|
||||
obj = vp2.obj ;
|
||||
subj = vp.subj ;
|
||||
inf = vp.inf;
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp ++ emb; -- this should be covered in urdu as well
|
||||
prog = vp.prog ;
|
||||
comp = \\a => vp.comp ! a ++ obj1
|
||||
} ;
|
||||
|
||||
insertObj2 : (Str) -> VPH -> VPH = \obj1,vp -> {
|
||||
s = vp.s;
|
||||
obj = vp.obj ;
|
||||
subj = vp.subj ;
|
||||
inf = vp.inf;
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp ++ obj1;
|
||||
prog = vp.prog ;
|
||||
comp = vp.comp
|
||||
|
||||
} ;
|
||||
|
||||
insertObjc : (Agr => Str) -> VPHSlash -> VPHSlash = \obj,vp ->
|
||||
insertObj obj vp ** {c2 = vp.c2} ;
|
||||
insertObjc2 : Str -> VPHSlash -> VPHSlash = \obj,vp ->
|
||||
insertObj2 obj vp ** {c2 = vp.c2} ;
|
||||
|
||||
infVP : Bool -> VPH -> Agr -> Str = \isAux,vp,a ->
|
||||
vp.obj.s ++ vp.inf ++ vp.comp ! a ;
|
||||
infVV : Bool -> VPH -> Str = \isAux,vp ->
|
||||
case isAux of {False => (vp.comp ! (toAgr Sg Pers1 Masc)) ++ vp.inf ; True => (vp.comp ! (toAgr Sg Pers1 Masc)) ++ (vp.s ! VPImp).fin }; -- need to be checked and should be covered in urdu as well
|
||||
infV2V : Bool -> VPH -> Str = \isAux,vp ->
|
||||
case isAux of {False => (vp.comp ! (toAgr Sg Pers1 Masc)) ++ vp.inf ++ "دی" ; True => (vp.comp ! (toAgr Sg Pers1 Masc)) ++ (vp.s ! VPImp).fin ++ "دی"}; -- need to be checked and should be covered in urdu as well
|
||||
|
||||
insertObject : NP -> VPHSlash -> VPH = \np,vps -> {
|
||||
s = vps.s ;
|
||||
obj = case np.isPron of {
|
||||
False => {s = vps.obj.s ++ np.s ! objVType vps.c2.c ++ vps.c2.s ; a = np.a} ;
|
||||
_ => {s = vps.obj.s ++ np.s ! objVType vps.c2.c ++ vps.c2.s ; a = np.a}
|
||||
};
|
||||
subj = vps.c2.c ;
|
||||
inf = vps.inf;
|
||||
ad = vps.ad;
|
||||
embComp = vps.embComp;
|
||||
prog = vps.prog ;
|
||||
comp = vps.comp
|
||||
} ;
|
||||
|
||||
insertObjPre : (Agr => Str) -> VPHSlash -> VPH = \obj,vp -> {
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
inf = vp.inf ;
|
||||
subj = vp.subj ;
|
||||
ad = vp.ad ;
|
||||
embComp = vp.embComp;
|
||||
prog = vp.prog ;
|
||||
comp = \\a => obj ! a ++ vp.c2.s ++ vp.comp ! a
|
||||
} ;
|
||||
|
||||
insertAdV : Str -> VPH -> VPH = \ad,vp -> {
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
inf = vp.inf ;
|
||||
subj = vp.subj;
|
||||
ad = vp.ad ++ ad ;
|
||||
embComp = vp.embComp;
|
||||
prog = vp.prog ;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
conjThat : Str = "ت" ;
|
||||
checkPron : NP -> Str -> Str = \np,str -> case (np.isPron) of {
|
||||
True => np.s ! NPC Obl;
|
||||
False => np.s ! NPC Obl ++ str} ;
|
||||
|
||||
insertEmbCompl : VPH -> Str -> VPH = \vp,emb -> {
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
inf = vp.inf ;
|
||||
subj = vp.subj;
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp ++ emb;
|
||||
prog = vp.prog ;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
|
||||
insertTrans : VPH -> VType -> VPH = \vp,vtype -> {
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
inf = vp.inf ;
|
||||
subj = case vtype of {VIntrans => VTransPost ; VTrans => VTrans ; _ => vtype} ; -- still some problem not working properly
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp ;
|
||||
prog = vp.prog ;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
104
lib/src/sindhi/SentenceSnd.gf
Normal file
104
lib/src/sindhi/SentenceSnd.gf
Normal file
@@ -0,0 +1,104 @@
|
||||
concrete SentenceSnd of Sentence = CatSnd ** open Prelude, ResSnd in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
coding = utf8;
|
||||
|
||||
lin
|
||||
|
||||
PredVP np vp = mkClause np vp ;
|
||||
|
||||
PredSCVP sc vp = mkSClause sc.s (defaultAgr) vp ;
|
||||
|
||||
ImpVP vp = {
|
||||
s = \\pol,n =>
|
||||
let
|
||||
agr = Ag Masc (numImp n) Pers2_Casual ;
|
||||
-- verb = infVP True vp agr ;
|
||||
verb = (vp.s ! VPImp).inf ++ vp.comp ! agr ;
|
||||
dont = case pol of {
|
||||
CNeg True => "ن" ;
|
||||
CNeg False => "ن" ;
|
||||
_ => []
|
||||
}
|
||||
in
|
||||
dont ++ verb
|
||||
} ;
|
||||
|
||||
SlashVP np vp =
|
||||
mkClause np vp ** {c2 = vp.c2} ;
|
||||
|
||||
AdvSlash slash adv = {
|
||||
s = \\t,p,o => adv.s ! Masc ++ slash.s ! t ! p ! o ;
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
|
||||
SlashPrep cl prep = cl ** {c2 = { s = prep.s ; c = VIntrans}} ;
|
||||
|
||||
SlashVS np vs slash =
|
||||
mkClause np
|
||||
(insertObj2 (conjThat ++ slash.s) (predV vs)) **
|
||||
{c2 = slash.c2} ;
|
||||
|
||||
EmbedS s = {s = conjThat ++ s.s} ;
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = infVP False vp defaultAgr} ; --- agr
|
||||
|
||||
UseCl temp p cl =
|
||||
{ s = case <temp.t,temp.a> of {
|
||||
<Pres,Simul> => temp.s ++ p.s ++ cl.s ! VPGenPres ! p.p ! ODir;
|
||||
<Pres,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPres ! p.p ! ODir;
|
||||
<Past,Simul> => temp.s ++ p.s ++ cl.s ! VPImpPast ! p.p ! ODir;
|
||||
<Past,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPast ! p.p ! ODir;
|
||||
<Fut,Simul> => temp.s ++ p.s ++ cl.s ! VPFut ! p.p ! ODir;
|
||||
<Fut,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfFut ! p.p ! ODir;
|
||||
<Cond,Simul> => temp.s ++ p.s ++ cl.s ! VPSubj ! p.p ! ODir;
|
||||
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VPSubj ! p.p ! ODir -- this needs to be fixed by making SubjPerf in ResPnb
|
||||
|
||||
};
|
||||
} ;
|
||||
UseQCl temp p cl = {
|
||||
s = \\q => case <temp.t,temp.a> of {
|
||||
<Pres,Simul> => temp.s ++ p.s ++ cl.s ! VPGenPres ! p.p ! q;
|
||||
<Pres,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPres ! p.p ! q;
|
||||
<Past,Simul> => temp.s ++ p.s ++ cl.s ! VPImpPast ! p.p ! q;
|
||||
<Past,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPast ! p.p ! q;
|
||||
<Fut,Simul> => temp.s ++ p.s ++ cl.s ! VPFut ! p.p ! q;
|
||||
<Fut,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfFut ! p.p ! q;
|
||||
<Cond,Simul> => temp.s ++ p.s ++ cl.s ! VPSubj ! p.p ! q;
|
||||
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VPSubj ! p.p ! q
|
||||
|
||||
};
|
||||
} ;
|
||||
UseRCl temp p rcl = {
|
||||
s = \\q => case <temp.t,temp.a> of {
|
||||
<Pres,Simul> => temp.s ++ p.s ++ rcl.s ! VPGenPres ! p.p ! ODir ! q;
|
||||
<Pres,Anter> => temp.s ++ p.s ++ rcl.s ! VPPerfPres ! p.p ! ODir ! q;
|
||||
<Past,Simul> => temp.s ++ p.s ++ rcl.s ! VPImpPast ! p.p ! ODir ! q;
|
||||
<Past,Anter> => temp.s ++ p.s ++ rcl.s ! VPPerfPast ! p.p ! ODir ! q;
|
||||
<Fut,Simul> => temp.s ++ p.s ++ rcl.s ! VPFut ! p.p ! ODir ! q;
|
||||
<Fut,Anter> => temp.s ++ p.s ++ rcl.s ! VPPerfFut ! p.p ! ODir ! q;
|
||||
<Cond,Simul> => temp.s ++ p.s ++ rcl.s ! VPSubj ! p.p ! ODir ! q;
|
||||
<Cond,Anter> => temp.s ++ p.s ++ rcl.s ! VPSubj ! p.p ! ODir ! q
|
||||
};
|
||||
c = rcl.c
|
||||
} ;
|
||||
UseSlash temp p clslash = {
|
||||
s = case <temp.t,temp.a> of {
|
||||
<Pres,Simul> => temp.s ++ p.s ++ clslash.s ! VPGenPres ! p.p ! ODir;
|
||||
<Pres,Anter> => temp.s ++ p.s ++ clslash.s ! VPPerfPres ! p.p ! ODir;
|
||||
<Past,Simul> => temp.s ++ p.s ++ clslash.s ! VPImpPast ! p.p ! ODir ;
|
||||
<Past,Anter> => temp.s ++ p.s ++ clslash.s ! VPPerfPast ! p.p ! ODir;
|
||||
<Fut,Simul> => temp.s ++ p.s ++ clslash.s ! VPFut ! p.p ! ODir;
|
||||
<Fut,Anter> => temp.s ++ p.s ++ clslash.s ! VPPerfFut ! p.p ! ODir;
|
||||
<Cond,Simul> => temp.s ++ p.s ++ clslash.s ! VPSubj ! p.p ! ODir;
|
||||
<Cond,Anter> => temp.s ++ p.s ++ clslash.s ! VPSubj ! p.p ! ODir
|
||||
};
|
||||
c2 = clslash.c2
|
||||
} ;
|
||||
|
||||
AdvS a s = {s = a.s ! Masc ++ s.s} ;
|
||||
|
||||
RelS s r = {s = s.s ++ r.s ! agrP3 Masc Sg} ;
|
||||
SSubjS s sj s = { s = s.s ++ sj.s ++ s.s};
|
||||
|
||||
}
|
||||
132
lib/src/sindhi/StructuralSnd.gf
Normal file
132
lib/src/sindhi/StructuralSnd.gf
Normal file
@@ -0,0 +1,132 @@
|
||||
concrete StructuralSnd of Structural = CatSnd **
|
||||
open MorphoSnd, ParadigmsSnd, Prelude in {
|
||||
|
||||
flags optimize=all ;
|
||||
coding = utf8;
|
||||
|
||||
lin
|
||||
above_Prep = mkPrep "مٿی " ;
|
||||
after_Prep = mkPrep "کان پو۶ " ;
|
||||
all_Predet = ss "سڀ " ;
|
||||
almost_AdA, almost_AdN = mkAdN "گھڻو ڪری " ;
|
||||
although_Subj = ss "جیتوڻیڪ " ;
|
||||
always_AdV = ss "ھمیشھ " ;
|
||||
and_Conj = sd2 [] "۽" ** {n = Pl} ;
|
||||
because_Subj = ss "ڇاڪاڻ تی " ;
|
||||
before_Prep = mkPrep "پیھرین" ;
|
||||
behind_Prep = mkPrep "پٺتی " ;
|
||||
between_Prep = mkPrep " جی وچ می " ;
|
||||
both7and_DConj = sd2 "ٻ۶ی " "۽" ** {n = Pl} ;
|
||||
but_PConj = ss "پر" ;
|
||||
by8agent_Prep = mkPrep "ھٿان " ;
|
||||
by8means_Prep = mkPrep "ڪان" ;
|
||||
can8know_VV,can_VV = mkV "سگھڻ " ** { isAux = True} ;
|
||||
during_Prep = mkPrep "وچ ۾" ;
|
||||
either7or_DConj = sd2 "ڪو۶ی ٻیو " "یا" ** {n = Sg} ;
|
||||
--everybody_NP = MassNP (UseN (ParadigmsSnd.mkN "ھر ڪو۶ی" "ھر ڪو۶ی" "ھر ڪو۶ی" "ھر ڪو۶ی" Masc )); -- not a good way coz need to include NounSnd
|
||||
every_Det = mkDet "ھر ھڪ " "ھر ھڪ " "ھر ھڪ " "ھر ھڪ " Sg;
|
||||
--everything_NP = MassNP (UseN (ParadigmsSnd.mkN "ھر شی " "ھر شی " "ھر شی " "سڀ ڪجھ " Masc ));
|
||||
everywhere_Adv = mkAdv "ھر ھنڌ " ;
|
||||
few_Det = mkDet "ڪجھ " "ڪجھ " "ڪجھ " "ڪجھ " Pl ;
|
||||
first_Ord = {s = "پھریون" ; n = Sg} ; --DEPRECATED
|
||||
for_Prep = mkPrep "لا۶ی ";
|
||||
from_Prep = mkPrep "وٽان" ;
|
||||
he_Pron = personalPN "ھو" "ھو" "" ["ھو "] ["ھو"] Sg Masc Pers3_Distant ;
|
||||
here_Adv = mkAdv "ھتی" ;
|
||||
here7to_Adv = mkAdv "اجھو" ;
|
||||
here7from_Adv = mkAdv ["ھیڏانھن"] ;
|
||||
how_IAdv = ss "ڪ۶ین" ;
|
||||
how8many_IDet = makeIDet "ڪیترا" "ڪیترا" Pl ;
|
||||
how8much_IAdv = ss "ڪیترا";
|
||||
if_Subj = ss "جیڪڏھن" ;
|
||||
in8front_Prep = mkPrep ["جی سامھون"] ;
|
||||
i_Pron = personalPN "مان" "مھنجا " "مھنجو " "مان" " " Sg Masc Pers1;
|
||||
in_Prep = mkPrep "۾" ;
|
||||
it_Pron = personalPN "اھا" "ھن" "اھو" "اھا" "" Sg Masc Pers3_Near;
|
||||
less_CAdv = {s = "گھٽ" ; p = ""} ;
|
||||
many_Det = mkDet "گھڻا" "گھڻی" "ڪافی" "ڪیترا" Pl ;
|
||||
more_CAdv = {s = "وڌیڪ"; p = "گھڻا" } ;
|
||||
most_Predet = ss "سڀ کان گھڻو" ;
|
||||
much_Det = mkDet "گھڻو" "گھڻو" "گھڻو" "گھڻو" Sg ;
|
||||
--must_VV = {
|
||||
-- s = table {
|
||||
-- VVF VInf => ["hاvع تo"] ;
|
||||
-- VVF VPres => "مuست" ;
|
||||
-- VVF VPPart => ["hاد تo"] ;
|
||||
-- VVF VPresPart => ["hاviنگ تo"] ;
|
||||
-- VVF VPast => ["hاد تo"] ; --# notpresent
|
||||
-- VVPastNeg => ["hادn'ت تo"] ; --# notpresent
|
||||
-- VVPresNeg => "مuستn'ت"
|
||||
-- } ;
|
||||
-- isAux = True
|
||||
-- } ;
|
||||
|
||||
-----b
|
||||
no_Phr = ss "نo" ;
|
||||
no_Utt = ss "نا" ;
|
||||
on_Prep = mkPrep "مٿان" ;
|
||||
one_Quant = demoPN "ھڪ" "ھڪ" "ھڪ" ; -- DEPRECATED
|
||||
only_Predet = ss "صرف" ;
|
||||
or_Conj = sd2 [] "یا" ** {n = Sg} ;
|
||||
otherwise_PConj = ss "ن ت پو۶ی" ;
|
||||
part_Prep = mkPrep "حسو" ;
|
||||
possess_Prep = mkPrep[ "جو یا جی"] ;
|
||||
please_Voc = ss "مھربانی" ;
|
||||
quite_Adv = ss "ڇڏڻ " ;
|
||||
she_Pron = personalPN "ھو۶" "ھو" "ھو" ["ھو۶"] ["ھو۶"] Sg Fem Pers3_Distant ;
|
||||
so_AdA = ss "ان ڪری" ;
|
||||
--somebody_NP = MassNP (UseN (ParadigmsSnd.mkN "ڪو۶ی" "ڪو۶ی" "ڪو۶ی" "ڪو۶ی" Masc ));
|
||||
someSg_Det = mkDet "ڪجھ " "ڪجھ " "ڪجھ " "ڪجھ " Sg ;
|
||||
somePl_Det = mkDet "ڪجھ " "ڪجھ " "ڪجھ " "ڪجھ " Pl ;
|
||||
--something_NP = MassNP (UseN (ParadigmsSnd.mkN "ڪو۶ی شی" "ڪو۶ی شی" "ڪو۶ی شی" "ڪو۶ی شیون" Masc ));
|
||||
somewhere_Adv = mkAdv "ڪٿی" ;
|
||||
that_Quant = demoPN "جیڪو" "" "" ;
|
||||
that_Subj = ss "اھا" ;
|
||||
there_Adv = mkAdv "اتی" ;
|
||||
there7to_Adv = mkAdv ["ھتی"] ;
|
||||
there7from_Adv = mkAdv ["ھتان"] ;
|
||||
therefore_PConj = ss "ان ڪری" ;
|
||||
they_Pron = personalPN "اھی" "اھی" "اھی" ["اھی جو"] ["اھی جو"] Pl Masc Pers3_Distant ; ----
|
||||
this_Quant = demoPN "ھی" "ھن" "";
|
||||
through_Prep = mkPrep "منجھان" ;
|
||||
under_Prep = mkPrep " ھیٺان" ; -- ** {lock_Prep = <>};
|
||||
too_AdA = ss "بیحد";
|
||||
to_Prep = mkPrep "ڏانھن" ; -- ** {lock_Prep = <>};
|
||||
very_AdA = ss "تمام" ;
|
||||
want_VV = mkV "چاھڻ " ** { isAux = False} ;
|
||||
we_Pron = personalPN "اسان" "اسان" "اسان" "اسانجo" "اسانجo" Pl Masc Pers1 ;
|
||||
whatSg_IP = mkIP "ڇا" "ڇو" "" "" Sg Masc ;
|
||||
whatPl_IP = mkIP "ڇا" "ڇو " " " "" Pl Masc ;
|
||||
when_IAdv = ss "ڪڏھن" ;
|
||||
when_Subj = ss "جڏھن" ;
|
||||
where_IAdv = ss "ڪٿی" ;
|
||||
--which_IQuant = {s = \\_ => "ڪھڙو"} ;
|
||||
which_IQuant = mkIQuant "جیڪو" "جیڪی" "جیڪا" "جھڙو" ;
|
||||
whichPl_IDet = makeDet "جیڪY" "جنھن" ;
|
||||
whichSg_IDet = makeDet "جیڪو " "جیڪا" ;
|
||||
whoSg_IP = mkIP "ڪیر" "ڪھنجی" "ڪھنجo" "" Sg Masc ;
|
||||
whoPl_IP = mkIP "ڪیر" "ڪھنجا" "ڪھنجا" "" Pl Masc ;
|
||||
why_IAdv = ss "ڇو" ;
|
||||
without_Prep = mkPrep "کان سوا۶ " ;
|
||||
with_Prep = mkPrep "سان" ;
|
||||
yes_Phr = ss "ھا" ;
|
||||
yes_Utt = ss "ھا" ;
|
||||
youSg_Pron = personalPN "تون" "تون" "تون" "تھنجو" "تھنجی" Sg Masc Pers2_Casual ;
|
||||
youPl_Pron = personalPN "توھان" "توھان" "توھان" "توھانجو" "توھانجی" Pl Masc Pers2_Casual ;
|
||||
youPol_Pron = personalPN "توھان" "توھان" "توھان" "توھان جو" "توھان جی" Pl Masc Pers2_Respect ;
|
||||
no_Quant = demoPN " ڇو ن" "ڇو ن" "ڇو ن " ;
|
||||
not_Predet = {s="ن"} ;
|
||||
if_then_Conj = sd2 "جیڪڏھن" "ت" ** {n = Sg} ;
|
||||
at_least_AdN = mkAdN ["گھٽ می گھٽ"] ;
|
||||
at_most_AdN = mkAdN ["گھڻی کان گھڻو"];
|
||||
|
||||
--nothing_NP = MassNP (UseN (ParadigmsSnd.mkN "ڪجھ شی ن" "ڪجھ شی ن" "ڪجھ شی ن" "ڪجھ شی ن" "ڪجھ شی ن" "ڪجھ شی ن" Masc ));
|
||||
except_Prep = mkPrep "سوا۶ " ;
|
||||
--nobody_NP = MassNP (UseN (ParadigmsSnd.mkN "ڪو ب ن" "ڪو ب ن" "ڪو ب ن" "ڪو ب ن" "ڪو ب ن" "ڪو ب ن" Masc ));
|
||||
|
||||
as_CAdv = {s = "جی۶ن" ; p = "جھڙو"} ;
|
||||
have_V2 = mkV2 (mkV "رکڻ ") "" ;
|
||||
language_title_Utt = ss "ٻوlی" ;
|
||||
|
||||
}
|
||||
|
||||
50
lib/src/sindhi/SymbolSnd.gf
Normal file
50
lib/src/sindhi/SymbolSnd.gf
Normal file
@@ -0,0 +1,50 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete SymbolSnd of Symbol = CatSnd ** open Prelude, ResSnd in {
|
||||
|
||||
flags coding = utf8;
|
||||
|
||||
lin
|
||||
-- SymbPN i = {s = \\_ => i.s ; g = Masc} ;
|
||||
SymbPN i = {s = addGenitiveS i.s ; g = Masc} ;
|
||||
IntPN i = {s = addGenitiveS i.s ; g = Masc} ;
|
||||
FloatPN i = {s = addGenitiveS i.s ; g = Masc} ;
|
||||
NumPN i = {s = \\_ =>i.s ; g = Masc} ;
|
||||
CNIntNP cn i = {
|
||||
s = \\c => cn.s ! Sg ! Dir ++ i.s ;
|
||||
a = agrP3 cn.g Sg ;
|
||||
isPron = False
|
||||
} ;
|
||||
CNSymbNP det cn xs = {
|
||||
s = \\c => det.s!Sg!Masc ++ cn.s ! det.n ! Dir ++ xs.s ;
|
||||
a = agrP3 cn.g det.n;
|
||||
isPron = False
|
||||
} ;
|
||||
CNNumNP cn i = {
|
||||
s = \\c => cn.s ! Sg ! Dir ++ i.s ;
|
||||
a = agrP3 cn.g Sg;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
SymbS sy = sy ;
|
||||
SymbNum sy = { s = sy.s ; n = Pl } ;
|
||||
SymbOrd sy = { s = sy.s ++ "wاN" ; n = Pl} ;
|
||||
|
||||
lincat
|
||||
|
||||
Symb, [Symb] = SS ;
|
||||
|
||||
lin
|
||||
MkSymb s = s ;
|
||||
|
||||
BaseSymb = infixSS "تE" ;
|
||||
ConsSymb = infixSS "" ;
|
||||
|
||||
oper
|
||||
-- Note: this results in a space before 's, but there's
|
||||
-- not mauch we can do about that.
|
||||
addGenitiveS : Str -> Case => Str = \s ->
|
||||
table {_ => s ++ "دا" } ;
|
||||
|
||||
|
||||
}
|
||||
44
lib/src/sindhi/VerbSnd.gf
Normal file
44
lib/src/sindhi/VerbSnd.gf
Normal file
@@ -0,0 +1,44 @@
|
||||
concrete VerbSnd of Verb = CatSnd ** open ResSnd in {
|
||||
|
||||
flags coding = utf8;
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
UseV v = predV v ;
|
||||
SlashV2a v = predV v ** {c2 = {s = v.c2.s ; c = VTrans}} ;
|
||||
Slash2V3 v np =
|
||||
insertObjc (\\_ => np.s ! NPObj ++ v.c3 ) (predV v ** {c2 = {s = v.c2 ; c = VTrans}}) ;
|
||||
|
||||
Slash3V3 v np =
|
||||
insertObjc (\\_ => checkPron np v.c2) (predV v ** {c2 = {s = v.c3 ; c = VTrans}}) ;
|
||||
|
||||
ComplVV v vp = insertTrans (insertVV (infVV v.isAux vp) (predV v) vp.embComp vp) vp.subj;
|
||||
ComplVS v s = insertTrans (insertObj2 (conjThat ++ s.s) (predV v)) VTransPost ;
|
||||
ComplVQ v q = insertObj2 (conjThat ++ q.s ! QIndir) (predV v) ;
|
||||
ComplVA v ap = insertObj (\\a => ap.s ! giveNumber a ! giveGender a ! Dir ) (predV v) ;
|
||||
SlashV2V v vp = insertVV (infV2V v.isAux vp) (predV v) vp.embComp vp **{c2 = {s = "تwN" ; c = VTransPost}} ; -- should creat a form at VP level which can be used in VP like 'swn da kyna' also check the c=VTransPost it is correct in case if second v is intrasitive, but not if trans like begged me to ead bread
|
||||
SlashV2S v s = insertObjc2 (conjThat ++ s.s) (predV v ** {c2 = {s = "کی" ; c = VTransPost}}) ;
|
||||
SlashV2Q v q = insertObjc2 (conjThat ++ q.s ! QIndir) (predV v ** {c2 = {s = "کان" ; c = VTransPost}}) ; -- chek for VTransPost, as in this case , case should be ergative but agrement should be default
|
||||
SlashV2A v ap = insertObjc (\\a => ap.s ! giveNumber a ! giveGender a ! Dir ) (predV v ** {c2 = {s = "کی" ; c = VTransPost}}) ; ----
|
||||
ComplSlash vp np = insertObject np vp ;
|
||||
SlashVV vv vp =
|
||||
insertEmbCompl (insertObj (\\a => infVP vv.isAux vp a) (predV vv)) vp.embComp **
|
||||
{c2 = vp.c2} ;
|
||||
SlashV2VNP vv np vp =
|
||||
insertObjPre (\\_ => np.s ! NPObj )
|
||||
(insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) **
|
||||
{c2 = vp.c2} ;
|
||||
UseComp comp = insertObj comp.s (predAux auxBe) ;
|
||||
|
||||
AdvVP vp adv = insertObj (\\a => adv.s ! (fromAgr a).g) vp ;
|
||||
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
ReflVP v = insertObjPre (\\_ => RefPron) v ;
|
||||
PassV2 v = predV v ; -- need to be fixed
|
||||
CompAP ap ={s = \\a => ap.s ! giveNumber a ! giveGender a ! Dir } ;
|
||||
CompNP np = {s = \\_ => np.s ! NPObj} ;
|
||||
CompAdv adv = {s = \\a => adv.s ! (fromAgr a).g } ;
|
||||
CompCN cn = {s = \\a => cn.s ! giveNumber a ! Dir} ;
|
||||
|
||||
|
||||
}
|
||||
40
lib/src/sindhi/src/AdjectiveSnd.gf
Normal file
40
lib/src/sindhi/src/AdjectiveSnd.gf
Normal file
@@ -0,0 +1,40 @@
|
||||
concrete AdjectiveSnd of Adjective = CatSnd ** open ResSnd, Prelude in {
|
||||
|
||||
flags coding = utf8;
|
||||
lin
|
||||
|
||||
PositA a = a ;
|
||||
UseComparA a = a;
|
||||
|
||||
ComparA a np = {
|
||||
-- s = \\n,g,c => np.s ! NPC Obl ++ "k'an" ++ a.s ! n ! g ! c ;
|
||||
s = \\n,g,c => np.s ! NPC Abl ++ "k'an" ++ a.s ! n ! g ! c ;
|
||||
} ;
|
||||
|
||||
---- $SuperlA$ belongs to determiner syntax in $Noun$.
|
||||
|
||||
ComplA2 a np = {
|
||||
s = \\n,g,c => np.s ! NPC Obl ++ a.c2 ++ a.s ! n ! g ! c ;
|
||||
} ;
|
||||
|
||||
ReflA2 a = {
|
||||
s = \\n,g,c => a.s ! n ! g ! c ++ RefPron ++ "san" ;
|
||||
} ;
|
||||
|
||||
SentAP ap sc = {
|
||||
s = \\n,g,c => ap.s ! n ! g ! c ++ sc.s ;
|
||||
} ;
|
||||
|
||||
AdAP ada ap = {
|
||||
s = \\n,g,c => ada.s ++ ap.s ! n ! g ! c ;
|
||||
} ;
|
||||
|
||||
UseA2 a = a ;
|
||||
|
||||
CAdvAP cadv ap np = {
|
||||
s = \\n,g,c => cadv.s ++ ap.s ! n ! g ! c ++ cadv.p ++ np.s ! NPC Dir ;
|
||||
};
|
||||
|
||||
AdjOrd ord = { s = \\_,_,_ => ord.s ; };
|
||||
|
||||
}
|
||||
20
lib/src/sindhi/src/AdverbSnd.gf
Normal file
20
lib/src/sindhi/src/AdverbSnd.gf
Normal file
@@ -0,0 +1,20 @@
|
||||
concrete AdverbSnd of Adverb = CatSnd ** open ResSnd, Prelude in {
|
||||
|
||||
flags coding = utf8;
|
||||
lin
|
||||
PositAdvAdj a = {s = \\g => a.s ! Sg ! g ! Obl } ;
|
||||
ComparAdvAdj cadv a np = {
|
||||
s = \\g => np.s ! NPObj ++ cadv.p ++ cadv.s ++ a.s ! Sg ! g ! Obl ;
|
||||
} ;
|
||||
ComparAdvAdjS cadv a s = {
|
||||
s = \\g => cadv.p ++ cadv.s ++ a.s ! Sg ! g ! Obl ++ s.s;
|
||||
} ;
|
||||
|
||||
PrepNP prep np = {s = \\_ => np.s ! NPObj ++ prep.s } ;
|
||||
|
||||
AdAdv ada adv = { s = \\g => ada.s ++ adv.s ! g} ;
|
||||
|
||||
SubjS sub snt = {s = \\_ => sub.s ++ snt.s } ;
|
||||
AdnCAdv cadv = {s = "san gD' " ++ cadv.s} ;
|
||||
|
||||
}
|
||||
19
lib/src/sindhi/src/ExtraSnd.gf
Normal file
19
lib/src/sindhi/src/ExtraSnd.gf
Normal file
@@ -0,0 +1,19 @@
|
||||
concrete ExtraSnd of ExtraSndAbs = CatSnd **
|
||||
open ResSnd, Coordination, Prelude, MorphoSnd, ParadigmsSnd in {
|
||||
|
||||
flags coding = utf8;
|
||||
|
||||
lin
|
||||
GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "ka" ; a = np.a} ;
|
||||
|
||||
each_Det = mkDet "hr kwy" "hr kwy" "hr kwy" "hr kwy" Sg ;
|
||||
have_V = mkV "rakh'na";
|
||||
IAdvAdv adv = {s = "ktny" ++ adv.s!Masc} ;
|
||||
ICompAP ap = {s = "ktnE" ++ ap.s ! Sg ! Masc ! Dir} ;
|
||||
cost_V = mkV "qymt" ;
|
||||
|
||||
-- added for causitives
|
||||
make_CV = mkVerb "nothing" ** {c2 = "" };
|
||||
|
||||
-- for VP conjunction
|
||||
}
|
||||
40
lib/src/sindhi/src/IdiomSnd.gf
Normal file
40
lib/src/sindhi/src/IdiomSnd.gf
Normal file
@@ -0,0 +1,40 @@
|
||||
concrete IdiomSnd of Idiom = CatSnd ** open Prelude,Predef, ResSnd in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
flags coding = utf8;
|
||||
|
||||
lin
|
||||
ImpersCl vp = mkSClause " " (agrP3 Masc Sg) vp ;
|
||||
GenericCl vp = mkSClause "kWe'y" (agrP3 Masc Sg) vp ;
|
||||
|
||||
CleftNP np rs =
|
||||
let cl = mkSClause (np.s ! NPC rs.c) (np.a) (predAux auxBe);
|
||||
in
|
||||
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
|
||||
|
||||
CleftAdv ad ss = { s = \\t,b,o => ad.s ! Masc ++ ss.s};
|
||||
|
||||
ExistNP np =
|
||||
mkSClause "h'ty" (agrP3 (fromAgr np.a).g (fromAgr np.a).n)
|
||||
(insertObj (\\_ => np.s ! NPC Dir) (predAux auxBe)) ;
|
||||
|
||||
ExistIP ip =
|
||||
let cl = mkSClause ("h'ty" ++ ip.s ! Dir) (agrP3 ip.g ip.n) (predAux auxBe);
|
||||
in {
|
||||
s = \\t,p,qf => case qf of {
|
||||
QDir => cl.s ! t ! p ! ODir;
|
||||
QIndir => cl.s ! t! p ! ODir
|
||||
}
|
||||
};
|
||||
|
||||
ProgrVP vp = (predProg vp) ;
|
||||
|
||||
|
||||
ImpPl1 vp = {s = "ac" ++ (vp.s ! VPReq).inf} ;
|
||||
-- ImpP3 np vp = {s = np.s!NPC Dir ++ "k'y" ++ (vp.s ! VPImp ).inf ++ "D'y"}; here VPImp form is not correct e.g jan ko sw do, rather jan ko swnE do, and swnE is stored in vp.VPInf.fin
|
||||
ImpP3 np vp = {s = np.s!NPC Dir ++ "k'y" ++ (vp.s ! VPInf ).fin ++ "D'yW"};
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
362
lib/src/sindhi/src/LexiconSnd.gf
Normal file
362
lib/src/sindhi/src/LexiconSnd.gf
Normal file
@@ -0,0 +1,362 @@
|
||||
--# -path=.:prelude:alltenses
|
||||
|
||||
concrete LexiconSnd of Lexicon = CatSnd **
|
||||
--open ResSnd, Prelude in {
|
||||
open ParadigmsSnd,MorphoSnd, Prelude in {
|
||||
|
||||
flags
|
||||
optimize=values ;
|
||||
coding = utf8;
|
||||
|
||||
lin
|
||||
|
||||
airplane_N = mkN03 "jh'aj" ;
|
||||
answer_V2S = mkV2 (compoundV "jWab" (mkV "D'yt' ")) ;
|
||||
apple_N = mkN03 "sWf" ;
|
||||
art_N = mkN13 "fn" ;
|
||||
ask_V2Q = mkV2 (mkV "pc't' ");
|
||||
baby_N = mkN05 "Bar" ;
|
||||
bad_A = mkAdj3 "krab" ;
|
||||
bank_N = mkN03 "bank" ;
|
||||
beautiful_A = mkAdj1 "pyarW" ;
|
||||
become_VA = mkV "T'yt' ";
|
||||
beer_N = mkN03 "Xrab" ;
|
||||
--beg_V2V = mkV "pnt' " ;
|
||||
big_A = mkAdj1 "WD'W" ;
|
||||
bike_N = mkN03 "saycl" ;
|
||||
bird_N = mkN01 "pk'y" ;
|
||||
black_A = mkAdj1 "karW" ;
|
||||
blue_A = mkAdj1 "nyrW" ;
|
||||
boat_N = mkN04 "B'yry" ;
|
||||
book_N = mkN03 "ktab" ;
|
||||
boot_N = mkN01 "jWtW" ;
|
||||
boss_N = mkN03 "baLadst" ;
|
||||
boy_N = mkN01 "cWkrW" ;
|
||||
bread_N = mkN03 "many" ;
|
||||
break_V2 = mkV2 "TWrt' " ;
|
||||
broad_A = mkAdj1 "WykrW" ;
|
||||
--brother_N2 = mkN10 "B'ae' " "jo " ; --not correct
|
||||
brown_A = mkAdj3 "nasy" ;
|
||||
butter_N = mkN13 "mk't'" ;
|
||||
buy_V2 = mkV2(compoundV "Kryd " do_V2);
|
||||
camera_N = mkN01 "kymyra";
|
||||
cap_N = mkN03 "t'WpY" ;
|
||||
car_N = mkN03 "gaD'y" ;
|
||||
carpet_N = mkN01 "tD'W" ;
|
||||
cat_N = mkN09 "BLy" ;
|
||||
ceiling_N = mkN01 "c't" ;
|
||||
chair_N = mkN09 "krsy" ;
|
||||
cheese_N = mkN14 "pnyr" ;
|
||||
child_N = mkN01 "Bar" ;
|
||||
--church_N = mkN03 "grja" (mkN "grja") ;
|
||||
clean_A = mkAdj3 "saf" ;
|
||||
clever_A = mkAdj3 "hWXyar" ;
|
||||
close_V2 = mkV2 (compoundV "bnd" do_V2);
|
||||
coat_N = mkN03 "kWT" ;
|
||||
cold_A = mkAdj1 "T'd'W" ;
|
||||
computer_N = mkN03 "kmpyWTr" ;
|
||||
country_N = mkN03 "mlk" ;
|
||||
cousin_N = mkN03 "se'WT" ; -- a compund noun made of two nouns
|
||||
cow_N = mkN09 "gan" ;
|
||||
die_V = mkV "mrt' " ;
|
||||
dirty_A = mkAdj1 "myrW" ;
|
||||
--distance_N3 = mkN3 (mkN "pnd'") (mkPrep "da") "dE" "tWN" ;
|
||||
doctor_N = mkN03 "d!aktr" ;
|
||||
dog_N = mkN01 "ktW" ;
|
||||
door_N = mkN01 "drWzW" ;
|
||||
drink_V2 = mkV2 "pye't' ";
|
||||
easy_A2V = mkA "sWLW" "" ;
|
||||
eat_V2 = mkV2( mkV "k'ae't' ");
|
||||
empty_A = mkAdj3 "KaLy" ;
|
||||
enemy_N = mkN03 "dXmn" ;
|
||||
factory_N = mkN02 "karKanW" ;
|
||||
father_N2 = mkN2 (mkN06 "py") (mkPrep "jW") "jy" ;
|
||||
fear_VS = mkV "d!J't' ";
|
||||
fish_N = mkN09 "mc'y" ;
|
||||
floor_N = mkN03 "frX" ;
|
||||
fridge_N = mkN03 "grj" ;
|
||||
friend_N = mkN05 "dWst" ;
|
||||
fruit_N = mkN13 "Cmr" ;
|
||||
--fun_AV = mkAdj1V (regA "mzW") ;
|
||||
garden_N = mkN03 "baG" ;
|
||||
girl_N = mkN09 "c'Wkry" ;
|
||||
glove_N = mkN01 "dstanW" ;
|
||||
gold_N = mkN13 "sWn" ;
|
||||
good_A = mkAdj1 "sT!W" ;
|
||||
-- go_V = mkIrrgV "WY't'" "" ;
|
||||
green_A = mkAdj1 "saeW" ;
|
||||
harbour_N = mkN08 "panagah'" ;
|
||||
hate_V2 = mkV2 (compoundV "nfrt" do_V2) ;
|
||||
hat_N = mkN01 "tWplW" ;
|
||||
--have_V = dirV2 (mk5V "ha?e" "has" "had" "had" "h'jt' ") ;
|
||||
hear_V2 = mkV2 (mkV "Bd't' ") ;
|
||||
hill_N = mkN09 "Tkry" ;
|
||||
hope_VS = (compoundV "amyd" do_V2);
|
||||
horse_N = mkN01 "gWrW" ;
|
||||
hot_A = mkAdj1 "kWsW" ;
|
||||
house_N = mkN03 "gh'r" ;
|
||||
important_A = mkAdj3 "Z-rWry" ;
|
||||
industry_N = mkN01 "dndW" ;
|
||||
iron_N = mkN09 "LWh' " ;
|
||||
king_N = mkN01 "badXah'" ;
|
||||
know_V2 = mkV2 (mkV "Jat't'") ;
|
||||
know_VS = (mkV "J'at't' ") ;
|
||||
know_VQ = (mkV "J'at't' ") ;
|
||||
lake_N = mkN09 "DnD" ;
|
||||
lamp_N = mkN09 "bty " ;
|
||||
learn_V2 = mkV2 ( mkV "sK't' ") ;
|
||||
leather_N = mkN01 "cmRW" ;
|
||||
leave_V2 = mkV2 (mkV "cD't'") ;
|
||||
like_V2 = mkV2 (compoundV "pSnd" do_V2);
|
||||
listen_V2 = mkV2 (mkV "Kn Dyt' ") ;
|
||||
live_V = mkV "rht' " ; ---- touch
|
||||
long_A = mkAdj1 "d!gW" ;
|
||||
lose_V2= mkV2 "harae't' " ;
|
||||
love_N = mkN08 "mh'bt" ;
|
||||
love_V2 = mkV2 (compoundV "eXq" do_V2) "san";
|
||||
man_N = mkN03 "mat'h'W" ;--not correct according to rules should be discussed
|
||||
--married_A2 = mkAdj1 "prt'yL" ;
|
||||
meat_N = mkN01 "k'adW" ;
|
||||
milk_N = mkN13 "k'yr" ;
|
||||
moon_N = mkN13 "cnd!" ;
|
||||
--mother_N2 = mkN2(mkN07 "mae' " "jW" "jy" );--not covered need to be discussed
|
||||
mountain_N = mkN03 "jbL" ;
|
||||
music_N = mkN14 "mWsyqy" ;
|
||||
narrow_A = mkAdj1 "sWRh'W" ;
|
||||
new_A = mkAdj1 "ne'Wn" ;
|
||||
newspaper_N = mkN04 "aKbar" ;
|
||||
oil_N = mkN03 "tyL" ;
|
||||
old_A = mkAdj1 "pWRh'y" ;
|
||||
-- open_V2 = mkV2 (mkIrrgV "KWLt'" "KWl") ;
|
||||
paint_V2A = mkV2 (compoundV "rng" do_V2) ;
|
||||
paper_N = mkN01 "pnW" ;
|
||||
--paris_PN = mkN13 "pyrs" masculine;
|
||||
peace_N = mkN13 "amn" ;
|
||||
pen_N = mkN14 "qLm" ;
|
||||
planet_N = mkN01 "syarW" ;
|
||||
plastic_N = mkN13 "mRndR" ;
|
||||
play_V2 = mkV2 (mkV "rand") ;
|
||||
policeman_N = mkN05 "spah'y" ;
|
||||
priest_N = mkN05 "pyGmbr" ;
|
||||
--probable_AS = mkAdj1S (regA "amkan" ) ;
|
||||
queen_N = mkN09 "Xh'zady" ;
|
||||
radio_N = mkN01 "bajW" ;
|
||||
--rain_V0 = compoundV "mynh'n" "";
|
||||
red_A = mkAdj1 "G'aRh'W" ; -- worst case
|
||||
religion_N = mkN03 "mzh'b" ;
|
||||
restaurant_N = mkN05 "h'WTl" ;
|
||||
river_N = mkN12 "drya" ;
|
||||
rock_N = mkN08 "Tkry" ;
|
||||
roof_N = mkN14 "c't" ;
|
||||
rubber_N = mkN13 "rbR" ;
|
||||
run_V = mkV "d!WRt' " ;
|
||||
say_VS = mkV "cWt' " ;
|
||||
school_N = mkN03 "askWL" ;
|
||||
science_N = mkN13 "saenS" ;
|
||||
sea_N = mkN14 "smnd!" ;
|
||||
seek_V2 = mkV2 (compoundV "tlaX" do_V2) ;
|
||||
see_V2 = mkV2 (mkV "D'st' ") ;
|
||||
sell_V = mkV "Wkt't' ";
|
||||
send_V= mkV "mWkLt' ";
|
||||
sheep_N = mkN09 "rD" ;
|
||||
ship_N = mkN03 "jhaz" ;
|
||||
shirt_N = mkN01 "cWLW";
|
||||
shoe_N = mkN01 "jWtW" ;
|
||||
shop_N = mkN03 "dWkan" ;
|
||||
short_A = mkAdj1 "nnDW " ;
|
||||
silver_N = mkN14 "candy" ;
|
||||
sister_N = mkN11 "Byt' " ;
|
||||
sleep_V = mkV "smh't' " ;
|
||||
small_A = mkAdj1 "nnDW" ;
|
||||
snake_N = mkN03 "nang" ;
|
||||
sock_N = mkN04 "jWrab" ;
|
||||
speak_V2 = mkV2 (mkV "GaLhe't' ") ;
|
||||
star_N = mkN01 "XrWeat" ;
|
||||
steel_N = mkN13 "astyL" ;
|
||||
stone_N = mkN05 "pTr" ;
|
||||
stove_N = mkN01 "cLh'W" ;
|
||||
student_N = mkN05 "Xagrd" ;
|
||||
stupid_A = mkAdj1 "cryW" ;
|
||||
sun_N = mkN13 "sj" ;
|
||||
switch8off_V2 = mkV2 (mkV "h'Laet") ;
|
||||
switch8on_V2 = mkV2 (compoundV "bnd" do_V2) ;
|
||||
table_N = mkN04 "myz" ;
|
||||
talk_V = mkV "GaLhaet' ";
|
||||
teacher_N = mkN05 "astad" ;
|
||||
teach_V = mkV "syk'art' ";
|
||||
television_N = mkN14 "tyLyWzn" ;
|
||||
thick_A = mkAdj1 "mWtW" ;
|
||||
thin_A = mkAdj1 "snh'W" ;
|
||||
train_N = mkN09 "ryL" ;
|
||||
travel_V = (compoundV "sfr" do_V2) ;
|
||||
tree_N = mkN13 "Wt' " ;
|
||||
trousers_N = mkN01 "pajamW" ;
|
||||
ugly_A = mkAdj3 "bdsWrt" ;
|
||||
understand_V = mkV "smjh't' ";
|
||||
university_N = mkN09 "yWnyWrsTY" ;
|
||||
village_N = mkN03 "GWT! " ;
|
||||
wait_V2 = mkV2 (compoundV "antz-ar" (mkV "antz-ar")) ;
|
||||
walk_V = mkV "h'Lt' " ;
|
||||
warm_A = mkAdj3 "grm" ;
|
||||
war_N = mkN03 "jng" ;
|
||||
watch_V2 = mkV2 (mkV "Dst' ") ;
|
||||
water_N = mkN14 "pat'y" ; -- not covered masculine ending with y
|
||||
white_A = mkAdj1 "ac'W" ;
|
||||
window_N = mkN09 "dry" ;
|
||||
wine_N = mkN04 "Xrab";
|
||||
win_V = mkV"k'Tt' " ;
|
||||
woman_N = mkN09 "astry" ;
|
||||
wonder_VQ = compoundV "h'yran"(mkV "T'yt' ") ;
|
||||
wood_N = mkN13 "kaT!" ;
|
||||
write_V = mkV "LKt' " ;
|
||||
yellow_A = mkAdj1 "pyLW" ;
|
||||
young_A = mkAdj3 "jWan" ;
|
||||
do_V2 = mkV2 (mkV "krt' ") ;
|
||||
now_Adv = mkAdv "h'at'y" ;
|
||||
--already_Adv = mkAdj1dv "ph'ryaeyn" ;
|
||||
song_N = mkN01 "ganW" ;
|
||||
-- number_N = mkN03 "ang" ;
|
||||
put_V = mkV "Wjt' " ;
|
||||
stop_V = mkV "byh't' " ;
|
||||
jump_V = compoundV "TpW " (mkV "") ; -- here
|
||||
left_Ord = {s = "k'abW" ; n = singular};
|
||||
right_Ord = {s= "sJ'W" ; n = singular};
|
||||
--far_Adv = mkAdj1dv "pry" ;
|
||||
correct_A = mkAdj3 "sh'y" ;
|
||||
dry_A = mkAdj3 "KXk" ;
|
||||
dull_A = mkAdj1 "jD'W" ;
|
||||
full_A = mkAdj3 "BryL" ;
|
||||
heavy_A = mkAdj1 "grW" ;
|
||||
near_A = mkAdj1 "Wyjh'W" ;
|
||||
rotten_A = mkAdj3 "Krab" ;
|
||||
round_A = mkAdj3 "gWL" ;
|
||||
sharp_A = mkAdj3 "tyz" ;
|
||||
smooth_A = mkAdj3 "hmWar" ;
|
||||
straight_A = mkAdj1 "sd'W" ;
|
||||
wet_A = mkAdj1 "aaLW";
|
||||
wide_A = mkAdj1 "WykrW" ;
|
||||
animal_N = mkN03 "janWr" ;
|
||||
ashes_N = mkN14 "rak' " ; -- FIXME: plural only?
|
||||
back_N = mkN09 "pT! " ;
|
||||
bark_N = mkN13 "Be'Wnkt' " ;
|
||||
belly_N = mkN14 "pyT" ;
|
||||
blood_N = mkN13 "rt" ;
|
||||
bone_N = mkN09 "hD'y" ;
|
||||
breast_N = mkN09 "c'aty" ;
|
||||
cloud_N = mkN03 "jh'R" ;
|
||||
day_N = mkN13 "D'ynh'n" ;
|
||||
dust_N = mkN14"d'WR" ;
|
||||
ear_N = mkN03 "kn" ;
|
||||
earth_N = mkN08 "zmyn" ;
|
||||
egg_N = mkN01 "bydW" ;
|
||||
eye_N = mkN09 "ak' " ;
|
||||
fat_N = mkN09 "crBy" ;
|
||||
feather_N = mkN13 "k'nB'" ;
|
||||
fingernail_N = mkN03 "nh' " ;
|
||||
fire_N = mkN14 "bah'" ;
|
||||
flower_N = mkN03 "gL" ;
|
||||
fog_N = mkN13 "mak" ;
|
||||
foot_N = mkN03 "pyr" ; -- not properly covered need to be discussed
|
||||
forest_N = mkN01 "ByLW" ;
|
||||
grass_N = mkN04 "gah" ;
|
||||
--guts_N = mkN "g?t" ; -- FIXME: no singular
|
||||
hair_N = mkN03 "War" ;
|
||||
hand_N = mkN03 "hT' ";
|
||||
head_N = mkN01 "mT'W" ;
|
||||
heart_N = mkN09 "dL";
|
||||
horn_N = mkN13 "sc! " ;
|
||||
husband_N = mkN03 "mRs" ;
|
||||
ice_N = mkN09 "brf" ;
|
||||
nee_N = mkN01 "gWD'W" ;
|
||||
leaf_N = mkN03 "pn" ;
|
||||
leg_N = mkN09 "Tng" ;
|
||||
liver_N = mkN03 "jyrW" ;
|
||||
louse_N = mkN14 "jWne' " ;
|
||||
mouth_N = mkN03 "Wat" ;
|
||||
name_N = mkN01 "naLW";
|
||||
neck_N = mkN04 "knd' " ;
|
||||
night_N = mkN09 "rat" ;
|
||||
nose_N = mkN03 "nk" ;
|
||||
person_N = mkN03 "XKs" ;
|
||||
rain_N = mkN14 "mynhn" ;
|
||||
road_N = mkN01 "rstW" ;
|
||||
root_N = mkN09 "paR" ;
|
||||
rope_N = mkN09 "rsy";
|
||||
salt_N = mkN14 "LWt' " ;
|
||||
sand_N = mkN14 "Wary" ;
|
||||
seed_N = mkN03 "Bj" ;
|
||||
skin_N = mkN09 "cmRy" ;
|
||||
sky_N = mkN03 "aasman";
|
||||
smoke_N = mkN13 "dWnh'W"; -- singular masc nouns ending with aN,wN yet to be implemented
|
||||
snow_N = mkN13 "brf" ;
|
||||
stick_N = mkN09 "D'nd!y" ;
|
||||
tail_N = mkN13 "pc' " ;
|
||||
tongue_N = mkN08 "zban" ;
|
||||
tooth_N = mkN03 "D'and";
|
||||
wife_N = mkN09 "zaL" ;
|
||||
wind_N = mkN08 "h'Wa" ;
|
||||
wing_N = mkN05 "pr" ;
|
||||
worm_N = mkN01 "kyneWn" ;
|
||||
year_N = mkN03 "saL" ;
|
||||
blow_V = mkV "WJ't' " ;
|
||||
breathe_V = compoundV "sah " (mkV "K't't' " ) ;
|
||||
burn_V = mkV "sRt' " ;
|
||||
dig_V = mkV "K'Tt' " ;
|
||||
fall_V = mkV "krt' " ;
|
||||
float_V = mkV "trt' " ;
|
||||
flow_V = mkV "Wh't' " ;
|
||||
fly_V = mkV "aD't' ";
|
||||
freeze_V = mkV "J'mt' " ;
|
||||
give_V3= mkV3 (mkV "D'yt' ") "" "" ; -- here
|
||||
laugh_V = mkV "k'Lt' " ;
|
||||
lie_N = mkN01 "kWR" ;
|
||||
lie_V = compoundV "kWR " ( mkV "GaLhaet' ") ;
|
||||
play_V = mkV "k'yDt' " ;
|
||||
sew_V = mkV "sbt' " ;
|
||||
sing_V = mkV "gae't' " ;
|
||||
sit_V = mkV "Wyh't' ";
|
||||
smell_V = mkV "sngt' " ;
|
||||
spit_V = mkV "T'kt' " ;
|
||||
stand_V = mkV "bah't' ";
|
||||
swell_V = mkV "sbt'" ;
|
||||
swim_V = mkV "trt' " ;
|
||||
think_V = mkV "sWct' " ;
|
||||
turn_V = mkV "mRt' ";
|
||||
vomit_V = compoundV "aLTy" (mkV "krt' ") ;
|
||||
bite_V2 = mkV2 (mkV "cK pae't' ") ;
|
||||
count_V = mkV "Gt't' ";
|
||||
cut_V = mkV "kTt' ";
|
||||
fear_V = mkV "d!J't' " ;
|
||||
fight_V = mkV "WRh't' " ;
|
||||
hit_V = mkV "mart' " ;
|
||||
hold_V = mkV "jh'Lt' " ;
|
||||
hunt_V2 = mkV2 (compoundV "Xkar" do_V2);
|
||||
kill_V = mkV "marn" ;
|
||||
pull_V = mkV "ckt' ";
|
||||
push_V = mkV "d'kt' " ;
|
||||
rub_V = mkV "mh'Tt' " ;
|
||||
scratch_V= mkV "Krct' " ;
|
||||
split_V= mkV "h'art' " ;
|
||||
--squeeze_V2 = dirV2 (regV "sq?eeze") ;
|
||||
--stab_V2 = dirV2 (regDuplV "stab") ;
|
||||
suck_V = mkV "cWst' " ;
|
||||
throw_V = mkV "ac'Lt' " ;
|
||||
tie_V = mkV "Bd't' " ;
|
||||
wash_V = mkV "d'We't'" ;
|
||||
wipe_V= mkV "agh't' ";
|
||||
--other_A = regA "Bya";
|
||||
grammar_N = mkN03 "grdan" ;
|
||||
language_N = mkN09 "BWLy" ;
|
||||
rule_N = mkN03 "aSWL" ;
|
||||
|
||||
---- added 4/6/2007
|
||||
john_PN = mkPN "jan" masculine ;
|
||||
question_N = mkN03 "sWal" ;
|
||||
--ready_A = regA "tyar" ;
|
||||
reason_N = mkN03 "sbb" ;
|
||||
today_Adv = mkAdv "aJ' " ;
|
||||
uncertain_A = mkAdj3 ["acank"] ;
|
||||
|
||||
|
||||
}
|
||||
|
||||
393
lib/src/sindhi/src/MorphoSnd.gf
Normal file
393
lib/src/sindhi/src/MorphoSnd.gf
Normal file
@@ -0,0 +1,393 @@
|
||||
--# -path=.:../../prelude
|
||||
--
|
||||
----1 A Simple Sindhi Resource Morphology
|
||||
----
|
||||
---- by Jherna Devi, Shafqat Virk,2012
|
||||
----
|
||||
---- This resource morphology contains definitions needed in the resource
|
||||
---- syntax. To build a lexicon, it is better to use $ParadigmsSnd$, which
|
||||
---- gives a higher-level access to this module.
|
||||
--
|
||||
resource MorphoSnd = ResSnd ** open Prelude,Predef in {
|
||||
|
||||
|
||||
flags optimize=all ;
|
||||
coding = utf8;
|
||||
|
||||
----2 Nouns
|
||||
oper
|
||||
|
||||
mkN : (x1,_,_,_,_,_,_,x8 : Str) -> Gender -> Noun =
|
||||
\sd,so,sv,sa, pd,po,pv,pa, g -> {
|
||||
s = table {
|
||||
Sg => table {
|
||||
Dir => sd ;
|
||||
Obl => so ;
|
||||
Voc => sv ;
|
||||
Abl => sa
|
||||
} ;
|
||||
Pl => table {
|
||||
Dir => pd ;
|
||||
Obl => po ;
|
||||
Voc => pv ;
|
||||
Abl => pa
|
||||
}
|
||||
} ;
|
||||
|
||||
g = g
|
||||
} ;
|
||||
|
||||
|
||||
-- 1. msculine: chokro, kuto, hat
|
||||
mkN01 : Str -> Noun ;
|
||||
mkN01 chokro = let chokr = (tk 1 chokro)
|
||||
in mkN (chokro) (chokr+"y") (chokr+"a") (chokr+"a")
|
||||
(chokr+"a") (chokr+"n") (chokr+"a") (chokr+"a")
|
||||
Masc ;
|
||||
|
||||
|
||||
-- 2. karkhano
|
||||
mkN02 : Str -> Noun ;
|
||||
mkN02 karkhano =let karkhan = (tk 1 karkhano)
|
||||
in mkN (karkhano) (karkhan+"y") (karkhan+"a") (karkhano)
|
||||
(karkhan+"a") (karkhan+"n") (karkhan+"W") (karkhan+"a")
|
||||
Fem ;
|
||||
|
||||
-- 3. gher, shehar
|
||||
mkN03 : Str -> Noun ;
|
||||
mkN03 gher = mkN (gher) (gher) (gher) (gher)
|
||||
(gher) (gher+"n") (gher+"W") (gher)
|
||||
Masc ;
|
||||
|
||||
-- 4. paki, mez, gah
|
||||
mkN04 : Str -> Noun ;
|
||||
mkN04 paki = mkN (paki) (paki) (paki) (paki)
|
||||
(paki) (paki+"n") (paki) (paki)
|
||||
Fem ;
|
||||
|
||||
-- 5. msculine: bar, hotel, pathar
|
||||
mkN05 : Str -> Noun ;
|
||||
mkN05 bar = mkN (bar) (bar) (bar) (bar)
|
||||
(bar) (bar+"n") (bar+"W") (bar)
|
||||
Masc ;
|
||||
|
||||
-- 6. pe
|
||||
mkN06 : Str -> Noun ;
|
||||
mkN06 pe = mkN (pe) (pe) (pe) (pe)
|
||||
(pe+"e'r") (pe+"e'rn") (pe+"e'rW") (pe+"e'r")
|
||||
Masc ;
|
||||
|
||||
-- 7. Feminine : ma
|
||||
mkN07 : Str -> Noun ;
|
||||
mkN07 ma = mkN (ma) (ma) (ma) (ma)
|
||||
(ma+"e'r") (ma+"e'rn") (ma+"e'rW") (ma+"e'r")
|
||||
Fem ;
|
||||
|
||||
-- 8. msculine: topi, takre
|
||||
mkN08 : Str -> Noun ;
|
||||
mkN08 topi = mkN (topi) (topi) (topi) (topi)
|
||||
(topi+"Wn") (topi+"n") (topi+"W") (topi+"Wn")
|
||||
Masc ;
|
||||
|
||||
-- 9. Feminine: bere, bili, kurse
|
||||
mkN09 : Str -> Noun ;
|
||||
mkN09 bili = mkN (bili) (bili) (bili) (bili)
|
||||
(bili+"Wn") (bili+"n") (bili+"n") (bili+"Wn")
|
||||
Fem ;
|
||||
|
||||
-- 10. msculine: bha
|
||||
mkN010 : Str -> Noun ;
|
||||
mkN010 bha = mkN (bha) (bha) (bha) (bha)
|
||||
(bha+"r") (bha+"rn") (bha+"rW") (bha+"r")
|
||||
Masc ;
|
||||
|
||||
-- 11. Feminine: bhen
|
||||
mkN11 : Str -> Noun ;
|
||||
mkN11 bhen = let bhe= (tk 1 bhen)
|
||||
in mkN (bhen) (bhen) (bhen) (bhen)
|
||||
(bhe+"nr") (bhe+"nrn") (bhen+"Wn") (bhe+"nr")
|
||||
Fem ;
|
||||
|
||||
--12. msculine: raja, darya
|
||||
mkN12 : Str -> Noun ;
|
||||
mkN12 raja = mkN (raja) (raja) (raja) (raja)
|
||||
(raja) (raja+"e'n") (raja+"e'W") (raja)
|
||||
Masc ;
|
||||
|
||||
-- 13. msculine: fan, son, kher,
|
||||
mkN13 : Str -> Noun ;
|
||||
mkN13 son = mkN (son) (son) (son) (son)
|
||||
(son) (son) (son) (son)
|
||||
Masc ;
|
||||
|
||||
-- 14. Feminine: pen, samand
|
||||
mkN14 : Str -> Noun ;
|
||||
mkN14 pen = mkN (pen) (pen) (pen) (pen)
|
||||
(pen) (pen) pen ""
|
||||
Fem ;
|
||||
|
||||
|
||||
|
||||
----2 Determiners
|
||||
|
||||
IDeterminer = {s:Gender => Str ; n : Number};
|
||||
|
||||
makeDet : Str -> Str -> Str -> Str -> Number -> Determiner = \s1,s2,s3,s4,n -> {
|
||||
s = table {
|
||||
Sg => table {
|
||||
Masc => s1 ;
|
||||
Fem => s2
|
||||
} ;
|
||||
Pl => table {
|
||||
Masc => s3 ;
|
||||
Fem => s4
|
||||
}
|
||||
} ;
|
||||
|
||||
n = n
|
||||
};
|
||||
|
||||
makeIDet : Str -> Str -> Number -> IDeterminer = \s1,s2,n -> {
|
||||
s = table {
|
||||
Masc => s1;
|
||||
Fem => s2
|
||||
};
|
||||
n = n
|
||||
};
|
||||
|
||||
makeIQuant : Str -> Str -> Str -> Str -> {s:Number => Gender => Str} = \s1,s2,s3,s4 -> {
|
||||
s = table {
|
||||
Sg => table {
|
||||
Masc => s1 ;
|
||||
Fem => s2
|
||||
} ;
|
||||
Pl => table {
|
||||
Masc => s3 ;
|
||||
Fem => s4
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
-- Proposition
|
||||
|
||||
makePrep : Str -> Preposition = \str -> {s = str } ** { lock_Prep = <>};
|
||||
|
||||
----2 Pronouns
|
||||
--PronForm = {s:Pronoun => Str};
|
||||
|
||||
DemonPronForm = {s:DemPronForm => Str};
|
||||
mkDemonPronForm : (x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16:Str) -> DemPronForm =
|
||||
\y1,y2,y3,y4,y5,y6,y7,y8,y9,y10,y11,y12,y13,y14,y15,y16 -> {
|
||||
s = table {
|
||||
Sg => table {
|
||||
Masc => table {
|
||||
Dir => y1 ;
|
||||
Obl => y2 ;
|
||||
Voc => y3 ;
|
||||
Abl => y4
|
||||
};
|
||||
Fem => table {
|
||||
Dir => y5 ;
|
||||
Obl => y6 ;
|
||||
Voc => y7 ;
|
||||
Abl => y8
|
||||
}
|
||||
};
|
||||
Pl => table {
|
||||
Masc => table {
|
||||
Dir => y9 ;
|
||||
Obl => y10 ;
|
||||
Voc => y11 ;
|
||||
Abl => y12
|
||||
};
|
||||
Fem => table {
|
||||
Dir => y13 ;
|
||||
Obl => y14 ;
|
||||
Voc => y15 ;
|
||||
Abl => y16
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
makeDemonPronForm : Str -> Str -> Str -> DemPronForm ;
|
||||
makeDemonPronForm yeh is inn = mkDemonPronForm yeh is "" yeh is "" yeh inn "" yeh inn "" "" "" "" "";
|
||||
-- makePossPronForm myra myry hmara hmary = mkDemonPronForm myra myra myra myry myry myry hmara hmara hmara hmary hmary hmary;
|
||||
|
||||
mkPron : (x1,x2,x3,x4:Str) -> {s:Case => Str} =
|
||||
\y1,y2,y3,y4 -> { s =
|
||||
table {
|
||||
Dir => y1;
|
||||
Obl => y2;
|
||||
Voc => y3;
|
||||
Abl => y4
|
||||
}
|
||||
};
|
||||
|
||||
------- PossPronForm yet to be implemented
|
||||
|
||||
|
||||
-- IntPronForm = {s:InterrPronForm => Str};
|
||||
IntPronForm = {s: Case => Str};
|
||||
mkIntPronForm : (x1,x2,x3,x4:Str) -> IntPronForm =
|
||||
\y1,y2,y3,y4 -> {
|
||||
s =
|
||||
table {
|
||||
Dir => y1;
|
||||
Obl => y2;
|
||||
Voc => y3;
|
||||
Abl => y4
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
----2 Adjectives
|
||||
-- defined in ResSnd
|
||||
|
||||
------------------------------------------------------------------
|
||||
----Verbs
|
||||
------------------------------------------------------------------
|
||||
|
||||
--1. Basic stem form, direct & indirect causatives exists
|
||||
-- v1 nechna nechaana nechwana
|
||||
|
||||
mkVerb : (_: Str) -> Verb = \inf ->
|
||||
let root = (tk 1 inf) ;
|
||||
inf = inf ;
|
||||
root2 = (tk 2 inf) ;
|
||||
in {
|
||||
s = table {
|
||||
|
||||
Root => root ;
|
||||
|
||||
Inf => inf ;
|
||||
Inf_Fem => ((tk 1 root) + "y") ;
|
||||
Inf_Obl => (tk 1 root) ;
|
||||
Ablative => ((tk 1 root) + "WN") ;
|
||||
|
||||
|
||||
VF tense person number gender => (mkCmnVF root root2 tense person number gender).s
|
||||
}
|
||||
} ;
|
||||
|
||||
mkIrrgVerb : (inf,root: Str) -> Verb = \inf,root ->
|
||||
let root = root ;
|
||||
in {
|
||||
s = table {
|
||||
|
||||
Root => root ;
|
||||
|
||||
Inf => inf ;
|
||||
Inf_Fem => ((tk 1 inf) + "y") ;
|
||||
Inf_Obl => (tk 1 inf) ;
|
||||
Ablative => ((tk 1 inf) + "WN") ;
|
||||
|
||||
|
||||
VF tense person number gender => (mkCmnVF (root+"y") (root+"y") tense person number gender).s
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
mkCmnVF : Str -> Str -> VTense -> PPerson -> Number -> Gender -> {s:Str}= \root,root2,t,p,n,g ->
|
||||
{s = case (last root) of {
|
||||
("a"|"A"|"y") => (mkCmnVF1 root t p n g).s ;
|
||||
_ => (mkCmnVF1 root t p n g).s
|
||||
}
|
||||
};
|
||||
|
||||
mkCmnVF1 : Str -> VTense -> PPerson -> Number -> Gender -> {s:Str}= \root,t,p,n,g ->
|
||||
{s = let nadaa = root + "ndW" ; --root + variants{"nda";"Wnda"};
|
||||
nadii = root + "Wn" ; --root + variants{"ndy";"Wndy"} ;
|
||||
nade = root + "ndy" ; --root + variants{"ndy";"yndyn"} ;
|
||||
nadiiaaN = root + "ndW"; --root + variants{"ndyaN";"WndyaN"};
|
||||
ndi = root + "ndy";
|
||||
nda = root + "nda" ;
|
||||
ndywn = root + "ndyWn" ;
|
||||
ndyn = root + "ndyn" ;
|
||||
|
||||
in
|
||||
case <t,p,n,g> of {
|
||||
<Subj,Pers1, Sg,_> => root + "an" ;
|
||||
<Subj,Pers1, Sg,_> => root + "an" ;
|
||||
<subj, Pers1, pl,Masc> => root + "Wn" ;
|
||||
<subj, Pers1, pl,Fem> => root + "Wn" ;
|
||||
<Subj,Pers2_Casual, Sg,_> => root +"yn";
|
||||
<Subj,Pers2_Casual, Pl,_> => root + "W" ;
|
||||
<Subj,Pers2_Respect, _, _> => root + "W" ;
|
||||
|
||||
<Subj,Pers3_Near, Sg,Masc> => root +"y";
|
||||
<Subj,Pers3_Near, sg,Fem> => root +"y";
|
||||
<Subj,Pers3_Near, pl,Masc> => root +"n";
|
||||
<Subj,Pers3_Near, pl,Fem> => root +"n";
|
||||
<Subj,Pers3_Distant,Sg,Masc> => root +"y";
|
||||
<Subj,Pers3_Distant,Sg,Fem> => root +"y";
|
||||
<Subj,Pers3_Distant,Pl,Masc> => root +"n";
|
||||
<Subj,Pers3_Distant,Pl,Fem> => root +"n";
|
||||
|
||||
|
||||
<Perf, Pers1,Sg,Masc> => root + "yL" ;
|
||||
<Perf, Pers1,Sg,Fem> => root + "yL" ;
|
||||
<Perf, Pers1,Pl,Masc> => root + "yL" ;
|
||||
<Perf, Pers1,Pl,Fem> => root + "yL" ;
|
||||
<Perf, Pers2_Casual,Sg,Masc> => root + "yL" ;
|
||||
<Perf, Pers2_Casual,Sg,Fem> => root + "yL" ;
|
||||
<Perf, Pers2_Casual,Pl,Masc> => root + "yL" ;
|
||||
<Perf, Pers2_Casual,Pl,Fem> => root + "yL" ;
|
||||
<Perf, Pers2_Respect,Sg,Masc> => root + "yL" ;
|
||||
<Perf, Pers2_Respect,Sg,Fem> => root + "yL" ;
|
||||
<Perf, Pers2_Respect,Pl,Masc> => root + "yL" ;
|
||||
<Perf, Pers2_Respect,Pl,Fem> => root + "yL" ;
|
||||
|
||||
<Perf, _, Sg,Masc> => root + "yL" ;
|
||||
<Perf, _, Sg,Fem> => root + "yL" ;
|
||||
<Perf, _, Pl,Masc> => root + "yL" ;
|
||||
<Perf, _, Pl,Fem> => root + "yL" ;
|
||||
|
||||
<Imperf, Pers1,Sg, Masc> => root + "ndW" ;
|
||||
<Imperf, Pers1,Sg, Fem> => root + "ndy" ;
|
||||
<Imperf, Pers1,Pl, Masc> => root + "nda" ;
|
||||
<Imperf, Pers1,Pl, Fem> => root + "ndyWn" ;
|
||||
|
||||
<Imperf, Pers2_Casual, Sg, Masc> => root + "ndW" ;
|
||||
<Imperf, Pers2_Casual, Sg, Fem> => root + "ndy" ;
|
||||
<Imperf, Pers2_Casual, Pl, Masc> => root + "nda" ;
|
||||
<Imperf, Pers2_Casual, Pl, Fem> => root + "ndyWn" ;
|
||||
|
||||
<Imperf, Pers2_Respect, Sg, Masc> => root + "nda" ;
|
||||
<Imperf, Pers2_Respect, Sg, Fem> => root + "ndyWn" ;
|
||||
<Imperf, Pers2_Respect, Pl, Masc> => root + "nda" ;
|
||||
<Imperf, Pers2_Respect, Pl, Fem> => root + "ndyWn" ;
|
||||
|
||||
<Imperf, _, Sg, Masc> => root + "ndW" ;
|
||||
<Imperf, _, Sg, Fem> => root + "ndy" ;
|
||||
<Imperf, _, Pl, Masc> => root + "nda" ;
|
||||
<Imperf, _, Pl, Fem> => root + "ndyWn"
|
||||
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
mkCmnVF2 : Str -> VTense -> PPerson -> Number -> Gender -> {s:Str}= \inf,t,p,n,g ->
|
||||
{s =
|
||||
case <t,p,n,g> of {
|
||||
<_, _, _,_> => inf
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
126
lib/src/sindhi/src/NumeralSnd.gf
Normal file
126
lib/src/sindhi/src/NumeralSnd.gf
Normal file
@@ -0,0 +1,126 @@
|
||||
concrete NumeralSnd of Numeral = CatSnd ** open ResSnd, Prelude in {
|
||||
-- By Harald Hammarstroem
|
||||
-- Modification for Punjabi by Shafqat Virk
|
||||
flags coding=utf8 ;
|
||||
|
||||
|
||||
|
||||
param DForm = unit | ten ;
|
||||
param DSize = sg | r2 | r3 | r4 | r5 | r6 | r7 | r8 | r9 ;
|
||||
param Size = singl | less100 | more100 ;
|
||||
|
||||
oper LinDigit = {s : DForm => Str ; size : DSize ; n : Number} ;
|
||||
|
||||
|
||||
lincat Dig = { s:Str ; n : Number};
|
||||
lincat Digit = LinDigit ;
|
||||
lincat Sub10 = {s : DForm => Str ; size : DSize ; n : Number} ;
|
||||
lincat Sub100 = {s : Str ; size : Size ; n : Number} ;
|
||||
lincat Sub1000 = {s : Str ; s2 : Str ; size : Size ; n : Number } ;
|
||||
lincat Sub1000000 = { s : Str ; n : Number } ;
|
||||
|
||||
lin num x0 =
|
||||
{s = table {
|
||||
NCard => x0.s ;
|
||||
NOrd => Prelude.glue x0.s "Wn" -- (mkOrd x0.s) need to use mkOrd which will make irregular ordinals but it gives path error
|
||||
};
|
||||
n = x0.n
|
||||
} ;
|
||||
oper mkOrd : Str -> Str =
|
||||
\s -> case s of {
|
||||
"h'k" => "ph'ryWn";
|
||||
"B" => "ByWn";
|
||||
"Ty" => "TyWn";
|
||||
"car" => "cWaT'Wn";
|
||||
_ => s ++ "WN"
|
||||
};
|
||||
-- {s = \\_ => x0.s ; n = x0.n} ;
|
||||
|
||||
|
||||
oper mkNum : Str -> Str -> DSize -> LinDigit =
|
||||
\do -> \bis -> \sz ->
|
||||
{s = table {unit => do ; ten => bis } ;
|
||||
size = sz ; n = Pl} ;
|
||||
|
||||
lin n2 = mkNum "B" "Wyh'" r2 ;
|
||||
lin n3 = mkNum "Ty" "Tyh'" r3 ;
|
||||
lin n4 = mkNum "car" "calyh'" r4 ;
|
||||
lin n5 = mkNum "pnj" "pnjah'" r5 ;
|
||||
lin n6 = mkNum "c'h'" "sT!h' " r6 ;
|
||||
lin n7 = mkNum "st" "str" r7;
|
||||
lin n8 = mkNum "aT! '" "asy" r8;
|
||||
lin n9 = mkNum "nW" "nWy" r9 ;
|
||||
|
||||
oper mkR : Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> Str -> DSize => Str = \a1 -> \a2 -> \a3 -> \a4 -> \a5 -> \a6 -> \a7 -> \a8 -> \a9 -> table {
|
||||
sg => a1 + "nh'n" ;
|
||||
r2 => a2 + "yh' " ;
|
||||
r3 => a3 + "yh' " ;
|
||||
r4 => a4 + "alyh' " ;
|
||||
r5 => a5 + "Wnjah' " ;
|
||||
r6 => a6 + "h'T!" ;
|
||||
r7 => a7 + "tr" ;
|
||||
r8 => a8 + "asy" ;
|
||||
r9 => a9 + "anWy"
|
||||
} ;
|
||||
|
||||
oper rows : DSize => DSize => Str = table {
|
||||
sg => mkR "yar " "ayk " "akT" "aykyt " "ayk" "ayk" "ayk" "ayk" "ayk" ;
|
||||
r2 => mkR "Bay " "BaW" "BT" "Bae't" "Ba" "Ba" "Bah' " "Byy" "Byy" ;
|
||||
r3 => mkR "Tyr " "TyW " "TyT" "Tyt" "Ty" "Ty" "Tyh' " "Ty" "ty" ;
|
||||
r4 => mkR "cWD' " "cWW " "cWT" "cWe't " "cW" "cW" "cWh' " "cWr " "cWr" ;
|
||||
r5 => mkR "pnd'r " "pnjW " "pnjT" "pnjyt" "pnj" "pnj" "pnjh'" "pnj" "pnj" ;
|
||||
r6 => mkR "sWr " "c'W" "c'Ty" "c'ae't" "c'a" "c'a" "c'ah'" "c'" "c'" ;
|
||||
r7 => mkR "str" "staW" "stT " "styt" "st" "st" "st" "st" "st" ;
|
||||
r8 => mkR "arR" "aT!aW " "aT!T" "aT!y" "aT!" "aT!" "aT!a" "aT!" "aT!" ;
|
||||
r9 => table {sg => "at'Wyh' " ; r2 => "at'Tyh' " ; r3 => "at'ytalyh' " ;
|
||||
r4 => "at'Wnjah' " ; r5 => "at'h'T! " ; r6 => "at'tr " ;
|
||||
r7 => "at'asy " ;
|
||||
r8 => "at'anWy " ; r9 => "nWanWy" }
|
||||
} ;
|
||||
|
||||
oper ss : Str -> {s : Str} = \s -> {s = s} ;
|
||||
|
||||
lin pot01 = {s = table {unit => "h'k" ; _ => "dmy" } ; size = sg ; n = Sg} ;
|
||||
lin pot0 d = d ;
|
||||
lin pot110 = {s = "D'h' " ; size = less100 ; n = Pl} ;
|
||||
lin pot111 = {s = rows ! sg ! sg ; size = less100 ; n = Pl} ;
|
||||
lin pot1to19 d = {s = rows ! d.size ! sg ; size = less100 ; n = d.n} ;
|
||||
lin pot0as1 n = {s = n.s ! unit ; size = table {sg => singl ; _ => less100} ! n.size ; n = n.n } ;
|
||||
|
||||
lin pot1 d = {s = d.s ! ten ; size = less100 ; n = d.n} ;
|
||||
lin pot1plus d e = {s = rows ! e.size ! d.size ; size = less100 ; n = d.n} ;
|
||||
|
||||
lin pot1as2 n = {s = n.s ; s2 = "dmy" ; size = n.size ; n = n.n} ;
|
||||
lin pot2 d = {s = (mksau (d.s ! unit) d.size) ;
|
||||
s2 = d.s ! unit ++ "lk' " ; size = more100 ; n = d.n} ;
|
||||
lin pot2plus d e =
|
||||
{s = (mksau (d.s ! unit) d.size) ++ e.s ;
|
||||
s2 = (d.s ! unit) ++ "lk' " ++ (mkhazar e.s e.size) ;
|
||||
size = more100 ; n = d.n} ;
|
||||
|
||||
lin pot2as3 n = {s = n.s ; n = n.n} ;
|
||||
lin pot3 n = {s = table { singl => ekhazar ;
|
||||
less100 => n.s ++ "h'zar" ;
|
||||
more100 => n.s2 } ! n.size ; n = n.n} ;
|
||||
lin pot3plus n m =
|
||||
{s = table {singl => ekhazar ;
|
||||
less100 => n.s ++ "h'zar" ;
|
||||
more100 => n.s2 } ! n.size ++ m.s ; n = n.n} ;
|
||||
|
||||
lin D_0 = { s = "N0" ; n = Sg};
|
||||
lin D_1 = { s = "N1" ; n = Sg};
|
||||
lin D_2 = { s = "N2" ; n = Pl};
|
||||
lin D_3 = { s = "N3" ; n = Pl};
|
||||
lin D_4 = { s = "N4" ; n = Pl};
|
||||
lin D_5 = { s = "N5" ; n = Pl};
|
||||
lin D_6 = { s = "N6" ; n = Pl};
|
||||
lin D_7 = { s = "N7" ; n = Pl};
|
||||
lin D_8 = { s = "N8" ; n = Pl};
|
||||
lin D_9 = { s = "N9" ; n = Pl};
|
||||
lin IDig d = { s = \\_ => d.s ; n = d.n} ;
|
||||
lin IIDig d dg = { s = \\df => Prelude.glue (dg.s ! df) d.s ; n = Pl };
|
||||
|
||||
oper ekhazar : Str = variants {"h'zar" ; "h'k" ++ "h'zar"} ;
|
||||
oper mkhazar : Str -> Size -> Str = \s -> \sz -> table {singl => ekhazar ; _ => s ++ "h'zar"} ! sz ;
|
||||
oper mksau : Str -> DSize -> Str = \s -> \sz -> table {sg => "h'k" ++ "sW" ; _ => s ++ "sW"} ! sz ;
|
||||
}
|
||||
75
lib/src/sindhi/src/QuestionSnd.gf
Normal file
75
lib/src/sindhi/src/QuestionSnd.gf
Normal file
@@ -0,0 +1,75 @@
|
||||
concrete QuestionSnd of Question = CatSnd ** open ResSnd, Prelude in {
|
||||
flags optimize=all_subs ;
|
||||
coding = utf8;
|
||||
|
||||
lin
|
||||
|
||||
QuestCl cl = {
|
||||
s = \\t,p,qf => case qf of {
|
||||
QDir => cl.s ! t ! p ! OQuest;
|
||||
QIndir => "jykD'h'n" ++ cl.s ! t! p ! ODir
|
||||
}
|
||||
};
|
||||
|
||||
QuestVP qp vp =
|
||||
let cl = mkSClause ("") (Ag qp.g qp.n Pers3_Near) vp;
|
||||
qp1 = qp.s ! Dir;
|
||||
qp2 = qp.s ! Obl ++ "jy"
|
||||
in { s = \\t,p,o => case t of {
|
||||
VPImpPast => case vp.subj of {VIntrans => qp1 ++ cl.s ! t ! p ! ODir; _ => qp2 ++ cl.s ! t ! p ! ODir};
|
||||
_ => qp1 ++ cl.s ! t ! p ! ODir
|
||||
}
|
||||
};
|
||||
QuestSlash ip slash =
|
||||
let ip1 = ip.s ! Dir;
|
||||
ip2 = ip.s ! Obl ++ "jy"
|
||||
in {
|
||||
s = \\t,p,o => case t of {
|
||||
VPImpPast => ip2 ++ slash.s ! t ! p ! ODir;
|
||||
_ => ip1 ++ slash.s ! t ! p ! ODir
|
||||
}
|
||||
};
|
||||
|
||||
QuestIAdv iadv cl = {
|
||||
s = \\t,p,_ => iadv.s ++ cl.s ! t ! p ! ODir;
|
||||
};
|
||||
|
||||
QuestIComp icomp np =
|
||||
let cl = mkSClause (np.s ! NPC Dir ++ icomp.s) np.a (predAux auxBe);
|
||||
in {
|
||||
s = \\t,p,qf => case qf of {
|
||||
QDir => cl.s ! t ! p ! ODir;
|
||||
QIndir => cl.s ! t! p ! ODir
|
||||
}
|
||||
};
|
||||
|
||||
PrepIP p ip = {s = ip.s ! ResSnd. Voc ++ p.s } ;
|
||||
|
||||
AdvIP ip adv = {
|
||||
s = \\c => adv.s ! ip.g ++ ip.s ! c ;
|
||||
n = ip.n;
|
||||
g = ip.g;
|
||||
} ;
|
||||
|
||||
IdetCN idet cn = {
|
||||
s = \\c => idet.s ! cn.g ++ cn.s ! idet.n ! c ;
|
||||
g = cn.g;
|
||||
n = idet.n;
|
||||
} ;
|
||||
|
||||
IdetIP idet = {
|
||||
s = \\_ => idet.s ! Masc ;
|
||||
n = idet.n;
|
||||
g = Masc;
|
||||
} ;
|
||||
|
||||
IdetQuant iqant num = {
|
||||
s = \\g => iqant.s ! num.n ! g ++ num.s ;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
CompIAdv a = a ;
|
||||
CompIP p = ss (p.s ! Dir) ;
|
||||
AdvIAdv i a = {s = i.s ++ a.s ! Masc} ;
|
||||
|
||||
}
|
||||
90
lib/src/sindhi/src/RelativeSnd.gf
Normal file
90
lib/src/sindhi/src/RelativeSnd.gf
Normal file
@@ -0,0 +1,90 @@
|
||||
concrete RelativeSnd of Relative = CatSnd ** open ResSnd in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
coding = utf8;
|
||||
|
||||
lin
|
||||
|
||||
RelCl cl = {
|
||||
s = \\t,p,o,agr => case <t,giveNumber agr,giveGender agr> of {
|
||||
<VPImpPast,Sg,_> => "jh'nk'y" ++ cl.s ! t ! p ! o ;
|
||||
<VPImpPast,Pl,_> => "jh'njW" ++ cl.s ! t ! p ! o ;
|
||||
<_,Sg,Masc> => "jyh'RW" ++ cl.s ! t ! p ! o ;
|
||||
<_,Sg,Fem> => "jyh'Ra" ++ cl.s ! t ! p ! o ;
|
||||
<_,Pl,Masc> => "jyh'Ra" ++ cl.s ! t ! p ! o ;
|
||||
<_,Pl,Fem> => "jyh'RyWn" ++ cl.s ! t ! p ! o
|
||||
};
|
||||
c = Dir
|
||||
} ;
|
||||
-- RelVP and RelSlash slows the linking process a lot this is why it is commented for test purposes
|
||||
|
||||
RelVP rp vp = {
|
||||
s = \\t,p,o,ag =>
|
||||
let
|
||||
agr = case rp.a of {
|
||||
RNoAg => ag ;
|
||||
RAg a => a
|
||||
} ;
|
||||
cl = mkSClause (rp.s ! (giveNumber agr) ! (giveGender agr) ! Dir) agr vp;
|
||||
|
||||
-- cl = case t of {
|
||||
-- VPImpPast => mkSClause (rp.s ! (giveNumber agr) ! Obl) agr vp;
|
||||
-- _ => mkSClause (rp.s ! (giveNumber agr) ! Dir) agr vp
|
||||
-- };
|
||||
in
|
||||
cl.s ! t ! p ! ODir ;
|
||||
c = Dir
|
||||
} ;
|
||||
|
||||
|
||||
---- Pied piping: "at which we are looking". Stranding and empty
|
||||
---- relative are defined in $ExtraHin.gf$ ("that we are looking at",
|
||||
---- "we are looking at").
|
||||
--
|
||||
RelSlash rp slash = {
|
||||
s = \\t,p,o,agr => rp.s ! (giveNumber agr) ! (giveGender agr) ! Obl ++ slash.c2.s ++ slash.s ! t ! p ! o ;
|
||||
c = Dir
|
||||
} ;
|
||||
|
||||
FunRP p np rp = {
|
||||
s = \\n,g,c => rp.s ! n ! g ! c ++ np.s ! NPC c ++ p.s ;
|
||||
a = RAg np.a
|
||||
} ;
|
||||
|
||||
IdRP = {
|
||||
s = table {
|
||||
Sg => table {
|
||||
Masc => table {
|
||||
|
||||
ResSnd.Dir => "jh'Ra" ;
|
||||
ResSnd.Obl => "jnh'n" ;
|
||||
ResSnd.Voc => "jh'Ry" ;
|
||||
ResSnd.Abl => "jh'Ry"
|
||||
};
|
||||
Fem => table {
|
||||
|
||||
ResSnd.Dir => "jh'Ry" ;
|
||||
ResSnd.Obl => "jnh'n" ;
|
||||
ResSnd.Voc => "jh'Ry" ;
|
||||
ResSnd.Abl => "jh'Ry"
|
||||
}
|
||||
};
|
||||
Pl => table {
|
||||
Masc => table {
|
||||
ResSnd.Dir => "jh'Ry" ;
|
||||
ResSnd.Obl => "jh'Ry" ;
|
||||
ResSnd.Voc => "jh'Ry" ;
|
||||
ResSnd.Abl => "jh'Ry"
|
||||
};
|
||||
Fem => table {
|
||||
ResSnd.Dir => "jh'Ry" ;
|
||||
ResSnd.Obl => "jh'Ry" ;
|
||||
ResSnd.Voc => "jh'Ry" ;
|
||||
ResSnd.Abl => "jh'Ry"
|
||||
}
|
||||
}
|
||||
};
|
||||
a = RNoAg
|
||||
} ;
|
||||
|
||||
}
|
||||
673
lib/src/sindhi/src/ResSnd.gf
Normal file
673
lib/src/sindhi/src/ResSnd.gf
Normal file
@@ -0,0 +1,673 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
--
|
||||
--1 Sndu auxiliary operations.
|
||||
--
|
||||
-- This module contains operations that are needed to make the
|
||||
-- resource syntax work.
|
||||
|
||||
resource ResSnd = ParamX ** open Prelude,Predef in {
|
||||
|
||||
flags optimize=all ;
|
||||
coding = utf8;
|
||||
|
||||
param
|
||||
Case = Dir | Obl | Voc | Abl ;
|
||||
Gender = Masc | Fem ;
|
||||
VTense = Subj | Perf | Imperf;
|
||||
PPerson = Pers1
|
||||
| Pers2_Casual
|
||||
| Pers2_Respect
|
||||
| Pers3_Near
|
||||
| Pers3_Distant;
|
||||
|
||||
Order = ODir | OQuest ;
|
||||
|
||||
--2 For $Relative$
|
||||
|
||||
RAgr = RNoAg | RAg Agr ;
|
||||
RCase = RC Number Case ;
|
||||
|
||||
-- for Numerial
|
||||
|
||||
CardOrd = NCard | NOrd ;
|
||||
|
||||
VerbForm4 =
|
||||
VF VTense PPerson Number Gender
|
||||
| Inf | Inf_Fem | Inf_Obl | Ablative
|
||||
| Root ;
|
||||
|
||||
oper
|
||||
Noun = {s : Number => Case => Str ; g : Gender} ;
|
||||
Verb = {s : VerbForm4 => Str} ;
|
||||
Preposition = {s : Str};
|
||||
DemPronForm = {s : Number => Gender => Case => Str};
|
||||
-- PossPronForm = {s : Number => Gender => Case => Str};
|
||||
Determiner = {s : Number => Gender => Str ; n : Number};
|
||||
|
||||
-----------------------------------------------
|
||||
-- Snd Adjectives
|
||||
-----------------------------------------------
|
||||
Adjective1 = {s : Number => Gender => Case => Str} ;
|
||||
|
||||
mkAdj1 : Str -> Adjective1 ;
|
||||
mkAdj1 nyrw = let end = last (nyrw) ;
|
||||
--nyr = if_then_else Str (eq end "y") nyrw (tk 1 nyrw)
|
||||
nyr = (tk 1 nyrw)
|
||||
in adj1 (nyrw) (nyr+"y") ( nyr+"a") (nyr+"a") (nyrw) (nyr+"y") (nyr+"y") (nyr+"y")
|
||||
(nyr+"a") (nyr+"n") ( nyr+"a") (nyr+"a") (nyr+"yWn") (nyr+"yn") (nyr+"yn") (nyr+"yWn") ;
|
||||
|
||||
|
||||
|
||||
adj1 :(x1,_,_,_,_,_,_, _,_,_,_,_,_,_,_, x16 : Str) -> {s : Number => Gender => Case => Str} =
|
||||
\msd,mso,msv,msa, fsd,fso,fsv,fsa, mpd,mpo,mpv,mpa, fpd,fpo,fpv,fpa -> {
|
||||
s = table {
|
||||
Sg => (cmnAdj msd mso msv msa fsd fso fsv fsa).s ;
|
||||
Pl => (cmnAdj mpd mpo mpv mpa fpd fpo fpv fpa).s
|
||||
}
|
||||
};
|
||||
|
||||
mkAdj2 : Str -> Adjective1 ;
|
||||
mkAdj2 young = adj1 (young) (young) (young ) (young) (young) (young) (young) (young)
|
||||
(young) (young) (young ) (young) (young+"yn") (young+"yn") (young+"yn") (young+"yn") ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
mkAdj3 : Str -> Adjective1 ;
|
||||
mkAdj3 acank = adj1 acank acank acank acank acank acank acank acank acank acank acank acank acank acank acank acank ;
|
||||
|
||||
|
||||
cmnAdj : (x1,_,_,_,_,_,_,x8 : Str) -> {s : Gender => Case => Str} =
|
||||
\sd,so,sv,sa, pd,po,pv,pa -> {
|
||||
s = table {
|
||||
Masc => table {
|
||||
Dir => sd ;
|
||||
Obl => so ;
|
||||
Voc => sv ;
|
||||
Abl => sa
|
||||
} ;
|
||||
Fem => table {
|
||||
Dir => pd ;
|
||||
Obl => po ;
|
||||
Voc => pv ;
|
||||
Abl => pa
|
||||
}
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
RefPron : Str;
|
||||
RefPron = "pat'";
|
||||
|
||||
----------------------------------------------------------
|
||||
-- Grammar part
|
||||
----------------------------------------------------------
|
||||
|
||||
param
|
||||
Agr = Ag Gender Number PPerson ;
|
||||
NPCase = NPC Case | NPObj | NPErg ;
|
||||
|
||||
oper
|
||||
np2pronCase : (Case => Str) -> NPCase -> Agr -> Str = \ppf,npc,a -> case npc of {
|
||||
NPC c => ppf ! c;
|
||||
NPObj => ppf ! Obl ;
|
||||
NPErg => case (fromAgr a).p of {
|
||||
(Pers3_Near|Pers3_Distant) => ppf ! Dir ++ "jy" ;
|
||||
_ => ppf ! Dir
|
||||
}
|
||||
} ;
|
||||
|
||||
toNP : ( Case => Str) -> NPCase -> Str = \pn, npc -> case npc of {
|
||||
NPC c => pn ! c ;
|
||||
NPObj => pn ! Dir ;
|
||||
NPErg => pn ! Obl
|
||||
} ;
|
||||
|
||||
detcn2NP : (Determiner) -> Noun -> NPCase -> Number -> Str = \dt,cn,npc,nn -> case npc of {
|
||||
NPC c => dt.s ! Sg ! Masc ++ cn.s ! nn ! c ;
|
||||
NPObj => dt.s ! Sg ! Masc ++ cn.s ! nn ! Dir ;
|
||||
NPErg => dt.s ! Sg ! Masc ++ cn.s ! nn ! Obl
|
||||
} ;
|
||||
|
||||
det2NP : (Determiner) -> NPCase -> Str = \dt,npc -> case npc of {
|
||||
NPC c => dt.s ! Sg ! Masc ;
|
||||
NPObj => dt.s ! Sg ! Masc ;
|
||||
NPErg => dt.s ! Sg ! Masc
|
||||
} ;
|
||||
|
||||
|
||||
oper
|
||||
------------------------------------------
|
||||
-- Agreement transformations
|
||||
-----------------------------------------
|
||||
|
||||
toAgr : Number -> PPerson -> Gender -> Agr = \n,p,g ->
|
||||
Ag g n p;
|
||||
|
||||
|
||||
fromAgr : Agr -> {n : Number ; p : PPerson ; g : Gender} = \a -> case a of {
|
||||
Ag g n p => {n = n ; p = p ; g = g}
|
||||
} ;
|
||||
|
||||
conjAgr : Agr -> Agr -> Agr = \a0,b0 ->
|
||||
let a = fromAgr a0 ; b = fromAgr b0
|
||||
in
|
||||
toAgr
|
||||
(conjNumber a.n b.n)
|
||||
b.p a.g;
|
||||
|
||||
giveNumber : Agr -> Number =\a -> case a of {
|
||||
Ag _ n _ => n
|
||||
};
|
||||
giveGender : Agr -> Gender =\a -> case a of {
|
||||
Ag g _ _ => g
|
||||
};
|
||||
|
||||
defaultAgr : Agr = agrP3 Masc Sg ;
|
||||
agrP3 : Gender -> Number -> Agr = \g,n -> Ag g n Pers3_Distant ;
|
||||
|
||||
personalAgr : Agr = agrP1 Masc Sg ;
|
||||
agrP1 : Gender -> Number -> Agr = \g,n -> Ag g n Pers1 ;
|
||||
|
||||
param
|
||||
CPolarity =
|
||||
CPos
|
||||
| CNeg Bool ; -- contracted or not
|
||||
|
||||
oper
|
||||
contrNeg : Bool -> Polarity -> CPolarity = \b,p -> case p of {
|
||||
Pos => CPos ;
|
||||
Neg => CNeg b
|
||||
} ;
|
||||
|
||||
NP : Type = {s : NPCase => Str ; a : Agr ; isPron : Bool} ;
|
||||
|
||||
param
|
||||
CTense = CPresent | CPast | CFuture | CContinuous;
|
||||
|
||||
oper
|
||||
copula : CTense -> Number -> PPerson -> Gender -> Str = \t,n,p,g ->
|
||||
case <t,n,p,g> of {
|
||||
<CPresent,Sg,Pers1,Masc > => "T'W";
|
||||
<CPresent,Sg,Pers1,Fem > => "T'y" ;
|
||||
<CPresent,Sg,Pers2_Casual,Masc > => "T'W" ;
|
||||
<CPresent,Sg,Pers2_Casual,Fem > => "T'y" ;
|
||||
<CPresent,Sg,Pers2_Respect,Masc > => "T'a" ;
|
||||
<CPresent,Sg,Pers2_Respect,Fem > => "T'yWn" ;
|
||||
<CPresent,Sg,Pers3_Near,Masc > => "T'W" ;
|
||||
<CPresent,Sg,Pers3_Near,Fem > => "T'y" ;
|
||||
<CPresent,Sg,Pers3_Distant,Masc > => "T'W" ;
|
||||
<CPresent,Sg,Pers3_Distant,Fem > => "T'y" ;
|
||||
<CPresent,Pl,Pers1,Masc > => "T'a" ;
|
||||
<CPresent,Pl,Pers1,Fem > => "T'yWn" ;
|
||||
<CPresent,Pl,Pers2_Casual,Masc > => "T'a" ;
|
||||
<CPresent,Pl,Pers2_Casual,Fem > => "T'y" ;
|
||||
<CPresent,Pl,Pers2_Respect,Masc > => "T'a" ;
|
||||
<CPresent,Pl,Pers2_Respect,Fem > => "T'yWn" ;
|
||||
<CPresent,Pl,Pers3_Near,Masc > => "T'a" ;
|
||||
<CPresent,Pl,Pers3_Near,Fem > => "T'yWn" ;
|
||||
<CPresent,Pl,Pers3_Distant,Masc > => "T'a" ;
|
||||
<CPresent,Pl,Pers3_Distant,Fem > => "T'yWn" ;
|
||||
<CPast,Sg,Pers1,Masc > => "h'ym" ;
|
||||
<CPast,Sg,Pers1,Fem > => "h'ym" ;
|
||||
<CPast,Sg,Pers2_Casual,Masc > => "h'e'yn" ;
|
||||
<CPast,Sg,Pers2_Casual,Fem > => "h'e'yn" ;
|
||||
<CPast,Sg,Pers2_Respect,Masc > => "h'e'W" ;
|
||||
<CPast,Sg,Pers2_Respect,Fem > => "h'e'yWn" ;
|
||||
<CPast,Sg,Pers3_Near,_ > => "ah'y" ;
|
||||
-- <CPast,Sg,Pers3_Near,Fem > => "ah'e'" ;
|
||||
<CPast,Sg,Pers3_Distant,Masc > => "h'yW" ;
|
||||
<CPast,Sg,Pers3_Distant,Fem > => "h'e'y" ;
|
||||
|
||||
<CPast,Pl,Pers1,Masc > => "h'e'asyn" ;
|
||||
<CPast,Pl,Pers1,Fem > => "h'yWsyn" ;
|
||||
<CPast,Pl,Pers2_Casual,_ > => "h'e'a" ;
|
||||
<CPast,Pl,Pers2_Respect,_ > => "h'yW" ;
|
||||
<CPast,Pl,Pers3_Near,Masc > => "h'e'a" ;
|
||||
<CPast,Pl,Pers3_Near,Fem > => "h'e'yWn" ;
|
||||
<CPast,Pl,Pers3_Distant,Masc > => "h'e'a" ;
|
||||
<CPast,Pl,Pers3_Distant,Fem > => "h'yWn" ;
|
||||
|
||||
<CFuture,Sg,Pers1,Masc > => "h'Wnds" ;
|
||||
<CFuture,Sg,Pers1,Fem > => "h'Wnds" ;
|
||||
<CFuture,Sg,Pers2_Casual,Masc > => "h'Wndyn" ;
|
||||
<CFuture,Sg,Pers2_Casual,Fem > => "h'Wndyn" ;
|
||||
<CFuture,Sg,Pers2_Respect,Masc > => "h'WndWe' " ;
|
||||
<CFuture,Sg,Pers2_Respect,Fem > => "h'WndWe' " ;
|
||||
<CFuture,Sg,Pers3_Near,Masc > => "h'WndW " ;
|
||||
<CFuture,Sg,Pers3_Near,Fem > => "h'Wndy" ;
|
||||
<CFuture,Sg,Pers3_Distant,Masc > => "h'WndW " ;
|
||||
<CFuture,Sg,Pers3_Distant,Fem > => "h'Wndy" ;
|
||||
<CFuture,Pl,Pers1,Masc > => "h'Wndasyn" ;
|
||||
<CFuture,Pl,Pers1,Fem > => "h'WndyWnsyn" ;
|
||||
<CFuture,Pl,Pers2_Casual,Masc > => "h'WndWe' " ;
|
||||
<CFuture,Pl,Pers2_Casual,Fem > => "h'WndyWyn" ;
|
||||
<CFuture,Pl,Pers2_Respect,Masc > => "h'WndWe' " ;
|
||||
<CFuture,Pl,Pers2_Respect,Fem > => "h'WndyWyn" ;
|
||||
<CFuture,Pl,Pers3_Near,Masc > => "h'Wnda" ;
|
||||
<CFuture,Pl,Pers3_Near,Fem > => "h'WndyWn" ;
|
||||
<CFuture,Pl,Pers3_Distant,Masc > => "h'Wnda" ;
|
||||
<CFuture,Pl,Pers3_Distant,Fem > => "h'WndyWn" ;
|
||||
|
||||
<CContinuous,Sg,Pers1,Masc > => "ah'yan" ;
|
||||
<CContinuous,Sg,Pers1,Fem > => "ah'yan" ;
|
||||
<CContinuous,Sg,Pers2_Casual,Masc > => "ah'yn" ;
|
||||
<CContinuous,Sg,Pers2_Casual,Fem > => "ah'yn" ;
|
||||
<CContinuous,Sg,Pers2_Respect,Masc > => "ah'yW " ;
|
||||
<CContinuous,Sg,Pers2_Respect,Fem > => "ah'yW " ;
|
||||
<CContinuous,Sg,Pers3_Near,Masc > => "ah'y " ;
|
||||
<CContinuous,Sg,Pers3_Near,Fem > => "ah'y" ;
|
||||
<CContinuous,Sg,Pers3_Distant,Masc > => "ah'y " ;
|
||||
<CContinuous,Sg,Pers3_Distant,Fem > => "ah'y" ;
|
||||
<CContinuous,Pl,Pers1,Masc > => "ah'yWn" ;
|
||||
<CContinuous,Pl,Pers1,Fem > => "ah'yWn" ;
|
||||
<CContinuous,Pl,Pers2_Casual,Masc > => "ah'yW " ;
|
||||
<CContinuous,Pl,Pers2_Casual,Fem > => "ah'yW " ;
|
||||
<CContinuous,Pl,Pers2_Respect,Masc > => "ah'yW " ;
|
||||
<CContinuous,Pl,Pers2_Respect,Fem > => "ah'yW " ;
|
||||
<CContinuous,Pl,Pers3_Near,Masc > => "ah'n" ;
|
||||
<CContinuous,Pl,Pers3_Near,Fem > => "ah'n" ;
|
||||
<CContinuous,Pl,Pers3_Distant,Masc > => "ah'n" ;
|
||||
<CContinuous,Pl,Pers3_Distant,Fem > => "ah'n"
|
||||
|
||||
|
||||
} ;
|
||||
param
|
||||
VPPTense =
|
||||
VPPres
|
||||
|VPPast
|
||||
|VPFutr
|
||||
|VPPerf;
|
||||
|
||||
VPHTense =
|
||||
VPGenPres -- impf hum nahim "I go"
|
||||
| VPImpPast -- impf Ta nahim "I went"
|
||||
| VPFut -- fut na/nahim "I shall go"
|
||||
| VPContPres -- stem raha hum nahim "I am going"
|
||||
| VPContPast -- stem raha Ta nahim "I was going"
|
||||
| VPContFut
|
||||
| VPPerfPres -- perf hum na/nahim "I have gone"
|
||||
| VPPerfPast -- perf Ta na/nahim "I had gone"
|
||||
| VPPerfFut
|
||||
| VPPerfPresCont
|
||||
| VPPerfPastCont
|
||||
| VPPerfFutCont
|
||||
| VPSubj -- subj na "I may go"
|
||||
;
|
||||
|
||||
VPHForm =
|
||||
VPTense VPPTense Agr -- 9 * 12
|
||||
| VPReq
|
||||
| VPImp
|
||||
| VPReqFut
|
||||
| VPInf
|
||||
| VPStem
|
||||
;
|
||||
|
||||
VType = VIntrans | VTrans | VTransPost ;
|
||||
|
||||
oper
|
||||
|
||||
objVType : VType -> NPCase = \vt -> case vt of {
|
||||
VTrans => NPObj ;
|
||||
_ => NPC Obl
|
||||
} ;
|
||||
|
||||
VPH : Type = {
|
||||
s : VPHForm => {fin, inf : Str} ;
|
||||
obj : {s : Str ; a : Agr} ;
|
||||
subj : VType ;
|
||||
comp : Agr => Str;
|
||||
inf : Str;
|
||||
ad : Str;
|
||||
embComp : Str ;
|
||||
prog : Bool ;
|
||||
} ;
|
||||
|
||||
VPHSlash = VPH ** {c2 : Compl} ;
|
||||
|
||||
oper
|
||||
Compl : Type = {s : Str ; c : VType} ;
|
||||
|
||||
predV : Verb -> VPH = \verb -> {
|
||||
s = \\vh =>
|
||||
case vh of {
|
||||
VPTense VPPres (Ag g n p) => {fin = copula CPresent n p g ; inf = verb.s ! VF Subj p n g } ;
|
||||
VPTense VPPast (Ag g n p) => {fin = copula CPast n p g ; inf =verb.s ! VF Perf p n g} ;
|
||||
VPTense VPFutr (Ag g n p) => {fin = copula CFuture n p g ; inf = verb.s ! VF Imperf p n g } ;
|
||||
VPTense VPPerf (Ag g n p) => { fin = [] ; inf = verb.s ! Root ++ cka g n } ;
|
||||
VPStem => {fin = [] ; inf = verb.s ! Root};
|
||||
VPInf => {fin = verb.s!Inf_Obl ; inf = verb.s ! Root};
|
||||
VPImp => {fin = verb.s!VF Subj Pers3_Near Pl Masc ; inf = verb.s ! Root};
|
||||
VPReq => {fin = [] ; inf = verb.s!VF Subj Pers1 Pl Masc};
|
||||
_ => {fin = [] ; inf = verb.s ! Root}
|
||||
};
|
||||
obj = {s = [] ; a = defaultAgr} ;
|
||||
subj = VIntrans ;
|
||||
inf = verb.s ! Inf;
|
||||
ad = [];
|
||||
embComp = [];
|
||||
prog = False ;
|
||||
comp = \\_ => []
|
||||
} ;
|
||||
|
||||
predVc : (Verb ** {c2,c1 : Str}) -> VPHSlash = \verb ->
|
||||
predV verb ** {c2 = {s = verb.c1 ; c = VTrans} } ;
|
||||
-------------------------
|
||||
-- added for cauitives
|
||||
predVcc : (Verb **{c2:Compl}) -> VPHSlash = \verb ->
|
||||
predV verb ** {c2 = {s = "" ; c = VTrans} } ;
|
||||
------------------------
|
||||
|
||||
raha : Gender -> Number -> Str = \g,n ->
|
||||
(mkAdj1 "rya").s ! n ! g ! Dir ;
|
||||
rahanDa : Gender -> Number -> Str = \g,n ->
|
||||
(mkAdj1 "rh'nda").s ! n ! g ! Dir ;
|
||||
|
||||
pya : Gender -> Number -> Str = \g,n ->
|
||||
(mkAdj1 "pya").s ! n ! g ! Dir ;
|
||||
|
||||
cka : Gender -> Number -> Str = \g,n ->
|
||||
(mkAdj1 "gya").s ! n ! g ! Dir ;
|
||||
|
||||
hw : PPerson -> Number -> Str = \pp,n ->
|
||||
case <pp,n> of {
|
||||
<Pers1,_> => "hwwaN";
|
||||
<Pers2_Casual,Sg> => "hwwyN";
|
||||
<Pers2_Casual,Pl> => "hww";
|
||||
<Pers2_Respect,_> => "hww";
|
||||
<Pers3_Distant,Sg> => "hwwE";
|
||||
<Pers3_Distant,Pl> => "hwn";
|
||||
<Pers3_Near,Sg> => "hwwE";
|
||||
<Pers3_Near,Pl> => "hwn"
|
||||
|
||||
};
|
||||
|
||||
predAux : Aux -> VPH = \verb -> {
|
||||
s = \\vh =>
|
||||
let
|
||||
|
||||
inf = verb.inf ;
|
||||
part = verb.ppart ;
|
||||
|
||||
in
|
||||
case vh of {
|
||||
VPTense VPPres (Ag g n p) => {fin = copula CContinuous n p g ; inf = part } ;
|
||||
VPTense VPPast (Ag g n p) => {fin = copula CPast n p g ; inf = part } ;
|
||||
VPTense VPFutr (Ag g n p) => {fin = copula CFuture n p g ; inf = part ++ hw p n } ;
|
||||
VPStem => {fin = [] ; inf = "rh" };
|
||||
_ => {fin = part ; inf = inf }
|
||||
};
|
||||
obj = {s = [] ; a = defaultAgr} ;
|
||||
subj = VIntrans ;
|
||||
inf = verb.inf;
|
||||
ad = [];
|
||||
embComp = [];
|
||||
prog = False ;
|
||||
comp = \\_ => []
|
||||
} ;
|
||||
|
||||
Aux = {
|
||||
inf,ppart,prpart : Str
|
||||
} ;
|
||||
|
||||
auxBe : Aux = {
|
||||
inf = "" ;
|
||||
ppart = "" ;
|
||||
prpart = ""
|
||||
} ;
|
||||
|
||||
predProg : VPH -> VPH = \verb -> {
|
||||
s = \\vh =>
|
||||
case vh of {
|
||||
VPTense VPPres (Ag g n p) => {fin = copula CPresent n p g ; inf = (verb.s!VPTense VPPres (Ag g n p)).inf ++ pya g n} ;
|
||||
VPTense VPPast (Ag g n p) => {fin = copula CPast n p g ; inf = (verb.s!VPTense VPPres (Ag g n p)).inf ++ pya g n} ;
|
||||
VPTense VPFutr (Ag g n p) => {fin = copula CFuture n p g ; inf = (verb.s!VPTense VPPres (Ag g n p)).inf } ;
|
||||
VPTense VPPerf (Ag g n p) => {fin = copula CPast n p g ; inf = (verb.s!VPTense VPPres (Ag g n p)).inf ++ raha g n } ;
|
||||
VPStem => {fin = [] ; inf = (verb.s!VPStem).inf };
|
||||
_ => {fin = [] ; inf = [] }
|
||||
};
|
||||
obj = verb.obj ;
|
||||
subj = VIntrans ;
|
||||
inf = verb.inf;
|
||||
ad = verb.ad;
|
||||
embComp = verb.embComp;
|
||||
prog = True ;
|
||||
comp = verb.comp
|
||||
} ;
|
||||
|
||||
Clause : Type = {s : VPHTense => Polarity => Order => Str} ;
|
||||
mkClause : NP -> VPH -> Clause = \np,vp -> {
|
||||
s = \\vt,b,ord =>
|
||||
let
|
||||
subjagr : NPCase * Agr = case vt of {
|
||||
VPImpPast => case vp.subj of {
|
||||
VTrans => <NPErg, vp.obj.a> ;
|
||||
VTransPost => <NPErg, defaultAgr> ;
|
||||
_ => <NPC Dir, np.a>
|
||||
} ;
|
||||
_ => <NPC Dir, np.a>
|
||||
} ;
|
||||
subj = subjagr.p1 ;
|
||||
agr = subjagr.p2 ;
|
||||
n = (fromAgr agr).n;
|
||||
p = (fromAgr agr).p;
|
||||
g = (fromAgr agr).g;
|
||||
vps = case vt of {
|
||||
|
||||
VPGenPres => vp.s ! VPTense VPPres agr ;
|
||||
VPImpPast => vp.s ! VPTense VPPast agr ;
|
||||
|
||||
VPFut => case vp.prog of { True => {fin = (vp.s ! VPTense VPFutr agr).fin ; inf = (vp.s ! VPTense VPFutr agr).inf ++ hw p n} ;
|
||||
_ => vp.s ! VPTense VPFutr agr } ;
|
||||
VPContPres =>
|
||||
{fin = copula CContinuous n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
||||
VPContPast =>
|
||||
{fin = copula CPast n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
||||
VPContFut =>
|
||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPTense VPPres agr).inf ++ raha g n } ;
|
||||
VPPerfPres =>
|
||||
{fin = copula CContinuous n p g ; inf = (vp.s ! VPTense VPPast agr).inf } ;
|
||||
-- {fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
||||
VPPerfPast =>
|
||||
-- {fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
||||
{fin = copula CPast n p g ; inf = (vp.s ! VPTense VPPast agr).inf } ;
|
||||
VPPerfFut =>
|
||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPTense VPPast agr).inf } ;
|
||||
VPPerfPresCont =>
|
||||
{fin = copula CContinuous n p g ; inf = (vp.s ! VPTense VPFutr agr).inf ++ raha g n} ;
|
||||
VPPerfPastCont =>
|
||||
{fin = copula CPast n p g ; inf = (vp.s ! VPTense VPFutr agr).inf ++ rahanDa g n} ;
|
||||
VPPerfFutCont =>
|
||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPTense VPFutr agr).inf ++ rahanDa g n} ;
|
||||
VPSubj => case vp.prog of { True => {fin = (vp.s ! VPTense VPFutr agr).inf ++ hw p n ; inf = "Xayd" } ;
|
||||
_ => {fin = (vp.s ! VPTense VPFutr agr).inf ; inf = "Xayd" } }
|
||||
|
||||
};
|
||||
|
||||
|
||||
quest =
|
||||
case ord of
|
||||
{ ODir => [];
|
||||
OQuest => "c'a" };
|
||||
na =
|
||||
case b of
|
||||
{ Pos => [];
|
||||
Neg => "n" };
|
||||
nahim =
|
||||
case b of
|
||||
{ Pos => [];
|
||||
Neg => "n" };
|
||||
in
|
||||
case vt of {
|
||||
VPSubj => quest ++ np.s ! subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! np.a ++ vps.inf ++ na ++ vps.fin ++ vp.embComp ;
|
||||
_ => quest ++ np.s ! subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! np.a ++ vps.inf ++ nahim ++ vps.fin ++ vp.embComp};
|
||||
|
||||
} ;
|
||||
|
||||
mkSClause : Str -> Agr -> VPH -> Clause =
|
||||
\subj,agr,vp -> {
|
||||
s = \\t,b,ord =>
|
||||
let
|
||||
n = (fromAgr agr).n;
|
||||
p = (fromAgr agr).p;
|
||||
g = (fromAgr agr).g;
|
||||
vps = case t of {
|
||||
VPGenPres => vp.s ! VPTense VPPres agr ;
|
||||
VPImpPast => vp.s ! VPTense VPPast agr ;
|
||||
VPFut => vp.s ! VPTense VPFutr agr ;
|
||||
VPContPres =>
|
||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ pya g n } ;
|
||||
VPContPast =>
|
||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ pya g n } ;
|
||||
VPContFut =>
|
||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ pya g n ++ hw p n } ;
|
||||
VPPerfPres =>
|
||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
||||
VPPerfPast =>
|
||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ cka g n } ;
|
||||
VPPerfFut =>
|
||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ cka g n ++ hw p n } ;
|
||||
VPPerfPresCont =>
|
||||
{fin = copula CPresent n p g ; inf = (vp.s ! VPStem).inf ++ pya g n } ;
|
||||
VPPerfPastCont =>
|
||||
{fin = copula CPast n p g ; inf = (vp.s ! VPStem).inf ++ pya g n } ;
|
||||
VPPerfFutCont =>
|
||||
{fin = copula CFuture n p g ; inf = (vp.s ! VPStem).inf ++ pya g n ++ hw p n } ;
|
||||
VPSubj => {fin = (vp.s ! VPTense VPPres agr).inf ; inf = "Xayd" }
|
||||
|
||||
};
|
||||
|
||||
quest =
|
||||
case ord of
|
||||
{ ODir => [];
|
||||
OQuest => "c'a" };
|
||||
na =
|
||||
case b of
|
||||
{ Pos => [];
|
||||
Neg => "n" };
|
||||
nahim =
|
||||
case b of
|
||||
{ Pos => [];
|
||||
Neg => "n" };
|
||||
in
|
||||
case t of {
|
||||
VPSubj => quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ vps.inf ++ na ++ vps.fin ++ vp.embComp;
|
||||
_ => quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ vps.inf ++ nahim ++ vps.fin ++ vp.embComp};
|
||||
} ;
|
||||
|
||||
insertSubj : PPerson -> Str -> Str = \p,s ->
|
||||
case p of { Pers1 => s ++ "wN" ; _ => s ++ ""};
|
||||
|
||||
insertObj : (Agr => Str) -> VPH -> VPH = \obj1,vp -> {
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
subj = vp.subj ;
|
||||
inf = vp.inf;
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp;
|
||||
prog = vp.prog ;
|
||||
comp = \\a => vp.comp ! a ++ obj1 ! a
|
||||
} ;
|
||||
insertVV : Str -> VPH -> Str -> VPH -> VPH = \obj1,vp,emb,vp2 -> {
|
||||
s = vp.s ;
|
||||
obj = vp2.obj ;
|
||||
subj = vp.subj ;
|
||||
inf = vp.inf;
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp ++ emb; -- this should be covered in urdu as well
|
||||
prog = vp.prog ;
|
||||
comp = \\a => vp.comp ! a ++ obj1
|
||||
} ;
|
||||
|
||||
insertObj2 : (Str) -> VPH -> VPH = \obj1,vp -> {
|
||||
s = vp.s;
|
||||
obj = vp.obj ;
|
||||
subj = vp.subj ;
|
||||
inf = vp.inf;
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp ++ obj1;
|
||||
prog = vp.prog ;
|
||||
comp = vp.comp
|
||||
|
||||
} ;
|
||||
|
||||
insertObjc : (Agr => Str) -> VPHSlash -> VPHSlash = \obj,vp ->
|
||||
insertObj obj vp ** {c2 = vp.c2} ;
|
||||
insertObjc2 : Str -> VPHSlash -> VPHSlash = \obj,vp ->
|
||||
insertObj2 obj vp ** {c2 = vp.c2} ;
|
||||
|
||||
infVP : Bool -> VPH -> Agr -> Str = \isAux,vp,a ->
|
||||
vp.obj.s ++ vp.inf ++ vp.comp ! a ;
|
||||
infVV : Bool -> VPH -> Str = \isAux,vp ->
|
||||
case isAux of {False => (vp.comp ! (toAgr Sg Pers1 Masc)) ++ vp.inf ; True => (vp.comp ! (toAgr Sg Pers1 Masc)) ++ (vp.s ! VPImp).fin }; -- need to be checked and should be covered in urdu as well
|
||||
infV2V : Bool -> VPH -> Str = \isAux,vp ->
|
||||
case isAux of {False => (vp.comp ! (toAgr Sg Pers1 Masc)) ++ vp.inf ++ "dy" ; True => (vp.comp ! (toAgr Sg Pers1 Masc)) ++ (vp.s ! VPImp).fin ++ "dy"}; -- need to be checked and should be covered in urdu as well
|
||||
|
||||
insertObject : NP -> VPHSlash -> VPH = \np,vps -> {
|
||||
s = vps.s ;
|
||||
obj = case np.isPron of {
|
||||
False => {s = vps.obj.s ++ np.s ! objVType vps.c2.c ++ vps.c2.s ; a = np.a} ;
|
||||
_ => {s = vps.obj.s ++ np.s ! objVType vps.c2.c ++ vps.c2.s ; a = np.a}
|
||||
};
|
||||
subj = vps.c2.c ;
|
||||
inf = vps.inf;
|
||||
ad = vps.ad;
|
||||
embComp = vps.embComp;
|
||||
prog = vps.prog ;
|
||||
comp = vps.comp
|
||||
} ;
|
||||
|
||||
insertObjPre : (Agr => Str) -> VPHSlash -> VPH = \obj,vp -> {
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
inf = vp.inf ;
|
||||
subj = vp.subj ;
|
||||
ad = vp.ad ;
|
||||
embComp = vp.embComp;
|
||||
prog = vp.prog ;
|
||||
comp = \\a => obj ! a ++ vp.c2.s ++ vp.comp ! a
|
||||
} ;
|
||||
|
||||
insertAdV : Str -> VPH -> VPH = \ad,vp -> {
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
inf = vp.inf ;
|
||||
subj = vp.subj;
|
||||
ad = vp.ad ++ ad ;
|
||||
embComp = vp.embComp;
|
||||
prog = vp.prog ;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
conjThat : Str = "t" ;
|
||||
checkPron : NP -> Str -> Str = \np,str -> case (np.isPron) of {
|
||||
True => np.s ! NPC Obl;
|
||||
False => np.s ! NPC Obl ++ str} ;
|
||||
|
||||
insertEmbCompl : VPH -> Str -> VPH = \vp,emb -> {
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
inf = vp.inf ;
|
||||
subj = vp.subj;
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp ++ emb;
|
||||
prog = vp.prog ;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
|
||||
insertTrans : VPH -> VType -> VPH = \vp,vtype -> {
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
inf = vp.inf ;
|
||||
subj = case vtype of {VIntrans => VTransPost ; VTrans => VTrans ; _ => vtype} ; -- still some problem not working properly
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp ;
|
||||
prog = vp.prog ;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
104
lib/src/sindhi/src/SentenceSnd.gf
Normal file
104
lib/src/sindhi/src/SentenceSnd.gf
Normal file
@@ -0,0 +1,104 @@
|
||||
concrete SentenceSnd of Sentence = CatSnd ** open Prelude, ResSnd in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
coding = utf8;
|
||||
|
||||
lin
|
||||
|
||||
PredVP np vp = mkClause np vp ;
|
||||
|
||||
PredSCVP sc vp = mkSClause sc.s (defaultAgr) vp ;
|
||||
|
||||
ImpVP vp = {
|
||||
s = \\pol,n =>
|
||||
let
|
||||
agr = Ag Masc (numImp n) Pers2_Casual ;
|
||||
-- verb = infVP True vp agr ;
|
||||
verb = (vp.s ! VPImp).inf ++ vp.comp ! agr ;
|
||||
dont = case pol of {
|
||||
CNeg True => "n" ;
|
||||
CNeg False => "n" ;
|
||||
_ => []
|
||||
}
|
||||
in
|
||||
dont ++ verb
|
||||
} ;
|
||||
|
||||
SlashVP np vp =
|
||||
mkClause np vp ** {c2 = vp.c2} ;
|
||||
|
||||
AdvSlash slash adv = {
|
||||
s = \\t,p,o => adv.s ! Masc ++ slash.s ! t ! p ! o ;
|
||||
c2 = slash.c2
|
||||
} ;
|
||||
|
||||
SlashPrep cl prep = cl ** {c2 = { s = prep.s ; c = VIntrans}} ;
|
||||
|
||||
SlashVS np vs slash =
|
||||
mkClause np
|
||||
(insertObj2 (conjThat ++ slash.s) (predV vs)) **
|
||||
{c2 = slash.c2} ;
|
||||
|
||||
EmbedS s = {s = conjThat ++ s.s} ;
|
||||
EmbedQS qs = {s = qs.s ! QIndir} ;
|
||||
EmbedVP vp = {s = infVP False vp defaultAgr} ; --- agr
|
||||
|
||||
UseCl temp p cl =
|
||||
{ s = case <temp.t,temp.a> of {
|
||||
<Pres,Simul> => temp.s ++ p.s ++ cl.s ! VPGenPres ! p.p ! ODir;
|
||||
<Pres,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPres ! p.p ! ODir;
|
||||
<Past,Simul> => temp.s ++ p.s ++ cl.s ! VPImpPast ! p.p ! ODir;
|
||||
<Past,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPast ! p.p ! ODir;
|
||||
<Fut,Simul> => temp.s ++ p.s ++ cl.s ! VPFut ! p.p ! ODir;
|
||||
<Fut,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfFut ! p.p ! ODir;
|
||||
<Cond,Simul> => temp.s ++ p.s ++ cl.s ! VPSubj ! p.p ! ODir;
|
||||
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VPSubj ! p.p ! ODir -- this needs to be fixed by making SubjPerf in ResPnb
|
||||
|
||||
};
|
||||
} ;
|
||||
UseQCl temp p cl = {
|
||||
s = \\q => case <temp.t,temp.a> of {
|
||||
<Pres,Simul> => temp.s ++ p.s ++ cl.s ! VPGenPres ! p.p ! q;
|
||||
<Pres,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPres ! p.p ! q;
|
||||
<Past,Simul> => temp.s ++ p.s ++ cl.s ! VPImpPast ! p.p ! q;
|
||||
<Past,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfPast ! p.p ! q;
|
||||
<Fut,Simul> => temp.s ++ p.s ++ cl.s ! VPFut ! p.p ! q;
|
||||
<Fut,Anter> => temp.s ++ p.s ++ cl.s ! VPPerfFut ! p.p ! q;
|
||||
<Cond,Simul> => temp.s ++ p.s ++ cl.s ! VPSubj ! p.p ! q;
|
||||
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VPSubj ! p.p ! q
|
||||
|
||||
};
|
||||
} ;
|
||||
UseRCl temp p rcl = {
|
||||
s = \\q => case <temp.t,temp.a> of {
|
||||
<Pres,Simul> => temp.s ++ p.s ++ rcl.s ! VPGenPres ! p.p ! ODir ! q;
|
||||
<Pres,Anter> => temp.s ++ p.s ++ rcl.s ! VPPerfPres ! p.p ! ODir ! q;
|
||||
<Past,Simul> => temp.s ++ p.s ++ rcl.s ! VPImpPast ! p.p ! ODir ! q;
|
||||
<Past,Anter> => temp.s ++ p.s ++ rcl.s ! VPPerfPast ! p.p ! ODir ! q;
|
||||
<Fut,Simul> => temp.s ++ p.s ++ rcl.s ! VPFut ! p.p ! ODir ! q;
|
||||
<Fut,Anter> => temp.s ++ p.s ++ rcl.s ! VPPerfFut ! p.p ! ODir ! q;
|
||||
<Cond,Simul> => temp.s ++ p.s ++ rcl.s ! VPSubj ! p.p ! ODir ! q;
|
||||
<Cond,Anter> => temp.s ++ p.s ++ rcl.s ! VPSubj ! p.p ! ODir ! q
|
||||
};
|
||||
c = rcl.c
|
||||
} ;
|
||||
UseSlash temp p clslash = {
|
||||
s = case <temp.t,temp.a> of {
|
||||
<Pres,Simul> => temp.s ++ p.s ++ clslash.s ! VPGenPres ! p.p ! ODir;
|
||||
<Pres,Anter> => temp.s ++ p.s ++ clslash.s ! VPPerfPres ! p.p ! ODir;
|
||||
<Past,Simul> => temp.s ++ p.s ++ clslash.s ! VPImpPast ! p.p ! ODir ;
|
||||
<Past,Anter> => temp.s ++ p.s ++ clslash.s ! VPPerfPast ! p.p ! ODir;
|
||||
<Fut,Simul> => temp.s ++ p.s ++ clslash.s ! VPFut ! p.p ! ODir;
|
||||
<Fut,Anter> => temp.s ++ p.s ++ clslash.s ! VPPerfFut ! p.p ! ODir;
|
||||
<Cond,Simul> => temp.s ++ p.s ++ clslash.s ! VPSubj ! p.p ! ODir;
|
||||
<Cond,Anter> => temp.s ++ p.s ++ clslash.s ! VPSubj ! p.p ! ODir
|
||||
};
|
||||
c2 = clslash.c2
|
||||
} ;
|
||||
|
||||
AdvS a s = {s = a.s ! Masc ++ s.s} ;
|
||||
|
||||
RelS s r = {s = s.s ++ r.s ! agrP3 Masc Sg} ;
|
||||
SSubjS s sj s = { s = s.s ++ sj.s ++ s.s};
|
||||
|
||||
}
|
||||
132
lib/src/sindhi/src/StructuralSnd.gf
Normal file
132
lib/src/sindhi/src/StructuralSnd.gf
Normal file
@@ -0,0 +1,132 @@
|
||||
concrete StructuralSnd of Structural = CatSnd **
|
||||
open MorphoSnd, ParadigmsSnd, Prelude in {
|
||||
|
||||
flags optimize=all ;
|
||||
coding = utf8;
|
||||
|
||||
lin
|
||||
above_Prep = mkPrep "mT'y " ;
|
||||
after_Prep = mkPrep "k'an pWe' " ;
|
||||
all_Predet = ss "sB' " ;
|
||||
almost_AdA, almost_AdN = mkAdN "gh't'W kry " ;
|
||||
although_Subj = ss "jytWt'yk " ;
|
||||
always_AdV = ss "h'myXh' " ;
|
||||
and_Conj = sd2 [] "A" ** {n = Pl} ;
|
||||
because_Subj = ss "c'akat' ty " ;
|
||||
before_Prep = mkPrep "pyh'ryn" ;
|
||||
behind_Prep = mkPrep "pT!ty " ;
|
||||
between_Prep = mkPrep " jy Wc my " ;
|
||||
both7and_DConj = sd2 "Be'y " "A" ** {n = Pl} ;
|
||||
but_PConj = ss "pr" ;
|
||||
by8agent_Prep = mkPrep "h'T'an " ;
|
||||
by8means_Prep = mkPrep "kan" ;
|
||||
can8know_VV,can_VV = mkV "sgh't' " ** { isAux = True} ;
|
||||
during_Prep = mkPrep "Wc M" ;
|
||||
either7or_DConj = sd2 "kWe'y ByW " "ya" ** {n = Sg} ;
|
||||
--everybody_NP = MassNP (UseN (ParadigmsSnd.mkN "h'r kWe'y" "h'r kWe'y" "h'r kWe'y" "h'r kWe'y" Masc )); -- not a good way coz need to include NounSnd
|
||||
every_Det = mkDet "h'r h'k " "h'r h'k " "h'r h'k " "h'r h'k " Sg;
|
||||
--everything_NP = MassNP (UseN (ParadigmsSnd.mkN "h'r Xy " "h'r Xy " "h'r Xy " "sB' kjh' " Masc ));
|
||||
everywhere_Adv = mkAdv "h'r h'nd' " ;
|
||||
few_Det = mkDet "kjh' " "kjh' " "kjh' " "kjh' " Pl ;
|
||||
first_Ord = {s = "ph'ryWn" ; n = Sg} ; --DEPRECATED
|
||||
for_Prep = mkPrep "Lae'y ";
|
||||
from_Prep = mkPrep "WTan" ;
|
||||
he_Pron = personalPN "h'W" "h'W" "" ["h'W "] ["h'W"] Sg Masc Pers3_Distant ;
|
||||
here_Adv = mkAdv "h'ty" ;
|
||||
here7to_Adv = mkAdv "ajh'W" ;
|
||||
here7from_Adv = mkAdv ["h'yD'anh'n"] ;
|
||||
how_IAdv = ss "ke'yn" ;
|
||||
how8many_IDet = makeIDet "kytra" "kytra" Pl ;
|
||||
how8much_IAdv = ss "kytra";
|
||||
if_Subj = ss "jykD'h'n" ;
|
||||
in8front_Prep = mkPrep ["jy samh'Wn"] ;
|
||||
i_Pron = personalPN "man" "mh'nja " "mh'njW " "man" " " Sg Masc Pers1;
|
||||
in_Prep = mkPrep "M" ;
|
||||
it_Pron = personalPN "ah'a" "h'n" "ah'W" "ah'a" "" Sg Masc Pers3_Near;
|
||||
less_CAdv = {s = "gh'T" ; p = ""} ;
|
||||
many_Det = mkDet "gh't'a" "gh't'y" "kafy" "kytra" Pl ;
|
||||
more_CAdv = {s = "Wd'yk"; p = "gh't'a" } ;
|
||||
most_Predet = ss "sB' k'an gh't'W" ;
|
||||
much_Det = mkDet "gh't'W" "gh't'W" "gh't'W" "gh't'W" Sg ;
|
||||
--must_VV = {
|
||||
-- s = table {
|
||||
-- VVF VInf => ["have to"] ;
|
||||
-- VVF VPres => "must" ;
|
||||
-- VVF VPPart => ["had to"] ;
|
||||
-- VVF VPresPart => ["having to"] ;
|
||||
-- VVF VPast => ["had to"] ; --# notpresent
|
||||
-- VVPastNeg => ["hadn't to"] ; --# notpresent
|
||||
-- VVPresNeg => "mustn't"
|
||||
-- } ;
|
||||
-- isAux = True
|
||||
-- } ;
|
||||
|
||||
-----b
|
||||
no_Phr = ss "no" ;
|
||||
no_Utt = ss "na" ;
|
||||
on_Prep = mkPrep "mT'an" ;
|
||||
one_Quant = demoPN "h'k" "h'k" "h'k" ; -- DEPRECATED
|
||||
only_Predet = ss "Srf" ;
|
||||
or_Conj = sd2 [] "ya" ** {n = Sg} ;
|
||||
otherwise_PConj = ss "n t pWe'y" ;
|
||||
part_Prep = mkPrep "HsW" ;
|
||||
possess_Prep = mkPrep[ "jW ya jy"] ;
|
||||
please_Voc = ss "mh'rbany" ;
|
||||
quite_Adv = ss "c'D't' " ;
|
||||
she_Pron = personalPN "h'We'" "h'W" "h'W" ["h'We'"] ["h'We'"] Sg Fem Pers3_Distant ;
|
||||
so_AdA = ss "an kry" ;
|
||||
--somebody_NP = MassNP (UseN (ParadigmsSnd.mkN "kWe'y" "kWe'y" "kWe'y" "kWe'y" Masc ));
|
||||
someSg_Det = mkDet "kjh' " "kjh' " "kjh' " "kjh' " Sg ;
|
||||
somePl_Det = mkDet "kjh' " "kjh' " "kjh' " "kjh' " Pl ;
|
||||
--something_NP = MassNP (UseN (ParadigmsSnd.mkN "kWe'y Xy" "kWe'y Xy" "kWe'y Xy" "kWe'y XyWn" Masc ));
|
||||
somewhere_Adv = mkAdv "kT'y" ;
|
||||
that_Quant = demoPN "jykW" "" "" ;
|
||||
that_Subj = ss "ah'a" ;
|
||||
there_Adv = mkAdv "aty" ;
|
||||
there7to_Adv = mkAdv ["h'ty"] ;
|
||||
there7from_Adv = mkAdv ["h'tan"] ;
|
||||
therefore_PConj = ss "an kry" ;
|
||||
they_Pron = personalPN "ah'y" "ah'y" "ah'y" ["ah'y jW"] ["ah'y jW"] Pl Masc Pers3_Distant ; ----
|
||||
this_Quant = demoPN "h'y" "h'n" "";
|
||||
through_Prep = mkPrep "mnjh'an" ;
|
||||
under_Prep = mkPrep " h'yT!an" ; -- ** {lock_Prep = <>};
|
||||
too_AdA = ss "byHd";
|
||||
to_Prep = mkPrep "D'anh'n" ; -- ** {lock_Prep = <>};
|
||||
very_AdA = ss "tmam" ;
|
||||
want_VV = mkV "cah't' " ** { isAux = False} ;
|
||||
we_Pron = personalPN "asan" "asan" "asan" "asanjo" "asanjo" Pl Masc Pers1 ;
|
||||
whatSg_IP = mkIP "c'a" "c'W" "" "" Sg Masc ;
|
||||
whatPl_IP = mkIP "c'a" "c'W " " " "" Pl Masc ;
|
||||
when_IAdv = ss "kD'h'n" ;
|
||||
when_Subj = ss "jD'h'n" ;
|
||||
where_IAdv = ss "kT'y" ;
|
||||
--which_IQuant = {s = \\_ => "kh'RW"} ;
|
||||
which_IQuant = mkIQuant "jykW" "jyky" "jyka" "jh'RW" ;
|
||||
whichPl_IDet = makeDet "jykY" "jnh'n" ;
|
||||
whichSg_IDet = makeDet "jykW " "jyka" ;
|
||||
whoSg_IP = mkIP "kyr" "kh'njy" "kh'njo" "" Sg Masc ;
|
||||
whoPl_IP = mkIP "kyr" "kh'nja" "kh'nja" "" Pl Masc ;
|
||||
why_IAdv = ss "c'W" ;
|
||||
without_Prep = mkPrep "k'an sWae' " ;
|
||||
with_Prep = mkPrep "san" ;
|
||||
yes_Phr = ss "h'a" ;
|
||||
yes_Utt = ss "h'a" ;
|
||||
youSg_Pron = personalPN "tWn" "tWn" "tWn" "th'njW" "th'njy" Sg Masc Pers2_Casual ;
|
||||
youPl_Pron = personalPN "tWh'an" "tWh'an" "tWh'an" "tWh'anjW" "tWh'anjy" Pl Masc Pers2_Casual ;
|
||||
youPol_Pron = personalPN "tWh'an" "tWh'an" "tWh'an" "tWh'an jW" "tWh'an jy" Pl Masc Pers2_Respect ;
|
||||
no_Quant = demoPN " c'W n" "c'W n" "c'W n " ;
|
||||
not_Predet = {s="n"} ;
|
||||
if_then_Conj = sd2 "jykD'h'n" "t" ** {n = Sg} ;
|
||||
at_least_AdN = mkAdN ["gh'T my gh'T"] ;
|
||||
at_most_AdN = mkAdN ["gh't'y k'an gh't'W"];
|
||||
|
||||
--nothing_NP = MassNP (UseN (ParadigmsSnd.mkN "kjh' Xy n" "kjh' Xy n" "kjh' Xy n" "kjh' Xy n" "kjh' Xy n" "kjh' Xy n" Masc ));
|
||||
except_Prep = mkPrep "sWae' " ;
|
||||
--nobody_NP = MassNP (UseN (ParadigmsSnd.mkN "kW b n" "kW b n" "kW b n" "kW b n" "kW b n" "kW b n" Masc ));
|
||||
|
||||
as_CAdv = {s = "jye'n" ; p = "jh'RW"} ;
|
||||
have_V2 = mkV2 (mkV "rk't' ") "" ;
|
||||
language_title_Utt = ss "BWly" ;
|
||||
|
||||
}
|
||||
|
||||
50
lib/src/sindhi/src/SymbolSnd.gf
Normal file
50
lib/src/sindhi/src/SymbolSnd.gf
Normal file
@@ -0,0 +1,50 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete SymbolSnd of Symbol = CatSnd ** open Prelude, ResSnd in {
|
||||
|
||||
flags coding = utf8;
|
||||
|
||||
lin
|
||||
-- SymbPN i = {s = \\_ => i.s ; g = Masc} ;
|
||||
SymbPN i = {s = addGenitiveS i.s ; g = Masc} ;
|
||||
IntPN i = {s = addGenitiveS i.s ; g = Masc} ;
|
||||
FloatPN i = {s = addGenitiveS i.s ; g = Masc} ;
|
||||
NumPN i = {s = \\_ =>i.s ; g = Masc} ;
|
||||
CNIntNP cn i = {
|
||||
s = \\c => cn.s ! Sg ! Dir ++ i.s ;
|
||||
a = agrP3 cn.g Sg ;
|
||||
isPron = False
|
||||
} ;
|
||||
CNSymbNP det cn xs = {
|
||||
s = \\c => det.s!Sg!Masc ++ cn.s ! det.n ! Dir ++ xs.s ;
|
||||
a = agrP3 cn.g det.n;
|
||||
isPron = False
|
||||
} ;
|
||||
CNNumNP cn i = {
|
||||
s = \\c => cn.s ! Sg ! Dir ++ i.s ;
|
||||
a = agrP3 cn.g Sg;
|
||||
isPron = False
|
||||
} ;
|
||||
|
||||
SymbS sy = sy ;
|
||||
SymbNum sy = { s = sy.s ; n = Pl } ;
|
||||
SymbOrd sy = { s = sy.s ++ "waN" ; n = Pl} ;
|
||||
|
||||
lincat
|
||||
|
||||
Symb, [Symb] = SS ;
|
||||
|
||||
lin
|
||||
MkSymb s = s ;
|
||||
|
||||
BaseSymb = infixSS "tE" ;
|
||||
ConsSymb = infixSS "" ;
|
||||
|
||||
oper
|
||||
-- Note: this results in a space before 's, but there's
|
||||
-- not mauch we can do about that.
|
||||
addGenitiveS : Str -> Case => Str = \s ->
|
||||
table {_ => s ++ "da" } ;
|
||||
|
||||
|
||||
}
|
||||
44
lib/src/sindhi/src/VerbSnd.gf
Normal file
44
lib/src/sindhi/src/VerbSnd.gf
Normal file
@@ -0,0 +1,44 @@
|
||||
concrete VerbSnd of Verb = CatSnd ** open ResSnd in {
|
||||
|
||||
flags coding = utf8;
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
UseV v = predV v ;
|
||||
SlashV2a v = predV v ** {c2 = {s = v.c2.s ; c = VTrans}} ;
|
||||
Slash2V3 v np =
|
||||
insertObjc (\\_ => np.s ! NPObj ++ v.c3 ) (predV v ** {c2 = {s = v.c2 ; c = VTrans}}) ;
|
||||
|
||||
Slash3V3 v np =
|
||||
insertObjc (\\_ => checkPron np v.c2) (predV v ** {c2 = {s = v.c3 ; c = VTrans}}) ;
|
||||
|
||||
ComplVV v vp = insertTrans (insertVV (infVV v.isAux vp) (predV v) vp.embComp vp) vp.subj;
|
||||
ComplVS v s = insertTrans (insertObj2 (conjThat ++ s.s) (predV v)) VTransPost ;
|
||||
ComplVQ v q = insertObj2 (conjThat ++ q.s ! QIndir) (predV v) ;
|
||||
ComplVA v ap = insertObj (\\a => ap.s ! giveNumber a ! giveGender a ! Dir ) (predV v) ;
|
||||
SlashV2V v vp = insertVV (infV2V v.isAux vp) (predV v) vp.embComp vp **{c2 = {s = "twN" ; c = VTransPost}} ; -- should creat a form at VP level which can be used in VP like 'swn da kyna' also check the c=VTransPost it is correct in case if second v is intrasitive, but not if trans like begged me to ead bread
|
||||
SlashV2S v s = insertObjc2 (conjThat ++ s.s) (predV v ** {c2 = {s = "k'y" ; c = VTransPost}}) ;
|
||||
SlashV2Q v q = insertObjc2 (conjThat ++ q.s ! QIndir) (predV v ** {c2 = {s = "k'an" ; c = VTransPost}}) ; -- chek for VTransPost, as in this case , case should be ergative but agrement should be default
|
||||
SlashV2A v ap = insertObjc (\\a => ap.s ! giveNumber a ! giveGender a ! Dir ) (predV v ** {c2 = {s = "k'y" ; c = VTransPost}}) ; ----
|
||||
ComplSlash vp np = insertObject np vp ;
|
||||
SlashVV vv vp =
|
||||
insertEmbCompl (insertObj (\\a => infVP vv.isAux vp a) (predV vv)) vp.embComp **
|
||||
{c2 = vp.c2} ;
|
||||
SlashV2VNP vv np vp =
|
||||
insertObjPre (\\_ => np.s ! NPObj )
|
||||
(insertObjc (\\a => infVP vv.isAux vp a) (predVc vv)) **
|
||||
{c2 = vp.c2} ;
|
||||
UseComp comp = insertObj comp.s (predAux auxBe) ;
|
||||
|
||||
AdvVP vp adv = insertObj (\\a => adv.s ! (fromAgr a).g) vp ;
|
||||
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
ReflVP v = insertObjPre (\\_ => RefPron) v ;
|
||||
PassV2 v = predV v ; -- need to be fixed
|
||||
CompAP ap ={s = \\a => ap.s ! giveNumber a ! giveGender a ! Dir } ;
|
||||
CompNP np = {s = \\_ => np.s ! NPObj} ;
|
||||
CompAdv adv = {s = \\a => adv.s ! (fromAgr a).g } ;
|
||||
CompCN cn = {s = \\a => cn.s ! giveNumber a ! Dir} ;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user