1 ;; te-rts.mim -- Telugu input method with RTS method
3 ;; Copyright 2005, 2006 Suraj N. Kurapati
4 ;; Copyright (C) 2003, 2004, 2005, 2006
5 ;; National Institute of Advanced Industrial Science and Technology (AIST)
6 ;; Registration Number H15PRO112
9 ;; This file is part of the m17n contrib; a sub-part of the m17n
12 ;; The m17n library is free software; you can redistribute it and/or
13 ;; modify it under the terms of the GNU Lesser General Public License
14 ;; as published by the Free Software Foundation; either version 2.1 of
15 ;; the License, or (at your option) any later version.
17 ;; The m17n library is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ;; Lesser General Public License for more details.
22 ;; You should have received a copy of the GNU Lesser General Public
23 ;; License along with the m17n library; if not, write to the Free
24 ;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
31 (description "Input method for Telugu script with RTS method.
32 For the detail of RTS, see the page:
33 <http://groups.google.com/groups?selm=Bv0A9M.27B%40rice.edu&output=gplain>.
35 This input method is based upon the Telugu Rice Transliteration
36 Standard (RTS) specification and its Rice Inverse
37 Transliterator (RIT) supplement.
39 The original RTS specification was written by Ananda Kishore and
40 Rama Rao Kanneganti in 1992 and can presently be accessed in the
41 \"soc.culture.indian.telugu\" newsgroup archives (see
42 <http://groups.google.com/groups?selm=Bv0A9M.27B\%40rice.edu&output=gplain>).
44 The RIT supplement adds alternative combinations for
45 transliteration but, in general, does not distract from the
46 original specification (see
47 <http://www.teluguworld.org/RIT/rit3.0/manual.html>). Whenever a
48 supplemental combination conflicts with the original RTS, the RTS
49 version has precedence and the supplemental combination is
50 disregarded (such as 'ea' from RIT 3.0).
52 Finally, this input method deviates slightly from the RTS in the
55 (1) The combinations \"\@n\", \"\@2\", \"~c\", and \"~j\"
56 yield \"�\" because their corresponding glyphs do not
57 yet exist in Telugu's Unicode chart.
59 (2) The operators \"_\" and \"#\" are not implemented
60 because the user's input is transliterated in real
61 time, as opposed to being post-processed in one
64 (3) According to the RTS, the combination \"jn\" should
65 yield \"జ్ఞ్\" but seems as if it may yield
66 \"జ్న్\". To avoid confusion, the user is required to
67 type \"j~n\" to generate \"జ్ఞ్\", and \"jn\" to
70 (4) If it appears at the end of a word, the combination
71 \"m\" yields \"ం
\82\". The user can type \"m&\" to
72 bypass this behavior and force \"m\" to yield \"మ్\".
79 ((S-\ )) ((C-@)) ; m17n stuff
81 ("a") ("b") ("c") ("d") ("e") ("f") ("g") ("h") ("i") ("j")
82 ("k") ("l") ("m") ("n") ("o") ("p") ("r") ("s") ("t") ("u")
83 ("v") ("w") ("x") ("y") ("z")
85 ("A") ("B") ("C") ("D") ("E") ("G") ("H") ("I") ("J") ("K")
86 ("L") ("M") ("N") ("O") ("P") ("R") ("S") ("T") ("U")
88 ("0") ("1") ("2") ("3") ("4") ("5") ("6") ("7") ("8") ("9")
95 ; these consonants undergo automatic sunna generation
121 ("~c" "�") ; త్స (tsa) allophone of చ (cha)
126 ("c'" "ఛ్") ; from RIT 2.0, 3.0
129 ("z" "జ్") ; from RIT 3.0
131 ("~j" "�") ; డ్జ (dza) allophone of జ (ja)
193 ("V" "వ్") ; from RIT 3.0
195 ("W" "వ్") ; from RIT 3.0
198 ("s'" "శ్") ; from RIT 2.0, 3.0
206 ("ks" "క్స్") ; workaround for inputting "ks"
211 ; these consonants do NOT undergo automatic sunna generation
220 ("n'" "ణ్") ; from RIT 2.0, 3.0
232 ("Sh" "ష్") ; from RIT 3.0
233 ("SH" "ష్") ; from RIT 3.0
243 ("l'" "ళ్") ; from RIT 2.0, 3.0
246 ("r''" "ఱ్") ; from RIT 2.0, 3.0
251 ; these consonants are converted into sunna by the automatic sunna generation logic, if they appear inside a word
260 ; these sequences are converted into sunna by the automatic sunna generation logic, if they appear at the end of a word
266 ; 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.
267 ; for ch in ' ' '!' '\"' '#' '$' '%' "'" '(' ')' '*' '+' ',' '-' '.' '/' '\\' ':' ';' '<' '=' '>' '?' '[' ']' '_' '`' '{' '}'; do echo " (\"m${ch}\" \"ం${ch}\")"; done # exclude '^' '&' '|' '@' '~'
307 ("A" "ఆ") ; from RIT 2.0, 3.0
315 ("I" "ఈ") ; from RIT 2.0, 3.0
326 ("r'" "ఋ") ; from RIT 2.0
329 ("r'u" "ౠ") ; from RIT 2.0
343 ("ei" "ఐ") ; from RIT 3.0
354 ("ow" "ఔ") ; from RIT 3.0
371 ("|" "।") ; from RIT 3.0
372 ("||" "॥") ; from Yudit
375 ; additional modifiers
376 ("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.
378 ("@M" "ఁ") ; అర్ధసున్న (ardhasunna), చంద్ర బిందు (chandra bindu)
379 ("@m" "ఁ") ; from RIT 3.0
381 ("@h" "ః") ; విసర్గ (visarga)
384 ("@n" "�") ; నకర పొల్లు (nakara-pollu), నకర విరమ (nakara-virama)
385 ("@N" "�") ; from RIT 3.0
387 ("@2" "�") ; అవగ్రహ (avagraha)
389 ("^" "్") ; పొల్లు (pollu), విరమ (virama), halant
402 ("aa" (delete @-) "ా")
403 ("a'" (delete @-) "ా")
404 ("A" (delete @-) "ా") ; from RIT 3.0
406 ("i" (delete @-) "ి")
408 ("ee" (delete @-) "ీ")
409 ("ii" (delete @-) "ీ")
410 ("ia" (delete @-) "ీ")
411 ("i'" (delete @-) "ీ")
412 ("I" (delete @-) "ీ") ; from RIT 3.0
414 ("u" (delete @-) "ు")
416 ("oo" (delete @-) "ూ")
417 ("uu" (delete @-) "ూ")
418 ("U" (delete @-) "ూ")
419 ("ua" (delete @-) "ూ")
420 ("u'" (delete @-) "ూ")
422 ("R" (delete @-) "ృ")
423 ("r'" (delete @-) "ృ") ; from RIT 2.0
425 ("Ru" (delete @-) "ౄ")
426 ("r'u" (delete @-) "ౄ") ; from RIT 2.0
428 ("~l" (delete @-) "")
430 ("~L" (delete @-) "")
432 ("e" (delete @-) "ె")
434 ("ea" (delete @-) "ే")
435 ("ae" (delete @-) "ే")
436 ("E" (delete @-) "ే")
437 ("e'" (delete @-) "ే")
439 ("ai" (delete @-) "ై")
440 ("ei" (delete @-) "ై") ; from RIT 3.0
442 ("o" (delete @-) "ొ")
444 ("oe" (delete @-) "ో")
445 ("O" (delete @-) "ో")
446 ("oa" (delete @-) "ో")
447 ("o'" (delete @-) "ో")
449 ("au" (delete @-) "ౌ")
450 ("ou" (delete @-) "ౌ")
451 ("ow" (delete @-) "ౌ") ; from RIT 3.0
454 ; additional modifiers
455 ("^" (delete @-) "్") ; పొల్లు (pollu), విరమ (virama), halant
464 ((BackSpace) (undo)))
469 ; state machine for transliteration
472 (starter (pushback 1) (shift intermediate))
476 (consonant (shift second))
477 (consonant2 (shift second))
478 (sunna-inside-word (shift second-sunna-inside-word))
479 (sunna-endof-word (shift init))
480 (independent (shift init))
482 (return (shift init))
488 (sunna-inside-word (shift second-sunna-inside-word))
489 (sunna-endof-word (shift init))
490 (dependent (shift init))
492 (return (shift init))
495 (second-sunna-inside-word
497 (consonant (move p) (delete @-) (delete @-) "ం" (move @>) (shift second))
498 (consonant2 (shift second))
500 (sunna-endof-word (shift init))
501 (dependent (shift init))