Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
427 lines (401 sloc) 12.7 KB
# encoding: utf-8
##
# Copyright (C) Navaneeth.K.N
#
# This is part of libvarnam. See LICENSE.txt for the license
##
language_code "ml"
identifier "ml"
display_name "Malayalam"
author "Navaneeth KN"
stable true
$virama = "്"
virama "~" => "്"
infer_dead_consonants true
vowels "a" => "അ",
[["a"], "aa", "A"] => ["ആ", "ാ"],
"i" => ["ഇ", "ി"],
["ee", "I", "ii", ["i"]] => ["ഈ", "ീ"],
"u" => ["ഉ", "ു"],
[["u"], "uu", "oo", "U"] => ["ഊ", "ൂ"],
[["ri", "ru"], "R"] => ["ഋ", "ൃ", "ർ"],
"e" => ["എ", "െ"],
["E", ["e"]] => ["ഏ", "േ"],
["ai", "ei"] => ["ഐ", "ൈ"],
"o" => ["ഒ", "ൊ"],
["O", ["o"]] => ["ഓ", "ോ"],
["ou", "au", "ow"] => ["ഔ", "ൌ"],
["OU", "AU", "OW"] => ["ഔ", "ൗ"]
vowels({:priority => :low, :accept_if => :ends_with}, [["y"]] => ["ഇ", "ി"])
consonants ["ka"] => "ക",
["kha", ["gha"]] => "ഖ",
"ga" => "ഗ",
["gha", ["kha"]] => "ഘ",
["NGa", ["nga"]] => "ങ്ങ",
"cha" => "ച",
["CHa", ["cha", "jha"]] => "ഛ",
[["cha"]] => "ച്ഛ",
"ja" => "ജ",
["jha", "JHa"] => "ഝ",
[["nja"], "NJa"] => "ഞ്ഞ",
["ta", ["tta"]] => "റ്റ",
[["da", "ta"], "Ta"] => "ട",
[["da", "ta"], "TTa"] => "ഠ",
["Da", ["da"]] => "ഡ",
[["da"], "DDa"] => "ഢ",
["tha", ["ta"]] => "ത",
[["tha", "dha"], "thha"] => "ഥ",
[["tha", "dha"], "tathha"] => "ത്ഥ",
"da" => "ദ",
[["dha"], "ddha"] => "ദ്ധ",
"dha" => "ധ",
"pa" => "പ",
["pha", "fa", "Fa"] => "ഫ",
"ba" => "ബ",
"bha" => "ഭ",
["va", "wa"] => "വ",
["Sa", ["sha", "sa"]] => "ശ",
["sa", "za"] => "സ",
"ha" => "ഹ"
consonants({:accept_if => :starts_with}, ["ca"] => "ക")
tag "render_value2" do
consonants "nja" => ["ഞ", "ഞ്ഞ"],
"nga" => ["ങ", "ങ്ങ"]
end
consonants ["kra"] => "ക്ര",
"gra" => "ഗ്ര",
["ghra", ["khra"]] => "ഘ്ര",
["CHra", ["chra", "jhra"]] => "ഛ്ര",
"jra" => "ജ്ര",
[["dra", "tra"], "Tra"] => "ട്ര",
["Dra", ["dra"]] => "ഡ്ര",
"Dhra" => "ഢ്ര",
["thra", ["tra"]] => "ത്ര",
"dra" => "ദ്ര",
["ddhra", ["dhra"]] => "ദ്ധ്ര",
"dhra" => "ധ്ര",
"pra" => "പ്ര",
["phra", "fra", "Fra"] => "ഫ്ര",
"bra" => "ബ്ര",
"bhra" => "ഭ്ര",
["vra", "wra"] => "വ്ര",
["Sra", ["shra", "sra"]] => "ശ്ര",
"shra" => "ഷ്ര",
["sra", "zra"] => "സ്ര",
"hra" => "ഹ്ര",
"nthra" => "ന്ത്ര",
[["ndra", "ntra"], "nDra", "Ntra", "nTra"] => "ണ്ട്ര",
"ndra" => "ന്ദ്ര",
[["thra"], "THra", "tthra"] => "ത്ത്ര",
"nnra" => "ന്ന്ര",
["kkra", "Kra", "Cra"] => "ക്ക്ര",
["mpra", "mbra"] => "മ്പ്ര",
["skra","schra"] => "സ്ക്ര",
"ndhra" => "ന്ധ്ര",
"nmra" => "ന്മ്ര",
["NDra", ["ndra"]] => "ണ്ഡ്ര"
consonants({:accept_if => :starts_with}, ["cra"] => "ക്ര")
consonants "ya" => "യ",
"sha" => "ഷ",
"zha" => "ഴ",
["xa", ["Xa"]] => "ക്സ",
"ksha" => "ക്ഷ",
"nka" => "ങ്ക",
["ncha", ["nja"]] => "ഞ്ച",
"ntha" => "ന്ത",
"nta" => "ന്റ",
[["nda"], "nDa", "Nta"] => "ണ്ട",
"nda" => "ന്ദ",
"tta" => "ട്ട",
[["tha"], "THa", "ttha"] => "ത്ത",
"lla" => "ല്ല",
["LLa", ["lla"]] => "ള്ള",
"nna" => "ന്ന",
["NNa", ["nna"]] => "ണ്ണ",
["bba", "Ba"] => "ബ്ബ",
["kka", "Ka"] => "ക്ക",
["gga", "Ga"] => "ഗ്ഗ",
["jja", "Ja"] => "ജ്ജ",
["mma", "Ma"] => "മ്മ",
["ppa", "Pa"] => "പ്പ",
["vva", "Va", "wwa", "Wa"] => "വ്വ",
["yya", "Ya"] => "യ്യ",
["mpa", "mba"] => "മ്പ",
["ska","scha"] => "സ്ക",
[["cha"], "chcha", "ccha", "Cha"] => "ച്ച",
"ndha" => "ന്ധ",
"jnja" => "ജ്ഞ",
"nma" => "ന്മ",
["Nma", ["nma"]] => "ണ്മ",
["nJa", ["nja"]] => "ഞ്ജ",
["NDa", ["nda"]] => "ണ്ഡ"
# Don't need to infer dead consonants because removing 'a' from pattern will make what is mapped for chill
infer_dead_consonants false
consonants ["ra"] => "ര",
[["ra"], "Ra"] => "റ",
["na"] => "ന",
[["na"], "Na"] => "ണ",
["la"] => "ല",
[["la"], "La"] => "ള",
["ma"] => "മ"
infer_dead_consonants true
consonants ["rva", "rwa"] => "ര്വ",
"rya" => "ര്യ",
["Rva", "Rwa", ["rva"]] => "റ്വ്",
["Rya", ["rya"]] => "റ്യ്",
["nva", "nwa"] => "ന്വ",
"nya" => "ന്യ",
["Nva", "Nwa", ["nva", "nwa"]] => "ണ്വ",
["Nya", ["nya"]] => "ണ്യ",
["lva", "lwa"] => "ല്വ",
"lya" => "ല്യ",
["Lva", "Lwa", ["lva", "lwa"]] => "ള്വ",
["Lya", ["lya"]] => "ള്യ",
["mva", "mwa"] => "മ്വ",
"mya" => "മ്യ"
# Autogenerate consonant vowel combinations
generate_cv
consonants [["ru"]] => "ര്",
[["r~", "ru"]] => "റ്",
[["nu"]] => "ന്",
[["n~", "nu"]] => "ണ്",
[["lu"]] => "ല്",
[["l~", "lu"]] => "ള്",
[["mu"]] => "മ്",
["r~"] => "ര്",
["R~"] => "റ്",
["n~"] => "ന്",
["N~"] => "ണ്",
["l~"] => "ല്",
["L~"] => "ള്",
["m~"] => "മ്"
# value1 = atomic chil. value2 = old style. value3 = base letter
tag "chill" do
consonants "m" => ["ം","ം","മ"],
"n" => ["ൻ", "ന്‍", "ന"],
["N", ["n"]] => ["ൺ", "ണ്‍", "ണ"],
"l" => ["ൽ", "ല്‍", "ല"],
["L", ["l"]] => ["ൾ", "ള്‍", "ള"],
["r"] => ["ർ", "ര്‍", "ര"]
end
# * is the place holder which will be replaced by the actual value
consonants({:accept_if => :ends_with}, combine(get_dead_consonants, [["*u"]] => "*1"))
symbols "/" => "ഽ",
["H", [":"]] => "ഃ"
numbers "0" => "൦",
"1" => "൧",
"2" => "൨",
"3" => "൩",
"4" => "൪",
"5" => "൫",
"6" => "൬",
"7" => "൭",
"8" => "൮",
"9" => "൯"
stemrules "ാ" => "്",
"ും" => "്",
"ണു" => "ണ്",
"ന്റെ" => "ൻ",
"ൻറെ" => "ൻ",
"ന്റേ" => "ൻ",
"ന്" => "ൻ",
"ിനു" => "ിൻ",
"നേ" => "ൻ",
"നെ" => "ൻ",
"നു" => "ൻ",
"ള്" => "ൾ",
"ളു" => "ൾ",
"ളെ" => "ൾ",
"ളേ" => "ൾ",
"ളോ" => "ൾ",
"ളൂ" => "ൾ",
"ല്" => "ൽ",
"ലെ" => "ൽ",
"ലേ" => "ൽ",
"ലോ" => "ൽ",
"ലു" => "ൽ",
"ലൂ" => "ൽ",
"റു" => "ർ",
"രെ" => "ർ",
"രേ" => "ർ",
"ര്" => "ർ",
"രു" => "ർ",
"രൊ" => "ർ",
"വ്" => "ം",
"മ്" => "ം",
"മു" => "ം",
"മേ" => "ം",
"മോ" => "ം",
"മൊ" => "ം",
"ത്ത്" => "ം",
"ത്തേ" => "ം",
"തോ" => "ത്",
"ച്ചേ" => "ച്ചു",
"യ്" => "",
"യു" => "",
"യെ" => "",
"യേ" => "",
"യി" => "",
"യോ" => "",
"ടെ" => "",
"ടേ" => "",
"ടോ" => "ട്",
"ക്ക്" => "",
"ക്കു" => "",
"ക്കെ" => "",
"ല്ലാം" => "",
"ല്ലോ" => "",
"ണ്ടു" => "ണ്ട്",
"ണ്ടോ" => "ണ്ട്",
"ണ്ടിൽ" => "ണ്ട്",
"ളിൽ" => "ൾ",
"മായ" => "ം",
"മായി" => "ം",
"മാക്കി" => "ം",
"മാക്കും" => "ം",
"മാണ്" => "ം",
"മുണ്ട്" => "ം",
"മെന്ന" => "ം",
"മെന്ന്" => "ം",
"മിൻ" => "ം",
"മാർ" => "",
"ണെന്നു" => "ണ്",
"ണെന്ന്" => "ണ്",
"ണെന്ന" => "ണ്",
#"ന്ൻ" => "ന്ന്",
"ന്നോ" => "ന്ന്",
"ന്നല്ല" => "ന്ന്",
"ന്നാണ്‌" => "ന്ന്",
"ന്നാക്കി" => "ന്ന്",
"ന്നത്" => "ന്ന",
"ന്നതു" => "ന്ന",
"ന്നുണ്ട്" => "ന്ന",
"നിന്ന്" => "",
"നായ" => "ൻ",
"നോടു"=> "ൻ",
"ട്ടില്ല" => "ട്ട്",
#"ളുടെ" => "ൾ",
"ൾക്ക്" => "ൾ",
"ൾക്കും" => "ൾ",
"ളാണ്" => "ൾ",
"ളായ" => "ൾ",
"ളോട്" => "ൾ",
"ളോളം" => "ൾ",
"ളുണ്ട്" => "ൾ",
"ളാൽ"=> "ൾ",
"റിൽ" => "ർ",
"രായ" => "ർ",
"രോട്" => "ർ",
"വായ" => "വ്",
"ങ്ങൾ" => "ം",
"ത്തിൽ" => "ം",
"ത്തിൻ" => "ം",
"ത്തായ" => "ത്ത്",
"ത്തുന്നു" => "ന്ന",
"ത്തുന്ന" => "ന്ന",
"ത്തുക" => "ന്ന",
"ത്തെ" => "ം",
"ത്തോ" => "ം",
"വുന്ന" => "ം",
"ലേക്ക്" => "ൽ",
"ലിൽ" => "ൽ",
"ലാണ്" => "ൽ",
"ലായ" => "ൽ",
"ലുളള" => "ൽ",
"ലാക്കി" => "ൽ",
"ല്ലെന്നു" => "ല്ല",
"ല്ലെന്ന്" => "ല്ല",
"ല്ലാത്ത" => "ല്ല",
"ല്ലെന്ന" => "ല്ല",
"ലുണ്ട്" => "ൽ",
"രുടെ" => "ർ",
"രാണ്" => "ർ",
"രിൽ" => "ർ",
"വിൽ" => "വ്",
"യവ" => "യ",
"യിരി" =>"ണ്‌",
"കൾ‍" => "",
"ാതെ" => "",
"യായ" => "",
"യുള്ളൂ" => "",
"യുള്ളു" => "",
"യാണോ" => "",
"യായി" => "",
"യെന്ന" => "",
"യാണ്" => "",
"യത്" => "യ",
"യല്ല" => "",
"യുണ്ട്" => "",
"യില്ല" => "",
"യുടെ" => "",
"യെന്നു" => "",
"യിൽ" => "",
"കൾ" => "",
"ക്കൾ" => "",
"ക്കാൾ" => "",
"ക്കുന്നു" => "",
"തന്നെ" => "",
"ത്തന്നെ" => "",
"ക്കാൻ" => "ക്കുക",
"ക്കേണ്ടി" => "ക്കുക",
"ക്കൊണ്ട്" => "",
"കൊണ്ട്" => "",
"കൊണ്ടു" => "",
"ക്കൊണ്ടു" => "",
"ക്കാണ്" => "",
"ക്കിൽ" => "ക്ക്",
"െന്ന്" => "്",
"ോളം" => "്",
"ാക്" => "്",
"ാക്കി" => "്",
"ിരുന്നു" => "്",
"ിരുന്ന" =>"്",
"ാണ്" => "്",
"ിത്" => "്",
#"ിൽ" => "്",
"ില്ല" => "ിൽ" ,
"ുള്ള" => "്",
"ുള്ളത്" => "്",
"ുണ്ട്" => "്",
"ിയ" => "ി",
"ച്ചത്" => "ച്ചു",
"പ്പിൽ" => "പ്പ്",
"പ്പിച്ച" => "ച്ച",
"താണ്‌" => "ത്",
"തല്ല" => "ത്",
"തിൻ" => "ത്",
"ഴാണ്‌" => "ഴ്",
"വാണ്‌" => "വ്",
"യിരിക്കുന്ന" => "",
"യിരിക്കുന്നു" => "",
"യിരുന്നത്" => "",
"യിരുന്ന" => "",
"യിരുന്നു" => "",
"യാകട്ടെ" => "",
"ണ്ടായി" => "",
"ണ്ടായ" => "",
"പ്പെടുന്നു" => "ുന്ന",
"ിട്ടുണ്ട്" => "്",
"െങ്കിൽ" => "്",
"പ്പിക്കുക" => "പ്പിച്ചു",
"ക്കപ്പെട്ട" => "ക്കുക",
"ക്കുവാൻ" => "ക്കുക"
exceptions_stem "ന്" => "ന്",
"നെ" => "ന്",
"നു" => "ന്",
"കൾ" => "ക്",
"കൊണ്ടു" => "ക്",
"കൊണ്ട്" => "ക്",
"ലോ" => "ല്",
"ല്ല" => "ല്",
"ടെ" => "ട്",
"തോ" => "ത്",
"താണ്‌" => "ത്",
"തായ" => "ത്",
"തിൻ" => "ത്",
"തന്നെ" => "ത്",
"വ്" => "ി",
"ിക്കുന്ന" => "ര",
"ുണ്ട്" => "ന്ന",
"ളു" => "ള്",
"ളി" => "ള്"