Module:tevo-translit: Difference between revisions
No edit summary |
No edit summary |
||
| (40 intermediate revisions by 2 users not shown) | |||
| Line 91: | Line 91: | ||
-- avagraha | -- avagraha | ||
['ऽ']='ʼ', | ['ऽ']='ʼ', | ||
['़']='', | |||
--numerals | --numerals | ||
['०']='0', ['१']='1', ['२']='2', ['३']='3', ['४']='4', ['५']='5', ['६']='6', ['७']='7', ['८']='8', ['९']='9', | ['०']='0', ['१']='1', ['२']='2', ['३']='3', ['४']='4', ['५']='5', ['६']='6', ['७']='7', ['८']='8', ['९']='9', | ||
[' | ['॒']='́', | ||
[' | ['॑']='́', | ||
--punctuation | --punctuation | ||
-- ['॥']='.', --double danda | -- ['॥']='.', --double danda | ||
| Line 108: | Line 109: | ||
return nil | return nil | ||
end | end | ||
text = gsub( | text = gsub(text,'([क-ह]़?)'..'([ािीुूृॄॢॣेैोौ्ॅॆॊॉ]?)'..'([अ-औ]?)',function(c, d, e) | ||
if d == "" and e ~= "" then | if d == "" and e ~= "" then | ||
if tt[e] == "i" or tt[e] == "u" then return consonants[c] .. 'a' .. tt[e] .. diaeresis | if tt[e] == "i" or tt[e] == "u" then return consonants[c] .. 'a' .. tt[e] .. diaeresis | ||
| Line 126: | Line 122: | ||
end) | end) | ||
text = gsub(text, "ः॑","́h") | |||
text = gsub(text, '([aअ][' .. acute .. grave .. ']?[इउ])', '%1' .. diaeresis) | text = gsub(text, '([aअ][' .. acute .. grave .. ']?[इउ])', '%1' .. diaeresis) | ||
text = gsub(text, '.', tt) | text = gsub(text, '.', tt) | ||
text = gsub(text, 'a([iu])([' .. acute .. grave .. '])', 'a%2%1') | text = gsub(text, 'a([iu])([' .. acute .. grave .. '])', 'a%2%1') | ||
text = gsub(text, 'e([i])([' .. acute .. grave .. '])', 'e%2%1') | |||
text = gsub(text, 'o([u])([' .. acute .. grave .. '])', 'o%2%1') | |||
text = gsub(text, 'ē([i])([' .. acute .. grave .. '])', 'ē%2%1') | |||
text = gsub(text, 'ō([u])([' .. acute .. grave .. '])', 'ō%2%1') | |||
text = gsub(text, " ?[।॥]", ".") | text = gsub(text, " ?[।॥]", ".") | ||
text = gsub(text, "(ā" .. acute .. "3[iu])" .. acute, "%1") -- for pluti vowels | text = gsub(text, "(ā" .. acute .. "3[iu])" .. acute, "%1") -- for pluti vowels | ||