From 81bb7c7ddebcd859976b20a7eed9f423471bc45a Mon Sep 17 00:00:00 2001 From: "virk.shafqat" Date: Sat, 20 Apr 2013 09:15:49 +0000 Subject: [PATCH] refinementsDiffHindustani --- examples/phrasebook/WordsUrd.gf | 2 +- lib/src/hindi/DiffHin.gf | 37 ++++++++++----------------- lib/src/hindi/MorphoHin.gf | 19 ++++++++++++++ lib/src/hindi/src/DiffHin.gf | 37 ++++++++++----------------- lib/src/hindi/src/MorphoHin.gf | 19 ++++++++++++++ lib/src/hindustani/DiffHindustani.gf | 1 - lib/src/hindustani/ResHindustani.gf | 6 ++--- lib/src/urdu/DiffUrd.gf | 38 ++++++++++------------------ lib/src/urdu/MorphoUrd.gf | 22 ++++++++++++++++ lib/src/urdu/src/DiffUrd.gf | 38 ++++++++++------------------ lib/src/urdu/src/MorphoUrd.gf | 22 ++++++++++++++++ 11 files changed, 142 insertions(+), 99 deletions(-) diff --git a/examples/phrasebook/WordsUrd.gf b/examples/phrasebook/WordsUrd.gf index 3655e4c57..e336968a4 100644 --- a/examples/phrasebook/WordsUrd.gf +++ b/examples/phrasebook/WordsUrd.gf @@ -157,7 +157,7 @@ flags coding = utf8 ; -- QWhatName p = mkQS (mkQCl whatSg_IP (mkVP (nameOf p))) ; QWhatName p = mkQS (mkQCl what_IAdv (mkNP p.poss (P.mkN "نام" "نام" "نام" "نام" "نام" "نام" masculine))) ; -- QWhatAge p = mkQS (mkQCl (mkCl (mkNP (modQuant p.poss)) (mkAdv "عمر"))) ; - QWhatAge p = mkQS (mkQCl howMuch_IAdv (mkNP (modQuant p.poss) (P.mkN "عمر" "عمر" "عمر" "عمریں" "عمریں" "عمرو" feminine))) ; + QWhatAge p = mkQS (mkQCl howMuch_IAdv (mkNP (modQuant p.poss) (P.mkN "عمر" feminine))) ; HowMuchCost item = mkQS (mkQCl (mkCl (modNP item) (mkAdv ["كی قیمت"]))) ; -- HowMuchCost item = mkQS (mkQCl howMuch_IAdv (mkNP cost_Predet (modNP item))) ; ItCost item price = mkCl item (mkV2 (mkV "قیمت")) price ; diff --git a/lib/src/hindi/DiffHin.gf b/lib/src/hindi/DiffHin.gf index b9b61061a..84aa19666 100644 --- a/lib/src/hindi/DiffHin.gf +++ b/lib/src/hindi/DiffHin.gf @@ -98,11 +98,21 @@ oper } ; - raha : Gender -> Number -> Str = \g,n -> - (regAdjective "रहा").s ! n ! g ! Dir ! Posit ; + raha : Gender -> Number -> Str = \g,n -> + case of { + => "रहा"; + => "रहे"; + => "रही" + + }; - cka : Gender -> Number -> Str = \g,n -> - (regAdjective "चुका").s ! n ! g ! Dir ! Posit ; + cka : Gender -> Number -> Str = \g,n -> + case of { + => "चुका"; + => "चुके"; + => "चुकी" + + }; hw : UPerson -> Number -> Str = \pp,n -> case of { @@ -121,23 +131,4 @@ oper => "हुए" ; => "हुई" }; - ----------------------------------------------- - -- Hindustani Adjectives - ----------------------------------------------- - - - regAdjective : Str -> Adjective; - regAdjective x = case x of { - acch + ("ा"|"न") => mkAdjective x ("बहुत" ++ x) ("सब से" ++ x) (acch + "े") ("बहुत" ++ acch + "े") ("सब से" ++ acch + "े") (acch + "े") ("बहुत" ++ acch + "े") ("सब से" ++ acch + "े") - (acch + "ी") ("बहुत" ++ acch + "ी") ("सब से" ++ acch + "ी") (acch + "ी") ("बहुत" ++ acch + "ी") ("सब से" ++ acch + "ी") (acch + "ी") ("बहुत" ++ acch + "ी") ("सब से" ++ acch + "ी") - (acch +"े") ("बहुत" ++ acch + "े") ("सब से" ++ acch + "े") (acch + "े") ("बहुत" ++ acch + "े") ("सब से" ++ acch + "े") (acch + "े") ("बहुत" ++ acch + "े") ("सब से" ++ acch + "े") - (acch + "ी") ("बहुत" ++ acch + "ी") ("सब से" ++ acch + "ी") (acch + "ी") ("बहुत" ++ acch + "ी") ("सब से" ++ acch + "ी") (acch + "ी") ("बहुत" ++ acch + "ी") ("सब से" ++ acch + "ी"); - - _ => mkAdjective x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) - x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) - x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) - x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) - - }; - } \ No newline at end of file diff --git a/lib/src/hindi/MorphoHin.gf b/lib/src/hindi/MorphoHin.gf index 6bb9eaf31..e91ea56cb 100644 --- a/lib/src/hindi/MorphoHin.gf +++ b/lib/src/hindi/MorphoHin.gf @@ -331,6 +331,25 @@ oper ----2 Adjectives makeIrregA : Str -> Adjective = \str -> {s = \\_,_,_,_ => str} ; + compoundAdj : Str -> Str -> Adjective = \s1,s2 -> mkCompoundAdj (regAdjective s1) (regAdjective s2) ; + mkCompoundAdj : Adjective -> Adjective -> Adjective ; + mkCompoundAdj adj1 adj2 = {s = \\n,g,c,d => adj1.s ! n ! g ! c ! d ++ adj2.s ! n ! g ! c ! d} ; + + + regAdjective : Str -> Adjective; + regAdjective x = case x of { + acch + ("ा"|"न") => mkAdjective x ("बहुत" ++ x) ("सब से" ++ x) (acch + "े") ("बहुत" ++ acch + "े") ("सब से" ++ acch + "े") (acch + "े") ("बहुत" ++ acch + "े") ("सब से" ++ acch + "े") + (acch + "ी") ("बहुत" ++ acch + "ी") ("सब से" ++ acch + "ी") (acch + "ी") ("बहुत" ++ acch + "ी") ("सब से" ++ acch + "ी") (acch + "ी") ("बहुत" ++ acch + "ी") ("सब से" ++ acch + "ी") + (acch +"े") ("बहुत" ++ acch + "े") ("सब से" ++ acch + "े") (acch + "े") ("बहुत" ++ acch + "े") ("सब से" ++ acch + "े") (acch + "े") ("बहुत" ++ acch + "े") ("सब से" ++ acch + "े") + (acch + "ी") ("बहुत" ++ acch + "ी") ("सब से" ++ acch + "ी") (acch + "ी") ("बहुत" ++ acch + "ी") ("सब से" ++ acch + "ी") (acch + "ी") ("बहुत" ++ acch + "ी") ("सब से" ++ acch + "ी"); + + _ => mkAdjective x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) + x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) + x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) + x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) x ("बहुत" ++ x) ("सब से" ++ x) + + }; + ----3 Verbs CommonVF = {s : VTense => UPerson => Number => Gender => Str} ; diff --git a/lib/src/hindi/src/DiffHin.gf b/lib/src/hindi/src/DiffHin.gf index e0ca8d18c..5c0533e8e 100644 --- a/lib/src/hindi/src/DiffHin.gf +++ b/lib/src/hindi/src/DiffHin.gf @@ -98,11 +98,21 @@ oper } ; - raha : Gender -> Number -> Str = \g,n -> - (regAdjective "raha:").s ! n ! g ! Dir ! Posit ; + raha : Gender -> Number -> Str = \g,n -> + case of { + => "raha:"; + => "rahe:"; + => "rahi:" + + }; - cka : Gender -> Number -> Str = \g,n -> - (regAdjective "cuka:").s ! n ! g ! Dir ! Posit ; + cka : Gender -> Number -> Str = \g,n -> + case of { + => "cuka:"; + => "cuke:"; + => "cuki:" + + }; hw : UPerson -> Number -> Str = \pp,n -> case of { @@ -121,23 +131,4 @@ oper => "huE:" ; => "huI:" }; - ----------------------------------------------- - -- Hindustani Adjectives - ----------------------------------------------- - - - regAdjective : Str -> Adjective; - regAdjective x = case x of { - acch + ("a:"|"an") => mkAdjective x ("bahut" ++ x) ("sab se:" ++ x) (acch + "e:") ("bahut" ++ acch + "e:") ("sab se:" ++ acch + "e:") (acch + "e:") ("bahut" ++ acch + "e:") ("sab se:" ++ acch + "e:") - (acch + "i:") ("bahut" ++ acch + "i:") ("sab se:" ++ acch + "i:") (acch + "i:") ("bahut" ++ acch + "i:") ("sab se:" ++ acch + "i:") (acch + "i:") ("bahut" ++ acch + "i:") ("sab se:" ++ acch + "i:") - (acch +"e:") ("bahut" ++ acch + "e:") ("sab se:" ++ acch + "e:") (acch + "e:") ("bahut" ++ acch + "e:") ("sab se:" ++ acch + "e:") (acch + "e:") ("bahut" ++ acch + "e:") ("sab se:" ++ acch + "e:") - (acch + "i:") ("bahut" ++ acch + "i:") ("sab se:" ++ acch + "i:") (acch + "i:") ("bahut" ++ acch + "i:") ("sab se:" ++ acch + "i:") (acch + "i:") ("bahut" ++ acch + "i:") ("sab se:" ++ acch + "i:"); - - _ => mkAdjective x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) - x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) - x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) - x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) - - }; - } \ No newline at end of file diff --git a/lib/src/hindi/src/MorphoHin.gf b/lib/src/hindi/src/MorphoHin.gf index 6f5c9c7eb..8abe836a9 100644 --- a/lib/src/hindi/src/MorphoHin.gf +++ b/lib/src/hindi/src/MorphoHin.gf @@ -331,6 +331,25 @@ oper ----2 Adjectives makeIrregA : Str -> Adjective = \str -> {s = \\_,_,_,_ => str} ; + compoundAdj : Str -> Str -> Adjective = \s1,s2 -> mkCompoundAdj (regAdjective s1) (regAdjective s2) ; + mkCompoundAdj : Adjective -> Adjective -> Adjective ; + mkCompoundAdj adj1 adj2 = {s = \\n,g,c,d => adj1.s ! n ! g ! c ! d ++ adj2.s ! n ! g ! c ! d} ; + + + regAdjective : Str -> Adjective; + regAdjective x = case x of { + acch + ("a:"|"an") => mkAdjective x ("bahut" ++ x) ("sab se:" ++ x) (acch + "e:") ("bahut" ++ acch + "e:") ("sab se:" ++ acch + "e:") (acch + "e:") ("bahut" ++ acch + "e:") ("sab se:" ++ acch + "e:") + (acch + "i:") ("bahut" ++ acch + "i:") ("sab se:" ++ acch + "i:") (acch + "i:") ("bahut" ++ acch + "i:") ("sab se:" ++ acch + "i:") (acch + "i:") ("bahut" ++ acch + "i:") ("sab se:" ++ acch + "i:") + (acch +"e:") ("bahut" ++ acch + "e:") ("sab se:" ++ acch + "e:") (acch + "e:") ("bahut" ++ acch + "e:") ("sab se:" ++ acch + "e:") (acch + "e:") ("bahut" ++ acch + "e:") ("sab se:" ++ acch + "e:") + (acch + "i:") ("bahut" ++ acch + "i:") ("sab se:" ++ acch + "i:") (acch + "i:") ("bahut" ++ acch + "i:") ("sab se:" ++ acch + "i:") (acch + "i:") ("bahut" ++ acch + "i:") ("sab se:" ++ acch + "i:"); + + _ => mkAdjective x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) + x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) + x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) + x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) x ("bahut" ++ x) ("sab se:" ++ x) + + }; + ----3 Verbs CommonVF = {s : VTense => UPerson => Number => Gender => Str} ; diff --git a/lib/src/hindustani/DiffHindustani.gf b/lib/src/hindustani/DiffHindustani.gf index 77159240e..1f4e83db0 100644 --- a/lib/src/hindustani/DiffHindustani.gf +++ b/lib/src/hindustani/DiffHindustani.gf @@ -34,5 +34,4 @@ interface DiffHindustani = open Prelude in { cka : Gender -> Number -> Str ; hw : UPerson -> Number -> Str ; hwa : Agr -> Str ; - regAdjective : Str -> Adjective ; } \ No newline at end of file diff --git a/lib/src/hindustani/ResHindustani.gf b/lib/src/hindustani/ResHindustani.gf index 3b1075855..06c4714d5 100644 --- a/lib/src/hindustani/ResHindustani.gf +++ b/lib/src/hindustani/ResHindustani.gf @@ -406,9 +406,9 @@ param cvp = vp.cvp } ; - compoundAdj : Str -> Str -> Adjective = \s1,s2 -> mkCompoundAdj (regAdjective s1) (regAdjective s2) ; - mkCompoundAdj : Adjective -> Adjective -> Adjective ; - mkCompoundAdj adj1 adj2 = {s = \\n,g,c,d => adj1.s ! n ! g ! c ! d ++ adj2.s ! n ! g ! c ! d} ; +-- compoundAdj : Str -> Str -> Adjective = \s1,s2 -> mkCompoundAdj (regAdjective s1) (regAdjective s2) ; +-- mkCompoundAdj : Adjective -> Adjective -> Adjective ; +-- mkCompoundAdj adj1 adj2 = {s = \\n,g,c,d => adj1.s ! n ! g ! c ! d ++ adj2.s ! n ! g ! c ! d} ; } diff --git a/lib/src/urdu/DiffUrd.gf b/lib/src/urdu/DiffUrd.gf index dca736172..de3eff6df 100644 --- a/lib/src/urdu/DiffUrd.gf +++ b/lib/src/urdu/DiffUrd.gf @@ -99,11 +99,21 @@ copula : CTense -> Number -> UPerson -> Gender -> Str = \t,n,p,g -> } ; - raha : Gender -> Number -> Str = \g,n -> - (regAdjective "رہا").s ! n ! g ! Dir ! Posit ; + raha : Gender -> Number -> Str = \g,n -> + case of { + => "رہا"; + => "رہے"; + => "رہی" + + }; - cka : Gender -> Number -> Str = \g,n -> - (regAdjective "چکا").s ! n ! g ! Dir ! Posit ; + cka : Gender -> Number -> Str = \g,n -> + case of { + => "چکا"; + => "چکے"; + => "چکی" + + }; hw : UPerson -> Number -> Str = \pp,n -> case of { @@ -124,24 +134,4 @@ copula : CTense -> Number -> UPerson -> Gender -> Str = \t,n,p,g -> => "ہوی" }; - ----------------------------------------------- - -- Hindustani Adjectives - ----------------------------------------------- - - Adjective = { s: Number => Gender => Case => Degree => Str }; - - regAdjective : Str -> Adjective; - regAdjective x = case x of { - acch + ("ا"|"اں") => mkAdjective x ("بہت" ++ x) ("سب سے" ++ x) (acch + "ے") ("بہت" ++ acch + "ے") ("سب سے" ++ acch + "ے") (acch + "ے") ("بہت" ++ acch + "ے") ("سب سے" ++ acch + "ے") - (acch + "ی") ("بہت" ++ acch + "ی") ("سب سے" ++ acch + "ی") (acch + "ی") ("بہت" ++ acch + "ی") ("سب سے" ++ acch + "ی") (acch + "ی") ("بہت" ++ acch + "ی") ("سب سے" ++ acch + "ی") - (acch +"ے") ("بہت" ++ acch + "ے") ("سب سے" ++ acch + "ے") (acch + "ے") ("بہت" ++ acch + "ے") ("سب سے" ++ acch + "ے") (acch + "ے") ("بہت" ++ acch + "ے") ("سب سے" ++ acch + "ے") - (acch + "ی") ("بہت" ++ acch + "ی") ("سب سے" ++ acch + "ی") (acch + "ی") ("بہت" ++ acch + "ی") ("سب سے" ++ acch + "ی") (acch + "ی") ("بہت" ++ acch + "ی") ("سب سے" ++ acch + "ی"); - - _ => mkAdjective x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) - x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) - x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) - x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) - - }; - } diff --git a/lib/src/urdu/MorphoUrd.gf b/lib/src/urdu/MorphoUrd.gf index 232278ead..0f2fdfec0 100644 --- a/lib/src/urdu/MorphoUrd.gf +++ b/lib/src/urdu/MorphoUrd.gf @@ -169,6 +169,28 @@ oper mkN12 bhao = mkNoun (bhao) (bhao) (bhao) (bhao) (bhao) (bhao) Masc ; + +-- Adjectives + compoundAdj : Str -> Str -> Adjective = \s1,s2 -> mkCompoundAdj (regAdjective s1) (regAdjective s2) ; + mkCompoundAdj : Adjective -> Adjective -> Adjective ; + mkCompoundAdj adj1 adj2 = {s = \\n,g,c,d => adj1.s ! n ! g ! c ! d ++ adj2.s ! n ! g ! c ! d} ; + + regAdjective : Str -> Adjective; + regAdjective x = case x of { + acch + ("ا"|"اں") => mkAdjective x ("بہت" ++ x) ("سب سے" ++ x) (acch + "ے") ("بہت" ++ acch + "ے") ("سب سے" ++ acch + "ے") (acch + "ے") ("بہت" ++ acch + "ے") ("سب سے" ++ acch + "ے") + (acch + "ی") ("بہت" ++ acch + "ی") ("سب سے" ++ acch + "ی") (acch + "ی") ("بہت" ++ acch + "ی") ("سب سے" ++ acch + "ی") (acch + "ی") ("بہت" ++ acch + "ی") ("سب سے" ++ acch + "ی") + (acch +"ے") ("بہت" ++ acch + "ے") ("سب سے" ++ acch + "ے") (acch + "ے") ("بہت" ++ acch + "ے") ("سب سے" ++ acch + "ے") (acch + "ے") ("بہت" ++ acch + "ے") ("سب سے" ++ acch + "ے") + (acch + "ی") ("بہت" ++ acch + "ی") ("سب سے" ++ acch + "ی") (acch + "ی") ("بہت" ++ acch + "ی") ("سب سے" ++ acch + "ی") (acch + "ی") ("بہت" ++ acch + "ی") ("سب سے" ++ acch + "ی"); + + _ => mkAdjective x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) + x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) + x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) + x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) x ("بہت" ++ x) ("سب سے" ++ x) + + }; + + + ----2 Determiners IDeterminer = {s:Gender => Case => Str ; n : Number}; makeDet : Str -> Str -> Str -> Str -> Number -> Determiner = \s1,s2,s3,s4,n -> { diff --git a/lib/src/urdu/src/DiffUrd.gf b/lib/src/urdu/src/DiffUrd.gf index 0036bef57..e9aa4cbaa 100644 --- a/lib/src/urdu/src/DiffUrd.gf +++ b/lib/src/urdu/src/DiffUrd.gf @@ -99,11 +99,21 @@ copula : CTense -> Number -> UPerson -> Gender -> Str = \t,n,p,g -> } ; - raha : Gender -> Number -> Str = \g,n -> - (regAdjective "rha").s ! n ! g ! Dir ! Posit ; + raha : Gender -> Number -> Str = \g,n -> + case of { + => "rha"; + => "rhE"; + => "rhy" + + }; - cka : Gender -> Number -> Str = \g,n -> - (regAdjective "cka").s ! n ! g ! Dir ! Posit ; + cka : Gender -> Number -> Str = \g,n -> + case of { + => "cka"; + => "ckE"; + => "cky" + + }; hw : UPerson -> Number -> Str = \pp,n -> case of { @@ -124,24 +134,4 @@ copula : CTense -> Number -> UPerson -> Gender -> Str = \t,n,p,g -> => "hwy" }; - ----------------------------------------------- - -- Hindustani Adjectives - ----------------------------------------------- - - Adjective = { s: Number => Gender => Case => Degree => Str }; - - regAdjective : Str -> Adjective; - regAdjective x = case x of { - acch + ("a"|"aN") => mkAdjective x ("bht" ++ x) ("sb sE" ++ x) (acch + "E") ("bht" ++ acch + "E") ("sb sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sb sE" ++ acch + "E") - (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y") - (acch +"E") ("bht" ++ acch + "E") ("sb sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sb sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sb sE" ++ acch + "E") - (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y"); - - _ => mkAdjective x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) - x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) - x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) - x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) - - }; - } diff --git a/lib/src/urdu/src/MorphoUrd.gf b/lib/src/urdu/src/MorphoUrd.gf index 5e5715954..33b2762ab 100644 --- a/lib/src/urdu/src/MorphoUrd.gf +++ b/lib/src/urdu/src/MorphoUrd.gf @@ -169,6 +169,28 @@ oper mkN12 bhao = mkNoun (bhao) (bhao) (bhao) (bhao) (bhao) (bhao) Masc ; + +-- Adjectives + compoundAdj : Str -> Str -> Adjective = \s1,s2 -> mkCompoundAdj (regAdjective s1) (regAdjective s2) ; + mkCompoundAdj : Adjective -> Adjective -> Adjective ; + mkCompoundAdj adj1 adj2 = {s = \\n,g,c,d => adj1.s ! n ! g ! c ! d ++ adj2.s ! n ! g ! c ! d} ; + + regAdjective : Str -> Adjective; + regAdjective x = case x of { + acch + ("a"|"aN") => mkAdjective x ("bht" ++ x) ("sb sE" ++ x) (acch + "E") ("bht" ++ acch + "E") ("sb sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sb sE" ++ acch + "E") + (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y") + (acch +"E") ("bht" ++ acch + "E") ("sb sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sb sE" ++ acch + "E") (acch + "E") ("bht" ++ acch + "E") ("sb sE" ++ acch + "E") + (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y") (acch + "y") ("bht" ++ acch + "y") ("sb sE" ++ acch + "y"); + + _ => mkAdjective x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) + x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) + x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) + x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) x ("bht" ++ x) ("sb sE" ++ x) + + }; + + + ----2 Determiners IDeterminer = {s:Gender => Case => Str ; n : Number}; makeDet : Str -> Str -> Str -> Str -> Number -> Determiner = \s1,s2,s3,s4,n -> {