mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
the rest of Urdu files - now compiles with lib/src/Make
This commit is contained in:
@@ -49,7 +49,8 @@ langsCoding = [
|
||||
(("spanish", "Spa"),""),
|
||||
(("swedish", "Swe"),""),
|
||||
(("thai", "Tha"),"to_thai"),
|
||||
(("turkish", "Tur"),"")
|
||||
(("turkish", "Tur"),""),
|
||||
(("urdu", "Urd"),"")
|
||||
]
|
||||
|
||||
langs = map fst langsCoding
|
||||
|
||||
6
lib/src/api/CombinatorsUrd.gf
Normal file
6
lib/src/api/CombinatorsUrd.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsUrd = Combinators with
|
||||
(Cat = CatUrd),
|
||||
(Structural = StructuralUrd),
|
||||
(Constructors = ConstructorsUrd) ;
|
||||
3
lib/src/api/ConstructorsUrd.gf
Normal file
3
lib/src/api/ConstructorsUrd.gf
Normal file
@@ -0,0 +1,3 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsUrd = Constructors with (Grammar = GrammarUrd) ;
|
||||
5
lib/src/api/SymbolicUrd.gf
Normal file
5
lib/src/api/SymbolicUrd.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:present:mathematical:prelude
|
||||
|
||||
resource SymbolicUrd = Symbolic with
|
||||
(Symbol = SymbolUrd),
|
||||
(Grammar = GrammarUrd) ;
|
||||
5
lib/src/api/SyntaxUrd.gf
Normal file
5
lib/src/api/SyntaxUrd.gf
Normal file
@@ -0,0 +1,5 @@
|
||||
--# -path=.:./alltenses:../prelude
|
||||
|
||||
instance SyntaxUrd of Syntax =
|
||||
ConstructorsUrd, CatUrd, StructuralUrd, CombinatorsUrd ;
|
||||
|
||||
22
lib/src/api/TryUrd.gf
Normal file
22
lib/src/api/TryUrd.gf
Normal file
@@ -0,0 +1,22 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
--# -path=.:./present:c:/gf/lib/src/prelude:c:/gf/lib/src/abstract:c:/gf/lib/src/api:c:/gf/lib/src/urdu:c:/gf/lib/src/common
|
||||
resource TryUrd = SyntaxUrd - [mkAdN] , LexiconUrd, ParadigmsUrd - [mkAdv,mkDet,mkIP,mkAdN] **
|
||||
open (P = ParadigmsUrd) in {
|
||||
|
||||
oper
|
||||
|
||||
mkAdv = overload SyntaxUrd {
|
||||
mkAdv : Str -> Adv = P.mkAdv ;
|
||||
} ;
|
||||
|
||||
mkAdN = overload {
|
||||
mkAdN : CAdv -> AdN = SyntaxUrd.mkAdN ;
|
||||
--- mkAdN : Str -> AdN = P.mkAdN ;
|
||||
} ;
|
||||
|
||||
-- mkOrd = overload SyntaxUrd {
|
||||
-- mkOrd : A -> Ord = SyntaxUrd.OrdSuperl ;
|
||||
-- } ;
|
||||
|
||||
|
||||
}
|
||||
6
lib/src/urdu/AllUrd.gf
Normal file
6
lib/src/urdu/AllUrd.gf
Normal file
@@ -0,0 +1,6 @@
|
||||
--# -path=.:../abstract:../common:../prelude
|
||||
|
||||
concrete AllUrd of AllUrdAbs =
|
||||
LangUrd,
|
||||
ExtraUrd
|
||||
** {} ;
|
||||
4
lib/src/urdu/AllUrdAbs.gf
Normal file
4
lib/src/urdu/AllUrdAbs.gf
Normal file
@@ -0,0 +1,4 @@
|
||||
abstract AllUrdAbs =
|
||||
Lang,
|
||||
ExtraUrdAbs
|
||||
** {} ;
|
||||
11
lib/src/urdu/ExtraUrd.gf
Normal file
11
lib/src/urdu/ExtraUrd.gf
Normal file
@@ -0,0 +1,11 @@
|
||||
concrete ExtraUrd of ExtraUrdAbs = CatUrd **
|
||||
open ResUrd, Coordination, Prelude, MorphoUrd, ParadigmsUrd in {
|
||||
|
||||
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";
|
||||
|
||||
-- for VP conjunction
|
||||
}
|
||||
8
lib/src/urdu/ExtraUrdAbs.gf
Normal file
8
lib/src/urdu/ExtraUrdAbs.gf
Normal file
@@ -0,0 +1,8 @@
|
||||
abstract ExtraUrdAbs = Extra ** {
|
||||
|
||||
-- uncontracted negations; contracted are the default
|
||||
fun
|
||||
|
||||
each_Det : Det ;
|
||||
have_V : V;
|
||||
}
|
||||
45
lib/src/urdu/SymbolUrd.gf
Normal file
45
lib/src/urdu/SymbolUrd.gf
Normal file
@@ -0,0 +1,45 @@
|
||||
--# -path=.:../abstract:../common
|
||||
|
||||
concrete SymbolUrd of Symbol = CatUrd ** open Prelude, ResUrd in {
|
||||
|
||||
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
|
||||
} ;
|
||||
CNSymbNP det cn xs = {
|
||||
s = \\c => det.s!Sg!Masc ++ cn.s ! det.n ! Dir ++ xs.s ;
|
||||
a = agrP3 cn.g det.n
|
||||
} ;
|
||||
CNNumNP cn i = {
|
||||
s = \\c => cn.s ! Sg ! Dir ++ i.s ;
|
||||
a = agrP3 cn.g Sg
|
||||
} ;
|
||||
|
||||
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 "awr" ;
|
||||
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 ++ "ka" } ;
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user