1 ;; te-rts.mim -- Telugu input method with RTS method
3 ;; Copyright (C) 2003, 2004, 2005, 2006
4 ;; National Institute of Advanced Industrial Science and Technology (AIST)
5 ;; Registration Number H15PRO112
6 ;; Copyright 2005, 2006 Suraj N. Kurapati <skurapat@ucsc.edu>
7 ;; Copyright 2006 Chaitanya Kamisetty <chaitanya@atc.tcs.co.in>
10 ;; This file is part of the m17n contrib; a sub-part of the m17n
13 ;; The m17n library is free software; you can redistribute it and/or
14 ;; modify it under the terms of the GNU Lesser General Public License
15 ;; as published by the Free Software Foundation; either version 2.1 of
16 ;; the License, or (at your option) any later version.
18 ;; The m17n library is distributed in the hope that it will be useful,
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 ;; Lesser General Public License for more details.
23 ;; You should have received a copy of the GNU Lesser General Public
24 ;; License along with the m17n library; if not, write to the Free
25 ;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
26 ;; Boston, MA 02110-1301, USA.
32 (description "Input method for Telugu script with RTS method.
33 For the detail of RTS, see the page:
34 <http://groups.google.com/groups?selm=Bv0A9M.27B%40rice.edu&output=gplain>.
36 This input method is based upon the Telugu Rice Transliteration
37 Standard (RTS) specification and its Rice Inverse
38 Transliterator (RIT) supplement.
40 The original RTS specification was written by Ananda Kishore and
41 Rama Rao Kanneganti in 1992 and can presently be accessed in the
42 \"soc.culture.indian.telugu\" newsgroup archives (see
43 <http://groups.google.com/groups?selm=Bv0A9M.27B\%40rice.edu&output=gplain>).
45 The RIT supplement adds alternative combinations for
46 transliteration but, in general, does not distract from the
47 original specification (see
48 <http://www.teluguworld.org/RIT/rit3.0/manual.html>). Whenever a
49 supplemental combination conflicts with the original RTS, the RTS
50 version has precedence and the supplemental combination is
51 disregarded (such as 'ea' from RIT 3.0).
53 Finally, this input method deviates slightly from the RTS in the
56 (1) The combinations \"\@n\", \"\@2\", \"~c\", and \"~j\"
57 yield \"�\" because their corresponding glyphs do not
58 yet exist in Telugu's Unicode chart.
60 (2) If it appears at the end of a word, the combination
61 \"m\" yields \"ం\". The user can type \"m&\" to
62 bypass this behavior and force \"m\" to yield \"మ్\".
69 ((S-\ )) ((C-@)) ; m17n stuff
71 ("a") ("b") ("c") ("d") ("e") ("f") ("g") ("h") ("i") ("j")
72 ("k") ("l") ("m") ("n") ("o") ("p") ("r") ("s") ("t") ("u")
73 ("v") ("w") ("x") ("y") ("z")
75 ("A") ("B") ("C") ("D") ("E") ("G") ("H") ("I") ("J") ("K")
76 ("L") ("M") ("N") ("O") ("P") ("R") ("S") ("T") ("U") ("V")
79 ("0") ("1") ("2") ("3") ("4") ("5") ("6") ("7") ("8") ("9")
88 ; these consonants undergo automatic sunna generation
114 ("~c" "�") ; త్స (tsa) allophone of చ (cha)
119 ("c'" "ఛ్") ; from RIT 2.0, 3.0
122 ("z" "జ్") ; from RIT 3.0
124 ("~j" "�") ; డ్జ (dza) allophone of జ (ja)
186 ("V" "వ్") ; from RIT 3.0
188 ("W" "వ్") ; from RIT 3.0
191 ("s'" "శ్") ; from RIT 2.0, 3.0
199 ("ks" "క్స్") ; workaround for inputting "క్స్"
203 ("dd'" "డ్డ్") ; from RIT 3.0
206 ("tt'" "ట్ట్") ; from RIT 3.0
214 ; these consonants do NOT undergo automatic sunna generation
223 ("n'" "ణ్") ; from RIT 2.0, 3.0
235 ("Sh" "ష్") ; from RIT 3.0
236 ("SH" "ష్") ; from RIT 3.0
246 ("l'" "ళ్") ; from RIT 2.0, 3.0
249 ("r''" "ఱ్") ; from RIT 2.0, 3.0
254 ; these consonants are converted into sunna by the automatic sunna generation logic, if they appear inside a word
263 ; these sequences are converted into sunna by the automatic sunna generation logic, if they appear at the end of a word
269 ; the sequences below, using punctuation marks to denote the end of a word, are generated by the following shell command. keys in [1] the (starter) block, [2] the (independent) block, and [3] those which begin with the 'm' key are intentionally excluded from this command to ensure that they are transliterated normally.
270 ; for ch in ' ' '!' '\"' '#' '$' '%' "'" '(' ')' '*' '+' ',' '-' '.' '/' '\\' ':' ';' '<' '=' '>' '?' '[' ']' '_' '`' '{' '}'; do echo " (\"m${ch}\" \"ం${ch}\")"; done # exclude '^' '&' '|' '@' '~'
310 ("A" "ఆ") ; from RIT 2.0, 3.0
318 ("I" "ఈ") ; from RIT 2.0, 3.0
329 ("r'" "ఋ") ; from RIT 2.0
332 ("r'u" "ౠ") ; from RIT 2.0
346 ("ei" "ఐ") ; from RIT 3.0
357 ("ow" "ఔ") ; from RIT 3.0
374 ("|" "।") ; from RIT 3.0
375 ("||" "॥") ; from Yudit
378 ; additional modifiers
379 ("M" "ం") ; from "internal representation" section of RTS. This combination has been included because it is very widely used in RTS implementations which do not support automatic sunna generation and thus has become the defacto way of manually producing sunna.
381 ("@M" "ఁ") ; అర్ధసున్న (ardhasunna), చంద్ర బిందు (chandra bindu)
382 ("@m" "ఁ") ; from RIT 3.0
384 ("@h" "ః") ; విసర్గ (visarga)
387 ("@n" "�") ; నకర పొల్లు (nakara-pollu), నకర విరమ (nakara-virama)
388 ("@N" "�") ; from RIT 3.0
390 ("@2" "�") ; అవగ్రహ (avagraha)
392 ("^" "్") ; పొల్లు (pollu), విరమ (virama), halant
394 ("_" "") ; ignored according to RTS
407 ("aa" (delete @-) "ా")
408 ("a'" (delete @-) "ా")
409 ("A" (delete @-) "ా") ; from RIT 3.0
411 ("i" (delete @-) "ి")
413 ("ee" (delete @-) "ీ")
414 ("ii" (delete @-) "ీ")
415 ("ia" (delete @-) "ీ")
416 ("i'" (delete @-) "ీ")
417 ("I" (delete @-) "ీ") ; from RIT 3.0
419 ("u" (delete @-) "ు")
421 ("oo" (delete @-) "ూ")
422 ("uu" (delete @-) "ూ")
423 ("U" (delete @-) "ూ")
424 ("ua" (delete @-) "ూ")
425 ("u'" (delete @-) "ూ")
427 ("R" (delete @-) "ృ")
428 ("r'" (delete @-) "ృ") ; from RIT 2.0
430 ("Ru" (delete @-) "ౄ")
431 ("r'u" (delete @-) "ౄ") ; from RIT 2.0
433 ("~l" (delete @-) "")
435 ("~L" (delete @-) "")
437 ("e" (delete @-) "ె")
439 ("ea" (delete @-) "ే")
440 ("ae" (delete @-) "ే")
441 ("E" (delete @-) "ే")
442 ("e'" (delete @-) "ే")
444 ("ai" (delete @-) "ై")
445 ("ei" (delete @-) "ై") ; from RIT 3.0
447 ("o" (delete @-) "ొ")
449 ("oe" (delete @-) "ో")
450 ("O" (delete @-) "ో")
451 ("oa" (delete @-) "ో")
452 ("o'" (delete @-) "ో")
454 ("au" (delete @-) "ౌ")
455 ("ou" (delete @-) "ౌ")
456 ("ow" (delete @-) "ౌ") ; from RIT 3.0
459 ; additional modifiers
460 ("^" (delete @-) "్") ; పొల్లు (pollu), విరమ (virama), halant
472 ("a" "a" ) ("b" "b" ) ("c" "c" ) ("d" "d" ) ("e" "e") ("f" "f") ("g" "g") ("h" "h") ("i" "i") ("j" "j")
473 ("k" "k" ) ("l" "l" ) ("m" "m" ) ("n" "n" ) ("o" "o" ) ("p" "p" ) ("q" "q") ("r" "r" ) ("s" "s" ) ("t" "t" ) ("u" "u" )
474 ("v" "v" ) ("w" "w" ) ("x" "x" ) ("y" "y" ) ("z" "z" )
476 ("A" "A" ) ("B" "B" ) ("C" "C" ) ("D" "D" ) ("E" "E" ) ("F" "F") ("G" "G" ) ("H" "H" ) ("I" "I" ) ("J" "J" ) ("K" "K" )
477 ("L" "L" ) ("M" "M" ) ("N" "N" ) ("O" "O" ) ("P" "P" ) ("Q" "Q") ("R" "R" ) ("S" "S" ) ("T" "T" ) ("U" "U" ) ("V" "V" )
478 ("W" "W" ) ("X" "X" ) ("Y" "Y" ) ("Z" "Z" )
480 ("0" "0" ) ("1" "1" ) ("2" "2" ) ("3" "3" ) ("4" "4" ) ("5" "5" ) ("6" "6" ) ("7" "7" ) ("8" "8" ) ("9" "9" )
482 ("~" "~") ("`" "`") ("!" "!") ("@" "@" ) ("$" "$") ("%" "%") ("^" "^") ("&" "&") ("*" "*") ("(" "(") (")" ")") ("_" "_")
483 ("-" "-") ("+" "+") ("=" "=") ("{" "{") ("[" "[") ("}" "}") ("]" "]") ("|" "|" ) ("\\" "\\") (":" ":") (";" ";")
484 ("\"" "\"") ("\'" "\'") ("<" "<") ("," ",") (">" ">") ("." ".") ("?" "?") ("/" "/")
486 (" " " ") ((Tab) ("\t")) ((BackSpace) (undo)) ((Return) ("\n"))
494 ((BackSpace) (undo)))
499 ; state machine for transliteration
502 (starter (pushback 1) (shift intermediate))
506 (consonant (shift second))
507 (consonant2 (shift second))
508 (sunna-inside-word (shift second-sunna-inside-word))
509 (sunna-endof-word (shift init))
510 (independent (shift init))
511 (single_hash (shift no_transliteration))
512 (triple_hash (shift init))
514 (return (shift init))
520 (sunna-inside-word (shift second-sunna-inside-word))
521 (sunna-endof-word (shift init))
522 (dependent (shift init))
524 (return (shift init))
527 (second-sunna-inside-word
529 (consonant (move p) (delete @-) (delete @-) "ం" (move @>) (shift second))
530 (consonant2 (shift second))
532 (sunna-endof-word (shift init))
533 (dependent (shift init))
538 (single_hash (shift init))