Module:Svara/sandbox
Appearance
![]() | This is the module sandbox page for Module:Svara (diff). See also the companion subpage for test cases (run). |
local mSep = require('Module:Separated entries')
local getArgs = require('Module:Arguments').getArgs
local p = {}
function p.convertHindustani(input)
local svaras = {
["'s"] = 'Ṣ', -- sa (one octave below)
["'S"] = 'Ṣ', -- sa (one octave below)
['s'] = 'S',
['S'] = 'S',
['r'] = 'R', -- Komal re
['R'] = 'R', -- Shuddha re
['g'] = 'G̱', -- Komal ga
['G'] = 'G', -- Shuddha ga
['m'] = 'M', -- ma
['M'] = 'M̄', -- Tivra ma
['p'] = 'P',
['P'] = 'P',
['d'] = 'Ḏ', -- Komal dha
['D'] = 'D', -- Shuddha dha
['n'] = 'Ṉ', -- Komal ni
['N'] = 'N', -- shuddha ni
["S'"] = 'Ṡ', -- sa (one octave above)
}
for key, value in pairs(input) do
input[key] = svaras[value];
end
return input
end
function p.main(frame)
local args = getArgs(frame)
return p._main(args)
end
function p._main(args)
args['separator'] = " "
return mSep.main(args)
end
function p.hindustani(frame)
local args = getArgs(frame)
args = p.convertHindustani(args)
return p.main(args)
end
return p