Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mw.loader.using('ext.narayam.rules.hi', function () {
- var hi_rules = $.narayam.getScheme( 'hi' ).rules;
- var custom_rules = [
- ['([क-ह]़?)् ', '', '$1 '], //full alphabet on space
- //place the following above ['([क-ह])्\\`', '', '$1़्'] to override it
- ['(ड)्\\`', '', 'ड़'],
- ['(ढ)्\\`', '', 'ढ़'],
- ['(ज)्\\`', '', 'ज़्'],
- ['(F|f्\\`)', '', 'फ़्'], //this replaces ['F', '', 'फ़्']
- ['(क)्\\`', '', 'क़्'], //merge with ['q', '', 'क़्']?
- ['(ख)्\\`', '', 'ख़्'],
- ['(ग)्\\`', '', 'ग़्'],
- ['(य)्\\`', '', 'य़्'],
- //end overriding ones
- //z/Z modification, replaces the single rule ['(z|Z)', '', '.']
- ['z', '', 'ज़्'],
- ['Z', '', '.'],
- //O correction
- ['([क-ह]़?)्O', '', '$1ॉ'], //replaces ['([क-ह]़?)्O', '', '$1ो']
- ['O', '', 'ऑ'], //replaces ['O', '', 'ओ']
- //oo and ee correction
- ['([क-ह]़?)(ुu|्U|ॊo|ोo)', '', '$1ू'], //oo gives ू, replaces ['([क-ह]़?)(ुu|्U|ॊo)', '', '$1ू']
- ['([क-ह]़?)(्I|िi|ॆe|ेe)', '', '$1ी'], //ee gives ी, replaces ['([क-ह]़?)(्I|िi|ॆe)', '', '$1ी']
- //q correction
- ['q', '', 'क़्'], //replaces ['q', '', '\u0951'], merge with ['(क)्\\`', '', 'क़्']?
- //gY and jY for ज्ञ
- ['([ग्|ज्]़?)्Y', '', 'ज्ञ्']
- ];
- hi_rules.unshift.apply(hi_rules, custom_rules);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement