refinements

This commit is contained in:
virk.shafqat
2012-03-05 09:33:23 +00:00
parent b6736ae159
commit 2617a29867
36 changed files with 223 additions and 207 deletions

View File

@@ -11,7 +11,7 @@ concrete AdverbPes of Adverb = CatPes ** open ResPes, Prelude in {
s = a.adv ++ cadv.p ++ cadv.s ++ s.s;
} ;
PrepNP prep np = {s = prep.s ++ np.s ! NPC aEzafa } ;
PrepNP prep np = {s = prep.s ++ np.s ! NPC bEzafa } ;
AdAdv ada adv = { s = ada.s ++ adv.s} ;

View File

@@ -1,6 +1,6 @@
--# -path=.:../abstract:../common:../prelude
concrete AllPes of AllPesAbs =
LangPes
-- ExtraPes
LangPes,
ExtraPes
** {} ;

View File

@@ -1,4 +1,4 @@
abstract AllPesAbs =
Lang
-- ExtraPesAbs
Lang,
ExtraPesAbs
** {} ;

View File

@@ -4,16 +4,16 @@ concrete ExtraPes of ExtraPesAbs = CatPes **
flags coding = utf8;
lin
GenNP np = {s = \\_,_,_ => np.s ! NPC Obl ++ "ka" ; a = np.a} ;
GenNP np = {s = \\_ => np.s ! NPC aEzafa ; a = np.a ; fromPron = True} ; -- changed from fromPron=False for Phrasebook
each_Det = mkDet "hr kwy" "hr kwy" "hr kwy" "hr kwy" Sg ;
have_V = mkV "rakh-na";
IAdvAdv adv = {s = "ktny" ++ adv.s} ;
ICompAP ap = {s = "ktnE" ++ ap.s ! Sg ! Masc ! Dir ! Posit} ;
cost_V = mkV "qymt" ;
-- each_Det = mkDet "هر کwی" "هر کwی" "هر کwی" "هر کwی" Sg ;
-- have_V = mkV "رکh-ن";
IAdvAdv adv = {s = "تا چه" ++ adv.s} ;
-- ICompAP ap = {s = "کتنE" ++ ap.s ! Sg ! Masc ! Dir ! Posit} ;
-- cost_V = mkV "قیمت" ;
-- added for causitives
make_CV = mkVerb "nothing" ** {c2 = "" };
-- make_CV = mkVerb "نْتهنگ" ** {c2 = "" };
-- for VP conjunction
}

View File

@@ -179,7 +179,7 @@ concrete LexiconPes of Lexicon = CatPes **
small_A = mkA "کوچک" ;
snake_N = mkN01 "مار" animate;
sock_N = mkN01 "جوراب" inanimate;
speak_V2 = mkV2 (compoundV "صحبت" (mkV "کردن" "کن")) "با" False;
speak_V2 = mkV2 (compoundV "صحبت" (mkV "کردن" "کن")) "" False;
star_N = mkN01 "ستاره" animate;
steel_N = mkN01 "فولاد" inanimate; -- also "استیل"
stone_N = mkN01 "سنگ" inanimate;

View File

@@ -122,16 +122,16 @@ oper
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 = <>};
mkAdv : Str -> Adv = \str -> {s = str ; lock_Adv = <>};
----2 Prepositions
mkPrep : Str -> Prep ;
mkPrep str = makePrep str ** {lock_Prep = <>};
mkPrep str = {s = str ; lock_Prep = <>};
{-
--3 Determiners and quantifiers
-- mkQuant : overload {

View File

@@ -11,7 +11,7 @@ resource ResPes = ParamX ** open Prelude,Predef in {
coding = utf8;
param
Order = ODir | OQuest ;
Animacy = Animate | Inanimate ;
@@ -231,7 +231,7 @@ oper
-}
infVV : Bool -> VPH -> {s : AgrPes => Str} = \isAux,vp ->
{s = \\agr => case agr of {
AgPes n p => (vp.comp ! (toAgr n p)) ++ (vp.s ! VVForm (AgPes n p)).inf }};
AgPes n p => (vp.ad ++ vp.comp ! (toAgr n p)) ++ (vp.s ! VVForm (AgPes n p)).inf }};
insertObjPre : (AgrPes => Str) -> VPHSlash -> VPH = \obj,vp -> {
s = vp.s ;

View File

@@ -112,7 +112,7 @@ concrete StructuralPes of Structural = CatPes **
yes_Utt = ss "بله" ;
youSg_Pron = personalPN "تو" Sg PPers2 ;
youPl_Pron = personalPN "شما" Pl PPers2 ;
youPol_Pron = personalPN "شما" Sg PPers2 ;
youPol_Pron = personalPN "شما" Pl PPers2 ;
-- no_Quant = demoPN "هیچ" ;
not_Predet = {s="نه"} ;
if_then_Conj = sd2 "اگر" "آنگاه" ** {n = Sg} ;
@@ -124,7 +124,7 @@ concrete StructuralPes of Structural = CatPes **
as_CAdv = {s = ["به اندازه ی"] ; p = ""} ;
-- have_V2 = mkV2 (mkV "داشتن" "دار") "را" ;
have_V2 = mkV2 (mkV "داشتن" "دار") "را" ;
language_title_Utt = ss "پeرسن" ;

View File

@@ -3,29 +3,32 @@
concrete SymbolPes of Symbol = CatPes ** open Prelude, ResPes 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} ;
SymbPN i = {s = i.s ; animacy = Inanimate} ; -- "از" is removed for Phrasebook
IntPN i = {s = i.s ++ "از" ; animacy = Inanimate} ;
FloatPN i = {s = i.s ++ "از" ; animacy = Inanimate} ;
NumPN i = {s = i.s ; animacy = Inanimate} ;
CNIntNP cn i = {
s = \\c => cn.s ! Sg ! Dir ++ i.s ;
a = agrP3 cn.g Sg
s = \\ez => cn.s ! aEzafa ! Sg ++ i.s ;
a = agrPesP3 Sg ;
animacy = cn.animacy
} ;
CNSymbNP det cn xs = {
s = \\c => det.s!Sg!Masc ++ cn.s ! det.n ! Dir ++ xs.s ;
a = agrP3 cn.g det.n
s = \\ez => det.s ++ cn.s ! aEzafa ! det.n ++ xs.s ;
a = agrPesP3 det.n ;
animacy = cn.animacy
} ;
CNNumNP cn i = {
s = \\c => cn.s ! Sg ! Dir ++ i.s ;
a = agrP3 cn.g Sg
s = \\ez => cn.s ! aEzafa ! Sg ++ i.s ;
a = agrPesP3 Sg ;
animacy = cn.animacy
} ;
SymbS sy = sy ;
SymbNum sy = { s = sy.s ; n = Pl } ;
SymbOrd sy = { s = sy.s ++ "waN" ; n = Pl} ;
SymbOrd sy = { s = sy.s ++ "wN" ; n = Pl} ;
lincat
@@ -34,14 +37,15 @@ lincat
lin
MkSymb s = s ;
BaseSymb = infixSS "tE" ;
BaseSymb = infixSS "تE" ;
ConsSymb = infixSS "" ;
oper
--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" } ;
-}
-- addGenitiveS : Str ;
-- addGenitiveS s =
-- s ++ "از" ;
}

