forked from GitHub/gf-core
refinementNepali-11-06-20
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
abstract AllNepAbs =
|
||||
Lang
|
||||
-- ExtraPnbAbs
|
||||
-- ExtraNepAbs
|
||||
** {} ;
|
||||
|
||||
@@ -23,7 +23,7 @@ concrete CatNep of Cat = CommonX - [Adv] ** open ResNep, Prelude in {
|
||||
---- Question
|
||||
|
||||
QCl = {s : ResNep.VPHTense => Polarity => QForm => Str} ;
|
||||
IP = {s: Case => Str ; n : Number};
|
||||
IP = {s: Case => Str ; n : Number} ;
|
||||
IDet = {s : Gender => Str ; n : Number} ;
|
||||
--IDet = {s : Str ; n : Number} ;
|
||||
IQuant = {s : Number => Str} ;
|
||||
@@ -41,7 +41,7 @@ concrete CatNep of Cat = CommonX - [Adv] ** open ResNep, Prelude in {
|
||||
|
||||
VP = ResNep.VPH ;
|
||||
VPSlash = ResNep.VPHSlash ;
|
||||
Comp = {s : Agr => Str} ;
|
||||
Comp = {s : Agr => Str ; t : NType} ;
|
||||
|
||||
---- Adv
|
||||
Adv = {s : Str} ;
|
||||
@@ -61,7 +61,7 @@ concrete CatNep of Cat = CommonX - [Adv] ** open ResNep, Prelude in {
|
||||
Card = {s : Str; n : Number} ;
|
||||
Ord = {s : Str; n : Number} ;
|
||||
--Quant = {s : Number => Gender => Case => Str ; a:Agr}; -- ?? Number
|
||||
Quant = {s : Number => Gender => Str }; -- ?? Number
|
||||
Quant = {s : Number => Gender => Str } ; -- ?? Number
|
||||
Art = {s : Str} ;
|
||||
|
||||
---- Numeral
|
||||
@@ -91,9 +91,9 @@ concrete CatNep of Cat = CommonX - [Adv] ** open ResNep, Prelude in {
|
||||
A = ResNep.npAdjective ; --- {s : Gender => Number => Str} ;
|
||||
A2 = ResNep.npAdjective ** {c2 : Str} ;
|
||||
|
||||
N = {s : Number => Case => Str ; g : Gender} ;
|
||||
N = ResNep.Noun ;--{s : Number => Case => Str ; g : Gender ; t : NType ; h : NPerson} ;
|
||||
|
||||
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} ;
|
||||
N2 = ResNep.Noun ** {c2 : Str ; c3 : Str} ;
|
||||
N3 = ResNep.Noun ** {c2 : Str ; c3 : Str ; c4 : Str} ;
|
||||
PN = {s : Case => Str ; g : Gender ; t : NType ; h : NPerson } ;
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource CombinatorsNep = Combinators with
|
||||
(Cat = CatNep),
|
||||
(Structural = StructuralNep),
|
||||
(Constructors = ConstructorsNep) ;
|
||||
|
||||
@@ -12,6 +12,7 @@ concrete ConjunctionNep of Conjunction =
|
||||
|
||||
ConjNP conj ss = conjunctDistrTable NPCase conj ss ** {
|
||||
a = conjAgr (agrP3 Masc conj.n) ss.a ;
|
||||
t = ss.t ;
|
||||
} ;
|
||||
|
||||
ConjAP conj ss = conjunctDistrTable2 Number Gender conj ss ;
|
||||
@@ -25,9 +26,9 @@ concrete ConjunctionNep of Conjunction =
|
||||
BaseAdv x y = twoSS 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} ;
|
||||
BaseNP x y = twoTable NPCase x y ** {a = conjAgr x.a y.a ; t = x.t} ;
|
||||
BaseRS x y = twoTable Agr x y ** {c = x.c};
|
||||
ConsNP xs x = consrTable NPCase comma xs x ** {a = conjAgr xs.a x.a } ;
|
||||
ConsNP xs x = consrTable NPCase comma xs x ** {a = conjAgr xs.a x.a ; t = xs.t } ;
|
||||
ConsRS xs x = consrTable Agr comma xs x ** { c = xs.c};
|
||||
BaseAP x y = twoTable2 Number Gender x y ;
|
||||
ConsAP xs x = consrTable2 Number Gender comma xs x ;
|
||||
@@ -35,7 +36,7 @@ concrete ConjunctionNep of Conjunction =
|
||||
lincat
|
||||
[S] = {s1,s2 : Str} ;
|
||||
[Adv] = {s1,s2 : Str} ;
|
||||
[NP] = {s1,s2 : NPCase => Str ; a : Agr } ;
|
||||
[NP] = {s1,s2 : NPCase => Str ; a : Agr ; t : NType} ;
|
||||
[AP] = {s1,s2 : Number => Gender => Str} ;
|
||||
[RS] = {s1,s2 : Agr => Str ; c : Case};
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
resource ConstructorsNep = Constructors with (Grammar = GrammarNep) ;
|
||||
|
||||
@@ -9,18 +9,20 @@ concrete IdiomNep of Idiom = CatNep ** open Prelude,Predef, ResNep in {
|
||||
GenericCl vp = mkSClause "कोही" (agrP3 Masc Sg) vp ;
|
||||
|
||||
CleftNP np rs =
|
||||
let cl = mkSClause (np.s ! NPC rs.c) (np.a) (predAux auxBe);
|
||||
let cl = mkSClause (np.s ! NPC rs.c) (np.a) (predAux np.t);
|
||||
|
||||
in
|
||||
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
|
||||
|
||||
CleftAdv ad ss = { s = \\t,b,o => ad.s ++ ss.s};
|
||||
|
||||
ExistNP np =
|
||||
ExistNP np =
|
||||
mkSClause "त्यहाँ" (agrP3 (fromAgr np.a).g (fromAgr np.a).n) -- त्यहाँ
|
||||
(insertObj (\\_ => np.s ! NPC Nom) (predAux auxBe)) ;
|
||||
(insertObj (\\_ => np.s ! NPC Nom) (predAux np.t)) ;
|
||||
|
||||
ExistIP ip =
|
||||
let cl = mkSClause ("जुन्" ++ ip.s ! Nom) (agrP3 Masc ip.n) (predAux auxBe) ; -- जुन्
|
||||
--let cl = mkSClause ("जुन्" ++ ip.s ! Nom) (agrP3 Masc ip.n) (predAux auxBe) ; -- जुन्
|
||||
let cl = mkSClause ("त्यहाँ" ++ ip.s ! Nom) (agrP3 Masc ip.n) (predAux NonLiving) ; -- त्यहाँ
|
||||
in {
|
||||
s = \\t,p,qf => case qf of {
|
||||
QDir => cl.s ! t ! p ! ODir;
|
||||
@@ -31,9 +33,8 @@ concrete IdiomNep of Idiom = CatNep ** open Prelude,Predef, ResNep in {
|
||||
|
||||
ProgrVP vp = (predProg vp) ;
|
||||
|
||||
|
||||
ImpPl1 vp = {s = vp.obj.s ++ (vp.s ! ResNep.Imp).inf ++ vp.comp ! (agrP1 Masc Pl)} ;
|
||||
|
||||
ImpP3 np vp = {s = np.s!NPC Nom ++ "लाइ" ++ (vp.s ! PVForm ).inf ++ "देउ"} ;
|
||||
--ImpP3 np vp = {s = np.s ! NPC Nom ++ "लाइ" ++ (vp.s ! PVForm ).inf ++ "देउ"} ;
|
||||
ImpP3 np vp = {s = np.s ! NPC Acc ++ (vp.s ! PVForm ).inf ++ "देउ"} ;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,17 @@
|
||||
-- mkNF - Femenine Nouns
|
||||
-- mkNUN - Uncountable Nouns
|
||||
|
||||
-- In noun cases if you don't provide any parameter
|
||||
-- Here is the default forms it takes
|
||||
{-
|
||||
-- Default animacy : nonliving (inanimate)
|
||||
-- Default Honorific form : 3rd Person Low grade Honorofic(Pers3_L)
|
||||
-- Default gender : masculine
|
||||
-- human/profession/living : Living
|
||||
-}
|
||||
-- ParadigmsNep for details
|
||||
|
||||
|
||||
concrete LexiconNep of Lexicon = CatNep **
|
||||
open ParadigmsNep, MorphoNep, Prelude in {
|
||||
|
||||
@@ -18,7 +29,7 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
apple_N = regN "स्याऊ"; -- स्याऊ
|
||||
art_N = regN "कला" ; -- कला
|
||||
ask_V2Q = mkV2 (mkV "सोध्नु") ; -- सोध्नु
|
||||
baby_N = regN "बच्चा" ; -- बच्चा
|
||||
baby_N = regN "बच्चा" living ; -- बच्चा
|
||||
bad_A = mkA "खराब" ; -- खराब
|
||||
bank_N = regN "ब्याङ्क" ; -- ब्याङ्क
|
||||
beautiful_A = mkA "राम्रो" ; -- राम्रो
|
||||
@@ -27,18 +38,18 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
beg_V2V = mkV2V (compoundV "आग्रह" do_V2) lai "" False ; -- आग्रह
|
||||
big_A = mkA "ठुलो" ; -- ठुलो
|
||||
bike_N = regN "साइकल" ; --साइकल
|
||||
bird_N = regN "चरा" ; -- चरा
|
||||
bird_N = regN "चरा" living ; -- चरा
|
||||
black_A = mkA "कालो" ; -- कालो
|
||||
blue_A = mkA "निलो" ; -- निलो
|
||||
boat_N = regN "डुङ्गा" ; -- डुङ्गा
|
||||
book_N = regN "किताब" ; -- किताब
|
||||
boot_N = regN "जुत्ता" ; -- जुत्ता
|
||||
boss_N = regN "हाकिम" ; -- हाकिम
|
||||
boy_N = regN "केटा" ; -- केटा
|
||||
boot_N = regN "जुत्ता"; -- जुत्ता
|
||||
boss_N = regN "हाकिम" human Pers3_H ; -- हाकिम
|
||||
boy_N = regN "केटा" human; -- केटा
|
||||
bread_N = regN "रोटी" ; -- रोटी
|
||||
break_V2 = mkV2 (mkV "भाँच्नु") ; -- भाँच्नु
|
||||
broad_A = mkA "फराकिलो" ; -- फराकिलो
|
||||
brother_N2 = mkN2 (regN "दाजु") (mkPrep "को") "" ;
|
||||
brother_N2 = mkN2 (regN "दाजु" human Pers3_H) (mkPrep "को") "";
|
||||
brown_A = mkA "खैरो" ; -- खैरो
|
||||
butter_N = mkNUC "नौनी" feminine; -- नौनी
|
||||
buy_V2 = mkV2 (mkV "किन्नु"); -- किन्नु
|
||||
@@ -49,8 +60,8 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
cat_N = regN "बिरालो" ; -- बिरालो
|
||||
ceiling_N = regN "छत" ; -- छत
|
||||
chair_N = regN "कुर्सी" ; -- कुर्सी
|
||||
cheese_N = mkNF "चिज"; --चिज
|
||||
child_N = regN "बच्चा" ; -- बच्चा
|
||||
cheese_N = mkNF "चिज" ; --चिज
|
||||
child_N = regN "बच्चा" living ; -- बच्चा
|
||||
church_N = regN "गिर्जाघर" ; -- चर्च , गिर्जाघर
|
||||
city_N = regN "शहर" ; -- शहर
|
||||
clean_A = mkA "सफा" ; -- सफा
|
||||
@@ -62,31 +73,31 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
computer_N = regN "कम्प्युटर" ; -- कम्प्युटर
|
||||
country_N = regN "देश" ; -- देश
|
||||
cousin_N = regN "काका" ; -- काका
|
||||
cow_N = regN "गाई" ; -- गाई
|
||||
cow_N = mkNF "गाई" living Pers3_M ; -- गाई
|
||||
die_V = mkV "मर्नु" ; -- मर्नु
|
||||
dirty_A = mkA "फोहोर" ; -- फोहोर
|
||||
distance_N3 = mkN3 (regN "दुरी") (mkPrep "देखि") (mkPrep "सम्म") "को" ; -- दुरी, देखी, सम्म, त्यहाँ
|
||||
doctor_N = regN "डाक्टर" ; -- डाक्टर, | Cikitx:sk - चिकित्सक
|
||||
dog_N = regN "कुकुर" ; -- कुकुर
|
||||
doctor_N = regN "डाक्टर" profession Pers3_H ; -- डाक्टर, / Cikitx:sk - चिकित्सक
|
||||
dog_N = regN "कुकुर" living; -- कुकुर
|
||||
door_N = regN "ढोका" ; -- ढोका
|
||||
drink_V2 = mkV2 (mkV "पिउनु") ; -- पिउनु
|
||||
--easy_A2V = mkA "सजीलो" ; -- सजीलो
|
||||
eat_V2 = mkV2 (mkV "खानु") "" ; -- खानु
|
||||
empty_A = mkA "खाली" ; -- खाली
|
||||
enemy_N = regN "शत्रु" ; -- शत्रु
|
||||
enemy_N = regN "शत्रु" living ; -- शत्रु
|
||||
factory_N = regN "कारखाना" ; -- कारखाना
|
||||
father_N2 = mkN2 (regN "बुबा") (mkPrep "को") "" ; -- बुबा, बाबु
|
||||
father_N2 = mkN2 (regN "बुबा" living Pers3_H) (mkPrep "को") "" ; -- बुबा, बाबु
|
||||
fear_VS = mkV "डराउनु"; -- डराउनु
|
||||
find_V2 = mkV2 (mkV "पाउनु") ; -- पाउनु
|
||||
fish_N = regN "माछा" ; -- माछा
|
||||
fish_N = regN "माछा" living ; -- माछा
|
||||
floor_N = regN "भुँई" ; -- भुँई
|
||||
forget_V2 = mkV2 (mkV "बिर्सनु") ; -- बिर्सनु
|
||||
fridge_N = regN "फ्रिज" ; -- फ्रिज
|
||||
friend_N = regN "साथी" ; -- साथी
|
||||
friend_N = regN "साथी" living Pers3_M ; -- साथी
|
||||
fruit_N = regN "फल" ; -- फल
|
||||
--fun_AV = mkAdV "रमाइलो" ; -- रमाइलो
|
||||
garden_N = regN "बगैँचा" ; -- बगैँचा
|
||||
girl_N = mkNF "केटी" ; -- केटी
|
||||
girl_N = mkNF "केटी" living ; -- केटी
|
||||
glove_N = regN "पञ्जा"; -- पञ्जा
|
||||
gold_N = regN "सुन" ; -- सुन
|
||||
good_A = mkA "राम्रो" ; -- राम्रो
|
||||
@@ -99,13 +110,13 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
hear_V2 = mkV2 (mkV "सुन्नु") ; -- सुन्नु
|
||||
hill_N = regN "पहाड" ; -- पहाड
|
||||
hope_VS = (compoundV "आशा" do_V2); -- आशा
|
||||
horse_N = regN "घोडा" ; -- घोडा
|
||||
horse_N = regN "घोडा" living ; -- घोडा
|
||||
hot_A = mkA "तातो" ; -- तातो
|
||||
house_N = regN "घर" ; -- घर
|
||||
important_A = mkA "जरुरी" ; -- जरुरी
|
||||
industry_N = regN "उधोग" ; -- उधोग
|
||||
iron_N = regN "फलाम" ; -- फलाम
|
||||
king_N = regN "राजा" ; -- राजा
|
||||
king_N = regN "राजा" living Pers3_H; -- राजा
|
||||
know_V2 = mkV2 (mkV "चिन्नु") ; -- चिन्नु
|
||||
know_VS = (mkV "थाहा पाउनु") ; -- थाहा पाउनु
|
||||
know_VQ = (compoundV "थाहा" (mkV2 (mkV "पाउनु"))) ; -- थाहा पाउनु
|
||||
@@ -120,13 +131,13 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
long_A = mkA "लामो" ; -- लामो
|
||||
lose_V2 = mkV2 (mkV "हराउनु") ; -- हराउनु
|
||||
love_N = regN "माया" ; -- माया
|
||||
love_V2 = mkV2 (compoundV "माया" do_V2) "लाई" ; -- "नौण"; -- माया गर्नु
|
||||
man_N = regN "मान्छे" ; -- मान्छे
|
||||
love_V2 = mkV2 (compoundV "माया" do_V2) lai ; -- "नौण"; -- माया गर्नु
|
||||
man_N = regN "मान्छे" human ; -- मान्छे
|
||||
married_A2 = mkA "विवाहित" "सँग" ; -- सँग विवाहित
|
||||
meat_N = mkNUC "मासु" masculine ; -- मासु
|
||||
milk_N = mkNUC "दुध" masculine ; -- दुध
|
||||
moon_N = regN "चन्र्दमा" ; -- चन्र्दमा ??
|
||||
mother_N2 = mkN2 (mkNF "आमा") (mkPrep "को") ""; -- need ko discuss
|
||||
mother_N2 = mkN2 (mkNF "आमा" living Pers3_H) (mkPrep "को") "" ; -- need ko discuss
|
||||
mountain_N = regN "हिमाल" ; -- हिमाल
|
||||
music_N = regN "संगीत" ; -- संगीत
|
||||
narrow_A = mkA "सांगुरो" ; -- सांगुरो
|
||||
@@ -134,9 +145,9 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
newspaper_N = regN "समाचारपत्र" ; -- समाचारपत्र
|
||||
oil_N = mkNUC "तेल" masculine ; -- तेल
|
||||
--old_A = mkA "पुरानो" ; -- पुरानो
|
||||
old_A = mkA "बुढा" ; -- बुढा
|
||||
old_A = mkA "बुढो" ; -- बुढो
|
||||
open_V2 = mkV2 (mkV "खोल्नु") ; -- खोल्नु
|
||||
paint_V2A = mkV2 (compoundV "रँग" (mkV2 (mkV "लागाउनु"))) "लाइ" ;
|
||||
paint_V2A = mkV2 (compoundV "रँग" (mkV2 (mkV "लागाउनु"))) lai ;
|
||||
paper_N = regN "कागज" ; -- कागज
|
||||
paris_PN = mkPN "पेरिस" ; -- ???? DEFAULT AS MALE (inflection) is this correct ????
|
||||
peace_N = mkNUC "शान्ति" masculine ; -- शान्ति ???? Not sure
|
||||
@@ -144,10 +155,10 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
planet_N = regN "ग्रह" ; -- ग्रह
|
||||
plastic_N = regN "पाल्स्टिक" ; -- पाल्स्टिक
|
||||
play_V2 = mkV2 (mkV "खेल्नु") ; -- खेल्नु
|
||||
policeman_N = regN "प्रहरी" ; -- प्रहरी
|
||||
priest_N = regN "पुरोहित" ; -- पुरोहित
|
||||
policeman_N = regN "प्रहरी" human Pers3_M ; -- प्रहरी
|
||||
priest_N = regN "पुरोहित" human Pers3_H ; -- पुरोहित
|
||||
-- probable_AS = mkAdj1S (regA "पr?बाबले") ;
|
||||
queen_N = mkNF "रानी" ; -- रानी
|
||||
queen_N = mkNF "रानी" human Pers3_H ; -- रानी
|
||||
radio_N = regN "रेडियो"; -- रेडियो
|
||||
rain_V0 = compoundV "बर्षा" (mkV "हुनु" ) ; -- बर्षा ???? hunu/bhayo irregular case need to be added
|
||||
read_V2 = mkV2 (mkV "पढ्नु"); -- पढ्नु
|
||||
@@ -164,16 +175,16 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
science_N = regN "विज्ञन" ; -- विज्ञन
|
||||
sea_N = regN "समुन्द्र" ; -- समुन्द्र
|
||||
seek_V2 = mkV2 (mkV "खोज्नु" ) ;
|
||||
sell_V3 = mkV3 (mkV "बेच्नु") "" "लाई" ; -- बेच्नु ???? ram(le) sita (lai) kitab bachyo
|
||||
send_V3 = mkV3 (mkV "पठाउनु") "" "लाई"; -- पठाउनु ????
|
||||
sheep_N = regN "भेडा" ; -- भेडा
|
||||
sell_V3 = mkV3 (mkV "बेच्नु") "" lai ; -- बेच्नु ram(le) sita (lai) kitab bachyo
|
||||
send_V3 = mkV3 (mkV "पठाउनु") "" lai ; -- पठाउनु
|
||||
sheep_N = regN "भेडा" living ; -- भेडा
|
||||
ship_N = regN "जहाज" ; -- जहाज
|
||||
shirt_N = regN "सर्" ; -- सर्ट
|
||||
shoe_N = regN "जुत्ता" ; -- जुत्ता
|
||||
shop_N = regN "पसल" ; -- पसल
|
||||
short_A = mkA "छोटो" ; --छोटो
|
||||
silver_N = regN "चाँदि" ; -- चाँदि
|
||||
sister_N = mkNF "दीदी" ; -- दीदी
|
||||
sister_N = mkNF "दीदी" human Pers3_H ; -- दीदी
|
||||
sleep_V = mkV "सुत्नु" ; -- सुत्नु
|
||||
small_A = mkA "सानो" ; -- सानो
|
||||
snake_N = regN "र्षप" ; -- र्षप
|
||||
@@ -183,14 +194,14 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
steel_N = regN "स्टिल" ; -- स्टिल
|
||||
stone_N = regN "ढुङ्गा" ; -- ढुङ्गा
|
||||
stove_N = regN "चुलो" ; -- चुलो
|
||||
student_N = regN "बिध्यार्थि" ; --बिध्यार्थि
|
||||
student_N = regN "बिध्यार्थि" human ; --बिध्यार्थि
|
||||
stupid_A = mkA "मुर्ख" ; -- मुर्ख
|
||||
sun_N = regN "सुर्य"; -- सुर्य
|
||||
switch8off_V2 = mkV2 (compoundV "स्विच अफ" do_V2) ; -- स्विच अन्
|
||||
switch8on_V2 = mkV2 (compoundV "स्विच अन्" do_V2) ; -- स्विच अफ
|
||||
table_N = regN "टेबल" ; -- टेबल
|
||||
talk_V3 = mkV3 (compoundV "कुरा" (mkV2 (mkV "गर्नु"))) "सँग" ""; -- कुरा गर्नु सँग
|
||||
teacher_N = regN "शिक्षक" ; -- शिक्षक
|
||||
teacher_N = regN "शिक्षक" human Pers3_H ; -- शिक्षक
|
||||
teach_V2 = mkV2 (mkV "पढाउनु") ; -- पढाउनु
|
||||
television_N = regN "टेलिभिजन्" ; -- टेलिभिजन्
|
||||
thick_A = mkA "बाक्लो" ; -- बाक्लो
|
||||
@@ -212,7 +223,7 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
window_N = regN "झ्याल" ; -- झ्याल
|
||||
wine_N = regN "वाईन" ; -- वाईन
|
||||
win_V2 = mkV2 (mkV "जित्नु") ; -- जित्नु
|
||||
woman_N = mkNF "आईमाई" ; -- आईमाई
|
||||
woman_N = mkNF "आईमाई" Living Pers3_M ; -- आईमाई
|
||||
wonder_VQ = compoundV "अचम्म" (mkV "हुनु") ; -- अचम्म हुनु
|
||||
wood_N = regN "काठ" ; -- काठ
|
||||
write_V2 = mkV2 (mkV "लेख्नु") ; -- लेख्नु
|
||||
@@ -273,7 +284,7 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
head_N = regN "टाउकोस" ; -- टाउको
|
||||
heart_N = regN "मुटु" ; -- मुटु
|
||||
horn_N = regN "हर्न" ; -- हर्न
|
||||
husband_N = regN "पति" ; -- पति
|
||||
husband_N = regN "पति" human Pers3_M ; -- पति
|
||||
ice_N = mkNUC "हिऊँ" masculine ; -- हिऊँ
|
||||
knee_N = regN "घुँडा" ; -- घुँडा
|
||||
leaf_N = regN "पात" ; -- पात
|
||||
@@ -293,7 +304,7 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
salt_N = mkNUC "नुन" masculine ; -- नुन
|
||||
sand_N = mkNUC "बालुवा" masculine ; -- बालुवा
|
||||
seed_N = regN "बिउ" ; -- बिउ
|
||||
see_V2 = mkV2 (mkV "हेरर्नु" ) "लाई" ; -- हेरर्नु
|
||||
see_V2 = mkV2 (mkV "हेरर्नु" ) lai ; -- हेरर्नु
|
||||
skin_N = regN "छाला" ; -- छाला
|
||||
sky_N = regN "आकाश" ; -- आकाश
|
||||
smoke_N = mkNUC "धुवाँ" masculine ; -- धुवाँ
|
||||
@@ -302,7 +313,7 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
tail_N = regN "पुच्छर" ; -- पुच्छर
|
||||
tongue_N = regN "जिब्रो" ; -- जिब्रो
|
||||
tooth_N = regN "दाँत" ; -- दाँत
|
||||
wife_N = mkNF "पत्नी" ; -- पत्नी
|
||||
wife_N = mkNF "पत्नी" Living ; -- पत्नी
|
||||
wind_N = regN "हुरी" ; -- हुरी
|
||||
wing_N = regN "पंखा" ; -- पंखा
|
||||
worm_N = regN "जुगा" ; -- जुगा
|
||||
@@ -336,7 +347,7 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
cut_V2 = mkV2 (mkV "काटनु") ; -- काटनु
|
||||
fear_V2 = mkV2 (mkV "डराउनु") ; -- डराउनु
|
||||
fight_V2 = mkV2 (mkV "लड्नु") ; -- लड्नु
|
||||
hit_V2 = mkV2 (mkV "हान्नु" ) "लाई" ; -- हान्नु
|
||||
hit_V2 = mkV2 (mkV "हान्नु" ) lai ; -- हान्नु
|
||||
hold_V2 = mkV2 (mkV "समात्नु") ; -- समात्नु
|
||||
hunt_V2 = mkV2 (compoundV "शिकार" do_V2) ; -- शिकार
|
||||
kill_V2 = mkV2 (mkV "मार्नु") ; -- मार्नु
|
||||
@@ -358,12 +369,12 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
rule_N = regN "नियम" ; -- नियम
|
||||
|
||||
-- added 4/6/2007
|
||||
john_PN = mkPN "जोन" ;
|
||||
question_N = regN "प्रश्न" ; -- प्रश्न
|
||||
ready_A = mkA "तयार" ; -- तयार
|
||||
reason_N = regN "कारण" ; -- कारण
|
||||
today_Adv = mkAdv "आज" ; -- आज
|
||||
uncertain_A = mkA "अनिश्चित" ; -- अनिश्चित
|
||||
john_PN = mkPN "जोन" masculine human Pers3_L ;
|
||||
question_N = regN "प्रश्न" ; -- प्रश्न
|
||||
ready_A = mkA "तयार" ; -- तयार
|
||||
reason_N = regN "कारण" ; -- कारण
|
||||
today_Adv = mkAdv "आज" ; -- आज
|
||||
uncertain_A = mkA "अनिश्चित" ; -- अनिश्चित
|
||||
|
||||
oper
|
||||
lai = "लाई" ;
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
--# -path=.:../../prelude
|
||||
--
|
||||
----1 A Simple Punjabi Resource Morphology
|
||||
----
|
||||
---- Shafqat Virk, Aarne Ranta,2010
|
||||
----
|
||||
---- This resource morphology contains definitions needed in the resource
|
||||
---- syntax. To build a lexicon, it is better to use $ParadigmsPnb$, which
|
||||
---- gives a higher-level access to this module.
|
||||
-- 1 Morpholical inflection of Noun and Verbs of Nepali
|
||||
--
|
||||
-- by Dinesh Simkhada, Shafqat Virk - 2011
|
||||
--
|
||||
|
||||
resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
|
||||
@@ -16,7 +13,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
param
|
||||
{-
|
||||
For distinguishing root ending in -a- and rest of other.
|
||||
Root ending in -a/अ- is regarded as reg and rest ireg
|
||||
Root ending in -a/अ or h - is regarded as reg and rest ireg
|
||||
-}
|
||||
VCase = VReg | VIReg ;
|
||||
|
||||
@@ -24,9 +21,8 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
--1 Nouns
|
||||
oper
|
||||
|
||||
-- mkN : (x1,_,_,_,_,_,_,_,_,_,_,x12 : Str) -> Gender -> Bool -> Noun =
|
||||
mkN : (x1,_,_,_,_,_,_,_,_,_,_,x12 : Str) -> Gender -> Noun =
|
||||
\sn,sa,si,sd,sab,sl,pn,pa,pi,pd,pab,pl, g -> {
|
||||
mkN : (x1,_,_,_,_,_,_,_,_,_,_,x12 : Str) -> Gender -> NType -> NPerson -> Noun =
|
||||
\sn,sa,si,sd,sab,sl,pn,pa,pi,pd,pab,pl,g,t,h -> {
|
||||
s = table {
|
||||
Sg => table {
|
||||
Nom => sn ;
|
||||
@@ -45,38 +41,38 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
Loc => pl
|
||||
}
|
||||
} ;
|
||||
|
||||
g = g
|
||||
-- isHum = h
|
||||
g = g ;
|
||||
t = t ;
|
||||
h = h
|
||||
} ;
|
||||
|
||||
-- TODO
|
||||
-- ?? NEED TO ADD CASE IF ENDS WITH O (PG. 99 Jaya)
|
||||
-- ?? NEED TO ADD CASE IF ENDS WITH 'o' (PG. 99 Jaya)
|
||||
|
||||
-- Regular nouns
|
||||
mkNMF : Str -> Gender -> Noun ;
|
||||
mkNMF str g = mkN str (str + "लाई") (str + "ले") (str + "लाई") (str + "बाट") (str + "मा")
|
||||
(str + "हरु") (str + "हरुलाई") (str + "हरुले") (str + "हरुलाई") (str + "हरुबाट") (str + "हरुमा") g ;
|
||||
mkNMF : Str -> Gender -> NType -> NPerson -> Noun ;
|
||||
mkNMF str g t h = mkN str (str + "लाई") (str + "ले") (str + "लाई") (str + "बाट") (str + "मा")
|
||||
(str + "हरु") (str + "हरुलाई") (str + "हरुले") (str + "हरुलाई") (str + "हरुबाट") (str + "हरुमा") g t h ;
|
||||
|
||||
-- Regular Nouns
|
||||
mkNReg : Str -> Noun ;
|
||||
mkNReg str = mkNMF str Masc ;
|
||||
mkNReg : Str -> NType -> NPerson -> Noun ;
|
||||
mkNReg str typ hnr = mkNMF str Masc typ hnr ;
|
||||
|
||||
-- Faminine nouns
|
||||
mkNFem : Str -> Noun ;
|
||||
mkNFem str = mkNMF str Fem ;
|
||||
mkNFem : Str -> NType -> NPerson -> Noun ;
|
||||
mkNFem str typ hnr = mkNMF str Fem typ hnr ;
|
||||
|
||||
|
||||
-- Uncountable nouns, which have same singular and plular form
|
||||
-- eg water
|
||||
mkNUnc : Str -> Gender -> Noun ;
|
||||
mkNUnc str g = mkN str (str + "लाई") (str + "ले") (str + "लाई") (str + "बाट") (str + "मा")
|
||||
str (str + "लाई") (str + "ले") (str + "लाई") (str + "बाट") (str + "मा") g ;
|
||||
mkNUnc : Str -> Gender -> NType -> NPerson -> Noun ;
|
||||
mkNUnc str g t h = mkN str (str + "लाई") (str + "ले") (str + "लाई") (str + "बाट") (str + "मा")
|
||||
str (str + "लाई") (str + "ले") (str + "लाई") (str + "बाट") (str + "मा") g t h ;
|
||||
|
||||
-- Proper Names
|
||||
regN1 : Str -> Gender -> Noun ;
|
||||
regN1 str g = mkN str (str + "लाई") (str + "ले") (str + "लाई") (str + "बाट") (str + "मा")
|
||||
str str str str str str g ;
|
||||
regN1 : Str -> Gender -> NType -> NPerson -> Noun ;
|
||||
regN1 str g t h = mkN str (str + "लाई") (str + "ले") (str + "लाई") (str + "बाट") (str + "मा")
|
||||
str str str str str str g t h ;
|
||||
|
||||
|
||||
-- pronouns
|
||||
@@ -90,13 +86,12 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
Abl => ab ;
|
||||
Loc => l
|
||||
}
|
||||
} ;
|
||||
} ;
|
||||
|
||||
makePronReg : Str -> {s : Case => Str} ;
|
||||
makePronReg str = makePron str (str + "लाई") (str + "ले") (str + "लाई") (str + "बाट") (str + "मा") ;
|
||||
|
||||
--2. Derminers
|
||||
|
||||
--2. Derminers
|
||||
makeDet : Str -> Str -> Str -> Str -> Number -> Determiner =
|
||||
\s1,s2,s3, s4, n -> {
|
||||
s = table {
|
||||
@@ -104,35 +99,18 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
Fem => s2 } ;
|
||||
Pl => table { Masc => s3 ;
|
||||
Fem => s4 }
|
||||
} ;
|
||||
} ;
|
||||
n = n
|
||||
};
|
||||
} ;
|
||||
|
||||
|
||||
IDeterminer = {s : Gender => Str ; n : Number};
|
||||
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
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
-}
|
||||
-- maIdetn helper
|
||||
makeIDet : Str -> Str -> {s : Gender => Str} =
|
||||
\s1,s2 -> {
|
||||
s = table {
|
||||
Masc => s1 ;
|
||||
Fem => s2
|
||||
}
|
||||
} ;
|
||||
|
||||
-- Quantifiers
|
||||
makeQuant : Str -> Str -> Str -> Str -> {s : Number => Gender => Str } =
|
||||
@@ -143,7 +121,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
Pl => table { Masc => pm ;
|
||||
Fem => pf }
|
||||
}
|
||||
};
|
||||
} ;
|
||||
|
||||
-- Proposition
|
||||
makePrep : Str -> Preposition = \str -> {s = str } ** { lock_Prep = <>};
|
||||
@@ -161,7 +139,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
Imp => (mkImpForm root).s ;
|
||||
ProgRoot aspect number gender => (mkProgRoot root aspect number gender).s ;
|
||||
|
||||
VF tense aspect polarity person number gender =>
|
||||
VF tense aspect polarity person number gender =>
|
||||
case aspect of {
|
||||
Imperf => (mkVImperf root tense polarity person number gender).s ;
|
||||
Perf => (mkVPerf root tense polarity person number gender).s
|
||||
@@ -181,6 +159,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
--For the progressive root case
|
||||
mkProgRoot : Str -> Aspect -> Number -> Gender -> {s : Str } =
|
||||
\root,aspect,number,gender ->
|
||||
@@ -189,15 +168,15 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
vcase = (rootCheck root).vcase
|
||||
in {
|
||||
s= case <vcase,root> of {
|
||||
<VReg,_> => (mkProg root2 aspect number gender).s ;
|
||||
<_,"जा"> => (mkProg1 root aspect number gender).s ;
|
||||
<_,"हा"> => (mkProg1 root aspect number gender).s ;
|
||||
<_,_> => (mkProg1 root2 aspect number gender).s
|
||||
};
|
||||
<VReg, _> => (mkProgReg root2 aspect number gender).s ;
|
||||
<_, "जा"> => (mkProgIReg root aspect number gender).s ;
|
||||
<_, "हा"> => (mkProgIReg root aspect number gender).s ;
|
||||
<_, _> => (mkProgIReg root2 aspect number gender).s
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
mkProg : Str -> Aspect -> Number -> Gender -> {s : Str } =
|
||||
mkProgReg : Str -> Aspect -> Number -> Gender -> {s : Str } =
|
||||
\root2,aspect,number,gender -> {
|
||||
s = case <aspect,number,gender> of {
|
||||
<Imperf, _, _> => root2 + "दै" ;
|
||||
@@ -209,7 +188,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
};
|
||||
|
||||
|
||||
mkProg1 : Str -> Aspect -> Number -> Gender -> {s : Str } =
|
||||
mkProgIReg : Str -> Aspect -> Number -> Gender -> {s : Str } =
|
||||
\root,aspect,number,gender -> {
|
||||
s = case <aspect,number,gender> of {
|
||||
<Imperf, _, _> => root + "दै" ;
|
||||
@@ -220,8 +199,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
};
|
||||
} ;
|
||||
|
||||
--need to check for want_VV <- Not inflected correctle
|
||||
--
|
||||
--need to check for want_VV <- Not inflected correctly
|
||||
rootCheck : Str -> {root1:Str; root2:Str; vcase: VCase} =
|
||||
\root -> {
|
||||
{-
|
||||
@@ -282,7 +260,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
NPresent => (mkVPreNP root root1 vcase po pn n g).s ;
|
||||
NPast Simpl => (mkVPstSNP root root2 vcase po pn n g).s ;
|
||||
NPast Hab => (mkVPstHNP root root1 vcase po pn n g).s ;
|
||||
NPast Unknown => (mkVPstUNP root root2 vcase po pn n g).s ;
|
||||
--NPast Unknown => (mkVPstUNP root root2 vcase po pn n g).s ;
|
||||
NFuture Defin => (mkVFutDNP root po pn n g).s ;
|
||||
NFuture NDefin => (mkVFutNDNP root root2 vcase po pn n g).s
|
||||
}
|
||||
@@ -301,7 +279,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
NPresent => (mkVPreP root root2 vcase po pn n g).s ;
|
||||
NPast Simpl => (mkVPstSP root root2 vcase po pn n g).s ;
|
||||
NPast Hab => (mkVPstHP root root2 vcase po pn n g).s ;
|
||||
NPast Unknown => (mkVPstUP root root2 vcase po pn n g).s ;
|
||||
--NPast Unknown => (mkVPstUP root root2 vcase po pn n g).s ;
|
||||
NFuture Defin => (mkVFutDefP root root2 vcase po pn n g).s ;
|
||||
NFuture NDefin => (mkVFutNDefP root root2 vcase po pn n g).s
|
||||
}
|
||||
@@ -508,7 +486,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
{-
|
||||
-- Past Unknown, Nonprogressive mode, nonperfective aspect
|
||||
mkVPstUNP : Str -> Str -> VCase -> Polarity -> NPerson -> Number -> Gender -> {s:Str} =
|
||||
\ root, root2, vc, po, p, n, g ->
|
||||
@@ -567,7 +545,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
< _, _, _> => root + "नुभए" + na +"छ" -- नुभएनछ
|
||||
}
|
||||
} ;
|
||||
|
||||
-}
|
||||
|
||||
-- Future Definitive, Nonprogressive mode, nonperfective aspect
|
||||
-- Handles Both cases
|
||||
@@ -651,7 +629,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
<Pos, _, _, _> => root + "नुहोला" ; -- नुहोला
|
||||
|
||||
-- TODO : NOT CLEAR DEFINITION IN BOOK
|
||||
<Neg, _, _, _> => "टुडु"
|
||||
<Neg, _, _, _> => "टुडु"
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -745,7 +723,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
{-
|
||||
-- Past Unknown, Perfective aspect, Nonprogressive Mode
|
||||
mkVPstUP : Str -> Str -> VCase -> Polarity -> NPerson -> Number -> Gender -> {s:Str} =
|
||||
\root, root2, vc, po, pn, n, g ->
|
||||
@@ -781,7 +759,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-}
|
||||
-- Present, Perfective aspect, Nonprogressive Mode
|
||||
mkVPreP : Str -> Str -> VCase -> Polarity -> NPerson -> Number -> Gender -> {s:Str} =
|
||||
\root, root2, vc, po, pn, n, g ->
|
||||
|
||||
@@ -1,59 +1,65 @@
|
||||
concrete NounNep of Noun = CatNep ** open ResNep, Prelude in {
|
||||
|
||||
flags optimize=all_subs ;
|
||||
flags optimize = all_subs ;
|
||||
|
||||
lin
|
||||
|
||||
DetCN det cn = {
|
||||
s = \\c => detcn2NP det cn c det.n ;
|
||||
a = agrP3 cn.g det.n ;
|
||||
a = toAgr det.n cn.h cn.g ;
|
||||
t = cn.t
|
||||
} ;
|
||||
|
||||
UsePN pn = {s = \\c => toNP pn.s c ; a = agrP3 pn.g Sg } ;
|
||||
UsePN pn = {s = \\c => toNP pn.s c ; a = toAgr Sg pn.h pn.g ; t = pn.t } ;
|
||||
|
||||
--TODO NEED TO CHANGE np2pronCase
|
||||
UsePron p = {s = \\c => np2pronCase p.s c p.a ; a = p.a } ;
|
||||
UsePron p = {s = \\c => np2pronCase p.s c p.a ; a = p.a ; t = Living } ;
|
||||
|
||||
PredetNP pred np = {
|
||||
s = \\c => pred.s ++ np.s ! c ;
|
||||
a = np.a
|
||||
a = np.a ;
|
||||
t = np.t
|
||||
} ;
|
||||
|
||||
-- Neds to change this,
|
||||
-- needs to check for root ending case, now works for regular cases only
|
||||
-- needs to check for root ending case, now works for root2 cases only
|
||||
PPartNP np v2 = {
|
||||
s = \\c => case (fromAgr np.a).n of {
|
||||
Sg => np.s ! c ++ v2.s ! Root ++ eko;
|
||||
Pl => np.s ! c ++ v2.s ! Root ++ eka
|
||||
Sg => case (fromAgr np.a).g of {
|
||||
Masc => np.s ! c ++ v2.s ! Root ++ eko ;
|
||||
Fem => np.s ! c ++ v2.s ! Root ++ eki
|
||||
} ;
|
||||
Pl => np.s ! c ++ v2.s ! Root ++ eka
|
||||
} ;
|
||||
a = np.a
|
||||
a = np.a ;
|
||||
t = np.t
|
||||
} ;
|
||||
|
||||
RelNP np rs = {
|
||||
s = \\c => np.s ! c ++ "," ++ rs.s ! np.a ;
|
||||
a = np.a
|
||||
a = np.a ;
|
||||
t = np.t
|
||||
} ;
|
||||
|
||||
AdvNP np adv = {
|
||||
s = \\c => np.s ! c ++ adv.s ;
|
||||
a = np.a
|
||||
a = np.a ;
|
||||
t = np.t
|
||||
} ;
|
||||
|
||||
DetNP det = {
|
||||
s = \\c => det2NP det c ; ---- case
|
||||
a = agrP3 Masc Sg
|
||||
a = agrP3 Masc Sg ;
|
||||
t = NonLiving
|
||||
} ;
|
||||
|
||||
-- ?? quant
|
||||
DetQuantOrd quant num ord = {
|
||||
-- s = \\ c => detquant2det quant.s num.s c ++ ord.s ;
|
||||
s = \\n,g => quant.s ! n ! g ++ ord.s ++ num.s ;
|
||||
s = \\n,g => quant.s ! n ! g ++ ord.s ++ num.s ;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
DetQuant quant num = {
|
||||
-- s = \\c => detquant2det quant.s num.s c;
|
||||
s = \\n,g => quant.s!num.n!g++ num.s;
|
||||
s = \\n,g => quant.s ! num.n ! g ++ num.s;
|
||||
n = num.n
|
||||
} ;
|
||||
|
||||
@@ -62,10 +68,10 @@ concrete NounNep of Noun = CatNep ** open ResNep, Prelude in {
|
||||
|
||||
NumCard n = n ** {hasCard = True} ;
|
||||
|
||||
PossPron p = {s = \\_,_ => p.ps ; a = p.a} ;
|
||||
PossPron p = {s = \\_,_ => p.ps } ;
|
||||
|
||||
NumDigits n = {s = n.s ! NCard ; n = n.n} ;
|
||||
OrdDigits n = {s = n.s ! NOrd; 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} ;
|
||||
@@ -76,62 +82,81 @@ concrete NounNep of Noun = CatNep ** open ResNep, Prelude in {
|
||||
|
||||
DetArtSg art cn = {
|
||||
s = \\c => art.s ++ toNP (cn.s ! Sg) c ;
|
||||
a = agrP3 cn.g Sg
|
||||
a = Ag cn.g Sg cn.h
|
||||
} ;
|
||||
|
||||
DetArtPl art cn = {
|
||||
s = \\c => art.s ++ toNP (cn.s ! Pl) c ;
|
||||
a = agrP3 cn.g Pl
|
||||
a = toAgr Pl cn.p cn.g
|
||||
} ;
|
||||
|
||||
DefArt = {s = \\_,_ => [] } ;
|
||||
|
||||
IndefArt = {s = \\_,_ => [] } ;
|
||||
|
||||
MassNP cn = {s = \\c => toNP (cn.s ! Sg) c ; a = agrP3 cn.g Sg } ;
|
||||
MassNP cn = {
|
||||
s = \\c => toNP (cn.s ! Sg) c ;
|
||||
a = toAgr Sg cn.h cn.g ;
|
||||
t = cn.t
|
||||
} ;
|
||||
|
||||
UseN n = n ;
|
||||
UseN2 n = { s = n.s ; g = n.g };
|
||||
|
||||
UseN2 n2 = { s = n2.s ; g = n2.g ; t = n2.t ; h = n2.h };
|
||||
|
||||
Use2N3 f = {
|
||||
s = f.s;
|
||||
s = f.s ;
|
||||
g = f.g ;
|
||||
c2 = f.c2;
|
||||
t = f.t ;
|
||||
h = f.h ;
|
||||
c2 = f.c2 ;
|
||||
c3 = f.c3
|
||||
} ;
|
||||
|
||||
Use3N3 f = {
|
||||
s = f.s ;
|
||||
g = f.g ;
|
||||
c2 = f.c2;
|
||||
t = f.t ;
|
||||
h = f.h ;
|
||||
c2 = f.c2 ;
|
||||
c3 = f.c3
|
||||
} ;
|
||||
|
||||
ComplN2 f x = {
|
||||
s = \\n,c => x.s ! NPC Nom ++ f.c2 ++ f.s ! n ! c ;
|
||||
g = f.g;
|
||||
ComplN2 f np = {
|
||||
s = \\n,c => np.s ! NPC Nom ++ f.c2 ++ f.s ! n ! c ;
|
||||
g = f.g ;
|
||||
t = np.t ;
|
||||
--h = x.h
|
||||
h = (fromAgr np.a).p
|
||||
} ;
|
||||
|
||||
ComplN3 f x = {
|
||||
s = \\n,c => x.s ! NPObj ++ f.c3 ++ f.c4 ++ f.s ! n ! Nom ;
|
||||
g = f.g ;
|
||||
t = f.t ;
|
||||
h = f.h ;
|
||||
c2 = f.c2 ;
|
||||
c3 = f.c3
|
||||
} ;
|
||||
|
||||
|
||||
AdjCN ap cn = {
|
||||
s = \\n,c => ap.s ! n ! cn.g ++ cn.s ! n ! c ;
|
||||
g = cn.g
|
||||
g = cn.g ;
|
||||
t = cn.t ;
|
||||
h = cn.h
|
||||
} ;
|
||||
|
||||
RelCN cn rs = {
|
||||
s = \\n,c => cn.s ! n ! c ++ rs.s ! agrP3 cn.g n ;
|
||||
g = cn.g
|
||||
g = cn.g ;
|
||||
t = cn.t ;
|
||||
h = cn.h
|
||||
} ;
|
||||
|
||||
AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s ; g = cn.g} ;
|
||||
AdvCN cn ad = {s = \\n,c => cn.s ! n ! c ++ ad.s ; g = cn.g ; t = cn.t ; h = cn.h} ;
|
||||
|
||||
SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g} ;
|
||||
|
||||
ApposCN cn np = {s = \\n,c => cn.s ! n ! Nom ++ np.s ! NPC c ; g = cn.g} ;
|
||||
SentCN cn sc = {s = \\n,c => cn.s ! n ! c ++ sc.s ; g = cn.g ; t = cn.t ; h = cn.h} ;
|
||||
|
||||
ApposCN cn np = {s = \\n,c => cn.s ! n ! Nom ++ np.s ! NPC c ; g = cn.g ; t = cn.t ; h = cn.h} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
concrete NumeralNep of Numeral = CatNep ** open ResNep, Prelude in {
|
||||
-- By Harald Hammarstroem
|
||||
-- Modification for Nepali by Dinesh and Shafqat Virk
|
||||
-- Modification for Nepali by Dinesh Simkhada and Shafqat Virk - 2011
|
||||
flags coding=utf8 ;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ lincat Sub1000000 = {s : Str ; n : Number } ;
|
||||
lin num x0 =
|
||||
{s = table {
|
||||
NCard => x0.s ;
|
||||
NOrd => x0.s ++ "ौँ" -- need to use mkOrd x0.s but it gives linking error
|
||||
NOrd => Prelude.glue x0.s "ौँ" -- need to use mkOrd x0.s but it gives linking error
|
||||
};
|
||||
n = x0.n
|
||||
} ;
|
||||
|
||||
@@ -6,28 +6,96 @@ resource ParadigmsNep = open
|
||||
Predef,
|
||||
Prelude,
|
||||
MorphoNep,
|
||||
CatNep
|
||||
CatNep,
|
||||
ResNep
|
||||
in {
|
||||
|
||||
--2 Parameters
|
||||
|
||||
oper
|
||||
masculine : Gender ;
|
||||
feminine : Gender ;
|
||||
singular : Number;
|
||||
plural : Number;
|
||||
masculine : Gender ;
|
||||
feminine : Gender ;
|
||||
singular : Number ;
|
||||
plural : Number ;
|
||||
human : NType ;
|
||||
profession : NType ;
|
||||
living : NType ;
|
||||
|
||||
singular = Sg ; plural = Pl;
|
||||
|
||||
masculine = Masc ; feminine = Fem ;
|
||||
human = Living ; profession = Living ; living = Living ;
|
||||
|
||||
--2 Nouns
|
||||
regN : Str -> N = \s -> mkNReg s ** {lock_N= <>} ;
|
||||
mkNF : Str -> N = \s -> mkNFem s ** {lock_N= <>} ;
|
||||
mkNUC : Str -> Gender -> N = \s,g -> mkNUnc s g ** {lock_N= <>} ;
|
||||
-- For regular nouns takes Masc as default gender
|
||||
regN = overload {
|
||||
-- If no parameter is passed noun will take
|
||||
-- Animacy : Nonliving, Honor : 3rd person Low grade honorific
|
||||
regN : Str -> N = \s -> mkNReg s NonLiving Pers3_L ** {lock_N= <>} ;
|
||||
|
||||
-- Animacy : Nonliving by default, Honor : explicitely given,
|
||||
regN : Str -> NPerson -> N = \s,h -> mkNReg s NonLiving h ** {lock_N= <>} ;
|
||||
|
||||
-- Animacy : explicitely given, Honor : 3rd person Low grade honorific by default
|
||||
regN : Str -> NType -> N = \s,t -> mkNReg s t Pers3_L ** {lock_N= <>} ;
|
||||
|
||||
-- Animacy, Honor both exlicutely given
|
||||
regN : Str -> NType -> NPerson -> N = \s,t,h -> mkNReg s t h ** {lock_N= <>} ;
|
||||
|
||||
} ;
|
||||
|
||||
-- For femenine nouns
|
||||
mkNF = overload {
|
||||
mkNF : Str -> N = \s -> mkNFem s NonLiving Pers3_L ** {lock_N= <>} ;
|
||||
|
||||
mkNF : Str -> NPerson -> N = \s,h -> mkNFem s NonLiving h ** {lock_N= <>} ;
|
||||
|
||||
mkNF : Str -> NType -> N = \s,t -> mkNFem s t Pers3_L ** {lock_N= <>} ;
|
||||
|
||||
mkNF : Str -> NType -> NPerson -> N = \s,t,h -> mkNFem s t h ** {lock_N= <>} ;
|
||||
} ;
|
||||
|
||||
-- For uncountable nouns, could be both Masc or Fem Gender
|
||||
mkNUC = overload {
|
||||
mkNUC : Str -> N =
|
||||
\s -> mkNUnc s Masc NonLiving Pers3_L ** {lock_N= <>} ;
|
||||
|
||||
mkNUC : Str -> Gender -> N =
|
||||
\s,g -> mkNUnc s g NonLiving Pers3_L ** {lock_N= <>} ;
|
||||
|
||||
mkNUC : Str -> Gender -> NType -> N =
|
||||
\s,g,t -> mkNUnc s g t Pers3_L ** {lock_N= <>} ;
|
||||
|
||||
mkNUC : Str -> Gender -> NType -> NPerson -> N =
|
||||
\s,g,t,h -> mkNUnc s g t h ** {lock_N= <>} ;
|
||||
} ;
|
||||
--mkNUC : Str -> NType -> Gender -> N = \s,t,g -> mkNUnc s g t ** {lock_N= <>} ;
|
||||
|
||||
{-
|
||||
mkN2 = overload {
|
||||
mkN2 : N -> Prep -> Str -> N2 =
|
||||
\n,p,c -> n ** {lock_N2 = <> ; c2 = p.s ; c3 = c.s } ;
|
||||
|
||||
mkN2 : N -> Prep -> Str -> NType -> N2 =
|
||||
\n,p,c,t -> n ** {lock_N2 = <> ; c2 = p.s ; c3 = c } ;
|
||||
|
||||
mkN2 : N -> Prep -> Str -> NType -> NPerson -> N2 =
|
||||
\n,p,c,t,h -> n ** {lock_N2 = <> ; c2 = p.s ; c3 = c} ;
|
||||
} ;
|
||||
-}
|
||||
|
||||
mkN2 : N -> Prep -> Str -> N2;
|
||||
mkN2 = \n,p,c -> n ** {lock_N2 = <> ; c2 = p.s ; c3 = c } ;
|
||||
mkN2 = \n,p,c -> n ** {lock_N2 = <> ; c2 = p.s ; c3 = c} ;
|
||||
|
||||
{-
|
||||
mkN3 = overload {
|
||||
mkN3 : N -> Prep -> Prep -> Str-> N3 =
|
||||
\n,p,q,r -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q.s ; c4 = r} ;
|
||||
|
||||
mkN3 : N -> Prep -> Prep -> Str-> NType -> N3 =
|
||||
\n,p,q,r,t -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q.s ; c4 = r} ;
|
||||
} ;
|
||||
-}
|
||||
|
||||
mkN3 : N -> Prep -> Prep -> Str-> N3 ;
|
||||
mkN3 = \n,p,q,r -> n ** {lock_N3 = <> ; c2 = p.s ; c3 = q.s ; c4 = r} ;
|
||||
@@ -35,16 +103,19 @@ oper
|
||||
-- Compound Nouns
|
||||
|
||||
mkCmpdNoun : Str -> N -> N
|
||||
= \s,noun -> {s =\\n,c => s ++ noun.s ! n ! c ; g = noun.g ; lock_N = <>};
|
||||
= \s,noun -> {s =\\n,c => s ++ noun.s ! n ! c ; g = noun.g ; t = noun.t ; h = noun.h ; lock_N = <>};
|
||||
|
||||
|
||||
-- Proper names
|
||||
mkPN = overload {
|
||||
mkPN : Str -> PN =
|
||||
\s -> let n = regN1 s Masc in {s = n.s ! Sg ; g = n.g ; lock_PN = <>} ;
|
||||
mkPN : Str -> PN =
|
||||
\s -> let n = regN1 s Masc NonLiving Pers2_M in {s = n.s ! Sg ; g = n.g ; t = n.t ; h = n.h ; lock_PN = <>} ;
|
||||
|
||||
mkPN : Str -> Gender -> PN =
|
||||
\s, g -> let n = regN1 s g in {s = n.s ! Sg ; g = n.g ; lock_PN = <>} ;
|
||||
mkPN : Str -> Gender -> NPerson -> PN =
|
||||
\s,g,h -> let n = regN1 s g NonLiving h in {s = n.s ! Sg ; g = n.g ; t = n.t ; h = n.h ; lock_PN = <>} ;
|
||||
|
||||
mkPN : Str -> Gender -> NType -> NPerson -> PN =
|
||||
\s,g,t,h -> let n = regN1 s g t h in {s = n.s ! Sg ; g = n.g ; t = n.t ; h = n.h ; lock_PN = <>} ;
|
||||
} ;
|
||||
|
||||
|
||||
@@ -67,15 +138,19 @@ oper
|
||||
-- Determiner
|
||||
mkDet = overload {
|
||||
mkDet : (s1,s2:Str) -> Number -> Det =
|
||||
\s1,s2,nb -> let dt = makeDet s1 s1 s2 s2 nb in {s = dt.s ; n = nb ; lock_Det = <>};
|
||||
\s1,s2,nb -> let dt = makeDet s1 s1 s2 s2 nb in {s = dt.s ; n = nb ; lock_Det = <>} ;
|
||||
|
||||
mkDet : (s1,s2,s3,s4:Str) -> Number -> Det =
|
||||
\s1,s2,s3,s4,nb -> let dt = makeDet s1 s2 s3 s4 nb in {s = dt.s ; n = nb ; lock_Det = <>};
|
||||
\s1,s2,s3,s4,nb -> let dt = makeDet s1 s2 s3 s4 nb in {s = dt.s ; n = nb ; lock_Det = <>} ;
|
||||
} ;
|
||||
|
||||
-- IDet
|
||||
mkIDetn : (s1,s2:Str) -> Number -> IDet =
|
||||
\s1,s2,nb -> let dt = makeIDet s1 s2 in {s = dt.s ; n = nb ; lock_IDet = <>} ;
|
||||
|
||||
-- Intergative pronouns
|
||||
mkIP : (x1,x2,x3,x4:Str) -> Number -> IP =
|
||||
\s1,s2,s3,s4,n -> let p = mkIntPronForm s1 s2 s3 s4 in { s = p.s ; n = n ; lock_IP = <>};
|
||||
\s1,s2,s3,s4,n -> let p = mkIntPronForm s1 s2 s3 s4 in { s = p.s ; n = n ; lock_IP = <>} ;
|
||||
|
||||
|
||||
--2 Adjectives
|
||||
@@ -89,8 +164,8 @@ oper
|
||||
|
||||
--2 Verbs
|
||||
|
||||
mkV : Str -> V
|
||||
= \s -> mkVerb s ** {lock_V = <>} ;
|
||||
mkV : Str -> V =
|
||||
\s -> mkVerb s ** {lock_V = <>} ;
|
||||
|
||||
mkV2 = overload {
|
||||
mkV2 : Str -> V2
|
||||
@@ -150,15 +225,11 @@ oper
|
||||
\sm,sf,pm,pf -> {s = (makeQuant sm sf pm pf).s ; lock_Quant = <>};
|
||||
|
||||
mkQuant : (s1,s2:Str) -> Quant =
|
||||
\sg,pl -> {s = (makeQuant sg sg pl pl).s ; lock_Quant = <>};
|
||||
\sg,pl -> {s = (makeQuant sg sg pl pl).s ; lock_Quant = <>} ;
|
||||
} ;
|
||||
|
||||
{-
|
||||
-- mkQuant = overload {
|
||||
-- mkQuant : 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)
|
||||
@@ -175,48 +246,5 @@ oper
|
||||
|
||||
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 ;
|
||||
-}
|
||||
-}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ concrete PhraseNep of Phrase = CatNep ** open Prelude, ResNep in {
|
||||
|
||||
UttS s = s ;
|
||||
UttQS qs = {s = qs.s ! QDir} ;
|
||||
|
||||
-- be a man -> (मन्छे हउ)
|
||||
UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg False ++ "हउ"} ;
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ concrete QuestionNep of Question = CatNep ** open ResNep, Prelude in {
|
||||
QDir => cl.s ! t ! p ! OQuest;
|
||||
QIndir => "येदि" ++ cl.s ! t ! p ! ODir
|
||||
}
|
||||
} ;
|
||||
} ;
|
||||
|
||||
QuestVP qp vp =
|
||||
let cl = mkSClause ("") (Ag Masc qp.n Pers3_L) vp;
|
||||
let cl = mkSClause ("") (Ag Masc qp.n Pers3_M) vp; -- Pers3_M
|
||||
qp1 = qp.s ! Nom;
|
||||
qp2 = qp.s ! Ins
|
||||
in { s = \\t,p,o =>
|
||||
@@ -31,7 +31,7 @@ concrete QuestionNep of Question = CatNep ** open ResNep, Prelude in {
|
||||
in {
|
||||
s = \\t,p,o => case t of {
|
||||
-- VPSmplPast => ip2 ++ slash.s ! t ! p ! ODir ;
|
||||
_ => ip1 ++ slash.s ! t ! p ! ODir
|
||||
_ => ip2 ++ slash.s ! t ! p ! ODir
|
||||
}
|
||||
};
|
||||
|
||||
@@ -40,8 +40,8 @@ concrete QuestionNep of Question = CatNep ** open ResNep, Prelude in {
|
||||
} ;
|
||||
|
||||
QuestIComp icomp np =
|
||||
let cl = mkSClause (np.s ! NPC Nom ++ icomp.s) np.a (predAux auxBe);
|
||||
in {
|
||||
let cl = mkSClause (np.s ! NPC Nom ++ icomp.s) np.a (predAux NonLiving) ;--(predAux np.t); to test mkQCl-IAdv-NP-QCl
|
||||
in { -- eg उनी कहाँ छिन् - (छिन् - NonLiving case)
|
||||
s = \\t,p,qf => case qf of {
|
||||
QDir => cl.s ! t ! p ! ODir;
|
||||
QIndir => cl.s ! t ! p ! ODir
|
||||
@@ -78,6 +78,18 @@ concrete QuestionNep of Question = CatNep ** open ResNep, Prelude in {
|
||||
AddAdvQVP qvp iadv = insertObj (\\_ => iadv.s) qvp ;
|
||||
ComplSlashIP vpslash ip = insertObj (\\_ => ip.s ! Nom) vpslash ;
|
||||
|
||||
lincat QVP = CatNep.VP ;
|
||||
|
||||
--QuestQVP : IP -> QVP -> QCl ; -- who buys what where
|
||||
QuestQVP ip qvp =
|
||||
let cl = mkSClause ("") (Ag Masc ip.n Pers3_M) qvp ; -- Pers3_M
|
||||
qp1 = ip.s ! Nom ;
|
||||
qp2 = ip.s ! Ins
|
||||
in { s = \\t,p,o =>
|
||||
case t of {
|
||||
-- VPSmplPast => qp2 ++ cl.s ! t ! p ! ODir ;
|
||||
_ => qp1 ++ cl.s ! t ! p ! ODir
|
||||
}
|
||||
} ;
|
||||
|
||||
lincat QVP = CatNep.VP ;
|
||||
|
||||
}
|
||||
|
||||
@@ -10,37 +10,22 @@ concrete RelativeNep of Relative = CatNep ** open ResNep in {
|
||||
c = Nom
|
||||
} ;
|
||||
|
||||
-- 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 ! Nom) agr vp;
|
||||
|
||||
-- cl = case t of {
|
||||
-- VPImpPast => mkSClause (rp.s ! (giveNumber agr) ! Obl) agr vp;
|
||||
-- _ => mkSClause (rp.s ! (giveNumber agr) ! Dir) agr vp
|
||||
-- };
|
||||
|
||||
agr = case rp.a of {
|
||||
RNoAg => ag ;
|
||||
RAg a => a
|
||||
} ;
|
||||
cl = mkSClause (rp.s ! Nom) agr vp;
|
||||
in
|
||||
cl.s ! t ! p ! ODir ;
|
||||
c = Nom
|
||||
} ;
|
||||
|
||||
|
||||
---- Pied piping: 'at which we are looking'. Stranding and empty
|
||||
---- relative are defined in $ExtraHin.gf$ ("तहात ौे ारे लोोकिनग ात",
|
||||
---- "ौे ारे लोोकिनग ात").
|
||||
--
|
||||
RelSlash rp slash = {
|
||||
s = \\t,p,o,agr => rp.s ! Nom ++ slash.c2.s ++ slash.s ! t ! p ! o ;--case t of {
|
||||
-- VPImpPast => rp.s ! (giveNumber agr) Obl ++ slash.c2.s ++ slash.s ! t ! p ! o ;
|
||||
-- _ => rp.s ! (giveNumber agr) Dir ++ slash.c2.s ++ slash.s ! t ! p ! o
|
||||
-- };
|
||||
s = \\t,p,o,agr => rp.s ! Nom ++ slash.c2.s ++ slash.s ! t ! p ! o ;
|
||||
c = Nom
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
--
|
||||
--1 Pnbu auxiliary operations.
|
||||
--1 Nep auxiliary operations.
|
||||
-- by Dinesh SImkhada and Shafqat Virk - 2011
|
||||
--
|
||||
-- This module contains operations that are needed to make the
|
||||
-- resource syntax work.
|
||||
@@ -13,9 +14,6 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
param
|
||||
Case = Nom | Acc | Ins | Dat | Abl | Loc ;
|
||||
Gender = Masc | Fem ;
|
||||
VTense = NPresent | NPast PTypes | NFuture FTypes;
|
||||
PTypes = Simpl | Hab | Unknown ;
|
||||
FTypes = Defin | NDefin ;
|
||||
NPerson = Pers1
|
||||
| Pers2_L
|
||||
| Pers2_M
|
||||
@@ -38,10 +36,13 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
------------------------------------------
|
||||
--Verbs
|
||||
-------------------------------------------
|
||||
|
||||
VTense = NPresent | NPast PTypes | NFuture FTypes;
|
||||
PTypes = Simpl | Hab ; -- Unknown - Currently we didn't find the use of 'Unknown' type
|
||||
FTypes = Defin | NDefin ;
|
||||
|
||||
VerbForm =
|
||||
VF VTense Aspect Polarity NPerson Number Gender
|
||||
| Root -- Root form 'kha' is the root of 'khanu'
|
||||
| Root -- Root form, 'kha' is the root of 'khanu'
|
||||
| Inf -- Infinitive form 'khanau'
|
||||
| ProgRoot Aspect Number Gender
|
||||
| PVForm -- Partial verb form 'khan' is teh PVForm of 'khanu'
|
||||
@@ -49,30 +50,31 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
|
||||
-- Aspect Perfective and non-perfective
|
||||
Aspect = Perf | Imperf ;
|
||||
|
||||
-- For distinguishing the type of noun
|
||||
-- Prefessions/Occupations, Humans all mapped to Living category
|
||||
NType = Living | NonLiving ;
|
||||
|
||||
|
||||
oper
|
||||
-- Noun = {s : Number => Case => Str ; g : Gender ; isHum : Bool } ; -- TODO ADD HUMAN/NON-HUMAN CASE
|
||||
Noun = {s : Number => Case => Str ; g : Gender } ;
|
||||
|
||||
Noun = {s : Number => Case => Str ; g : Gender ; t : NType ; h : NPerson } ;
|
||||
|
||||
Verb = {s : VerbForm => Str} ;
|
||||
|
||||
Preposition = {s : Str};
|
||||
|
||||
-- DemPronForm = {s : Number => Gender => Case => Str};
|
||||
-- PossPronForm = {s : Number => Gender => Case => Str};
|
||||
--Determiner = {s : Number => Gender => Str ; n : Number};
|
||||
|
||||
|
||||
Determiner = {s : Number => Gender => Str ; n : Number};
|
||||
|
||||
|
||||
-- Nepali Adjectives
|
||||
|
||||
npAdjective = {s : Number => Gender => Str} ;
|
||||
|
||||
mkAdjnp : Str -> npAdjective = \str ->
|
||||
case str of {
|
||||
st + "ो" => mkAdj1 str (st+"ी") (st+"ा") ;
|
||||
_ => mkAdj1 str str str
|
||||
st + t@"त" + "ो" => mkAdj1 str str (st+t+"ा") ; -- No Fem for red [couple of places which takes Fem but no general rule]
|
||||
st + "ो" => mkAdj1 str (st+"ी") (st+"ा") ;
|
||||
_ => mkAdj1 str str str
|
||||
} ;
|
||||
|
||||
mkAdj1 : (x1,_,x3 : Str) -> npAdjective =
|
||||
@@ -92,17 +94,21 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
|
||||
-- Reflective Pronoun
|
||||
--eg. (i will do myself)
|
||||
reflPron : Str;
|
||||
reflPron = "आफैं"; -- आफैं
|
||||
-- Functions used at NounNep [TODO: inflection at morphological level and attach with VP might be good option]
|
||||
reflPron : Str ;
|
||||
reflPron = "आफैं" ; -- आफैं
|
||||
|
||||
eko : Str;
|
||||
eko = "एको";
|
||||
eko : Str ;
|
||||
eko = "एको" ;
|
||||
|
||||
eka : Str;
|
||||
eka = "एका";
|
||||
eko : Str ;
|
||||
eki = "एकी" ;
|
||||
|
||||
sbvn : Str;
|
||||
sbvn = "सबँन्धा" ;
|
||||
eka : Str ;
|
||||
eka = "एका" ;
|
||||
|
||||
sbvn : Str ;
|
||||
sbvn = "सबभन्दा" ;
|
||||
|
||||
----------------------------------------------------------
|
||||
-- Grammar part
|
||||
@@ -113,24 +119,20 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
NPCase = NPC Case | NPObj | NPErg ;
|
||||
|
||||
oper
|
||||
|
||||
|
||||
|
||||
np2pronCase : (Case => Str) -> NPCase -> Agr -> Str =
|
||||
\ppf,npc,a -> case npc of {
|
||||
NPC c => ppf ! c ;
|
||||
NPObj => ppf ! Nom ;
|
||||
NPErg => ppf ! Ins --Nom ++ "ले"
|
||||
} ;
|
||||
|
||||
NPC c => ppf ! c ;
|
||||
NPObj => ppf ! Nom ;
|
||||
NPErg => ppf ! Ins --Nom ++ "ले"
|
||||
} ;
|
||||
|
||||
toNP : (Case => Str) -> NPCase -> Str = \pn, npc -> case npc of {
|
||||
NPC c => pn ! c ;
|
||||
NPObj => pn ! Nom ;
|
||||
NPErg => pn ! Ins --Nom ++ "ले"
|
||||
} ;
|
||||
NPC c => pn ! c ;
|
||||
NPObj => pn ! Nom ;
|
||||
NPErg => pn ! Ins --Nom ++ "ले"
|
||||
} ;
|
||||
|
||||
-- ???? Hardcorded gender and Number
|
||||
-- this/these
|
||||
detcn2NP : (Determiner) -> Noun -> NPCase -> Number -> Str = \dt,cn,npc,nn -> case npc of {
|
||||
NPC c => dt.s ! dt.n ! Masc ++ cn.s ! nn ! c ;
|
||||
NPObj => dt.s ! dt.n ! Masc ++ cn.s ! nn ! Nom ;
|
||||
@@ -141,7 +143,7 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
NPC c => dt.s ! dt.n ! Masc ;
|
||||
NPObj => dt.s ! dt.n ! Masc ;
|
||||
NPErg => dt.s ! dt.n ! Masc ++ "ले"
|
||||
} ;
|
||||
} ;
|
||||
|
||||
------------------------------------
|
||||
-- Agreement transformations
|
||||
@@ -162,201 +164,65 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
conjAgr : Agr -> Agr -> Agr = \a0,b0 ->
|
||||
let a = fromAgr a0 ; b = fromAgr b0
|
||||
in
|
||||
toAgr
|
||||
(conjNumber a.n b.n)
|
||||
b.p a.g;
|
||||
toAgr (conjNumber a.n b.n) b.p a.g;
|
||||
|
||||
|
||||
giveNumber : Agr -> Number = \a -> case a of {
|
||||
giveNumber : Agr -> Number =
|
||||
\a -> case a of {
|
||||
Ag _ n _ => n
|
||||
};
|
||||
} ;
|
||||
|
||||
giveGender : Agr -> Gender = \a -> case a of {
|
||||
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_L ;
|
||||
|
||||
personalAgr : Agr = agrP1 Masc Sg ;
|
||||
|
||||
agrP1 : Gender -> Number -> Agr =
|
||||
\g,n -> Ag g n Pers1 ;
|
||||
|
||||
param
|
||||
|
||||
personalAgr : Agr = agrP1 Masc Sg ;
|
||||
|
||||
|
||||
param
|
||||
CPolarity =
|
||||
CPos
|
||||
| CNeg Bool ; -- contracted or not
|
||||
|
||||
oper
|
||||
oper
|
||||
contrNeg : Bool -> Polarity -> CPolarity =
|
||||
\b,p -> case p of {
|
||||
Pos => CPos ;
|
||||
Neg => CNeg b
|
||||
} ;
|
||||
|
||||
|
||||
NP : Type = {s : NPCase => Str ; a : Agr} ;
|
||||
|
||||
NP : Type = {s : NPCase => Str ; a : Agr ; t : NType } ;
|
||||
|
||||
param
|
||||
CTense = CPrsnt | CPast | CFuture ;
|
||||
|
||||
-- if the noun is of type occupation/Introductiary case it will take ho, instead of chh (in case of present)
|
||||
oper
|
||||
copula : CTense -> Polarity -> Number -> NPerson -> Gender -> Str =
|
||||
\t, po, n, pn, g ->
|
||||
case <t,po,pn,n,g> of {
|
||||
-- Resembles with "मकँफरेणफृेग" function for positive
|
||||
-- <CPrsnt, Pos, _, _, _> => mkVPreNPReg "" Pos pn n g ;
|
||||
-- Present Positive
|
||||
<CPrsnt, Pos, Pers1, Sg, _> => "छु" ; -- छु
|
||||
<CPrsnt, Pos, Pers1, Pl, _> => "छौं" ; -- छौं
|
||||
<CPrsnt, Pos, Pers2_L, Sg, Masc> => "छस्" ; -- छस्
|
||||
<CPrsnt, Pos, Pers2_L, Sg, Fem> => "छेस्" ; -- छेस्
|
||||
<CPrsnt, Pos, Pers2_L, Pl, _> => "छौ" ; -- छौ
|
||||
<CPrsnt, Pos, Pers2_M, Pl, Fem> => "छ्यौ" ; -- छ्यौ
|
||||
<CPrsnt, Pos, Pers2_M, _, _> => "छौ" ; -- छौ
|
||||
<CPrsnt, Pos, Pers3_L, Sg, Masc> => "छ" ; -- छ
|
||||
<CPrsnt, Pos, Pers3_L, Sg, Fem> => "छे" ; -- छे
|
||||
<CPrsnt, Pos, Pers3_L, Pl, _> => "छन्" ; -- छन्
|
||||
<CPrsnt, Pos, Pers3_M, Sg, Fem> => "छिन्" ; -- छिन्
|
||||
<CPrsnt, Pos, Pers3_M, _, _> => "छन्" ; -- छन्
|
||||
<CPrsnt, Pos, _ , _, _> => "हुनुहुन्छ" ; --हुनुहुन्छ
|
||||
|
||||
-- Present Negative
|
||||
<CPrsnt, Neg, Pers1, Sg, _> => "छैनँ" ; -- छैनँ
|
||||
<CPrsnt, Neg, Pers1, Pl, _> => "छैनौं" ; -- छैनौं
|
||||
<CPrsnt, Neg, Pers2_L, Sg, _> => "छैनस्" ; -- छैनस्
|
||||
<CPrsnt, Neg, Pers2_L, Pl, _> => "छैनौ" ; -- छैनौ
|
||||
<CPrsnt, Neg, Pers2_M, _, _> => "छैनौ" ; -- छैनौ
|
||||
<CPrsnt, Neg, Pers3_L, Sg, _> => "छैन" ; --छैन
|
||||
<CPrsnt, Neg, Pers3_L, Pl, _> => "छैनन्" ; -- छैनन्
|
||||
<CPrsnt, Neg, Pers3_M, _, _> => "छैनन्" ; -- छैनन्
|
||||
<CPrsnt, Neg, _, _, _> => "हुनुहुन्न" ; -- हुनुहुन्न
|
||||
|
||||
-- Resemples with "मकँफसतशफघेन" case, should refactor to make it
|
||||
-- take common function
|
||||
|
||||
-- Past Positive
|
||||
<CPast, Pos, Pers1, Sg, _> => "थिएँ" ; -- थिएँ
|
||||
<CPast, Pos, Pers1, Pl, _> => "थियौँ" ; -- थियौँ
|
||||
<CPast, Pos, Pers2_L, Sg, _> => "थिइस्" ; -- थिइस्
|
||||
<CPast, Pos, Pers2_L, Pl, _> => "थियौ" ; -- थियौ
|
||||
<CPast, Pos, Pers2_M, _, _> => "थियौ" ; -- थियौ
|
||||
<CPast, Pos, Pers3_L, Sg, Masc> => "थियो" ; -- थियो
|
||||
<CPast, Pos, Pers3_L, Sg, Fem> => "थिई" ; --थिई
|
||||
<CPast, Pos, Pers3_L, Pl, _> => "थिए" ; -- थिए
|
||||
<CPast, Pos, Pers3_M, Sg, Fem> => "थिइन्" ; -- थिइन्
|
||||
<CPast, Pos, Pers3_M, _, _> => "थिए" ; -- थिए
|
||||
<CPast, Pos, _, _, _> => "हुनुहुन्थ्यो" ; -- हुनुहुन्थ्यो
|
||||
|
||||
-- Past Positive
|
||||
<CPast, Neg, Pers1, Sg, _> => "थिनँ" ; -- थिनँ
|
||||
<CPast, Neg, Pers1, Pl, _> => "थेनौं" ; -- थेनौं
|
||||
<CPast, Neg, Pers2_L, Sg, _> => "थिनस्" ; -- थिनस्
|
||||
<CPast, Neg, Pers2_L, Pl, _> => "थेनौ" ; -- थेनौ
|
||||
<CPast, Neg, Pers2_M, _, _> => "थेनौ" ; -- थेनौ
|
||||
<CPast, Neg, Pers3_L, Sg, Masc> => "थेन" ; -- थेन
|
||||
<CPast, Neg, Pers3_L, Sg, Fem> => "थिन" ; --थिन
|
||||
<CPast, Neg, Pers3_L, Pl, _> => "थेनन्" ; -- थेनन्
|
||||
<CPast, Neg, Pers3_M, Sg, Fem> => "थिनन्" ; -- थिनन्
|
||||
<CPast, Neg, Pers3_M, _, _> => "थेनन्" ; -- थेनन्
|
||||
<CPast, Neg, _, _, _> => "हुनुहुन्नथ्यो" ; -- हुनुहुन्नथ्यो
|
||||
|
||||
|
||||
-- Can be covered by the function "मकँऊुतधणफ"
|
||||
-- Future Positive
|
||||
<CFuture, Pos, Pers1, Sg, _> => "हुनेछु" ; -- हुनेछु
|
||||
<CFuture, Pos, Pers1, Pl, _> => "हुनेछौं" ; -- हुनेछौं
|
||||
<CFuture, Pos, Pers2_L, Sg, _> => "हुनेछस्" ; -- हुनेछस्
|
||||
<CFuture, Pos, Pers2_L, Pl, _> => "हुनेछौं" ; -- हुनेछौ
|
||||
<CFuture, Pos, Pers2_M, _, _> => "हुनेछौं" ; -- हुनेछौ
|
||||
<CFuture, Pos, Pers3_L, Sg, _> => "हुनेछ" ; -- हुनेछ
|
||||
<CFuture, Pos, Pers3_L, Pl, _> => "हुनेछन्" ; -- हुनेछन्
|
||||
<CFuture, Pos, Pers3_M, _, Masc> => "हुनेछन्" ; -- हुनेछन्
|
||||
<CFuture, Pos, Pers3_M, Sg, Fem> => "हुनेछन्" ; -- हुनेछिन्
|
||||
<CFuture, Pos, Pers3_M, Pl, Fem> => "हुनेछन्" ; -- हुनेछन्
|
||||
<CFuture, Pos, _, _, _> => "हुनुहुनेछ" ; -- हुनुहुनेछ
|
||||
|
||||
-- Negative Case
|
||||
<CFuture, Neg, Pers1, Sg, _> => "हुनेछैन" ; -- हुनेछैन
|
||||
<CFuture, Neg, Pers1, Pl, _> => "हुनेछैनैँ" ; -- हुनेछैनैँ
|
||||
<CFuture, Neg, Pers2_L, Sg, _> => "हुनेछैनस्" ; -- हुनेछैनस्
|
||||
<CFuture, Neg, Pers2_L, Pl, _> => "हुनेछैनै" ; -- हुनेछैनै
|
||||
<CFuture, Neg, Pers2_M, _, _> => "हुनेछैनै" ; -- हुनेछैनै
|
||||
<CFuture, Neg, Pers3_L, Sg, _> => "हुनेछैन्" ; -- हुनेछैन्
|
||||
<CFuture, Neg, Pers3_L, Pl, _> => "हुनेछैनन्" ; -- हुनेछैनन्
|
||||
<CFuture, Neg, Pers3_M, Sg, _> => "हुनेछैनन्" ; -- हुनेछैनन्
|
||||
<CFuture, Neg, Pers3_M, Pl, _> => "हुनेछैनै" ; -- हुनेछैनै
|
||||
<CFuture, Neg, _, _, _> => "हुनुहुनेछैन्" -- हुनुहुनेछैन्
|
||||
} ;
|
||||
|
||||
-- For Human, occupation/Introductiary case case, (HAVENT INTEGRATED YET)
|
||||
copulaOpn : CTense -> Polarity -> Number -> NPerson -> Gender -> Str =
|
||||
\t, po, n, pn, g ->
|
||||
case <t,po,pn,n,g> of {
|
||||
-- Resembles with "मकँफरेणफृेग" function for positive
|
||||
-- <CPrsnt, Pos, _, _, _> => mkVPreNPReg "" Pos pn n g ;
|
||||
-- Present Positive
|
||||
<CPrsnt, Pos, Pers1, Sg, _> => "हुँ" ; -- हुँ
|
||||
<CPrsnt, Pos, Pers1, Pl, _> => "हौँ" ; -- हौँ
|
||||
<CPrsnt, Pos, Pers2_L, Sg, _> => "होस्" ; -- होस्
|
||||
--<CPrsnt, Pos, Pers2_L, Sg, Fem> => "होस्" ; -- छेस्
|
||||
<CPrsnt, Pos, Pers2_L, Pl, _> => "हौ" ; -- हौ
|
||||
--<CPrsnt, Pos, Pers2_M, Pl, Fem> => "छ्यौ" ; -- छ्यौ
|
||||
<CPrsnt, Pos, Pers2_M, _, _> => "हौ" ; -- हौ
|
||||
<CPrsnt, Pos, Pers3_L, Sg, Masc> => "हो" ; -- हो
|
||||
--<CPrsnt, Pos, Pers3_L, Sg, Fem> => "हुन्" ; -- हुन्
|
||||
<CPrsnt, Pos, Pers3_L, _, _> => "हुन्" ; -- हुन्
|
||||
--<CPrsnt, Pos, Pers3_M, Sg, Fem> => "हौ" ; -- हौ
|
||||
<CPrsnt, Pos, Pers3_M, _, _> => "हौ" ; -- हौ
|
||||
<CPrsnt, Pos, _ , _, _> => "हुनुहुन्छ" ; --हुनुहुन्छ
|
||||
|
||||
-- Present Negative
|
||||
<CPrsnt, Neg, Pers1, Sg, _> => "हैन" ; --
|
||||
<CPrsnt, Neg, Pers1, Pl, _> => "हैनौं" ; -- हैनौं
|
||||
<CPrsnt, Neg, Pers2_L, Sg, _> => "हैनस्" ; -- हैनस्
|
||||
<CPrsnt, Neg, Pers2_L, Pl, _> => "हैनौ" ; -- हैनौ
|
||||
<CPrsnt, Neg, Pers2_M, _, _> => "हैनौ" ; -- हैनौ
|
||||
<CPrsnt, Neg, Pers3_L, Sg, _> => "हैन" ; --हैन
|
||||
<CPrsnt, Neg, Pers3_L, Pl, _> => "हैनन्" ; -- हैनन्
|
||||
<CPrsnt, Neg, Pers3_M, _, _> => "हैनन्" ; -- हैनन्
|
||||
<CPrsnt, Neg, _, _, _> => "हुनुहुन्न" ; -- हुनुहुन्न
|
||||
|
||||
<_,_,_,_,_> => copula t po n pn g
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
param
|
||||
|
||||
|
||||
VPHTense =
|
||||
VPGenPres -- impf hum nahim "ी गो"
|
||||
| VPSmplPast -- impf Ta nahim "ी ौेनत"
|
||||
| VPFut -- fut na/nahim "ी सहालल गो"
|
||||
| VPPerfPres -- perf hum na/nahim "ी हावे गोने"
|
||||
| VPPerfPast -- perf Ta na/nahim "ी हाद गोने"
|
||||
| VPPerfFut
|
||||
| VPCondPres -- subj na "ी माय गो"
|
||||
| VPCondPast -- subj na "ी माय गो"
|
||||
VPGenPres -- impf hum nahim "ी गो"
|
||||
| VPSmplPast --# notpresent -- impf Ta nahim "ी ौेनत"
|
||||
| VPFut --# notpresent -- fut na/nahim "ी सहालल गो"
|
||||
| VPPerfPres -- perf hum na/nahim "ी हावे गोने"
|
||||
| VPPerfPast --# notpresent -- perf Ta na/nahim "ी हाद गोने"
|
||||
| VPPerfFut --# notpresent
|
||||
| VPCondPres -- subj na "ी माय गो"
|
||||
| VPCondPast --# notpresent -- subj na "ी माय गो"
|
||||
;
|
||||
|
||||
{-
|
||||
VPHForm =
|
||||
VPTense VPPTense Aspect Agr -- 9 * 12
|
||||
| VPReq
|
||||
| VPImp
|
||||
| VPReqFut
|
||||
| VPInf
|
||||
| VPStem
|
||||
;
|
||||
-}
|
||||
|
||||
|
||||
VType = VIntrans | VTrans | VTransPost ;
|
||||
|
||||
-- Tense defined for coupla case
|
||||
CTense = CPrsnt | CPast | CFuture ;
|
||||
|
||||
|
||||
oper
|
||||
|
||||
objVType : VType -> NPCase = \vt ->
|
||||
@@ -396,86 +262,44 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
comp = \\_ => []
|
||||
} ;
|
||||
|
||||
predVc : (Verb ** {c2,c1 : Str}) -> VPHSlash = \verb ->
|
||||
predV verb ** {c2 = {s = verb.c1 ; c = VTrans} } ;
|
||||
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} } ;
|
||||
------------------------
|
||||
-}
|
||||
{-
|
||||
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,_> => "हौौाण";
|
||||
<Pers2_Casual,Sg> => "हौौयण";
|
||||
<Pers2_Casual,Pl> => "हौौ";
|
||||
<Pers2_Respect,_> => "हौौ";
|
||||
<Pers3_Distant,Sg> => "हौौै";
|
||||
<Pers3_Distant,Pl> => "हौन";
|
||||
<Pers3_Near,Sg> => "हौौै";
|
||||
<Pers3_Near,Pl> => "हौन"
|
||||
|
||||
};
|
||||
-}
|
||||
|
||||
predAux : Aux -> VPH = \verb -> {
|
||||
s = \\vh =>
|
||||
let
|
||||
inf = verb.inf ;
|
||||
part = verb.ppart ;
|
||||
in
|
||||
predAux : NType -> VPH =\ctype -> {
|
||||
s = \\vh =>
|
||||
case vh of {
|
||||
VF NPresent _ pl p n g => {inf = copula CPrsnt pl n p g } ;
|
||||
VF (NPast _) _ pl p n g => {inf = copula CPast pl n p g } ;
|
||||
VF (NFuture _) _ pl p n g => {inf = copula CFuture pl n p g } ;
|
||||
Root => { inf = verb.inf} ;
|
||||
Inf => {inf = verb.inf} ;
|
||||
Imp => {inf = verb.inf} ;
|
||||
VF NPresent _ pl p n g =>
|
||||
case ctype of {
|
||||
Living => {inf = copulaPrLvng pl n p g } ;
|
||||
_ => {inf = copulaPrGen pl n p g }
|
||||
} ;
|
||||
VF (NPast _) _ pl p n g => {inf = copulaPsGen pl n p g } ;
|
||||
VF (NFuture _) _ pl p n g => {inf = copulaFtGen pl n p g } ;
|
||||
|
||||
Root => { inf = ""} ;
|
||||
Inf=> {inf = ""} ;
|
||||
Imp => {inf = ""} ;
|
||||
ProgRoot a n g => {inf = "" } ;
|
||||
PVForm => {inf = ""}
|
||||
};
|
||||
obj = {s = [] ; a = defaultAgr} ;
|
||||
subj = VIntrans ;
|
||||
inf = verb.inf;
|
||||
inf = "";
|
||||
ad = [];
|
||||
embComp = [];
|
||||
comp = \\_ => []
|
||||
} ;
|
||||
|
||||
Aux = {
|
||||
inf,ppart,prpart : Str
|
||||
} ;
|
||||
|
||||
auxBe : Aux = {
|
||||
inf = "" ;
|
||||
ppart = "" ;
|
||||
prpart = ""
|
||||
} ;
|
||||
|
||||
raha : VTense -> Aspect -> Gender -> Number -> NPerson -> {s:Str} = \t,a,g,n,p -> {
|
||||
s = case <t,a,g,n,p> of {
|
||||
<NPresent,Perf,Masc,Sg,Pers1> => "इरहन्" ;
|
||||
<_,_,_,_,_> => "इरहन्"
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
predProg : VPH -> VPH = \verb -> {
|
||||
s = \\vh =>
|
||||
case vh of {
|
||||
VF NPresent a pl p n g => {inf = (verb.s ! ProgRoot a n g).inf ++ copula CPrsnt pl n p g } ;
|
||||
VF (NPast _) a pl p n g => {inf = (verb.s ! ProgRoot a n g).inf ++ copula CPast pl n p g } ;
|
||||
VF (NFuture _) a pl p n g => {inf = (verb.s ! ProgRoot a n g).inf ++ copula CFuture pl n p g } ;
|
||||
Root => {inf = (verb.s ! Root).inf } ;
|
||||
VF NPresent a pl p n g => {inf = (verb.s ! ProgRoot a n g).inf ++ copulaPrGen pl n p g} ;
|
||||
VF (NPast _) a pl p n g => {inf = (verb.s ! ProgRoot a n g).inf ++ copulaPsGen pl n p g} ; --# notpresent
|
||||
VF (NFuture _) a pl p n g => {inf = (verb.s ! ProgRoot a n g).inf ++ copulaFtGen pl n p g} ; --# notpresent
|
||||
|
||||
Root => {inf = (verb.s ! Root).inf } ;
|
||||
Inf => {inf = (verb.s ! ProgRoot Imperf Sg Masc).inf } ;
|
||||
Imp => {inf = (verb.s ! Imp).inf } ;
|
||||
PVForm => {inf = (verb.s ! PVForm).inf } ;
|
||||
@@ -491,54 +315,49 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
|
||||
Clause : Type = {s : VPHTense => Polarity => Order => Str} ;
|
||||
|
||||
-- TODO, ERGATIVE CASE FROM NOUN INFLETION
|
||||
-- TODO, ERGATIVE CASE FROM NOUN INFLETION [No Proper grammer resource found]
|
||||
mkClause : NP -> VPH -> Clause = \np,vp -> {
|
||||
s = \\vt,b,ord =>
|
||||
let
|
||||
subjagr : NPCase * Agr = case vt of {
|
||||
VPSmplPast => case vp.subj of {
|
||||
VPSmplPast => case vp.subj of {
|
||||
VTrans => <NPErg, vp.obj.a> ;
|
||||
VTransPost => <NPErg, defaultAgr> ;
|
||||
_ => <NPC Nom, np.a>
|
||||
} ;
|
||||
} ;
|
||||
|
||||
VPPerfPast => case vp.subj of {
|
||||
VPPerfPast => case vp.subj of {
|
||||
VTrans => <NPErg, vp.obj.a> ;
|
||||
VTransPost => <NPErg, defaultAgr> ;
|
||||
_ => <NPC Nom, np.a>
|
||||
} ;
|
||||
|
||||
_ => <NPC Nom, np.a>
|
||||
} ;
|
||||
_ => <NPC Nom, np.a>
|
||||
} ;
|
||||
subj = subjagr.p1 ;
|
||||
agr = subjagr.p2 ;
|
||||
n = (fromAgr agr).n;
|
||||
p = (fromAgr agr).p;
|
||||
g = (fromAgr agr).g;
|
||||
vps = case <vt,b> of {
|
||||
<VPGenPres,Pos> => vp.s ! VF NPresent Imperf Pos p n g ;
|
||||
subj = subjagr.p1 ;
|
||||
agr = subjagr.p2 ;
|
||||
n = (fromAgr agr).n;
|
||||
p = (fromAgr agr).p;
|
||||
g = (fromAgr agr).g;
|
||||
vps = case <vt,b> of {
|
||||
<VPGenPres,Pos> => vp.s ! VF NPresent Imperf Pos p n g ;
|
||||
<VPGenPres,Neg> => vp.s ! VF NPresent Imperf Neg p n g ;
|
||||
<VPFut,Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<VPFut,Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g ;
|
||||
<VPSmplPast,Pos> => vp.s ! VF (NPast Simpl) Imperf Pos p n g ;
|
||||
<VPSmplPast,Neg> => vp.s ! VF (NPast Simpl) Imperf Neg p n g ;
|
||||
<VPFut,Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ; --# notpresent
|
||||
<VPFut,Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g ; --# notpresent
|
||||
<VPSmplPast,Pos> => vp.s ! VF (NPast Simpl) Imperf Pos p n g ; --# notpresent
|
||||
<VPSmplPast,Neg> => vp.s ! VF (NPast Simpl) Imperf Neg p n g ; --# notpresent
|
||||
|
||||
<VPPerfPres,Pos> => vp.s ! VF NPresent Perf Pos p n g ;
|
||||
<VPPerfPres,Neg> => vp.s ! VF NPresent Perf Neg p n g ;
|
||||
<VPPerfPast,Pos> => vp.s ! VF (NPast Simpl) Perf Pos p n g ;
|
||||
<VPPerfPast,Neg> => vp.s ! VF (NPast Simpl) Perf Neg p n g ;
|
||||
<VPPerfFut,Pos> => vp.s ! VF (NFuture Defin) Perf Pos p n g ;
|
||||
<VPPerfFut,Neg> => vp.s ! VF (NFuture Defin) Perf Neg p n g ;
|
||||
<VPPerfPast,Pos> => vp.s ! VF (NPast Simpl) Perf Pos p n g ; --# notpresent
|
||||
<VPPerfPast,Neg> => vp.s ! VF (NPast Simpl) Perf Neg p n g ; --# notpresent
|
||||
<VPPerfFut,Pos> => vp.s ! VF (NFuture Defin) Perf Pos p n g ; --# notpresent
|
||||
<VPPerfFut,Neg> => vp.s ! VF (NFuture Defin) Perf Neg p n g ; --# notpresent
|
||||
|
||||
<VPCondPres, Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<VPCondPres, Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g ;
|
||||
<VPCondPast, Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<VPCondPast, Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g
|
||||
{-
|
||||
<_, Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<_, Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g
|
||||
-}
|
||||
};
|
||||
<VPCondPast, Pos> => vp.s ! VF (NPast Hab) Perf Pos p n g ; --# notpresent
|
||||
<VPCondPast, Neg> => vp.s ! VF (NPast Hab) Perf Neg p n g --# notpresent
|
||||
} ;
|
||||
|
||||
quest =
|
||||
case ord of
|
||||
@@ -555,33 +374,29 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
\subj,agr,vp -> {
|
||||
s = \\t,b,ord =>
|
||||
let
|
||||
n = (fromAgr agr).n;
|
||||
p = (fromAgr agr).p;
|
||||
g = (fromAgr agr).g;
|
||||
vps = case <t,b> of {
|
||||
n = (fromAgr agr).n;
|
||||
p = (fromAgr agr).p;
|
||||
g = (fromAgr agr).g;
|
||||
vps = case <t,b> of {
|
||||
<VPGenPres,Pos> => vp.s ! VF NPresent Imperf Pos p n g ;
|
||||
<VPGenPres,Neg> => vp.s ! VF NPresent Imperf Neg p n g ;
|
||||
<VPFut,Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<VPFut,Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g ;
|
||||
<VPSmplPast,Pos> => vp.s ! VF (NPast Simpl) Imperf Pos p n g ;
|
||||
<VPSmplPast,Neg> => vp.s ! VF (NPast Simpl) Imperf Neg p n g ;
|
||||
<VPFut,Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ; --# notpresent
|
||||
<VPFut,Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g ; --# notpresent
|
||||
<VPSmplPast,Pos> => vp.s ! VF (NPast Simpl) Imperf Pos p n g ; --# notpresent
|
||||
<VPSmplPast,Neg> => vp.s ! VF (NPast Simpl) Imperf Neg p n g ; --# notpresent
|
||||
|
||||
<VPPerfPres,Pos> => vp.s ! VF NPresent Perf Pos p n g ;
|
||||
<VPPerfPres,Neg> => vp.s ! VF NPresent Perf Neg p n g ;
|
||||
<VPPerfPast,Pos> => vp.s ! VF (NPast Simpl) Perf Pos p n g ;
|
||||
<VPPerfPast,Neg> => vp.s ! VF (NPast Simpl) Perf Neg p n g ;
|
||||
<VPPerfFut,Pos> => vp.s ! VF (NFuture Defin) Perf Pos p n g ;
|
||||
<VPPerfFut,Neg> => vp.s ! VF (NFuture Defin) Perf Neg p n g ;
|
||||
<VPPerfPast,Pos> => vp.s ! VF (NPast Simpl) Perf Pos p n g ; --# notpresent
|
||||
<VPPerfPast,Neg> => vp.s ! VF (NPast Simpl) Perf Neg p n g ; --# notpresent
|
||||
<VPPerfFut,Pos> => vp.s ! VF (NFuture Defin) Perf Pos p n g ; --# notpresent
|
||||
<VPPerfFut,Neg> => vp.s ! VF (NFuture Defin) Perf Neg p n g ; --# notpresent
|
||||
|
||||
<VPCondPres, Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<VPCondPres, Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g ;
|
||||
<VPCondPast, Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<VPCondPast, Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g
|
||||
{-
|
||||
<_, Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<_, Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g
|
||||
-}
|
||||
};
|
||||
<VPCondPast, Pos> => vp.s ! VF (NPast Hab) Perf Pos p n g ; --# notpresent
|
||||
<VPCondPast, Neg> => vp.s ! VF (NPast Hab) Perf Neg p n g --# notpresent
|
||||
} ;
|
||||
|
||||
quest =
|
||||
case ord of
|
||||
@@ -590,112 +405,99 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
|
||||
in
|
||||
quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ vps.inf ++ vp.embComp
|
||||
-- quest ++ subj ++ vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vps.inf ++ vp.embComp
|
||||
--quest ++ subj ++ vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vps.inf ++ vp.embComp
|
||||
} ;
|
||||
{-
|
||||
insertSubj : PPerson -> Str -> Str = \p,s ->
|
||||
case p of { Pers1 => s ++ "ौण" ; _ => 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;
|
||||
comp = \\a => vp.comp ! a ++ obj1 ! a
|
||||
} ;
|
||||
|
||||
|
||||
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;
|
||||
comp = \\a => vp.comp ! a ++ obj1 ! a
|
||||
} ;
|
||||
|
||||
insertVV : {s:Agr => Str} -> VPH -> Str -> VPH -> VPH = \obj1,vp,emb,vp2 -> {
|
||||
s = vp.s ;
|
||||
-- obj = vp.obj ;
|
||||
obj = vp2.obj ;
|
||||
subj = vp.subj ;
|
||||
inf = vp.inf;
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp ++ emb;
|
||||
-- comp = \\a => vp.comp ! a ++ obj1.s ! a
|
||||
comp = \\a => obj1.s ! a ++ vp.comp ! a
|
||||
} ;
|
||||
s = vp.s ;
|
||||
obj = vp2.obj ;
|
||||
subj = vp.subj ;
|
||||
inf = vp.inf;
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp ++ emb;
|
||||
comp = \\a => obj1.s ! a ++ vp.comp ! a
|
||||
} ;
|
||||
|
||||
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;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
insertObj2 : (Str) -> VPH -> VPH = \obj1,vp -> {
|
||||
s = vp.s;
|
||||
obj = vp.obj ;
|
||||
subj = vp.subj ;
|
||||
inf = vp.inf;
|
||||
ad = vp.ad;
|
||||
embComp = Prelude.glue vp.embComp obj1;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
|
||||
insertObjc : (Agr => Str) -> VPHSlash -> VPHSlash = \obj,vp ->
|
||||
insertObj obj vp ** {c2 = vp.c2} ;
|
||||
insertObj obj vp ** {c2 = vp.c2} ;
|
||||
|
||||
insertObjc2 : Str -> VPHSlash -> VPHSlash = \obj,vp ->
|
||||
insertObj2 obj vp ** {c2 = vp.c2} ;
|
||||
insertObj2 obj vp ** {c2 = vp.c2} ;
|
||||
|
||||
infVP : Bool -> VPH -> {s:Agr => Str} = \isAux,vp ->
|
||||
{s= \\a => vp.obj.s ++ (vp.s! PVForm).inf ++ vp.comp ! a };
|
||||
{s= \\a => vp.obj.s ++ (vp.s ! PVForm).inf ++ vp.comp ! a };
|
||||
|
||||
infVV : VPH -> {s:Agr => Str} = \vp -> {
|
||||
s = \\ agr => vp.comp ! agr ++ (vp.s ! PVForm) . inf
|
||||
s = \\ agr => vp.comp ! agr ++ (vp.s ! PVForm).inf
|
||||
} ;
|
||||
|
||||
|
||||
infV2V : VPH -> {s :Agr => Str} = \vp -> {
|
||||
s = \\agr => vp.comp ! agr ++ (vp.s ! PVForm).inf --++ "लाइ"
|
||||
s = \\agr => vp.comp ! agr ++ (vp.s ! PVForm).inf -- ++ "लाइ"
|
||||
} ;
|
||||
|
||||
insertObject : NP -> VPHSlash -> VPH = \np,vps -> {
|
||||
s = vps.s ;
|
||||
obj = {s = np.s ! objVType vps.c2.c ++ vps.c2.s ++ vps.obj.s ; a = np.a} ;
|
||||
-- obj = {s = vps.obj.s ; a = np.a} ;
|
||||
--_ => {s = vps.obj.s ++ np.s ! objVType vps.c2.c ; a = np.a}
|
||||
---};
|
||||
obj = {s = np.s ! objVType vps.c2.c ++ vps.c2.s ++ vps.obj.s ; a = np.a} ;
|
||||
subj = vps.c2.c ;
|
||||
inf = vps.inf;
|
||||
ad = vps.ad;
|
||||
embComp = vps.embComp;
|
||||
comp = vps.comp
|
||||
-- comp = \\a => vps.comp ! a ++ np.s ! (objVType vps.c2.c) ++ vps.c2.s
|
||||
} ;
|
||||
|
||||
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;
|
||||
comp = \\a => obj ! a ++ vp.c2.s ++ vp.comp ! a
|
||||
} ;
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
inf = vp.inf ;
|
||||
subj = vp.subj ;
|
||||
ad = vp.ad ;
|
||||
embComp = vp.embComp;
|
||||
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;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
inf = vp.inf ;
|
||||
subj = vp.subj;
|
||||
ad = vp.ad ++ ad ;
|
||||
embComp = vp.embComp;
|
||||
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;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
inf = vp.inf ;
|
||||
subj = vp.subj;
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp ++ emb;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
|
||||
insertTrans : VPH -> VType -> VPH = \vp,vtype -> {
|
||||
s = vp.s ;
|
||||
@@ -710,4 +512,128 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
embComp = vp.embComp ;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
}
|
||||
|
||||
-- copula cases
|
||||
oper
|
||||
-- For Human, occupation/Introductiary case
|
||||
copulaPrLvng : Polarity -> Number -> NPerson -> Gender -> Str =
|
||||
\po,n,pn,g ->
|
||||
case <po,pn,n,g> of {
|
||||
-- Resembles with 'mkVPreNPReg' function for positive --TODO
|
||||
-- Present Positive
|
||||
<Pos, Pers1, Sg, _> => "हुँ" ; -- हुँ
|
||||
<Pos, Pers1, Pl, _> => "हौँ" ; -- हौँ
|
||||
<Pos, Pers2_L, Sg, _> => "होस्" ; -- होस्
|
||||
--<Pos, Pers2_L, Sg, Fem> => "होस्" ; -- छेस्
|
||||
<Pos, Pers2_L, Pl, _> => "हौ" ; -- हौ
|
||||
--<Pos, Pers2_M, Pl, Fem> => "छ्यौ" ; -- छ्यौ
|
||||
<Pos, Pers2_M, _, _> => "हौ" ; -- हौ
|
||||
<Pos, Pers3_L, Sg, Masc> => "हो" ; -- हो
|
||||
<Pos, Pers3_L, Sg, Fem> => "हुन्" ; -- हुन्
|
||||
<Pos, Pers3_L, Pl, _> => "हुन्" ; -- हुन्
|
||||
--<Pos, Pers3_M, Sg, Fem> => "हुन्" ; -- हुन्
|
||||
<Pos, Pers3_M, _, _> => "हुन्" ; -- हुन् --"हौ" ; -- हौ
|
||||
<Pos, _ , _, _> => "हुनुहुन्छ" ; --हुनुहुन्छ
|
||||
|
||||
-- Present Negative
|
||||
<Neg, Pers1, Sg, _> => "हैन" ; --
|
||||
<Neg, Pers1, Pl, _> => "हैनौं" ; -- हैनौं
|
||||
<Neg, Pers2_L, Sg, _> => "हैनस्" ; -- हैनस्
|
||||
<Neg, Pers2_L, Pl, _> => "हैनौ" ; -- हैनौ
|
||||
<Neg, Pers2_M, _, _> => "हैनौ" ; -- हैनौ
|
||||
<Neg, Pers3_L, Sg, _> => "हैन" ; --हैन
|
||||
<Neg, Pers3_L, Pl, _> => "हैनन्" ; -- हैनन्
|
||||
<Neg, Pers3_M, _, _> => "हैनन्" ; -- हैनन्
|
||||
<Neg, _, _, _> => "हुनुहुन्न" -- हुनुहुन्न
|
||||
} ;
|
||||
|
||||
copulaPrGen : Polarity -> Number -> NPerson -> Gender -> Str =
|
||||
\po,n,pn,g ->
|
||||
case <po,pn,n,g> of {
|
||||
<Pos, Pers1, Sg, _> => "छु" ; -- छु
|
||||
<Pos, Pers1, Pl, _> => "छौं" ; -- छौं
|
||||
<Pos, Pers2_L, Sg, Masc> => "छस्" ; -- छस्
|
||||
<Pos, Pers2_L, Sg, Fem> => "छेस्" ; -- छेस्
|
||||
<Pos, Pers2_L, Pl, _> => "छौ" ; -- छौ
|
||||
<Pos, Pers2_M, Pl, Fem> => "छ्यौ" ; -- छ्यौ
|
||||
<Pos, Pers2_M, _, _> => "छौ" ; -- छौ
|
||||
<Pos, Pers3_L, Sg, Masc> => "छ" ; -- छ
|
||||
<Pos, Pers3_L, Sg, Fem> => "छे" ; -- छे
|
||||
<Pos, Pers3_L, Pl, _> => "छन्" ; -- छन्
|
||||
<Pos, Pers3_M, Sg, Fem> => "छिन्" ; -- छिन्
|
||||
<Pos, Pers3_M, _, _> => "छन्" ; -- छन्
|
||||
<Pos, _ , _, _> => "हुनुहुन्छ" ; --हुनुहुन्छ
|
||||
|
||||
-- Present Negative
|
||||
<Neg, Pers1, Sg, _> => "छैनँ" ; -- छैनँ
|
||||
<Neg, Pers1, Pl, _> => "छैनौं" ; -- छैनौं
|
||||
<Neg, Pers2_L, Sg, _> => "छैनस्" ; -- छैनस्
|
||||
<Neg, Pers2_L, Pl, _> => "छैनौ" ; -- छैनौ
|
||||
<Neg, Pers2_M, _, _> => "छैनौ" ; -- छैनौ
|
||||
<Neg, Pers3_L, Sg, _> => "छैन" ; --छैन
|
||||
<Neg, Pers3_L, Pl, _> => "छैनन्" ; -- छैनन्
|
||||
<Neg, Pers3_M, _, _> => "छैनन्" ; -- छैनन्
|
||||
<Neg, _, _, _> => "हुनुहुन्न" -- हुनुहुन्न
|
||||
} ;
|
||||
|
||||
copulaPsGen : Polarity -> Number -> NPerson -> Gender -> Str =
|
||||
\po,n,pn,g ->
|
||||
case <po,pn,n,g> of {
|
||||
-- Past Positive
|
||||
<Pos, Pers1, Sg, _> => "थिएँ" ; -- थिएँ
|
||||
<Pos, Pers1, Pl, _> => "थियौँ" ; -- थियौँ
|
||||
<Pos, Pers2_L, Sg, _> => "थिइस्" ; -- थिइस्
|
||||
<Pos, Pers2_L, Pl, _> => "थियौ" ; -- थियौ
|
||||
<Pos, Pers2_M, _, _> => "थियौ" ; -- थियौ
|
||||
<Pos, Pers3_L, Sg, Masc> => "थियो" ; -- थियो
|
||||
<Pos, Pers3_L, Sg, Fem> => "थिई" ; --थिई
|
||||
<Pos, Pers3_L, Pl, _> => "थिए" ; -- थिए
|
||||
<Pos, Pers3_M, Sg, Fem> => "थिइन्" ; -- थिइन्
|
||||
<Pos, Pers3_M, _, _> => "थिए" ; -- थिए
|
||||
<Pos, _, _, _> => "हुनुहुन्थ्यो" ; -- हुनुहुन्थ्यो
|
||||
|
||||
-- Past Positive
|
||||
<Neg, Pers1, Sg, _> => "थिनँ" ; -- थिनँ
|
||||
<Neg, Pers1, Pl, _> => "थेनौं" ; -- थेनौं
|
||||
<Neg, Pers2_L, Sg, _> => "थिनस्" ; -- थिनस्
|
||||
<Neg, Pers2_L, Pl, _> => "थेनौ" ; -- थेनौ
|
||||
<Neg, Pers2_M, _, _> => "थेनौ" ; -- थेनौ
|
||||
<Neg, Pers3_L, Sg, Masc> => "थेन" ; -- थेन
|
||||
<Neg, Pers3_L, Sg, Fem> => "थिन" ; --थिन
|
||||
<Neg, Pers3_L, Pl, _> => "थेनन्" ; -- थेनन्
|
||||
<Neg, Pers3_M, Sg, Fem> => "थिनन्" ; -- थिनन्
|
||||
<Neg, Pers3_M, _, _> => "थेनन्" ; -- थेनन्
|
||||
<Neg, _, _, _> => "हुनुहुन्नथ्यो" -- हुनुहुन्नथ्यो
|
||||
} ;
|
||||
|
||||
|
||||
copulaFtGen : Polarity -> Number -> NPerson -> Gender -> Str =
|
||||
\po,n,pn,g ->
|
||||
case <po,pn,n,g> of {
|
||||
-- Future Positive
|
||||
<Pos, Pers1, Sg, _> => "हुनेछु" ; -- हुनेछु
|
||||
<Pos, Pers1, Pl, _> => "हुनेछौं" ; -- हुनेछौं
|
||||
<Pos, Pers2_L, Sg, _> => "हुनेछस्" ; -- हुनेछस्
|
||||
<Pos, Pers2_L, Pl, _> => "हुनेछौं" ; -- हुनेछौ
|
||||
<Pos, Pers2_M, _, _> => "हुनेछौं" ; -- हुनेछौ
|
||||
<Pos, Pers3_L, Sg, _> => "हुनेछ" ; -- हुनेछ
|
||||
<Pos, Pers3_L, Pl, _> => "हुनेछन्" ; -- हुनेछन्
|
||||
<Pos, Pers3_M, _, Masc> => "हुनेछन्" ; -- हुनेछन्
|
||||
<Pos, Pers3_M, Sg, Fem> => "हुनेछन्" ; -- हुनेछिन्
|
||||
<Pos, Pers3_M, Pl, Fem> => "हुनेछन्" ; -- हुनेछन्
|
||||
<Pos, _, _, _> => "हुनुहुनेछ" ; -- हुनुहुनेछ
|
||||
|
||||
-- Negative Case
|
||||
<Neg, Pers1, Sg, _> => "हुनेछैन" ; -- हुनेछैन
|
||||
<Neg, Pers1, Pl, _> => "हुनेछैनैँ" ; -- हुनेछैनैँ
|
||||
<Neg, Pers2_L, Sg, _> => "हुनेछैनस्" ; -- हुनेछैनस्
|
||||
<Neg, Pers2_L, Pl, _> => "हुनेछैनै" ; -- हुनेछैनै
|
||||
<Neg, Pers2_M, _, _> => "हुनेछैनै" ; -- हुनेछैनै
|
||||
<Neg, Pers3_L, Sg, _> => "हुनेछैन्" ; -- हुनेछैन्
|
||||
<Neg, Pers3_L, Pl, _> => "हुनेछैनन्" ; -- हुनेछैनन्
|
||||
<Neg, Pers3_M, Sg, _> => "हुनेछैनन्" ; -- हुनेछैनन्
|
||||
<Neg, Pers3_M, Pl, _> => "हुनेछैनै" ; -- हुनेछैनै
|
||||
<Neg, _, _, _> => "हुनुहुनेछैन्" -- हुनुहुनेछैन्
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ concrete SentenceNep of Sentence = CatNep ** open Prelude, ResNep in {
|
||||
ImpVP vp = {
|
||||
s = \\pol,n =>
|
||||
let
|
||||
agr = Ag Masc (numImp n) Pers2_M ;
|
||||
verb = vp.obj.s ++ (vp.s! PVForm).inf ++ vp.comp ! agr ;
|
||||
agr = Ag Masc (numImp n) Pers2_M ;
|
||||
verb = vp.obj.s ++ (vp.s ! Root).inf ++ vp.comp ! agr ;
|
||||
dont = case pol of {
|
||||
CNeg True => "नगर" ;
|
||||
CNeg False => "नगर" ;
|
||||
@@ -52,7 +52,7 @@ concrete SentenceNep of Sentence = CatNep ** open Prelude, ResNep in {
|
||||
<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 ! VPCondPres ! p.p ! ODir;
|
||||
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VPCondPast ! p.p ! ODir -- this needs to be fixed by making SubjPerf in ResPnb
|
||||
<Cond,Anter> => temp.s ++ p.s ++ cl.s ! VPCondPast ! p.p ! ODir
|
||||
|
||||
};
|
||||
} ;
|
||||
|
||||
@@ -25,9 +25,9 @@ concrete StructuralNep of Structural = CatNep **
|
||||
can8know_VV,can_VV = mkV "सक्नु" ** { isAux = True} ;
|
||||
during_Prep = mkPrep "पर्यान्त" ; -- पर्यान्त
|
||||
either7or_DConj = sd2 "अथवा" "या" ** {n = Sg} ; -- अथवा , या
|
||||
everybody_NP = MassNP (UseN (regN "सवौ जाना")) ; -- not a good way coz need to include Noun (सवौ जाना)
|
||||
everybody_NP = MassNP (UseN (regN "सवौ जाना" Living)) ; -- not a good way coz need to include Noun (सवौ जाना)
|
||||
every_Det = mkDet "सबै" "हरेक" Sg ; -- सबै, हरेक
|
||||
everything_NP = MassNP (UseN (regN "हारेक कुरा")) ; -- हारेक कुरा
|
||||
everything_NP = MassNP (UseN (regN "हारेक कुरा" NonLiving)) ; -- हारेक कुरा
|
||||
everywhere_Adv = mkAdv "जाता ततै" ; -- जाता ततै
|
||||
few_Det = mkDet "थोरै" "अलिकती" Pl ; -- थोरै, अलिकती
|
||||
-- d first_Ord = {s = "पेहला" ; n = Sg} ; --DEPRECATED
|
||||
@@ -49,7 +49,7 @@ concrete StructuralNep of Structural = CatNep **
|
||||
here7from_Adv = mkAdv ["यहाँ बाट"] ; -- यहाँ बाट
|
||||
how_IAdv = ss "कसरी" ; -- कसरी
|
||||
how8much_IAdv = ss "कती" ; -- कती
|
||||
--how8many_IDet = mkDet "कती वटा" "कती वटी" Pl ; -- काती वटा, कती वटी (incase of humans it becomes, 'kati jana') NEEDS FIX
|
||||
how8many_IDet = mkIDetn "कती वटा" "कती वटी" Pl ; -- काती वटा, कती वटी (incase of humans it becomes, 'kati jana') NEEDS FIX
|
||||
if_Subj = ss "यदि" ; -- यदि
|
||||
in8front_Prep = mkPrep "सामु" ; -- सामु
|
||||
in_Prep = mkPrep "मा" ; -- मा
|
||||
@@ -84,10 +84,10 @@ concrete StructuralNep of Structural = CatNep **
|
||||
possess_Prep = mkPrep "धारणा गर्नु" ; -- धारणा गर्नु
|
||||
quite_Adv = ss "एकदम" ; -- एकदम
|
||||
so_AdA = mkAdA "यस कारण" ; -- यस कारण ???? NEED TO CHECK
|
||||
somebody_NP = MassNP (UseN (regN "कोही")); -- कोही
|
||||
somebody_NP = MassNP (UseN (regN "कोही" Living)); -- कोही
|
||||
someSg_Det = mkDet "कोही" "केही" Sg ;
|
||||
somePl_Det = mkDet "कोही" "केही" Pl ;
|
||||
something_NP = MassNP (UseN (regN "केही कुरा")) ;
|
||||
something_NP = MassNP (UseN (regN "केही कुरा" NonLiving)) ;
|
||||
somewhere_Adv = mkAdv "कहीं" ; -- कहीं
|
||||
that_Quant = mkQuant "त्ये" "यिनीहरु" ;
|
||||
that_Subj = ss "त्यो"; -- त्यो
|
||||
@@ -123,7 +123,7 @@ concrete StructuralNep of Structural = CatNep **
|
||||
at_least_AdN = mkAdN "कमसेकम" ; -- कमसेकम
|
||||
at_most_AdN = mkAdN "बढीमा" ; -- बढीमा
|
||||
nothing_NP = MassNP (UseN (regN "केही पनी")) ; -- केही पनी
|
||||
nobody_NP = MassNP (UseN (regN "केही पनी")) ; --कोही पनी
|
||||
nobody_NP = MassNP (UseN (regN "केही पनी" living)) ; --कोही पनी
|
||||
except_Prep = mkPrep "बाहेक" ; -- बाहेक
|
||||
as_CAdv = {s = "जत्तीकै" ; p = ""} ; -- जत्तीकै
|
||||
have_V2 = mkV2 (mkV "हुनु") "" ; -- हुनु
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
--# -path=.:alltenses:prelude
|
||||
|
||||
instance SyntaxNep of Syntax =
|
||||
ConstructorsNep, CatNep, StructuralNep, CombinatorsNep ;
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
{-
|
||||
-- layout for unicode Nepali format, based on
|
||||
-- http://mpp.org.np/index.php?option=com_docman&task=cat_view&gid=18&Itemid=63
|
||||
-- keys like /, {, }.. are replaced by ([x]:) letters
|
||||
-- http://jrgraphix.net/r/Unicode/0900-097F
|
||||
-}
|
||||
transNepali :: Transliteration
|
||||
transNepali = mkTransliteration "Nepali" allTrans allCodes where
|
||||
allTrans = words $
|
||||
"z+ z= " ++
|
||||
"- V M h: - H A i: I: f F Z - - - e: " ++
|
||||
"E: - - O W k K g G n: C c j J Y q " ++
|
||||
"Q x X N t T d D n - p P b B m y " ++
|
||||
"r - l L - v S z s h - - ~ ` a i " ++
|
||||
"I u U R - - - e E - - o w x: - - " ++
|
||||
"O: - _ - - - - - - - - - - - - - " ++
|
||||
"- - - - . > 0 1 2 3 4 5 6 7 8 9 " ++
|
||||
"- - - - - - - - - - - - - - - - "
|
||||
allCodes = [0x200c,0x200d] ++ [0x0900 .. 0x097f]
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
--# -path=.:alltenses:prelude:./abstract
|
||||
resource TryNep = SyntaxNep - [mkAdN] , LexiconNep, ParadigmsNep - [mkAdv,mkDet,mkIP,mkAdN] **
|
||||
open (P = ParadigmsNep) in {
|
||||
|
||||
oper
|
||||
|
||||
mkAdv = overload SyntaxNep {
|
||||
mkAdv : Str -> Adv = P.mkAdv ;
|
||||
} ;
|
||||
|
||||
mkAdN = overload {
|
||||
mkAdN : CAdv -> AdN = SyntaxNep.mkAdN ;
|
||||
--- mkAdN : Str -> AdN = P.mkAdN ;
|
||||
} ;
|
||||
|
||||
-- mkOrd = overload SyntaxNep {
|
||||
-- mkOrd : A -> Ord = SyntaxNep.OrdSuperl ;
|
||||
-- } ;
|
||||
|
||||
|
||||
}
|
||||
@@ -4,40 +4,41 @@ concrete VerbNep of Verb = CatNep ** open ResNep in {
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
UseV v = predV v ;
|
||||
|
||||
SlashV2a v = predV v ** {c2 = {s = v.c2.s ; c = VTrans}} ;
|
||||
UseV v = predV v ;
|
||||
|
||||
-- use of these two functions
|
||||
Slash2V3 v np =
|
||||
insertObjc (\\_ => np.s ! NPObj ++ v.c3 ) (predV v ** {c2 = {s = v.c2 ; c = VTrans}}) ; -- NEEDS CHECKING
|
||||
|
||||
Slash3V3 v np =
|
||||
insertObjc (\\_ => np.s ! NPC Nom ++ v.c3) (predV v ** {c2 = {s = v.c2 ; c = VTrans}}) ;
|
||||
|
||||
|
||||
ComplVV v vp = insertTrans (insertVV (infVV vp) (predV v) vp.embComp vp) vp.subj ;
|
||||
ComplVV v vp = insertTrans (insertVV (infVV vp) (predV v) vp.embComp vp) vp.subj ;
|
||||
|
||||
ComplVS v s = insertTrans (insertObj2 (conjThat ++ s.s) (predV v)) VTransPost ;
|
||||
|
||||
ComplVS v s = insertTrans (insertObj2 (conjThat ++ s.s) (predV v)) VTransPost ;
|
||||
|
||||
ComplVQ v q = insertObj2 (conjThat ++ q.s ! QIndir) (predV v) ;
|
||||
|
||||
-- Need check for 'bhayo' inflection (past)
|
||||
-- cc -all PredVP (MassNP (UseN cat_N)) (ComplVA become_VA (PositA red_A))
|
||||
|
||||
ComplVA v ap = insertObj (\\a => ap.s ! giveNumber a ! giveGender a) (predV v) ;
|
||||
|
||||
--cc -table PredVP (MassNP (UseN cat_N)) (ComplSlash (SlashV2V beg_V2V (UseV sleep_V)) (MassNP (UseN dog_N)))
|
||||
SlashV2V v vp = insertVV (infV2V vp) (predV v) vp.embComp vp ** {c2 = {s = v.c1 ; c = VTrans}} ; -- 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
|
||||
|
||||
|
||||
SlashV2a v = predV v ** {c2 = {s = v.c2.s ; c = VTrans}} ;
|
||||
-- use of these two functions
|
||||
Slash2V3 v np =
|
||||
insertObjc (\\_ => np.s ! NPC Acc ++ v.c3 ) (predV v ** {c2 = {s = v.c2 ; c = VTrans}}) ; -- NEEDS CHECKING
|
||||
|
||||
Slash3V3 v np =
|
||||
insertObjc (\\_ => np.s ! NPC Acc ++ v.c3) (predV v ** {c2 = {s = v.c2 ; c = VTrans}}) ;
|
||||
|
||||
|
||||
-- Check for the use of 'Acc' case of noun instead of adding 'lai' and 'sanga' later
|
||||
SlashV2V v vp = insertVV (infV2V vp) (predV v) vp.embComp vp ** {c2 = {s = v.c1 ; c = VTrans}} ;
|
||||
|
||||
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
|
||||
|
||||
-- cc -table PredVP (MassNP (UseN cat_N)) (ComplSlash (SlashV2A paint_V2A (PositA red_A)) (MassNP (UseN dog_N)))
|
||||
SlashV2Q v q = insertObjc2 (conjThat ++ q.s ! QIndir) (predV v ** {c2 = {s = "सँग" ; c = VTransPost}}) ;
|
||||
|
||||
SlashV2A v ap = insertObjc (\\a => ap.s ! giveNumber a ! giveGender a ) (predV v ** {c2 = {s = v.c2.s ; c = VTrans}}) ;
|
||||
|
||||
|
||||
|
||||
ComplSlash vp np = insertObject np vp ;
|
||||
|
||||
|
||||
SlashVV vv vp =
|
||||
insertEmbCompl (insertObj (infVP vv.isAux vp).s (predV vv)) vp.embComp **
|
||||
{c2 = vp.c2} ;
|
||||
@@ -47,27 +48,30 @@ concrete VerbNep of Verb = CatNep ** open ResNep in {
|
||||
(insertObjc (infVP vv.isAux vp).s (predVc vv)) **
|
||||
{c2 = vp.c2} ;
|
||||
|
||||
-- cc -table PredVP (MassNP (UseN cat_N)) (UseComp (CompAdv there_Adv))
|
||||
UseComp comp = insertObj comp.s (predAux auxBe) ;
|
||||
|
||||
-- cc -table PredVP (MassNP (UseN cat_N)) (AdvVP (UseV sleep_V) there_Adv)
|
||||
AdvVP vp adv = insertObj (\\_ => adv.s ) vp ;
|
||||
|
||||
-- cc -table PredVP (MassNP (UseN cat_N)) (AdVVP always_AdV (UseV sleep_V))
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
|
||||
-- cc -table PredVP (MassNP (UseN cat_N)) (ReflVP (SlashV2a eat_V2))
|
||||
ReflVP v = insertObjPre (\\_ => reflPron) v ;
|
||||
UseComp comp = insertObj comp.s (predAux comp.t) ;
|
||||
|
||||
|
||||
PassV2 v = predV v ; -- need to be fixed
|
||||
|
||||
CompAP ap = {s = \\a => ap.s ! giveNumber a ! giveGender a } ;
|
||||
|
||||
CompNP np = {s = \\_ => np.s ! NPObj} ;
|
||||
CompCN cn = {s = \\a => cn.s ! giveNumber a ! Nom} ;
|
||||
|
||||
-- cc -table PredVP (MassNP (UseN cat_N)) (UseComp (CompAdv there_Adv))
|
||||
CompAdv adv = {s = \\a => adv.s } ;
|
||||
|
||||
AdvVP vp adv = insertObj (\\_ => adv.s ) vp ;
|
||||
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
|
||||
|
||||
AdvVPSlash vp ad = insertObj (\\_ => ad.s ) vp ** {c2 = vp.c2} ;
|
||||
AdVVPSlash ad vp = insertObj (\\_ => ad.s ) vp ** {c2 = vp.c2} ;
|
||||
|
||||
|
||||
CompAP ap = {s = \\a => ap.s ! giveNumber a ! giveGender a ; t = NonLiving} ;
|
||||
|
||||
CompNP np = {s = \\_ => np.s ! NPObj; t = np.t} ;
|
||||
|
||||
CompAdv adv = {s = \\a => adv.s ; t = NonLiving} ;
|
||||
|
||||
CompCN cn = {s = \\a => cn.s ! giveNumber a ! Nom ; t = cn.t} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -9,18 +9,20 @@ concrete IdiomNep of Idiom = CatNep ** open Prelude,Predef, ResNep in {
|
||||
GenericCl vp = mkSClause "kohI" (agrP3 Masc Sg) vp ;
|
||||
|
||||
CleftNP np rs =
|
||||
let cl = mkSClause (np.s ! NPC rs.c) (np.a) (predAux auxBe);
|
||||
let cl = mkSClause (np.s ! NPC rs.c) (np.a) (predAux np.t);
|
||||
|
||||
in
|
||||
{s = \\t,p,o => cl.s ! t ! p ! o ++ rs.s ! np.a };
|
||||
|
||||
CleftAdv ad ss = { s = \\t,b,o => ad.s ++ ss.s};
|
||||
|
||||
ExistNP np =
|
||||
ExistNP np =
|
||||
mkSClause "tx:yhaV" (agrP3 (fromAgr np.a).g (fromAgr np.a).n) -- त्यहाँ
|
||||
(insertObj (\\_ => np.s ! NPC Nom) (predAux auxBe)) ;
|
||||
(insertObj (\\_ => np.s ! NPC Nom) (predAux np.t)) ;
|
||||
|
||||
ExistIP ip =
|
||||
let cl = mkSClause ("junx:" ++ ip.s ! Nom) (agrP3 Masc ip.n) (predAux auxBe) ; -- जुन्
|
||||
--let cl = mkSClause ("junx:" ++ ip.s ! Nom) (agrP3 Masc ip.n) (predAux auxBe) ; -- जुन्
|
||||
let cl = mkSClause ("tx:yhaV" ++ ip.s ! Nom) (agrP3 Masc ip.n) (predAux NonLiving) ; -- त्यहाँ
|
||||
in {
|
||||
s = \\t,p,qf => case qf of {
|
||||
QDir => cl.s ! t ! p ! ODir;
|
||||
@@ -31,9 +33,8 @@ concrete IdiomNep of Idiom = CatNep ** open Prelude,Predef, ResNep in {
|
||||
|
||||
ProgrVP vp = (predProg vp) ;
|
||||
|
||||
|
||||
ImpPl1 vp = {s = vp.obj.s ++ (vp.s ! ResNep.Imp).inf ++ vp.comp ! (agrP1 Masc Pl)} ;
|
||||
|
||||
ImpP3 np vp = {s = np.s!NPC Nom ++ "lai:" ++ (vp.s ! PVForm ).inf ++ "def"} ;
|
||||
--ImpP3 np vp = {s = np.s ! NPC Nom ++ "lai:" ++ (vp.s ! PVForm ).inf ++ "def"} ;
|
||||
ImpP3 np vp = {s = np.s ! NPC Acc ++ (vp.s ! PVForm ).inf ++ "def"} ;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,17 @@
|
||||
-- mkNF - Femenine Nouns
|
||||
-- mkNUN - Uncountable Nouns
|
||||
|
||||
-- In noun cases if you don't provide any parameter
|
||||
-- Here is the default forms it takes
|
||||
{-
|
||||
-- Default animacy : nonliving (inanimate)
|
||||
-- Default Honorific form : 3rd Person Low grade Honorofic(Pers3_L)
|
||||
-- Default gender : masculine
|
||||
-- human/profession/living : Living
|
||||
-}
|
||||
-- ParadigmsNep for details
|
||||
|
||||
|
||||
concrete LexiconNep of Lexicon = CatNep **
|
||||
open ParadigmsNep, MorphoNep, Prelude in {
|
||||
|
||||
@@ -18,7 +29,7 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
apple_N = regN "sx:yaF"; -- स्याऊ
|
||||
art_N = regN "kla" ; -- कला
|
||||
ask_V2Q = mkV2 (mkV "soDx:nu") ; -- सोध्नु
|
||||
baby_N = regN "bCx:Ca" ; -- बच्चा
|
||||
baby_N = regN "bCx:Ca" living ; -- बच्चा
|
||||
bad_A = mkA "Krab" ; -- खराब
|
||||
bank_N = regN "bx:yan:x:k" ; -- ब्याङ्क
|
||||
beautiful_A = mkA "ramx:ro" ; -- राम्रो
|
||||
@@ -27,18 +38,18 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
beg_V2V = mkV2V (compoundV "Agx:rh" do_V2) lai "" False ; -- आग्रह
|
||||
big_A = mkA "Qulo" ; -- ठुलो
|
||||
bike_N = regN "sai:kl" ; --साइकल
|
||||
bird_N = regN "Cra" ; -- चरा
|
||||
bird_N = regN "Cra" living ; -- चरा
|
||||
black_A = mkA "kalo" ; -- कालो
|
||||
blue_A = mkA "nilo" ; -- निलो
|
||||
boat_N = regN "xun:x:ga" ; -- डुङ्गा
|
||||
book_N = regN "kitab" ; -- किताब
|
||||
boot_N = regN "jutx:ta" ; -- जुत्ता
|
||||
boss_N = regN "hakim" ; -- हाकिम
|
||||
boy_N = regN "keqa" ; -- केटा
|
||||
boot_N = regN "jutx:ta"; -- जुत्ता
|
||||
boss_N = regN "hakim" human Pers3_H ; -- हाकिम
|
||||
boy_N = regN "keqa" human; -- केटा
|
||||
bread_N = regN "roqI" ; -- रोटी
|
||||
break_V2 = mkV2 (mkV "BaVCx:nu") ; -- भाँच्नु
|
||||
broad_A = mkA "Prakilo" ; -- फराकिलो
|
||||
brother_N2 = mkN2 (regN "daju") (mkPrep "ko") "" ;
|
||||
brother_N2 = mkN2 (regN "daju" human Pers3_H) (mkPrep "ko") "";
|
||||
brown_A = mkA "KEro" ; -- खैरो
|
||||
butter_N = mkNUC "nwnI" feminine; -- नौनी
|
||||
buy_V2 = mkV2 (mkV "kinx:nu"); -- किन्नु
|
||||
@@ -49,8 +60,8 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
cat_N = regN "biralo" ; -- बिरालो
|
||||
ceiling_N = regN "ct" ; -- छत
|
||||
chair_N = regN "kurx:sI" ; -- कुर्सी
|
||||
cheese_N = mkNF "Cij"; --चिज
|
||||
child_N = regN "bCx:Ca" ; -- बच्चा
|
||||
cheese_N = mkNF "Cij" ; --चिज
|
||||
child_N = regN "bCx:Ca" living ; -- बच्चा
|
||||
church_N = regN "girx:jaGr" ; -- चर्च , गिर्जाघर
|
||||
city_N = regN "Shr" ; -- शहर
|
||||
clean_A = mkA "sPa" ; -- सफा
|
||||
@@ -62,31 +73,31 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
computer_N = regN "kmx:px:yuqr" ; -- कम्प्युटर
|
||||
country_N = regN "deS" ; -- देश
|
||||
cousin_N = regN "kaka" ; -- काका
|
||||
cow_N = regN "gaI:" ; -- गाई
|
||||
cow_N = mkNF "gaI:" living Pers3_M ; -- गाई
|
||||
die_V = mkV "mrx:nu" ; -- मर्नु
|
||||
dirty_A = mkA "Pohor" ; -- फोहोर
|
||||
distance_N3 = mkN3 (regN "durI") (mkPrep "deKi") (mkPrep "smx:m") "ko" ; -- दुरी, देखी, सम्म, त्यहाँ
|
||||
doctor_N = regN "xakx:qr" ; -- डाक्टर, | Cikitx:sk - चिकित्सक
|
||||
dog_N = regN "kukur" ; -- कुकुर
|
||||
doctor_N = regN "xakx:qr" profession Pers3_H ; -- डाक्टर, / Cikitx:sk - चिकित्सक
|
||||
dog_N = regN "kukur" living; -- कुकुर
|
||||
door_N = regN "Xoka" ; -- ढोका
|
||||
drink_V2 = mkV2 (mkV "pifnu") ; -- पिउनु
|
||||
--easy_A2V = mkA "sjIlo" ; -- सजीलो
|
||||
eat_V2 = mkV2 (mkV "Kanu") "" ; -- खानु
|
||||
empty_A = mkA "KalI" ; -- खाली
|
||||
enemy_N = regN "Stx:ru" ; -- शत्रु
|
||||
enemy_N = regN "Stx:ru" living ; -- शत्रु
|
||||
factory_N = regN "karKana" ; -- कारखाना
|
||||
father_N2 = mkN2 (regN "buba") (mkPrep "ko") "" ; -- बुबा, बाबु
|
||||
father_N2 = mkN2 (regN "buba" living Pers3_H) (mkPrep "ko") "" ; -- बुबा, बाबु
|
||||
fear_VS = mkV "xrafnu"; -- डराउनु
|
||||
find_V2 = mkV2 (mkV "pafnu") ; -- पाउनु
|
||||
fish_N = regN "maca" ; -- माछा
|
||||
fish_N = regN "maca" living ; -- माछा
|
||||
floor_N = regN "BuVI:" ; -- भुँई
|
||||
forget_V2 = mkV2 (mkV "birx:snu") ; -- बिर्सनु
|
||||
fridge_N = regN "Px:rij" ; -- फ्रिज
|
||||
friend_N = regN "saTI" ; -- साथी
|
||||
friend_N = regN "saTI" living Pers3_M ; -- साथी
|
||||
fruit_N = regN "Pl" ; -- फल
|
||||
--fun_AV = mkAdV "rmai:lo" ; -- रमाइलो
|
||||
garden_N = regN "bgEVCa" ; -- बगैँचा
|
||||
girl_N = mkNF "keqI" ; -- केटी
|
||||
girl_N = mkNF "keqI" living ; -- केटी
|
||||
glove_N = regN "pYx:ja"; -- पञ्जा
|
||||
gold_N = regN "sun" ; -- सुन
|
||||
good_A = mkA "ramx:ro" ; -- राम्रो
|
||||
@@ -99,13 +110,13 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
hear_V2 = mkV2 (mkV "sunx:nu") ; -- सुन्नु
|
||||
hill_N = regN "phax" ; -- पहाड
|
||||
hope_VS = (compoundV "ASa" do_V2); -- आशा
|
||||
horse_N = regN "Goxa" ; -- घोडा
|
||||
horse_N = regN "Goxa" living ; -- घोडा
|
||||
hot_A = mkA "tato" ; -- तातो
|
||||
house_N = regN "Gr" ; -- घर
|
||||
important_A = mkA "jrurI" ; -- जरुरी
|
||||
industry_N = regN "fDog" ; -- उधोग
|
||||
iron_N = regN "Plam" ; -- फलाम
|
||||
king_N = regN "raja" ; -- राजा
|
||||
king_N = regN "raja" living Pers3_H; -- राजा
|
||||
know_V2 = mkV2 (mkV "Cinx:nu") ; -- चिन्नु
|
||||
know_VS = (mkV "Taha pafnu") ; -- थाहा पाउनु
|
||||
know_VQ = (compoundV "Taha" (mkV2 (mkV "pafnu"))) ; -- थाहा पाउनु
|
||||
@@ -120,13 +131,13 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
long_A = mkA "lamo" ; -- लामो
|
||||
lose_V2 = mkV2 (mkV "hrafnu") ; -- हराउनु
|
||||
love_N = regN "maya" ; -- माया
|
||||
love_V2 = mkV2 (compoundV "maya" do_V2) "laI:" ; -- "nwN"; -- माया गर्नु
|
||||
man_N = regN "manx:ce" ; -- मान्छे
|
||||
love_V2 = mkV2 (compoundV "maya" do_V2) lai ; -- "nwN"; -- माया गर्नु
|
||||
man_N = regN "manx:ce" human ; -- मान्छे
|
||||
married_A2 = mkA "vivahit" "sVg" ; -- सँग विवाहित
|
||||
meat_N = mkNUC "masu" masculine ; -- मासु
|
||||
milk_N = mkNUC "duD" masculine ; -- दुध
|
||||
moon_N = regN "Cnx:rx:dma" ; -- चन्र्दमा ??
|
||||
mother_N2 = mkN2 (mkNF "Ama") (mkPrep "ko") ""; -- need ko discuss
|
||||
mother_N2 = mkN2 (mkNF "Ama" living Pers3_H) (mkPrep "ko") "" ; -- need ko discuss
|
||||
mountain_N = regN "himal" ; -- हिमाल
|
||||
music_N = regN "sMgIt" ; -- संगीत
|
||||
narrow_A = mkA "saMguro" ; -- सांगुरो
|
||||
@@ -134,9 +145,9 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
newspaper_N = regN "smaCarptx:r" ; -- समाचारपत्र
|
||||
oil_N = mkNUC "tel" masculine ; -- तेल
|
||||
--old_A = mkA "purano" ; -- पुरानो
|
||||
old_A = mkA "buXa" ; -- बुढा
|
||||
old_A = mkA "buXo" ; -- बुढो
|
||||
open_V2 = mkV2 (mkV "Kolx:nu") ; -- खोल्नु
|
||||
paint_V2A = mkV2 (compoundV "rVg" (mkV2 (mkV "lagafnu"))) "lai:" ;
|
||||
paint_V2A = mkV2 (compoundV "rVg" (mkV2 (mkV "lagafnu"))) lai ;
|
||||
paper_N = regN "kagj" ; -- कागज
|
||||
paris_PN = mkPN "peris" ; -- ???? DEFAULT AS MALE (inflection) is this correct ????
|
||||
peace_N = mkNUC "Sanx:ti" masculine ; -- शान्ति ???? Not sure
|
||||
@@ -144,10 +155,10 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
planet_N = regN "gx:rh" ; -- ग्रह
|
||||
plastic_N = regN "palx:sx:qik" ; -- पाल्स्टिक
|
||||
play_V2 = mkV2 (mkV "Kelx:nu") ; -- खेल्नु
|
||||
policeman_N = regN "px:rhrI" ; -- प्रहरी
|
||||
priest_N = regN "purohit" ; -- पुरोहित
|
||||
policeman_N = regN "px:rhrI" human Pers3_M ; -- प्रहरी
|
||||
priest_N = regN "purohit" human Pers3_H ; -- पुरोहित
|
||||
-- probable_AS = mkAdj1S (regA "pr?bable") ;
|
||||
queen_N = mkNF "ranI" ; -- रानी
|
||||
queen_N = mkNF "ranI" human Pers3_H ; -- रानी
|
||||
radio_N = regN "rexiyo"; -- रेडियो
|
||||
rain_V0 = compoundV "brx:za" (mkV "hunu" ) ; -- बर्षा ???? hunu/bhayo irregular case need to be added
|
||||
read_V2 = mkV2 (mkV "pXx:nu"); -- पढ्नु
|
||||
@@ -164,16 +175,16 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
science_N = regN "vijx:Yn" ; -- विज्ञन
|
||||
sea_N = regN "smunx:dx:r" ; -- समुन्द्र
|
||||
seek_V2 = mkV2 (mkV "Kojx:nu" ) ;
|
||||
sell_V3 = mkV3 (mkV "beCx:nu") "" "laI:" ; -- बेच्नु ???? ram(le) sita (lai) kitab bachyo
|
||||
send_V3 = mkV3 (mkV "pQafnu") "" "laI:"; -- पठाउनु ????
|
||||
sheep_N = regN "Bexa" ; -- भेडा
|
||||
sell_V3 = mkV3 (mkV "beCx:nu") "" lai ; -- बेच्नु ram(le) sita (lai) kitab bachyo
|
||||
send_V3 = mkV3 (mkV "pQafnu") "" lai ; -- पठाउनु
|
||||
sheep_N = regN "Bexa" living ; -- भेडा
|
||||
ship_N = regN "jhaj" ; -- जहाज
|
||||
shirt_N = regN "srx:" ; -- सर्ट
|
||||
shoe_N = regN "jutx:ta" ; -- जुत्ता
|
||||
shop_N = regN "psl" ; -- पसल
|
||||
short_A = mkA "coqo" ; --छोटो
|
||||
silver_N = regN "CaVdi" ; -- चाँदि
|
||||
sister_N = mkNF "dIdI" ; -- दीदी
|
||||
sister_N = mkNF "dIdI" human Pers3_H ; -- दीदी
|
||||
sleep_V = mkV "sutx:nu" ; -- सुत्नु
|
||||
small_A = mkA "sano" ; -- सानो
|
||||
snake_N = regN "rx:zp" ; -- र्षप
|
||||
@@ -183,14 +194,14 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
steel_N = regN "sx:qil" ; -- स्टिल
|
||||
stone_N = regN "Xun:x:ga" ; -- ढुङ्गा
|
||||
stove_N = regN "Culo" ; -- चुलो
|
||||
student_N = regN "biDx:yarx:Ti" ; --बिध्यार्थि
|
||||
student_N = regN "biDx:yarx:Ti" human ; --बिध्यार्थि
|
||||
stupid_A = mkA "murx:K" ; -- मुर्ख
|
||||
sun_N = regN "surx:y"; -- सुर्य
|
||||
switch8off_V2 = mkV2 (compoundV "sx:viC HP" do_V2) ; -- स्विच अन्
|
||||
switch8on_V2 = mkV2 (compoundV "sx:viC Hnx:" do_V2) ; -- स्विच अफ
|
||||
table_N = regN "qebl" ; -- टेबल
|
||||
talk_V3 = mkV3 (compoundV "kura" (mkV2 (mkV "grx:nu"))) "sVg" ""; -- कुरा गर्नु सँग
|
||||
teacher_N = regN "Sikx:zk" ; -- शिक्षक
|
||||
teacher_N = regN "Sikx:zk" human Pers3_H ; -- शिक्षक
|
||||
teach_V2 = mkV2 (mkV "pXafnu") ; -- पढाउनु
|
||||
television_N = regN "qeliBijnx:" ; -- टेलिभिजन्
|
||||
thick_A = mkA "bakx:lo" ; -- बाक्लो
|
||||
@@ -212,7 +223,7 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
window_N = regN "Jx:yal" ; -- झ्याल
|
||||
wine_N = regN "vaI:n" ; -- वाईन
|
||||
win_V2 = mkV2 (mkV "jitx:nu") ; -- जित्नु
|
||||
woman_N = mkNF "AI:maI:" ; -- आईमाई
|
||||
woman_N = mkNF "AI:maI:" Living Pers3_M ; -- आईमाई
|
||||
wonder_VQ = compoundV "HCmx:m" (mkV "hunu") ; -- अचम्म हुनु
|
||||
wood_N = regN "kaQ" ; -- काठ
|
||||
write_V2 = mkV2 (mkV "leKx:nu") ; -- लेख्नु
|
||||
@@ -273,7 +284,7 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
head_N = regN "qafkos" ; -- टाउको
|
||||
heart_N = regN "muqu" ; -- मुटु
|
||||
horn_N = regN "hrx:n" ; -- हर्न
|
||||
husband_N = regN "pti" ; -- पति
|
||||
husband_N = regN "pti" human Pers3_M ; -- पति
|
||||
ice_N = mkNUC "hiFV" masculine ; -- हिऊँ
|
||||
knee_N = regN "GuVxa" ; -- घुँडा
|
||||
leaf_N = regN "pat" ; -- पात
|
||||
@@ -293,7 +304,7 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
salt_N = mkNUC "nun" masculine ; -- नुन
|
||||
sand_N = mkNUC "baluva" masculine ; -- बालुवा
|
||||
seed_N = regN "bif" ; -- बिउ
|
||||
see_V2 = mkV2 (mkV "herrx:nu" ) "laI:" ; -- हेरर्नु
|
||||
see_V2 = mkV2 (mkV "herrx:nu" ) lai ; -- हेरर्नु
|
||||
skin_N = regN "cala" ; -- छाला
|
||||
sky_N = regN "AkaS" ; -- आकाश
|
||||
smoke_N = mkNUC "DuvaV" masculine ; -- धुवाँ
|
||||
@@ -302,7 +313,7 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
tail_N = regN "puCx:cr" ; -- पुच्छर
|
||||
tongue_N = regN "jibx:ro" ; -- जिब्रो
|
||||
tooth_N = regN "daVt" ; -- दाँत
|
||||
wife_N = mkNF "ptx:nI" ; -- पत्नी
|
||||
wife_N = mkNF "ptx:nI" Living ; -- पत्नी
|
||||
wind_N = regN "hurI" ; -- हुरी
|
||||
wing_N = regN "pMKa" ; -- पंखा
|
||||
worm_N = regN "juga" ; -- जुगा
|
||||
@@ -336,7 +347,7 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
cut_V2 = mkV2 (mkV "kaqnu") ; -- काटनु
|
||||
fear_V2 = mkV2 (mkV "xrafnu") ; -- डराउनु
|
||||
fight_V2 = mkV2 (mkV "lxx:nu") ; -- लड्नु
|
||||
hit_V2 = mkV2 (mkV "hanx:nu" ) "laI:" ; -- हान्नु
|
||||
hit_V2 = mkV2 (mkV "hanx:nu" ) lai ; -- हान्नु
|
||||
hold_V2 = mkV2 (mkV "smatx:nu") ; -- समात्नु
|
||||
hunt_V2 = mkV2 (compoundV "Sikar" do_V2) ; -- शिकार
|
||||
kill_V2 = mkV2 (mkV "marx:nu") ; -- मार्नु
|
||||
@@ -358,12 +369,12 @@ concrete LexiconNep of Lexicon = CatNep **
|
||||
rule_N = regN "niym" ; -- नियम
|
||||
|
||||
-- added 4/6/2007
|
||||
john_PN = mkPN "jon" ;
|
||||
question_N = regN "px:rSx:n" ; -- प्रश्न
|
||||
ready_A = mkA "tyar" ; -- तयार
|
||||
reason_N = regN "karN" ; -- कारण
|
||||
today_Adv = mkAdv "Aj" ; -- आज
|
||||
uncertain_A = mkA "HniSx:Cit" ; -- अनिश्चित
|
||||
john_PN = mkPN "jon" masculine human Pers3_L ;
|
||||
question_N = regN "px:rSx:n" ; -- प्रश्न
|
||||
ready_A = mkA "tyar" ; -- तयार
|
||||
reason_N = regN "karN" ; -- कारण
|
||||
today_Adv = mkAdv "Aj" ; -- आज
|
||||
uncertain_A = mkA "HniSx:Cit" ; -- अनिश्चित
|
||||
|
||||
oper
|
||||
lai = "laI:" ;
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
--# -path=.:../../prelude
|
||||
--
|
||||
----1 A Simple Punjabi Resource Morphology
|
||||
----
|
||||
---- Shafqat Virk, Aarne Ranta,2010
|
||||
----
|
||||
---- This resource morphology contains definitions needed in the resource
|
||||
---- syntax. To build a lexicon, it is better to use $ParadigmsPnb$, which
|
||||
---- gives a higher-level access to this module.
|
||||
-- 1 Morpholical inflection of Noun and Verbs of Nepali
|
||||
--
|
||||
-- by Dinesh Simkhada, Shafqat Virk - 2011
|
||||
--
|
||||
|
||||
resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
|
||||
@@ -24,9 +21,8 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
--1 Nouns
|
||||
oper
|
||||
|
||||
-- mkN : (x1,_,_,_,_,_,_,_,_,_,_,x12 : Str) -> Gender -> Bool -> Noun =
|
||||
mkN : (x1,_,_,_,_,_,_,_,_,_,_,x12 : Str) -> Gender -> Noun =
|
||||
\sn,sa,si,sd,sab,sl,pn,pa,pi,pd,pab,pl, g -> {
|
||||
mkN : (x1,_,_,_,_,_,_,_,_,_,_,x12 : Str) -> Gender -> NType -> NPerson -> Noun =
|
||||
\sn,sa,si,sd,sab,sl,pn,pa,pi,pd,pab,pl,g,t,h -> {
|
||||
s = table {
|
||||
Sg => table {
|
||||
Nom => sn ;
|
||||
@@ -45,38 +41,38 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
Loc => pl
|
||||
}
|
||||
} ;
|
||||
|
||||
g = g
|
||||
-- isHum = h
|
||||
g = g ;
|
||||
t = t ;
|
||||
h = h
|
||||
} ;
|
||||
|
||||
-- TODO
|
||||
-- ?? NEED TO ADD CASE IF ENDS WITH 'o' (PG. 99 Jaya)
|
||||
|
||||
-- Regular nouns
|
||||
mkNMF : Str -> Gender -> Noun ;
|
||||
mkNMF str g = mkN str (str + "laI:") (str + "le") (str + "laI:") (str + "baq") (str + "ma")
|
||||
(str + "hru") (str + "hrulaI:") (str + "hrule") (str + "hrulaI:") (str + "hrubaq") (str + "hruma") g ;
|
||||
mkNMF : Str -> Gender -> NType -> NPerson -> Noun ;
|
||||
mkNMF str g t h = mkN str (str + "laI:") (str + "le") (str + "laI:") (str + "baq") (str + "ma")
|
||||
(str + "hru") (str + "hrulaI:") (str + "hrule") (str + "hrulaI:") (str + "hrubaq") (str + "hruma") g t h ;
|
||||
|
||||
-- Regular Nouns
|
||||
mkNReg : Str -> Noun ;
|
||||
mkNReg str = mkNMF str Masc ;
|
||||
mkNReg : Str -> NType -> NPerson -> Noun ;
|
||||
mkNReg str typ hnr = mkNMF str Masc typ hnr ;
|
||||
|
||||
-- Faminine nouns
|
||||
mkNFem : Str -> Noun ;
|
||||
mkNFem str = mkNMF str Fem ;
|
||||
mkNFem : Str -> NType -> NPerson -> Noun ;
|
||||
mkNFem str typ hnr = mkNMF str Fem typ hnr ;
|
||||
|
||||
|
||||
-- Uncountable nouns, which have same singular and plular form
|
||||
-- eg water
|
||||
mkNUnc : Str -> Gender -> Noun ;
|
||||
mkNUnc str g = mkN str (str + "laI:") (str + "le") (str + "laI:") (str + "baq") (str + "ma")
|
||||
str (str + "laI:") (str + "le") (str + "laI:") (str + "baq") (str + "ma") g ;
|
||||
mkNUnc : Str -> Gender -> NType -> NPerson -> Noun ;
|
||||
mkNUnc str g t h = mkN str (str + "laI:") (str + "le") (str + "laI:") (str + "baq") (str + "ma")
|
||||
str (str + "laI:") (str + "le") (str + "laI:") (str + "baq") (str + "ma") g t h ;
|
||||
|
||||
-- Proper Names
|
||||
regN1 : Str -> Gender -> Noun ;
|
||||
regN1 str g = mkN str (str + "laI:") (str + "le") (str + "laI:") (str + "baq") (str + "ma")
|
||||
str str str str str str g ;
|
||||
regN1 : Str -> Gender -> NType -> NPerson -> Noun ;
|
||||
regN1 str g t h = mkN str (str + "laI:") (str + "le") (str + "laI:") (str + "baq") (str + "ma")
|
||||
str str str str str str g t h ;
|
||||
|
||||
|
||||
-- pronouns
|
||||
@@ -90,13 +86,12 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
Abl => ab ;
|
||||
Loc => l
|
||||
}
|
||||
} ;
|
||||
} ;
|
||||
|
||||
makePronReg : Str -> {s : Case => Str} ;
|
||||
makePronReg str = makePron str (str + "laI:") (str + "le") (str + "laI:") (str + "baq") (str + "ma") ;
|
||||
|
||||
--2. Derminers
|
||||
|
||||
--2. Derminers
|
||||
makeDet : Str -> Str -> Str -> Str -> Number -> Determiner =
|
||||
\s1,s2,s3, s4, n -> {
|
||||
s = table {
|
||||
@@ -104,35 +99,18 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
Fem => s2 } ;
|
||||
Pl => table { Masc => s3 ;
|
||||
Fem => s4 }
|
||||
} ;
|
||||
} ;
|
||||
n = n
|
||||
};
|
||||
} ;
|
||||
|
||||
|
||||
IDeterminer = {s : Gender => Str ; n : Number};
|
||||
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
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
-}
|
||||
-- maIdetn helper
|
||||
makeIDet : Str -> Str -> {s : Gender => Str} =
|
||||
\s1,s2 -> {
|
||||
s = table {
|
||||
Masc => s1 ;
|
||||
Fem => s2
|
||||
}
|
||||
} ;
|
||||
|
||||
-- Quantifiers
|
||||
makeQuant : Str -> Str -> Str -> Str -> {s : Number => Gender => Str } =
|
||||
@@ -161,7 +139,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
Imp => (mkImpForm root).s ;
|
||||
ProgRoot aspect number gender => (mkProgRoot root aspect number gender).s ;
|
||||
|
||||
VF tense aspect polarity person number gender =>
|
||||
VF tense aspect polarity person number gender =>
|
||||
case aspect of {
|
||||
Imperf => (mkVImperf root tense polarity person number gender).s ;
|
||||
Perf => (mkVPerf root tense polarity person number gender).s
|
||||
@@ -181,6 +159,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
--For the progressive root case
|
||||
mkProgRoot : Str -> Aspect -> Number -> Gender -> {s : Str } =
|
||||
\root,aspect,number,gender ->
|
||||
@@ -221,7 +200,6 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
} ;
|
||||
|
||||
--need to check for want_VV <- Not inflected correctly
|
||||
|
||||
rootCheck : Str -> {root1:Str; root2:Str; vcase: VCase} =
|
||||
\root -> {
|
||||
{-
|
||||
@@ -282,7 +260,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
NPresent => (mkVPreNP root root1 vcase po pn n g).s ;
|
||||
NPast Simpl => (mkVPstSNP root root2 vcase po pn n g).s ;
|
||||
NPast Hab => (mkVPstHNP root root1 vcase po pn n g).s ;
|
||||
NPast Unknown => (mkVPstUNP root root2 vcase po pn n g).s ;
|
||||
--NPast Unknown => (mkVPstUNP root root2 vcase po pn n g).s ;
|
||||
NFuture Defin => (mkVFutDNP root po pn n g).s ;
|
||||
NFuture NDefin => (mkVFutNDNP root root2 vcase po pn n g).s
|
||||
}
|
||||
@@ -301,7 +279,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
NPresent => (mkVPreP root root2 vcase po pn n g).s ;
|
||||
NPast Simpl => (mkVPstSP root root2 vcase po pn n g).s ;
|
||||
NPast Hab => (mkVPstHP root root2 vcase po pn n g).s ;
|
||||
NPast Unknown => (mkVPstUP root root2 vcase po pn n g).s ;
|
||||
--NPast Unknown => (mkVPstUP root root2 vcase po pn n g).s ;
|
||||
NFuture Defin => (mkVFutDefP root root2 vcase po pn n g).s ;
|
||||
NFuture NDefin => (mkVFutNDefP root root2 vcase po pn n g).s
|
||||
}
|
||||
@@ -508,7 +486,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
{-
|
||||
-- Past Unknown, Nonprogressive mode, nonperfective aspect
|
||||
mkVPstUNP : Str -> Str -> VCase -> Polarity -> NPerson -> Number -> Gender -> {s:Str} =
|
||||
\ root, root2, vc, po, p, n, g ->
|
||||
@@ -567,7 +545,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
< _, _, _> => root + "nuBe:" + na +"c" -- नुभएनछ
|
||||
}
|
||||
} ;
|
||||
|
||||
-}
|
||||
|
||||
-- Future Definitive, Nonprogressive mode, nonperfective aspect
|
||||
-- Handles Both cases
|
||||
@@ -651,7 +629,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
<Pos, _, _, _> => root + "nuhola" ; -- नुहोला
|
||||
|
||||
-- TODO : NOT CLEAR DEFINITION IN BOOK
|
||||
<Neg, _, _, _> => "quxu"
|
||||
<Neg, _, _, _> => "quxu"
|
||||
}
|
||||
} ;
|
||||
|
||||
@@ -745,7 +723,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
{-
|
||||
-- Past Unknown, Perfective aspect, Nonprogressive Mode
|
||||
mkVPstUP : Str -> Str -> VCase -> Polarity -> NPerson -> Number -> Gender -> {s:Str} =
|
||||
\root, root2, vc, po, pn, n, g ->
|
||||
@@ -781,7 +759,7 @@ resource MorphoNep = ResNep ** open Prelude,Predef in {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
-}
|
||||
-- Present, Perfective aspect, Nonprogressive Mode
|
||||
mkVPreP : Str -> Str -> VCase -> Polarity -> NPerson -> Number -> Gender -> {s:Str} =
|
||||
\root, root2, vc, po, pn, n, g ->
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
concrete NumeralNep of Numeral = CatNep ** open ResNep, Prelude in {
|
||||
-- By Harald Hammarstroem
|
||||
-- Modification for Nepali by Dinesh and Shafqat Virk
|
||||
-- Modification for Nepali by Dinesh Simkhada and Shafqat Virk - 2011
|
||||
flags coding=utf8 ;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ lincat Sub1000000 = {s : Str ; n : Number } ;
|
||||
lin num x0 =
|
||||
{s = table {
|
||||
NCard => x0.s ;
|
||||
NOrd => x0.s ++ "wV" -- need to use mkOrd x0.s but it gives linking error
|
||||
NOrd => Prelude.glue x0.s "wV" -- need to use mkOrd x0.s but it gives linking error
|
||||
};
|
||||
n = x0.n
|
||||
} ;
|
||||
|
||||
@@ -5,6 +5,7 @@ concrete PhraseNep of Phrase = CatNep ** open Prelude, ResNep in {
|
||||
|
||||
UttS s = s ;
|
||||
UttQS qs = {s = qs.s ! QDir} ;
|
||||
|
||||
-- be a man -> (मन्छे हउ)
|
||||
UttImpSg pol imp = {s = pol.s ++ imp.s ! contrNeg True pol.p ! ImpF Sg False ++ "hf"} ;
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ concrete QuestionNep of Question = CatNep ** open ResNep, Prelude in {
|
||||
QDir => cl.s ! t ! p ! OQuest;
|
||||
QIndir => "yedi" ++ cl.s ! t ! p ! ODir
|
||||
}
|
||||
} ;
|
||||
} ;
|
||||
|
||||
QuestVP qp vp =
|
||||
let cl = mkSClause ("") (Ag Masc qp.n Pers3_L) vp;
|
||||
let cl = mkSClause ("") (Ag Masc qp.n Pers3_M) vp; -- Pers3_M
|
||||
qp1 = qp.s ! Nom;
|
||||
qp2 = qp.s ! Ins
|
||||
in { s = \\t,p,o =>
|
||||
@@ -31,7 +31,7 @@ concrete QuestionNep of Question = CatNep ** open ResNep, Prelude in {
|
||||
in {
|
||||
s = \\t,p,o => case t of {
|
||||
-- VPSmplPast => ip2 ++ slash.s ! t ! p ! ODir ;
|
||||
_ => ip1 ++ slash.s ! t ! p ! ODir
|
||||
_ => ip2 ++ slash.s ! t ! p ! ODir
|
||||
}
|
||||
};
|
||||
|
||||
@@ -40,8 +40,8 @@ concrete QuestionNep of Question = CatNep ** open ResNep, Prelude in {
|
||||
} ;
|
||||
|
||||
QuestIComp icomp np =
|
||||
let cl = mkSClause (np.s ! NPC Nom ++ icomp.s) np.a (predAux auxBe);
|
||||
in {
|
||||
let cl = mkSClause (np.s ! NPC Nom ++ icomp.s) np.a (predAux NonLiving) ;--(predAux np.t); to test mkQCl-IAdv-NP-QCl
|
||||
in { -- eg उनी कहाँ छिन् - (छिन् - NonLiving case)
|
||||
s = \\t,p,qf => case qf of {
|
||||
QDir => cl.s ! t ! p ! ODir;
|
||||
QIndir => cl.s ! t ! p ! ODir
|
||||
@@ -78,6 +78,18 @@ concrete QuestionNep of Question = CatNep ** open ResNep, Prelude in {
|
||||
AddAdvQVP qvp iadv = insertObj (\\_ => iadv.s) qvp ;
|
||||
ComplSlashIP vpslash ip = insertObj (\\_ => ip.s ! Nom) vpslash ;
|
||||
|
||||
lincat QVP = CatNep.VP ;
|
||||
|
||||
--QuestQVP : IP -> QVP -> QCl ; -- who buys what where
|
||||
QuestQVP ip qvp =
|
||||
let cl = mkSClause ("") (Ag Masc ip.n Pers3_M) qvp ; -- Pers3_M
|
||||
qp1 = ip.s ! Nom ;
|
||||
qp2 = ip.s ! Ins
|
||||
in { s = \\t,p,o =>
|
||||
case t of {
|
||||
-- VPSmplPast => qp2 ++ cl.s ! t ! p ! ODir ;
|
||||
_ => qp1 ++ cl.s ! t ! p ! ODir
|
||||
}
|
||||
} ;
|
||||
|
||||
lincat QVP = CatNep.VP ;
|
||||
|
||||
}
|
||||
|
||||
@@ -10,37 +10,22 @@ concrete RelativeNep of Relative = CatNep ** open ResNep in {
|
||||
c = Nom
|
||||
} ;
|
||||
|
||||
-- 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 ! Nom) agr vp;
|
||||
|
||||
-- cl = case t of {
|
||||
-- VPImpPast => mkSClause (rp.s ! (giveNumber agr) ! Obl) agr vp;
|
||||
-- _ => mkSClause (rp.s ! (giveNumber agr) ! Dir) agr vp
|
||||
-- };
|
||||
|
||||
agr = case rp.a of {
|
||||
RNoAg => ag ;
|
||||
RAg a => a
|
||||
} ;
|
||||
cl = mkSClause (rp.s ! Nom) agr vp;
|
||||
in
|
||||
cl.s ! t ! p ! ODir ;
|
||||
c = Nom
|
||||
} ;
|
||||
|
||||
|
||||
---- 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 ! Nom ++ slash.c2.s ++ slash.s ! t ! p ! o ;--case t of {
|
||||
-- VPImpPast => rp.s ! (giveNumber agr) Obl ++ slash.c2.s ++ slash.s ! t ! p ! o ;
|
||||
-- _ => rp.s ! (giveNumber agr) Dir ++ slash.c2.s ++ slash.s ! t ! p ! o
|
||||
-- };
|
||||
s = \\t,p,o,agr => rp.s ! Nom ++ slash.c2.s ++ slash.s ! t ! p ! o ;
|
||||
c = Nom
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
--# -path=.:../abstract:../common:../../prelude
|
||||
--
|
||||
--1 Pnbu auxiliary operations.
|
||||
--1 Nep auxiliary operations.
|
||||
-- by Dinesh SImkhada and Shafqat Virk - 2011
|
||||
--
|
||||
-- This module contains operations that are needed to make the
|
||||
-- resource syntax work.
|
||||
@@ -36,8 +37,8 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
--Verbs
|
||||
-------------------------------------------
|
||||
VTense = NPresent | NPast PTypes | NFuture FTypes;
|
||||
PTypes = Simpl | Hab | Unknown ;
|
||||
FTypes = Defin | NDefin ;
|
||||
PTypes = Simpl | Hab ; -- Unknown - Currently we didn't find the use of 'Unknown' type
|
||||
FTypes = Defin | NDefin ;
|
||||
|
||||
VerbForm =
|
||||
VF VTense Aspect Polarity NPerson Number Gender
|
||||
@@ -49,31 +50,31 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
|
||||
-- Aspect Perfective and non-perfective
|
||||
Aspect = Perf | Imperf ;
|
||||
|
||||
-- For distinguishing the type of noun
|
||||
-- Prefessions/Occupations, Humans all mapped to Living category
|
||||
NType = Living | NonLiving ;
|
||||
|
||||
|
||||
oper
|
||||
-- Noun = {s : Number => Case => Str ; g : Gender ; isHum : Bool } ; -- TODO ADD HUMAN/NON-HUMAN CASE
|
||||
Noun = {s : Number => Case => Str ; g : Gender } ;
|
||||
|
||||
Noun = {s : Number => Case => Str ; g : Gender ; t : NType ; h : NPerson } ;
|
||||
|
||||
Verb = {s : VerbForm => Str} ;
|
||||
|
||||
Preposition = {s : Str};
|
||||
|
||||
-- DemPronForm = {s : Number => Gender => Case => Str};
|
||||
-- PossPronForm = {s : Number => Gender => Case => Str};
|
||||
--Determiner = {s : Number => Gender => Str ; n : Number};
|
||||
|
||||
|
||||
Determiner = {s : Number => Gender => Str ; n : Number};
|
||||
|
||||
|
||||
-- Nepali Adjectives
|
||||
|
||||
npAdjective = {s : Number => Gender => Str} ;
|
||||
|
||||
mkAdjnp : Str -> npAdjective = \str ->
|
||||
case str of {
|
||||
st + "o" => mkAdj1 str (st+"I") (st+"a") ;
|
||||
st + "to" => mkAdj1 str str str ;
|
||||
_ => mkAdj1 str str str
|
||||
st + t@"t" + "o" => mkAdj1 str str (st+t+"a") ; -- No Fem for red [couple of places which takes Fem but no general rule]
|
||||
st + "o" => mkAdj1 str (st+"I") (st+"a") ;
|
||||
_ => mkAdj1 str str str
|
||||
} ;
|
||||
|
||||
mkAdj1 : (x1,_,x3 : Str) -> npAdjective =
|
||||
@@ -93,17 +94,21 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
|
||||
-- Reflective Pronoun
|
||||
--eg. (i will do myself)
|
||||
-- Functions used at NounNep [TODO: inflection at morphological level and attach with VP might be good option]
|
||||
reflPron : Str ;
|
||||
reflPron = "APEM" ; -- आफैं
|
||||
|
||||
eko : Str ;
|
||||
eko = "e:ko" ;
|
||||
|
||||
eko : Str ;
|
||||
eki = "e:kI" ;
|
||||
|
||||
eka : Str ;
|
||||
eka = "e:ka" ;
|
||||
|
||||
sbvn : Str ;
|
||||
sbvn = "sbBnx:Da" ;
|
||||
sbvn = "sbBnx:da" ;
|
||||
|
||||
----------------------------------------------------------
|
||||
-- Grammar part
|
||||
@@ -117,17 +122,16 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
|
||||
np2pronCase : (Case => Str) -> NPCase -> Agr -> Str =
|
||||
\ppf,npc,a -> case npc of {
|
||||
NPC c => ppf ! c ;
|
||||
NPObj => ppf ! Nom ;
|
||||
NPErg => ppf ! Ins --Nom ++ "le"
|
||||
} ;
|
||||
|
||||
NPC c => ppf ! c ;
|
||||
NPObj => ppf ! Nom ;
|
||||
NPErg => ppf ! Ins --Nom ++ "le"
|
||||
} ;
|
||||
|
||||
toNP : (Case => Str) -> NPCase -> Str = \pn, npc -> case npc of {
|
||||
NPC c => pn ! c ;
|
||||
NPObj => pn ! Nom ;
|
||||
NPErg => pn ! Ins --Nom ++ "le"
|
||||
} ;
|
||||
NPC c => pn ! c ;
|
||||
NPObj => pn ! Nom ;
|
||||
NPErg => pn ! Ins --Nom ++ "le"
|
||||
} ;
|
||||
|
||||
detcn2NP : (Determiner) -> Noun -> NPCase -> Number -> Str = \dt,cn,npc,nn -> case npc of {
|
||||
NPC c => dt.s ! dt.n ! Masc ++ cn.s ! nn ! c ;
|
||||
@@ -139,7 +143,7 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
NPC c => dt.s ! dt.n ! Masc ;
|
||||
NPObj => dt.s ! dt.n ! Masc ;
|
||||
NPErg => dt.s ! dt.n ! Masc ++ "le"
|
||||
} ;
|
||||
} ;
|
||||
|
||||
------------------------------------
|
||||
-- Agreement transformations
|
||||
@@ -160,29 +164,30 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
conjAgr : Agr -> Agr -> Agr = \a0,b0 ->
|
||||
let a = fromAgr a0 ; b = fromAgr b0
|
||||
in
|
||||
toAgr
|
||||
(conjNumber a.n b.n)
|
||||
b.p a.g;
|
||||
toAgr (conjNumber a.n b.n) b.p a.g;
|
||||
|
||||
|
||||
giveNumber : Agr -> Number = \a -> case a of {
|
||||
giveNumber : Agr -> Number =
|
||||
\a -> case a of {
|
||||
Ag _ n _ => n
|
||||
};
|
||||
} ;
|
||||
|
||||
giveGender : Agr -> Gender = \a -> case a of {
|
||||
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_L ;
|
||||
|
||||
personalAgr : Agr = agrP1 Masc Sg ;
|
||||
|
||||
agrP1 : Gender -> Number -> Agr =
|
||||
\g,n -> Ag g n Pers1 ;
|
||||
|
||||
|
||||
personalAgr : Agr = agrP1 Masc Sg ;
|
||||
|
||||
|
||||
param
|
||||
CPolarity =
|
||||
CPos
|
||||
@@ -195,164 +200,29 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
Neg => CNeg b
|
||||
} ;
|
||||
|
||||
NP : Type = {s : NPCase => Str ; a : Agr} ;
|
||||
NP : Type = {s : NPCase => Str ; a : Agr ; t : NType } ;
|
||||
|
||||
param
|
||||
CTense = CPrsnt | CPast | CFuture ;
|
||||
|
||||
-- if the noun is of type occupation/Introductiary case it will take ho, instead of chh (in case of present)
|
||||
oper
|
||||
copula : CTense -> Polarity -> Number -> NPerson -> Gender -> Str =
|
||||
\t, po, n, pn, g ->
|
||||
case <t,po,pn,n,g> of {
|
||||
-- Resembles with "mkVPreNPReg" function for positive
|
||||
-- <CPrsnt, Pos, _, _, _> => mkVPreNPReg "" Pos pn n g ;
|
||||
-- Present Positive
|
||||
<CPrsnt, Pos, Pers1, Sg, _> => "cu" ; -- छु
|
||||
<CPrsnt, Pos, Pers1, Pl, _> => "cwM" ; -- छौं
|
||||
<CPrsnt, Pos, Pers2_L, Sg, Masc> => "csx:" ; -- छस्
|
||||
<CPrsnt, Pos, Pers2_L, Sg, Fem> => "cesx:" ; -- छेस्
|
||||
<CPrsnt, Pos, Pers2_L, Pl, _> => "cw" ; -- छौ
|
||||
<CPrsnt, Pos, Pers2_M, Pl, Fem> => "cx:yw" ; -- छ्यौ
|
||||
<CPrsnt, Pos, Pers2_M, _, _> => "cw" ; -- छौ
|
||||
<CPrsnt, Pos, Pers3_L, Sg, Masc> => "c" ; -- छ
|
||||
<CPrsnt, Pos, Pers3_L, Sg, Fem> => "ce" ; -- छे
|
||||
<CPrsnt, Pos, Pers3_L, Pl, _> => "cnx:" ; -- छन्
|
||||
<CPrsnt, Pos, Pers3_M, Sg, Fem> => "cinx:" ; -- छिन्
|
||||
<CPrsnt, Pos, Pers3_M, _, _> => "cnx:" ; -- छन्
|
||||
<CPrsnt, Pos, _ , _, _> => "hunuhunx:c" ; --हुनुहुन्छ
|
||||
|
||||
-- Present Negative
|
||||
<CPrsnt, Neg, Pers1, Sg, _> => "cEnV" ; -- छैनँ
|
||||
<CPrsnt, Neg, Pers1, Pl, _> => "cEnwM" ; -- छैनौं
|
||||
<CPrsnt, Neg, Pers2_L, Sg, _> => "cEnsx:" ; -- छैनस्
|
||||
<CPrsnt, Neg, Pers2_L, Pl, _> => "cEnw" ; -- छैनौ
|
||||
<CPrsnt, Neg, Pers2_M, _, _> => "cEnw" ; -- छैनौ
|
||||
<CPrsnt, Neg, Pers3_L, Sg, _> => "cEn" ; --छैन
|
||||
<CPrsnt, Neg, Pers3_L, Pl, _> => "cEnnx:" ; -- छैनन्
|
||||
<CPrsnt, Neg, Pers3_M, _, _> => "cEnnx:" ; -- छैनन्
|
||||
<CPrsnt, Neg, _, _, _> => "hunuhunx:z+n" ; -- हुनुहुन्न
|
||||
|
||||
-- Resemples with "mkVPstSPGen" case, should refactor to make it
|
||||
-- take common function
|
||||
|
||||
-- Past Positive
|
||||
<CPast, Pos, Pers1, Sg, _> => "Tie:V" ; -- थिएँ
|
||||
<CPast, Pos, Pers1, Pl, _> => "TiywV" ; -- थियौँ
|
||||
<CPast, Pos, Pers2_L, Sg, _> => "Tii:sx:" ; -- थिइस्
|
||||
<CPast, Pos, Pers2_L, Pl, _> => "Tiyw" ; -- थियौ
|
||||
<CPast, Pos, Pers2_M, _, _> => "Tiyw" ; -- थियौ
|
||||
<CPast, Pos, Pers3_L, Sg, Masc> => "Tiyo" ; -- थियो
|
||||
<CPast, Pos, Pers3_L, Sg, Fem> => "TiI:" ; --थिई
|
||||
<CPast, Pos, Pers3_L, Pl, _> => "Tie:" ; -- थिए
|
||||
<CPast, Pos, Pers3_M, Sg, Fem> => "Tii:nx:" ; -- थिइन्
|
||||
<CPast, Pos, Pers3_M, _, _> => "Tie:" ; -- थिए
|
||||
<CPast, Pos, _, _, _> => "hunuhunx:z+Tx:yo" ; -- हुनुहुन्थ्यो
|
||||
|
||||
-- Past Positive
|
||||
<CPast, Neg, Pers1, Sg, _> => "TinV" ; -- थिनँ
|
||||
<CPast, Neg, Pers1, Pl, _> => "TenwM" ; -- थेनौं
|
||||
<CPast, Neg, Pers2_L, Sg, _> => "Tinsx:" ; -- थिनस्
|
||||
<CPast, Neg, Pers2_L, Pl, _> => "Tenw" ; -- थेनौ
|
||||
<CPast, Neg, Pers2_M, _, _> => "Tenw" ; -- थेनौ
|
||||
<CPast, Neg, Pers3_L, Sg, Masc> => "Ten" ; -- थेन
|
||||
<CPast, Neg, Pers3_L, Sg, Fem> => "Tin" ; --थिन
|
||||
<CPast, Neg, Pers3_L, Pl, _> => "Tennx:" ; -- थेनन्
|
||||
<CPast, Neg, Pers3_M, Sg, Fem> => "Tinnx:" ; -- थिनन्
|
||||
<CPast, Neg, Pers3_M, _, _> => "Tennx:" ; -- थेनन्
|
||||
<CPast, Neg, _, _, _> => "hunuhunx:z+nTx:yo" ; -- हुनुहुन्नथ्यो
|
||||
|
||||
|
||||
-- Can be covered by the function "mkVFutDNP"
|
||||
-- Future Positive
|
||||
<CFuture, Pos, Pers1, Sg, _> => "hunecu" ; -- हुनेछु
|
||||
<CFuture, Pos, Pers1, Pl, _> => "hunecwM" ; -- हुनेछौं
|
||||
<CFuture, Pos, Pers2_L, Sg, _> => "hunecsx:" ; -- हुनेछस्
|
||||
<CFuture, Pos, Pers2_L, Pl, _> => "hunecwM" ; -- हुनेछौ
|
||||
<CFuture, Pos, Pers2_M, _, _> => "hunecwM" ; -- हुनेछौ
|
||||
<CFuture, Pos, Pers3_L, Sg, _> => "hunec" ; -- हुनेछ
|
||||
<CFuture, Pos, Pers3_L, Pl, _> => "hunecnx:" ; -- हुनेछन्
|
||||
<CFuture, Pos, Pers3_M, _, Masc> => "hunecnx:" ; -- हुनेछन्
|
||||
<CFuture, Pos, Pers3_M, Sg, Fem> => "hunecnx:" ; -- हुनेछिन्
|
||||
<CFuture, Pos, Pers3_M, Pl, Fem> => "hunecnx:" ; -- हुनेछन्
|
||||
<CFuture, Pos, _, _, _> => "hunuhunec" ; -- हुनुहुनेछ
|
||||
|
||||
-- Negative Case
|
||||
<CFuture, Neg, Pers1, Sg, _> => "hunecEn" ; -- हुनेछैन
|
||||
<CFuture, Neg, Pers1, Pl, _> => "hunecEnEV" ; -- हुनेछैनैँ
|
||||
<CFuture, Neg, Pers2_L, Sg, _> => "hunecEnsx:" ; -- हुनेछैनस्
|
||||
<CFuture, Neg, Pers2_L, Pl, _> => "hunecEnE" ; -- हुनेछैनै
|
||||
<CFuture, Neg, Pers2_M, _, _> => "hunecEnE" ; -- हुनेछैनै
|
||||
<CFuture, Neg, Pers3_L, Sg, _> => "hunecEnx:" ; -- हुनेछैन्
|
||||
<CFuture, Neg, Pers3_L, Pl, _> => "hunecEnnx:" ; -- हुनेछैनन्
|
||||
<CFuture, Neg, Pers3_M, Sg, _> => "hunecEnnx:" ; -- हुनेछैनन्
|
||||
<CFuture, Neg, Pers3_M, Pl, _> => "hunecEnE" ; -- हुनेछैनै
|
||||
<CFuture, Neg, _, _, _> => "hunuhunecEnx:" -- हुनुहुनेछैन्
|
||||
} ;
|
||||
|
||||
-- For Human, occupation/Introductiary case case, (HAVENT INTEGRATED YET)
|
||||
copulaOpn : CTense -> Polarity -> Number -> NPerson -> Gender -> Str =
|
||||
\t, po, n, pn, g ->
|
||||
case <t,po,pn,n,g> of {
|
||||
-- Resembles with "mkVPreNPReg" function for positive
|
||||
-- <CPrsnt, Pos, _, _, _> => mkVPreNPReg "" Pos pn n g ;
|
||||
-- Present Positive
|
||||
<CPrsnt, Pos, Pers1, Sg, _> => "huV" ; -- हुँ
|
||||
<CPrsnt, Pos, Pers1, Pl, _> => "hwV" ; -- हौँ
|
||||
<CPrsnt, Pos, Pers2_L, Sg, _> => "hosx:" ; -- होस्
|
||||
--<CPrsnt, Pos, Pers2_L, Sg, Fem> => "hosx:" ; -- छेस्
|
||||
<CPrsnt, Pos, Pers2_L, Pl, _> => "hw" ; -- हौ
|
||||
--<CPrsnt, Pos, Pers2_M, Pl, Fem> => "cx:yw" ; -- छ्यौ
|
||||
<CPrsnt, Pos, Pers2_M, _, _> => "hw" ; -- हौ
|
||||
<CPrsnt, Pos, Pers3_L, Sg, Masc> => "ho" ; -- हो
|
||||
--<CPrsnt, Pos, Pers3_L, Sg, Fem> => "hunx:" ; -- हुन्
|
||||
<CPrsnt, Pos, Pers3_L, _, _> => "hunx:" ; -- हुन्
|
||||
--<CPrsnt, Pos, Pers3_M, Sg, Fem> => "hw" ; -- हौ
|
||||
<CPrsnt, Pos, Pers3_M, _, _> => "hw" ; -- हौ
|
||||
<CPrsnt, Pos, _ , _, _> => "hunuhunx:c" ; --हुनुहुन्छ
|
||||
|
||||
-- Present Negative
|
||||
<CPrsnt, Neg, Pers1, Sg, _> => "hEn" ; --
|
||||
<CPrsnt, Neg, Pers1, Pl, _> => "hEnwM" ; -- हैनौं
|
||||
<CPrsnt, Neg, Pers2_L, Sg, _> => "hEnsx:" ; -- हैनस्
|
||||
<CPrsnt, Neg, Pers2_L, Pl, _> => "hEnw" ; -- हैनौ
|
||||
<CPrsnt, Neg, Pers2_M, _, _> => "hEnw" ; -- हैनौ
|
||||
<CPrsnt, Neg, Pers3_L, Sg, _> => "hEn" ; --हैन
|
||||
<CPrsnt, Neg, Pers3_L, Pl, _> => "hEnnx:" ; -- हैनन्
|
||||
<CPrsnt, Neg, Pers3_M, _, _> => "hEnnx:" ; -- हैनन्
|
||||
<CPrsnt, Neg, _, _, _> => "hunuhunx:z+n" ; -- हुनुहुन्न
|
||||
|
||||
<_,_,_,_,_> => copula t po n pn g
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
param
|
||||
|
||||
|
||||
VPHTense =
|
||||
VPGenPres -- impf hum nahim "I go"
|
||||
| VPSmplPast -- impf Ta nahim "I went"
|
||||
| VPFut -- fut na/nahim "I shall go"
|
||||
| VPPerfPres -- perf hum na/nahim "I have gone"
|
||||
| VPPerfPast -- perf Ta na/nahim "I had gone"
|
||||
| VPPerfFut
|
||||
| VPCondPres -- subj na "I may go"
|
||||
| VPCondPast -- subj na "I may go"
|
||||
VPGenPres -- impf hum nahim "I go"
|
||||
| VPSmplPast --# notpresent -- impf Ta nahim "I went"
|
||||
| VPFut --# notpresent -- fut na/nahim "I shall go"
|
||||
| VPPerfPres -- perf hum na/nahim "I have gone"
|
||||
| VPPerfPast --# notpresent -- perf Ta na/nahim "I had gone"
|
||||
| VPPerfFut --# notpresent
|
||||
| VPCondPres -- subj na "I may go"
|
||||
| VPCondPast --# notpresent -- subj na "I may go"
|
||||
;
|
||||
|
||||
{-
|
||||
VPHForm =
|
||||
VPTense VPPTense Aspect Agr -- 9 * 12
|
||||
| VPReq
|
||||
| VPImp
|
||||
| VPReqFut
|
||||
| VPInf
|
||||
| VPStem
|
||||
;
|
||||
-}
|
||||
|
||||
|
||||
VType = VIntrans | VTrans | VTransPost ;
|
||||
|
||||
-- Tense defined for coupla case
|
||||
CTense = CPrsnt | CPast | CFuture ;
|
||||
|
||||
|
||||
oper
|
||||
|
||||
objVType : VType -> NPCase = \vt ->
|
||||
@@ -392,86 +262,44 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
comp = \\_ => []
|
||||
} ;
|
||||
|
||||
predVc : (Verb ** {c2,c1 : Str}) -> VPHSlash = \verb ->
|
||||
predV verb ** {c2 = {s = verb.c1 ; c = VTrans} } ;
|
||||
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} } ;
|
||||
------------------------
|
||||
-}
|
||||
{-
|
||||
pya : Gender -> Number -> Str = \g,n ->
|
||||
(mkAdj1 "pya").s ! n ! g ! Dir ;
|
||||
|
||||
cka : Gender -> Number -> Str = \g,n ->
|
||||
(mkAdj1 "cka").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
|
||||
predAux : NType -> VPH =\ctype -> {
|
||||
s = \\vh =>
|
||||
case vh of {
|
||||
VF NPresent _ pl p n g => {inf = copula CPrsnt pl n p g } ;
|
||||
VF (NPast _) _ pl p n g => {inf = copula CPast pl n p g } ;
|
||||
VF (NFuture _) _ pl p n g => {inf = copula CFuture pl n p g } ;
|
||||
Root => { inf = verb.inf} ;
|
||||
Inf => {inf = verb.inf} ;
|
||||
Imp => {inf = verb.inf} ;
|
||||
VF NPresent _ pl p n g =>
|
||||
case ctype of {
|
||||
Living => {inf = copulaPrLvng pl n p g } ;
|
||||
_ => {inf = copulaPrGen pl n p g }
|
||||
} ;
|
||||
VF (NPast _) _ pl p n g => {inf = copulaPsGen pl n p g } ;
|
||||
VF (NFuture _) _ pl p n g => {inf = copulaFtGen pl n p g } ;
|
||||
|
||||
Root => { inf = ""} ;
|
||||
Inf=> {inf = ""} ;
|
||||
Imp => {inf = ""} ;
|
||||
ProgRoot a n g => {inf = "" } ;
|
||||
PVForm => {inf = ""}
|
||||
};
|
||||
obj = {s = [] ; a = defaultAgr} ;
|
||||
subj = VIntrans ;
|
||||
inf = verb.inf;
|
||||
inf = "";
|
||||
ad = [];
|
||||
embComp = [];
|
||||
comp = \\_ => []
|
||||
} ;
|
||||
|
||||
Aux = {
|
||||
inf,ppart,prpart : Str
|
||||
} ;
|
||||
|
||||
auxBe : Aux = {
|
||||
inf = "" ;
|
||||
ppart = "" ;
|
||||
prpart = ""
|
||||
} ;
|
||||
|
||||
raha : VTense -> Aspect -> Gender -> Number -> NPerson -> {s:Str} = \t,a,g,n,p -> {
|
||||
s = case <t,a,g,n,p> of {
|
||||
<NPresent,Perf,Masc,Sg,Pers1> => "i:rhnx:" ;
|
||||
<_,_,_,_,_> => "i:rhnx:"
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
predProg : VPH -> VPH = \verb -> {
|
||||
s = \\vh =>
|
||||
case vh of {
|
||||
VF NPresent a pl p n g => {inf = (verb.s ! ProgRoot a n g).inf ++ copula CPrsnt pl n p g } ;
|
||||
VF (NPast _) a pl p n g => {inf = (verb.s ! ProgRoot a n g).inf ++ copula CPast pl n p g } ;
|
||||
VF (NFuture _) a pl p n g => {inf = (verb.s ! ProgRoot a n g).inf ++ copula CFuture pl n p g } ;
|
||||
Root => {inf = (verb.s ! Root).inf } ;
|
||||
VF NPresent a pl p n g => {inf = (verb.s ! ProgRoot a n g).inf ++ copulaPrGen pl n p g} ;
|
||||
VF (NPast _) a pl p n g => {inf = (verb.s ! ProgRoot a n g).inf ++ copulaPsGen pl n p g} ; --# notpresent
|
||||
VF (NFuture _) a pl p n g => {inf = (verb.s ! ProgRoot a n g).inf ++ copulaFtGen pl n p g} ; --# notpresent
|
||||
|
||||
Root => {inf = (verb.s ! Root).inf } ;
|
||||
Inf => {inf = (verb.s ! ProgRoot Imperf Sg Masc).inf } ;
|
||||
Imp => {inf = (verb.s ! Imp).inf } ;
|
||||
PVForm => {inf = (verb.s ! PVForm).inf } ;
|
||||
@@ -487,54 +315,49 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
|
||||
Clause : Type = {s : VPHTense => Polarity => Order => Str} ;
|
||||
|
||||
-- TODO, ERGATIVE CASE FROM NOUN INFLETION
|
||||
-- TODO, ERGATIVE CASE FROM NOUN INFLETION [No Proper grammer resource found]
|
||||
mkClause : NP -> VPH -> Clause = \np,vp -> {
|
||||
s = \\vt,b,ord =>
|
||||
let
|
||||
subjagr : NPCase * Agr = case vt of {
|
||||
VPSmplPast => case vp.subj of {
|
||||
VPSmplPast => case vp.subj of {
|
||||
VTrans => <NPErg, vp.obj.a> ;
|
||||
VTransPost => <NPErg, defaultAgr> ;
|
||||
_ => <NPC Nom, np.a>
|
||||
} ;
|
||||
} ;
|
||||
|
||||
VPPerfPast => case vp.subj of {
|
||||
VPPerfPast => case vp.subj of {
|
||||
VTrans => <NPErg, vp.obj.a> ;
|
||||
VTransPost => <NPErg, defaultAgr> ;
|
||||
_ => <NPC Nom, np.a>
|
||||
} ;
|
||||
|
||||
_ => <NPC Nom, np.a>
|
||||
} ;
|
||||
_ => <NPC Nom, np.a>
|
||||
} ;
|
||||
subj = subjagr.p1 ;
|
||||
agr = subjagr.p2 ;
|
||||
n = (fromAgr agr).n;
|
||||
p = (fromAgr agr).p;
|
||||
g = (fromAgr agr).g;
|
||||
vps = case <vt,b> of {
|
||||
<VPGenPres,Pos> => vp.s ! VF NPresent Imperf Pos p n g ;
|
||||
subj = subjagr.p1 ;
|
||||
agr = subjagr.p2 ;
|
||||
n = (fromAgr agr).n;
|
||||
p = (fromAgr agr).p;
|
||||
g = (fromAgr agr).g;
|
||||
vps = case <vt,b> of {
|
||||
<VPGenPres,Pos> => vp.s ! VF NPresent Imperf Pos p n g ;
|
||||
<VPGenPres,Neg> => vp.s ! VF NPresent Imperf Neg p n g ;
|
||||
<VPFut,Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<VPFut,Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g ;
|
||||
<VPSmplPast,Pos> => vp.s ! VF (NPast Simpl) Imperf Pos p n g ;
|
||||
<VPSmplPast,Neg> => vp.s ! VF (NPast Simpl) Imperf Neg p n g ;
|
||||
<VPFut,Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ; --# notpresent
|
||||
<VPFut,Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g ; --# notpresent
|
||||
<VPSmplPast,Pos> => vp.s ! VF (NPast Simpl) Imperf Pos p n g ; --# notpresent
|
||||
<VPSmplPast,Neg> => vp.s ! VF (NPast Simpl) Imperf Neg p n g ; --# notpresent
|
||||
|
||||
<VPPerfPres,Pos> => vp.s ! VF NPresent Perf Pos p n g ;
|
||||
<VPPerfPres,Neg> => vp.s ! VF NPresent Perf Neg p n g ;
|
||||
<VPPerfPast,Pos> => vp.s ! VF (NPast Simpl) Perf Pos p n g ;
|
||||
<VPPerfPast,Neg> => vp.s ! VF (NPast Simpl) Perf Neg p n g ;
|
||||
<VPPerfFut,Pos> => vp.s ! VF (NFuture Defin) Perf Pos p n g ;
|
||||
<VPPerfFut,Neg> => vp.s ! VF (NFuture Defin) Perf Neg p n g ;
|
||||
<VPPerfPast,Pos> => vp.s ! VF (NPast Simpl) Perf Pos p n g ; --# notpresent
|
||||
<VPPerfPast,Neg> => vp.s ! VF (NPast Simpl) Perf Neg p n g ; --# notpresent
|
||||
<VPPerfFut,Pos> => vp.s ! VF (NFuture Defin) Perf Pos p n g ; --# notpresent
|
||||
<VPPerfFut,Neg> => vp.s ! VF (NFuture Defin) Perf Neg p n g ; --# notpresent
|
||||
|
||||
<VPCondPres, Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<VPCondPres, Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g ;
|
||||
<VPCondPast, Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<VPCondPast, Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g
|
||||
{-
|
||||
<_, Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<_, Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g
|
||||
-}
|
||||
};
|
||||
<VPCondPast, Pos> => vp.s ! VF (NPast Hab) Perf Pos p n g ; --# notpresent
|
||||
<VPCondPast, Neg> => vp.s ! VF (NPast Hab) Perf Neg p n g --# notpresent
|
||||
} ;
|
||||
|
||||
quest =
|
||||
case ord of
|
||||
@@ -551,33 +374,29 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
\subj,agr,vp -> {
|
||||
s = \\t,b,ord =>
|
||||
let
|
||||
n = (fromAgr agr).n;
|
||||
p = (fromAgr agr).p;
|
||||
g = (fromAgr agr).g;
|
||||
vps = case <t,b> of {
|
||||
n = (fromAgr agr).n;
|
||||
p = (fromAgr agr).p;
|
||||
g = (fromAgr agr).g;
|
||||
vps = case <t,b> of {
|
||||
<VPGenPres,Pos> => vp.s ! VF NPresent Imperf Pos p n g ;
|
||||
<VPGenPres,Neg> => vp.s ! VF NPresent Imperf Neg p n g ;
|
||||
<VPFut,Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<VPFut,Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g ;
|
||||
<VPSmplPast,Pos> => vp.s ! VF (NPast Simpl) Imperf Pos p n g ;
|
||||
<VPSmplPast,Neg> => vp.s ! VF (NPast Simpl) Imperf Neg p n g ;
|
||||
<VPFut,Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ; --# notpresent
|
||||
<VPFut,Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g ; --# notpresent
|
||||
<VPSmplPast,Pos> => vp.s ! VF (NPast Simpl) Imperf Pos p n g ; --# notpresent
|
||||
<VPSmplPast,Neg> => vp.s ! VF (NPast Simpl) Imperf Neg p n g ; --# notpresent
|
||||
|
||||
<VPPerfPres,Pos> => vp.s ! VF NPresent Perf Pos p n g ;
|
||||
<VPPerfPres,Neg> => vp.s ! VF NPresent Perf Neg p n g ;
|
||||
<VPPerfPast,Pos> => vp.s ! VF (NPast Simpl) Perf Pos p n g ;
|
||||
<VPPerfPast,Neg> => vp.s ! VF (NPast Simpl) Perf Neg p n g ;
|
||||
<VPPerfFut,Pos> => vp.s ! VF (NFuture Defin) Perf Pos p n g ;
|
||||
<VPPerfFut,Neg> => vp.s ! VF (NFuture Defin) Perf Neg p n g ;
|
||||
<VPPerfPast,Pos> => vp.s ! VF (NPast Simpl) Perf Pos p n g ; --# notpresent
|
||||
<VPPerfPast,Neg> => vp.s ! VF (NPast Simpl) Perf Neg p n g ; --# notpresent
|
||||
<VPPerfFut,Pos> => vp.s ! VF (NFuture Defin) Perf Pos p n g ; --# notpresent
|
||||
<VPPerfFut,Neg> => vp.s ! VF (NFuture Defin) Perf Neg p n g ; --# notpresent
|
||||
|
||||
<VPCondPres, Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<VPCondPres, Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g ;
|
||||
<VPCondPast, Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<VPCondPast, Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g
|
||||
{-
|
||||
<_, Pos> => vp.s ! VF (NFuture Defin) Imperf Pos p n g ;
|
||||
<_, Neg> => vp.s ! VF (NFuture Defin) Imperf Neg p n g
|
||||
-}
|
||||
};
|
||||
<VPCondPast, Pos> => vp.s ! VF (NPast Hab) Perf Pos p n g ; --# notpresent
|
||||
<VPCondPast, Neg> => vp.s ! VF (NPast Hab) Perf Neg p n g --# notpresent
|
||||
} ;
|
||||
|
||||
quest =
|
||||
case ord of
|
||||
@@ -586,12 +405,10 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
|
||||
in
|
||||
quest ++ subj ++ vp.obj.s ++ vp.ad ++ vp.comp ! agr ++ vps.inf ++ vp.embComp
|
||||
-- quest ++ subj ++ vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vps.inf ++ vp.embComp
|
||||
--quest ++ subj ++ vp.ad ++ vp.comp ! agr ++ vp.obj.s ++ vps.inf ++ vp.embComp
|
||||
} ;
|
||||
{-
|
||||
insertSubj : PPerson -> Str -> Str = \p,s ->
|
||||
case p of { Pers1 => s ++ "wN" ; _ => s ++ "E"};
|
||||
-}
|
||||
|
||||
|
||||
insertObj : (Agr => Str) -> VPH -> VPH = \obj1,vp -> {
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
@@ -604,13 +421,11 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
|
||||
insertVV : {s:Agr => Str} -> VPH -> Str -> VPH -> VPH = \obj1,vp,emb,vp2 -> {
|
||||
s = vp.s ;
|
||||
-- obj = vp.obj ;
|
||||
obj = vp2.obj ;
|
||||
subj = vp.subj ;
|
||||
inf = vp.inf;
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp ++ emb;
|
||||
-- comp = \\a => vp.comp ! a ++ obj1.s ! a
|
||||
comp = \\a => obj1.s ! a ++ vp.comp ! a
|
||||
} ;
|
||||
|
||||
@@ -620,78 +435,69 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
subj = vp.subj ;
|
||||
inf = vp.inf;
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp ++ obj1;
|
||||
comp = vp.comp
|
||||
embComp = Prelude.glue vp.embComp obj1;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
|
||||
insertObjc : (Agr => Str) -> VPHSlash -> VPHSlash = \obj,vp ->
|
||||
insertObj obj vp ** {c2 = vp.c2} ;
|
||||
insertObj obj vp ** {c2 = vp.c2} ;
|
||||
|
||||
insertObjc2 : Str -> VPHSlash -> VPHSlash = \obj,vp ->
|
||||
insertObj2 obj vp ** {c2 = vp.c2} ;
|
||||
insertObj2 obj vp ** {c2 = vp.c2} ;
|
||||
|
||||
infVP : Bool -> VPH -> {s:Agr => Str} = \isAux,vp ->
|
||||
{s= \\a => vp.obj.s ++ (vp.s! PVForm).inf ++ vp.comp ! a };
|
||||
{s= \\a => vp.obj.s ++ (vp.s ! PVForm).inf ++ vp.comp ! a };
|
||||
|
||||
infVV : VPH -> {s:Agr => Str} = \vp -> {
|
||||
s = \\ agr => vp.comp ! agr ++ (vp.s ! PVForm) . inf
|
||||
s = \\ agr => vp.comp ! agr ++ (vp.s ! PVForm).inf
|
||||
} ;
|
||||
|
||||
|
||||
infV2V : VPH -> {s :Agr => Str} = \vp -> {
|
||||
s = \\agr => vp.comp ! agr ++ (vp.s ! PVForm).inf --++ "lai:"
|
||||
s = \\agr => vp.comp ! agr ++ (vp.s ! PVForm).inf -- ++ "lai:"
|
||||
} ;
|
||||
|
||||
insertObject : NP -> VPHSlash -> VPH = \np,vps -> {
|
||||
s = vps.s ;
|
||||
obj = {s = np.s ! objVType vps.c2.c ++ vps.c2.s ++ vps.obj.s ; a = np.a} ;
|
||||
-- obj = {s = vps.obj.s ; a = np.a} ;
|
||||
--_ => {s = vps.obj.s ++ np.s ! objVType vps.c2.c ; a = np.a}
|
||||
---};
|
||||
obj = {s = np.s ! objVType vps.c2.c ++ vps.c2.s ++ vps.obj.s ; a = np.a} ;
|
||||
subj = vps.c2.c ;
|
||||
inf = vps.inf;
|
||||
ad = vps.ad;
|
||||
embComp = vps.embComp;
|
||||
comp = vps.comp
|
||||
-- comp = \\a => vps.comp ! a ++ np.s ! (objVType vps.c2.c) ++ vps.c2.s
|
||||
} ;
|
||||
|
||||
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;
|
||||
comp = \\a => obj ! a ++ vp.c2.s ++ vp.comp ! a
|
||||
} ;
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
inf = vp.inf ;
|
||||
subj = vp.subj ;
|
||||
ad = vp.ad ;
|
||||
embComp = vp.embComp;
|
||||
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;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
inf = vp.inf ;
|
||||
subj = vp.subj;
|
||||
ad = vp.ad ++ ad ;
|
||||
embComp = vp.embComp;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
|
||||
conjThat : Str = "kI" ; -- की
|
||||
|
||||
{-
|
||||
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;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
s = vp.s ;
|
||||
obj = vp.obj ;
|
||||
inf = vp.inf ;
|
||||
subj = vp.subj;
|
||||
ad = vp.ad;
|
||||
embComp = vp.embComp ++ emb;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
|
||||
insertTrans : VPH -> VType -> VPH = \vp,vtype -> {
|
||||
s = vp.s ;
|
||||
@@ -706,4 +512,128 @@ resource ResNep = ParamX ** open Prelude, Predef in {
|
||||
embComp = vp.embComp ;
|
||||
comp = vp.comp
|
||||
} ;
|
||||
}
|
||||
|
||||
-- copula cases
|
||||
oper
|
||||
-- For Human, occupation/Introductiary case
|
||||
copulaPrLvng : Polarity -> Number -> NPerson -> Gender -> Str =
|
||||
\po,n,pn,g ->
|
||||
case <po,pn,n,g> of {
|
||||
-- Resembles with 'mkVPreNPReg' function for positive --TODO
|
||||
-- Present Positive
|
||||
<Pos, Pers1, Sg, _> => "huV" ; -- हुँ
|
||||
<Pos, Pers1, Pl, _> => "hwV" ; -- हौँ
|
||||
<Pos, Pers2_L, Sg, _> => "hosx:" ; -- होस्
|
||||
--<Pos, Pers2_L, Sg, Fem> => "hosx:" ; -- छेस्
|
||||
<Pos, Pers2_L, Pl, _> => "hw" ; -- हौ
|
||||
--<Pos, Pers2_M, Pl, Fem> => "cx:yw" ; -- छ्यौ
|
||||
<Pos, Pers2_M, _, _> => "hw" ; -- हौ
|
||||
<Pos, Pers3_L, Sg, Masc> => "ho" ; -- हो
|
||||
<Pos, Pers3_L, Sg, Fem> => "hunx:" ; -- हुन्
|
||||
<Pos, Pers3_L, Pl, _> => "hunx:" ; -- हुन्
|
||||
--<Pos, Pers3_M, Sg, Fem> => "hunx:" ; -- हुन्
|
||||
<Pos, Pers3_M, _, _> => "hunx:" ; -- हुन् --"hw" ; -- हौ
|
||||
<Pos, _ , _, _> => "hunuhunx:c" ; --हुनुहुन्छ
|
||||
|
||||
-- Present Negative
|
||||
<Neg, Pers1, Sg, _> => "hEn" ; --
|
||||
<Neg, Pers1, Pl, _> => "hEnwM" ; -- हैनौं
|
||||
<Neg, Pers2_L, Sg, _> => "hEnsx:" ; -- हैनस्
|
||||
<Neg, Pers2_L, Pl, _> => "hEnw" ; -- हैनौ
|
||||
<Neg, Pers2_M, _, _> => "hEnw" ; -- हैनौ
|
||||
<Neg, Pers3_L, Sg, _> => "hEn" ; --हैन
|
||||
<Neg, Pers3_L, Pl, _> => "hEnnx:" ; -- हैनन्
|
||||
<Neg, Pers3_M, _, _> => "hEnnx:" ; -- हैनन्
|
||||
<Neg, _, _, _> => "hunuhunx:z+n" -- हुनुहुन्न
|
||||
} ;
|
||||
|
||||
copulaPrGen : Polarity -> Number -> NPerson -> Gender -> Str =
|
||||
\po,n,pn,g ->
|
||||
case <po,pn,n,g> of {
|
||||
<Pos, Pers1, Sg, _> => "cu" ; -- छु
|
||||
<Pos, Pers1, Pl, _> => "cwM" ; -- छौं
|
||||
<Pos, Pers2_L, Sg, Masc> => "csx:" ; -- छस्
|
||||
<Pos, Pers2_L, Sg, Fem> => "cesx:" ; -- छेस्
|
||||
<Pos, Pers2_L, Pl, _> => "cw" ; -- छौ
|
||||
<Pos, Pers2_M, Pl, Fem> => "cx:yw" ; -- छ्यौ
|
||||
<Pos, Pers2_M, _, _> => "cw" ; -- छौ
|
||||
<Pos, Pers3_L, Sg, Masc> => "c" ; -- छ
|
||||
<Pos, Pers3_L, Sg, Fem> => "ce" ; -- छे
|
||||
<Pos, Pers3_L, Pl, _> => "cnx:" ; -- छन्
|
||||
<Pos, Pers3_M, Sg, Fem> => "cinx:" ; -- छिन्
|
||||
<Pos, Pers3_M, _, _> => "cnx:" ; -- छन्
|
||||
<Pos, _ , _, _> => "hunuhunx:c" ; --हुनुहुन्छ
|
||||
|
||||
-- Present Negative
|
||||
<Neg, Pers1, Sg, _> => "cEnV" ; -- छैनँ
|
||||
<Neg, Pers1, Pl, _> => "cEnwM" ; -- छैनौं
|
||||
<Neg, Pers2_L, Sg, _> => "cEnsx:" ; -- छैनस्
|
||||
<Neg, Pers2_L, Pl, _> => "cEnw" ; -- छैनौ
|
||||
<Neg, Pers2_M, _, _> => "cEnw" ; -- छैनौ
|
||||
<Neg, Pers3_L, Sg, _> => "cEn" ; --छैन
|
||||
<Neg, Pers3_L, Pl, _> => "cEnnx:" ; -- छैनन्
|
||||
<Neg, Pers3_M, _, _> => "cEnnx:" ; -- छैनन्
|
||||
<Neg, _, _, _> => "hunuhunx:z+n" -- हुनुहुन्न
|
||||
} ;
|
||||
|
||||
copulaPsGen : Polarity -> Number -> NPerson -> Gender -> Str =
|
||||
\po,n,pn,g ->
|
||||
case <po,pn,n,g> of {
|
||||
-- Past Positive
|
||||
<Pos, Pers1, Sg, _> => "Tie:V" ; -- थिएँ
|
||||
<Pos, Pers1, Pl, _> => "TiywV" ; -- थियौँ
|
||||
<Pos, Pers2_L, Sg, _> => "Tii:sx:" ; -- थिइस्
|
||||
<Pos, Pers2_L, Pl, _> => "Tiyw" ; -- थियौ
|
||||
<Pos, Pers2_M, _, _> => "Tiyw" ; -- थियौ
|
||||
<Pos, Pers3_L, Sg, Masc> => "Tiyo" ; -- थियो
|
||||
<Pos, Pers3_L, Sg, Fem> => "TiI:" ; --थिई
|
||||
<Pos, Pers3_L, Pl, _> => "Tie:" ; -- थिए
|
||||
<Pos, Pers3_M, Sg, Fem> => "Tii:nx:" ; -- थिइन्
|
||||
<Pos, Pers3_M, _, _> => "Tie:" ; -- थिए
|
||||
<Pos, _, _, _> => "hunuhunx:z+Tx:yo" ; -- हुनुहुन्थ्यो
|
||||
|
||||
-- Past Positive
|
||||
<Neg, Pers1, Sg, _> => "TinV" ; -- थिनँ
|
||||
<Neg, Pers1, Pl, _> => "TenwM" ; -- थेनौं
|
||||
<Neg, Pers2_L, Sg, _> => "Tinsx:" ; -- थिनस्
|
||||
<Neg, Pers2_L, Pl, _> => "Tenw" ; -- थेनौ
|
||||
<Neg, Pers2_M, _, _> => "Tenw" ; -- थेनौ
|
||||
<Neg, Pers3_L, Sg, Masc> => "Ten" ; -- थेन
|
||||
<Neg, Pers3_L, Sg, Fem> => "Tin" ; --थिन
|
||||
<Neg, Pers3_L, Pl, _> => "Tennx:" ; -- थेनन्
|
||||
<Neg, Pers3_M, Sg, Fem> => "Tinnx:" ; -- थिनन्
|
||||
<Neg, Pers3_M, _, _> => "Tennx:" ; -- थेनन्
|
||||
<Neg, _, _, _> => "hunuhunx:z+nTx:yo" -- हुनुहुन्नथ्यो
|
||||
} ;
|
||||
|
||||
|
||||
copulaFtGen : Polarity -> Number -> NPerson -> Gender -> Str =
|
||||
\po,n,pn,g ->
|
||||
case <po,pn,n,g> of {
|
||||
-- Future Positive
|
||||
<Pos, Pers1, Sg, _> => "hunecu" ; -- हुनेछु
|
||||
<Pos, Pers1, Pl, _> => "hunecwM" ; -- हुनेछौं
|
||||
<Pos, Pers2_L, Sg, _> => "hunecsx:" ; -- हुनेछस्
|
||||
<Pos, Pers2_L, Pl, _> => "hunecwM" ; -- हुनेछौ
|
||||
<Pos, Pers2_M, _, _> => "hunecwM" ; -- हुनेछौ
|
||||
<Pos, Pers3_L, Sg, _> => "hunec" ; -- हुनेछ
|
||||
<Pos, Pers3_L, Pl, _> => "hunecnx:" ; -- हुनेछन्
|
||||
<Pos, Pers3_M, _, Masc> => "hunecnx:" ; -- हुनेछन्
|
||||
<Pos, Pers3_M, Sg, Fem> => "hunecnx:" ; -- हुनेछिन्
|
||||
<Pos, Pers3_M, Pl, Fem> => "hunecnx:" ; -- हुनेछन्
|
||||
<Pos, _, _, _> => "hunuhunec" ; -- हुनुहुनेछ
|
||||
|
||||
-- Negative Case
|
||||
<Neg, Pers1, Sg, _> => "hunecEn" ; -- हुनेछैन
|
||||
<Neg, Pers1, Pl, _> => "hunecEnEV" ; -- हुनेछैनैँ
|
||||
<Neg, Pers2_L, Sg, _> => "hunecEnsx:" ; -- हुनेछैनस्
|
||||
<Neg, Pers2_L, Pl, _> => "hunecEnE" ; -- हुनेछैनै
|
||||
<Neg, Pers2_M, _, _> => "hunecEnE" ; -- हुनेछैनै
|
||||
<Neg, Pers3_L, Sg, _> => "hunecEnx:" ; -- हुनेछैन्
|
||||
<Neg, Pers3_L, Pl, _> => "hunecEnnx:" ; -- हुनेछैनन्
|
||||
<Neg, Pers3_M, Sg, _> => "hunecEnnx:" ; -- हुनेछैनन्
|
||||
<Neg, Pers3_M, Pl, _> => "hunecEnE" ; -- हुनेछैनै
|
||||
<Neg, _, _, _> => "hunuhunecEnx:" -- हुनुहुनेछैन्
|
||||
} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -12,8 +12,10 @@ concrete SentenceNep of Sentence = CatNep ** open Prelude, ResNep in {
|
||||
ImpVP vp = {
|
||||
s = \\pol,n =>
|
||||
let
|
||||
agr = Ag Masc (numImp n) Pers2_M ;
|
||||
verb = vp.obj.s ++ (vp.s! PVForm).inf ++ vp.comp ! agr ;
|
||||
agr = Ag Masc (numImp n) Pers2_M ;
|
||||
--verb = vp.obj.s ++ (vp.s ! PVForm).inf ++ vp.comp ! agr ;
|
||||
verb = vp.obj.s ++ (vp.s ! Root).inf ++ vp.comp ! agr ;
|
||||
--verb = vp.obj.s ++ vp.comp ! agr ++ (vp.s ! Root).inf ;
|
||||
dont = case pol of {
|
||||
CNeg True => "ngr" ;
|
||||
CNeg False => "ngr" ;
|
||||
|
||||
@@ -25,9 +25,9 @@ concrete StructuralNep of Structural = CatNep **
|
||||
can8know_VV,can_VV = mkV "skx:nu" ** { isAux = True} ;
|
||||
during_Prep = mkPrep "prx:yanx:t" ; -- पर्यान्त
|
||||
either7or_DConj = sd2 "HTva" "ya" ** {n = Sg} ; -- अथवा , या
|
||||
everybody_NP = MassNP (UseN (regN "svw jana")) ; -- not a good way coz need to include Noun (सवौ जाना)
|
||||
everybody_NP = MassNP (UseN (regN "svw jana" Living)) ; -- not a good way coz need to include Noun (सवौ जाना)
|
||||
every_Det = mkDet "sbE" "hrek" Sg ; -- सबै, हरेक
|
||||
everything_NP = MassNP (UseN (regN "harek kura")) ; -- हारेक कुरा
|
||||
everything_NP = MassNP (UseN (regN "harek kura" NonLiving)) ; -- हारेक कुरा
|
||||
everywhere_Adv = mkAdv "jata ttE" ; -- जाता ततै
|
||||
few_Det = mkDet "TorE" "HliktI" Pl ; -- थोरै, अलिकती
|
||||
-- d first_Ord = {s = "pehla" ; n = Sg} ; --DEPRECATED
|
||||
@@ -49,7 +49,7 @@ concrete StructuralNep of Structural = CatNep **
|
||||
here7from_Adv = mkAdv ["yhaV baq"] ; -- यहाँ बाट
|
||||
how_IAdv = ss "ksrI" ; -- कसरी
|
||||
how8much_IAdv = ss "ktI" ; -- कती
|
||||
--how8many_IDet = mkDet "ktI vqa" "ktI vqI" Pl ; -- काती वटा, कती वटी (incase of humans it becomes, 'kati jana') NEEDS FIX
|
||||
how8many_IDet = mkIDetn "ktI vqa" "ktI vqI" Pl ; -- काती वटा, कती वटी (incase of humans it becomes, 'kati jana') NEEDS FIX
|
||||
if_Subj = ss "ydi" ; -- यदि
|
||||
in8front_Prep = mkPrep "samu" ; -- सामु
|
||||
in_Prep = mkPrep "ma" ; -- मा
|
||||
@@ -84,10 +84,10 @@ concrete StructuralNep of Structural = CatNep **
|
||||
possess_Prep = mkPrep "DarNa grx:nu" ; -- धारणा गर्नु
|
||||
quite_Adv = ss "e:kdm" ; -- एकदम
|
||||
so_AdA = mkAdA "ys karN" ; -- यस कारण ???? NEED TO CHECK
|
||||
somebody_NP = MassNP (UseN (regN "kohI")); -- कोही
|
||||
somebody_NP = MassNP (UseN (regN "kohI" Living)); -- कोही
|
||||
someSg_Det = mkDet "kohI" "kehI" Sg ;
|
||||
somePl_Det = mkDet "kohI" "kehI" Pl ;
|
||||
something_NP = MassNP (UseN (regN "kehI kura")) ;
|
||||
something_NP = MassNP (UseN (regN "kehI kura" NonLiving)) ;
|
||||
somewhere_Adv = mkAdv "khIM" ; -- कहीं
|
||||
that_Quant = mkQuant "tx:ye" "yinIhru" ;
|
||||
that_Subj = ss "tx:yo"; -- त्यो
|
||||
@@ -123,7 +123,7 @@ concrete StructuralNep of Structural = CatNep **
|
||||
at_least_AdN = mkAdN "kmsekm" ; -- कमसेकम
|
||||
at_most_AdN = mkAdN "bXIma" ; -- बढीमा
|
||||
nothing_NP = MassNP (UseN (regN "kehI pnI")) ; -- केही पनी
|
||||
nobody_NP = MassNP (UseN (regN "kehI pnI")) ; --कोही पनी
|
||||
nobody_NP = MassNP (UseN (regN "kehI pnI" living)) ; --कोही पनी
|
||||
except_Prep = mkPrep "bahek" ; -- बाहेक
|
||||
as_CAdv = {s = "jtx:tIkE" ; p = ""} ; -- जत्तीकै
|
||||
have_V2 = mkV2 (mkV "hunu") "" ; -- हुनु
|
||||
|
||||
@@ -4,40 +4,41 @@ concrete VerbNep of Verb = CatNep ** open ResNep in {
|
||||
flags optimize=all_subs ;
|
||||
|
||||
lin
|
||||
UseV v = predV v ;
|
||||
|
||||
SlashV2a v = predV v ** {c2 = {s = v.c2.s ; c = VTrans}} ;
|
||||
UseV v = predV v ;
|
||||
|
||||
-- use of these two functions
|
||||
Slash2V3 v np =
|
||||
insertObjc (\\_ => np.s ! NPObj ++ v.c3 ) (predV v ** {c2 = {s = v.c2 ; c = VTrans}}) ; -- NEEDS CHECKING
|
||||
|
||||
Slash3V3 v np =
|
||||
insertObjc (\\_ => np.s ! NPC Nom ++ v.c3) (predV v ** {c2 = {s = v.c2 ; c = VTrans}}) ;
|
||||
|
||||
|
||||
ComplVV v vp = insertTrans (insertVV (infVV vp) (predV v) vp.embComp vp) vp.subj ;
|
||||
ComplVV v vp = insertTrans (insertVV (infVV vp) (predV v) vp.embComp vp) vp.subj ;
|
||||
|
||||
ComplVS v s = insertTrans (insertObj2 (conjThat ++ s.s) (predV v)) VTransPost ;
|
||||
|
||||
ComplVS v s = insertTrans (insertObj2 (conjThat ++ s.s) (predV v)) VTransPost ;
|
||||
|
||||
ComplVQ v q = insertObj2 (conjThat ++ q.s ! QIndir) (predV v) ;
|
||||
|
||||
-- Need check for 'bhayo' inflection (past)
|
||||
-- cc -all PredVP (MassNP (UseN cat_N)) (ComplVA become_VA (PositA red_A))
|
||||
|
||||
ComplVA v ap = insertObj (\\a => ap.s ! giveNumber a ! giveGender a) (predV v) ;
|
||||
|
||||
--cc -table PredVP (MassNP (UseN cat_N)) (ComplSlash (SlashV2V beg_V2V (UseV sleep_V)) (MassNP (UseN dog_N)))
|
||||
SlashV2V v vp = insertVV (infV2V vp) (predV v) vp.embComp vp ** {c2 = {s = v.c1 ; c = VTrans}} ; -- 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
|
||||
|
||||
|
||||
SlashV2a v = predV v ** {c2 = {s = v.c2.s ; c = VTrans}} ;
|
||||
-- use of these two functions
|
||||
Slash2V3 v np =
|
||||
insertObjc (\\_ => np.s ! NPC Acc ++ v.c3 ) (predV v ** {c2 = {s = v.c2 ; c = VTrans}}) ; -- NEEDS CHECKING
|
||||
|
||||
Slash3V3 v np =
|
||||
insertObjc (\\_ => np.s ! NPC Acc ++ v.c3) (predV v ** {c2 = {s = v.c2 ; c = VTrans}}) ;
|
||||
|
||||
|
||||
-- Check for the use of 'Acc' case of noun instead of adding 'lai' and 'sanga' later
|
||||
SlashV2V v vp = insertVV (infV2V vp) (predV v) vp.embComp vp ** {c2 = {s = v.c1 ; c = VTrans}} ;
|
||||
|
||||
SlashV2S v s = insertObjc2 (conjThat ++ s.s) (predV v ** {c2 = {s = "laI:" ; c = VTransPost}}) ;
|
||||
|
||||
SlashV2Q v q = insertObjc2 (conjThat ++ q.s ! QIndir) (predV v ** {c2 = {s = "sVg" ; c = VTransPost}}) ; -- chek for VTransPost, as in this case , case should be ergative but agrement should be default
|
||||
|
||||
-- cc -table PredVP (MassNP (UseN cat_N)) (ComplSlash (SlashV2A paint_V2A (PositA red_A)) (MassNP (UseN dog_N)))
|
||||
SlashV2Q v q = insertObjc2 (conjThat ++ q.s ! QIndir) (predV v ** {c2 = {s = "sVg" ; c = VTransPost}}) ;
|
||||
|
||||
SlashV2A v ap = insertObjc (\\a => ap.s ! giveNumber a ! giveGender a ) (predV v ** {c2 = {s = v.c2.s ; c = VTrans}}) ;
|
||||
|
||||
|
||||
|
||||
ComplSlash vp np = insertObject np vp ;
|
||||
|
||||
|
||||
SlashVV vv vp =
|
||||
insertEmbCompl (insertObj (infVP vv.isAux vp).s (predV vv)) vp.embComp **
|
||||
{c2 = vp.c2} ;
|
||||
@@ -47,27 +48,30 @@ concrete VerbNep of Verb = CatNep ** open ResNep in {
|
||||
(insertObjc (infVP vv.isAux vp).s (predVc vv)) **
|
||||
{c2 = vp.c2} ;
|
||||
|
||||
-- cc -table PredVP (MassNP (UseN cat_N)) (UseComp (CompAdv there_Adv))
|
||||
UseComp comp = insertObj comp.s (predAux auxBe) ;
|
||||
|
||||
-- cc -table PredVP (MassNP (UseN cat_N)) (AdvVP (UseV sleep_V) there_Adv)
|
||||
AdvVP vp adv = insertObj (\\_ => adv.s ) vp ;
|
||||
|
||||
-- cc -table PredVP (MassNP (UseN cat_N)) (AdVVP always_AdV (UseV sleep_V))
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
|
||||
-- cc -table PredVP (MassNP (UseN cat_N)) (ReflVP (SlashV2a eat_V2))
|
||||
ReflVP v = insertObjPre (\\_ => reflPron) v ;
|
||||
UseComp comp = insertObj comp.s (predAux comp.t) ;
|
||||
|
||||
|
||||
PassV2 v = predV v ; -- need to be fixed
|
||||
|
||||
CompAP ap = {s = \\a => ap.s ! giveNumber a ! giveGender a } ;
|
||||
|
||||
CompNP np = {s = \\_ => np.s ! NPObj} ;
|
||||
CompCN cn = {s = \\a => cn.s ! giveNumber a ! Nom} ;
|
||||
|
||||
-- cc -table PredVP (MassNP (UseN cat_N)) (UseComp (CompAdv there_Adv))
|
||||
CompAdv adv = {s = \\a => adv.s } ;
|
||||
|
||||
AdvVP vp adv = insertObj (\\_ => adv.s ) vp ;
|
||||
|
||||
AdVVP adv vp = insertAdV adv.s vp ;
|
||||
|
||||
|
||||
AdvVPSlash vp ad = insertObj (\\_ => ad.s ) vp ** {c2 = vp.c2} ;
|
||||
AdVVPSlash ad vp = insertObj (\\_ => ad.s ) vp ** {c2 = vp.c2} ;
|
||||
|
||||
|
||||
CompAP ap = {s = \\a => ap.s ! giveNumber a ! giveGender a ; t = NonLiving} ;
|
||||
|
||||
CompNP np = {s = \\_ => np.s ! NPObj; t = np.t} ;
|
||||
|
||||
CompAdv adv = {s = \\a => adv.s ; t = NonLiving} ;
|
||||
|
||||
CompCN cn = {s = \\a => cn.s ! giveNumber a ! Nom ; t = cn.t} ;
|
||||
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ allTransliterations = Map.fromAscList [
|
||||
("greek", transGreek),
|
||||
("hebrew", transHebrew),
|
||||
("persian", transPersian),
|
||||
("nepali", transNepali),
|
||||
("telugu", transTelugu),
|
||||
("thai", transThai),
|
||||
("urdu", transUrdu)
|
||||
@@ -170,6 +171,21 @@ transPersian = (mkTransliteration "Persian/Farsi" allTrans allCodes)
|
||||
[0x0641..0x064f] ++ [0x0650..0x0657] ++
|
||||
[0x067e,0x0686,0x0698,0x06a9,0x06af,0x06cc]
|
||||
|
||||
transNepali :: Transliteration
|
||||
transNepali = mkTransliteration "Nepali" allTrans allCodes where
|
||||
allTrans = words $
|
||||
"z+ z= " ++
|
||||
"- V M h: - H A i: I: f F Z - - - e: " ++
|
||||
"E: - - O W k K g G n: C c j J Y q " ++
|
||||
"Q x X N t T d D n - p P b B m y " ++
|
||||
"r - l L - v S z s h - - ~ ` a i " ++
|
||||
"I u U R - - - e E - - o w x: - - " ++
|
||||
"O: - _ - - - - - - - - - - - - - " ++
|
||||
"- - - - . > 0 1 2 3 4 5 6 7 8 9 " ++
|
||||
"- - - - - - - - - - - - - - - - "
|
||||
allCodes = [0x200c,0x200d] ++ [0x0900 .. 0x097f]
|
||||
|
||||
|
||||
transHebrew :: Transliteration
|
||||
transHebrew = mkTransliteration "unvocalized Hebrew" allTrans allCodes where
|
||||
allTrans = words $
|
||||
|
||||
Reference in New Issue
Block a user