View File

@@ -11,7 +11,7 @@ concrete AdverbPes of Adverb = CatPes ** open ResPes, Prelude in {
s = a.adv ++ cadv.p ++ cadv.s ++ s.s;
} ;
PrepNP prep np = {s = prep.s ++ np.s ! NPC aEzafa } ;
PrepNP prep np = {s = prep.s ++ np.s ! NPC bEzafa } ;
AdAdv ada adv = { s = ada.s ++ adv.s} ;

View File

@@ -179,7 +179,7 @@ concrete LexiconPes of Lexicon = CatPes **
small_A = mkA "kvc^k" ;
snake_N = mkN01 "mAr" animate;
sock_N = mkN01 "jvrAb" inanimate;
speak_V2 = mkV2 (compoundV "SHbt" (mkV "krdn" "kn")) "bA" False;
speak_V2 = mkV2 (compoundV "SHbt" (mkV "krdn" "kn")) "" False;
star_N = mkN01 "stArh" animate;
steel_N = mkN01 "fvlAd" inanimate; -- also "Astyl"
stone_N = mkN01 "sng" inanimate;

View File

@@ -122,16 +122,16 @@ oper
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 = <>};
mkAdv : Str -> Adv = \str -> {s = str ; lock_Adv = <>};
----2 Prepositions
mkPrep : Str -> Prep ;
mkPrep str = makePrep str ** {lock_Prep = <>};
mkPrep str = {s = str ; lock_Prep = <>};
{-
--3 Determiners and quantifiers
-- mkQuant : overload {

View File

@@ -11,7 +11,7 @@ resource ResPes = ParamX ** open Prelude,Predef in {
coding = utf8;
param
Order = ODir | OQuest ;
Animacy = Animate | Inanimate ;
@@ -231,7 +231,7 @@ oper
-}
infVV : Bool -> VPH -> {s : AgrPes => Str} = \isAux,vp ->
{s = \\agr => case agr of {
AgPes n p => (vp.comp ! (toAgr n p)) ++ (vp.s ! VVForm (AgPes n p)).inf }};
AgPes n p => (vp.ad ++ vp.comp ! (toAgr n p)) ++ (vp.s ! VVForm (AgPes n p)).inf }};
insertObjPre : (AgrPes => Str) -> VPHSlash -> VPH = \obj,vp -> {
s = vp.s ;

View File

@@ -112,7 +112,7 @@ concrete StructuralPes of Structural = CatPes **
yes_Utt = ss "blh" ;
youSg_Pron = personalPN "tv" Sg PPers2 ;
youPl_Pron = personalPN "CmA" Pl PPers2 ;
youPol_Pron = personalPN "CmA" Sg PPers2 ;
youPol_Pron = personalPN "CmA" Pl PPers2 ;
-- no_Quant = demoPN "hyc^" ;
not_Predet = {s="nh"} ;
if_then_Conj = sd2 "Agr" "A:ngAh" ** {n = Sg} ;
@@ -124,7 +124,7 @@ concrete StructuralPes of Structural = CatPes **
as_CAdv = {s = ["bh AndAzh y"] ; p = ""} ;
-- have_V2 = mkV2 (mkV "dACtn" "dAr") "rA" ;
have_V2 = mkV2 (mkV "dACtn" "dAr") "rA" ;
language_title_Utt = ss "persian" ;

View File

@@ -8,3 +8,6 @@ rf -file=src/IdiomPes.gf | ps -env=quotes -to_persian | wf -file=IdiomPes.gf
rf -file=src/RelativePes.gf | ps -env=quotes -to_persian | wf -file=RelativePes.gf
rf -file=src/AdverbPes.gf | ps -env=quotes -to_persian | wf -file=AdverbPes.gf
rf -file=src/SentencePes.gf | ps -env=quotes -to_persian | wf -file=SentencePes.gf
rf -file=src/NumeralPes.gf | ps -env=quotes -to_persian | wf -file=NumeralPes.gf
rf -file=src/SymbolPes.gf | ps -env=quotes -to_persian | wf -file=SymbolPes.gf
rf -file=src/ExtraPes.gf | ps -env=quotes -to_persian | wf -file=ExtraPes.gf