This file is indexed.

/usr/share/m17n/hi-itrans.mim is in m17n-db 1.7.0-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
;; hi-itrans.mim -- Hindi input method with ITRANS method
;; Copyright (C) 2003, 2004, 2005, 2006, 2007
;;   National Institute of Advanced Industrial Science and Technology (AIST)
;;   Registration Number H15PRO112
;; Copyright (C) 2012  Kenichi Handa <handa@m17n.org>
;; Copyright (C) 2013  Vishvas Vasuki  <vishvas.vasuki@gmail.com>

;; This file is part of the m17n database; a sub-part of the m17n
;; library.

;; The m17n library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
;; as published by the Free Software Foundation; either version 2.1 of
;; the License, or (at your option) any later version.

;; The m17n library is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; Lesser General Public License for more details.

;; You should have received a copy of the GNU Lesser General Public
;; License along with the m17n library; if not, write to the Free
;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.

(input-method hi itrans)

(description "Hindi input method by ITRANS and Harvard-Kyoto
transliteration systems.
You can use all the standard ITRANS key sequences plus key
sequences such as the below.

  nk->ङ्क्, nkh->ङ्ख्, ng->ङ्ग्, ngh->ङ्घ्
  nch->ञ्च्, nCh->ञ्छ्, nc->ञ्च्, nC->ञ्छ्, nchh->ञ्छ्,
  nj->ञ्ज्, njh->ञ्झ्, nT->ण्ट्, nTh->ण्ठ्, nD->ण्ड्, nDh->ण्ढ्
  c->च्, C->छ्, z->श्, S->ष्, jn->ज्ञ्, R->ऋ

In addition, for convenience, when a consonant + halant sequence
is followed by non Devanagari letter, the last halant is removed.
For instance, 'k SPC'->'क ', 'k..'->'क।'.

The motivation behind additions made to the basic ITRANS scheme
is described in http://sanskritnlp.appspot.com/optitrans.html,
along with a tabulated comparison with several other
transliteration schemes.

Also, see: http://en.wikipedia.org/wiki/Devanagari_transliteration.")

(title "क")

(variable
 (trim-last-halant
  (_"If this variable is 1 (the default), the last Halant in a syllable
is removed if it is followed by non Devanagari letter.  For instance,
typing \"har..\" produces \"हर।\", not \"हर्।\".")
  1 0 1))

(map
 (starter
  (".") ("~") ("#") ("$") ("*") ("]") ((S-\ )) ((C-@))
  ("0") ("1") ("2") ("3") ("4") ("5") ("6") ("7") ("8") ("9")
  ("A") ("C") ("D") ("E") ("G") ("H") ("I") ("J") ("K") ("L")
  ("M") ("N") ("O") ("R") ("S") ("T") ("U") ("Y")
  ("a") ("b") ("c") ("d") ("e") ("f") ("g") ("h") ("i")
  ("j") ("k") ("l") ("m") ("n") ("o") ("p") ("q") ("r")
  ("s") ("t") ("u") ("v") ("w") ("x") ("y") ("z")
  ((KP_1)) ((KP_2)) ((KP_3)) ((KP_4)) ((KP_5))
  ((KP_6)) ((KP_7)) ((KP_8)) ((KP_9)) ((KP_0)))

 (consonant
  ("k" "क्")
  ("kh" "ख्")
  ("K" "ख्")
  ("g" "ग्")
  ("gh" "घ्")
  ("G" "घ्")
  (".k" "क़् ")
  ("q" "क़्")
  (".kh" "ख़्")
  (".K" "ख़्")
  (".g" "ग़्")
  ("nk" "ङ्क्")
  ("nx" "ङ्क्ष्")
  ("nkh" "ङ्ख्")
  ("nK" "ङ्ख्")
  ("ng" "ङ्ग्")
  ("ngh" "ङ्घ्")
  ("nG" "ङ्घ्")
  ("~N" "ङ्")
  ("N^" "ङ्")
  ("ch" "च्")
  ("Ch" "छ्")			      ; not in ITRANS Devenagari table
  ("c" "च्")
  ("C" "छ्")			      ; not in ITRANS Devenagari table
  ("chh" "छ्")
  ("j" "ज्")
  ("jh" "झ्")
  ("J" "झ्")
  ("nch" "ञ्च्")
  ("nCh" "ञ्छ्")			      ; not in ITRANS Devenagari table
  ("nc" "ञ्च्")
  ("nC" "ञ्छ्")			      ; not in ITRANS Devenagari table
  ("nchh" "ञ्छ्")
  ("nj" "ञ्ज्")
  ("njh" "ञ्झ्")
  ("nJ" "ञ्झ्")
  ("~n" "ञ्")
  ("JN" "ञ्")
  ("T" "ट्")
  ("Th" "ठ्")
  ("D" "ड्")
  ("Dh" "ढ्")
  (".D" "ड़्")
  (".Dh" "ढ़्")
  ("nT" "ण्ट्")
  ("nTh" "ण्ठ्")
  ("nD" "ण्ड्")
  ("nDh" "ण्ढ्")
  ("N" "ण्")
  ("t" "त्")
  ("th" "थ्")
  ("d" "द्")
  ("dh" "ध्")
  ("n" "न्")
  (":n" "ऩ्")			      ; not in ITRANS Devenagari table
  ("p" "प्")
  ("ph" "फ्")
  ("P" "फ्")
  (".ph" "फ़्")
  ("f" "फ़्")
  ("b" "ब्")
  ("bh" "भ्")
  ("B" "भ्")
  ("m" "म्")
  ("y" "य्")
  ("Y" "य़्")            ; not in ITRANS Devanagari table
  ("yh" "य़्")           ; not in ITRANS Devanagari table
  (".y" "य़्")
  ("r" "र्")
  ("l" "ल्")
  ("L" "ळ्")
  ("ld" "ळ्")
  ("v" "व्")
  ("w" "व्")
  ("sh" "श्")
  ("z" "ज़्")
  (".j" "ज़्")
;  ("z" "श्")
  ("S" "ष्")
  ("Sh" "ष्")
  ("shh" "ष्")
  ("s" "स्")
  ("h" "ह्")
  ("jn" "ज्ञ्")
  ("j~n" "ज्ञ्")
  ("jn" "ज्ञ्")
  ("GY" "ज्ञ्")
  ("dny" "ज्ञ्")		      ; not in ITRANS Devanagari table
  ("x" "क्ष्")
  ("ks" "क्स्")
  ("ksh" "क्ष्")
  ("gH"  ॻ्)
  ("jH"  ॼ्)
  ("DH"  "ॾ्")
  ("bH"  "ॿ्"))

 (independent
  ("a" "अ")
  ("aa" "आ")
  ("A" "आ")
  ("i" "इ")
  ("ii" "ई")
  ("I" "ई")
  ("u" "उ")
  ("uu" "ऊ")
  ("U" "ऊ")
  ("R" "ऋ")
  ("RRi" "ऋ")
  ("R^i" "ऋ")
  ("LLi" "ऌ")			      ; not in ITRANS Devanagari table
  ("L^i" "ऌ")			      ; not in ITRANS Devanagari table
  (".c" "ऍ")            ; not in ITRANS Devanagari table
  ("ea" "ऍ")            ; not in ITRANS Devanagari table
  ("ee" (set CANDRA-E-O 0) "ऎ")	      ; not in ITRANS Devanagari table
  ("E" "ऎ")			      ; not in ITRANS Devanagari table
  ("e" (set CANDRA-E-O ?ऍ) "ए")
  ("ai" "ऐ")
  ("oo" (set CANDRA-E-O 0) "ऒ")      ; not in ITRANS Devanagari table
  ("O" "ऒ")			      ; not in ITRANS Devanagari table
  ("o" (set CANDRA-E-O ?ऑ) "ओ")
  ("oa" "ऑ")
  ("au" "औ")
  ("RRI" "ॠ")			      ; not in ITRANS Devanagari table
  ("RR" "ॠ")			      ; not in ITRANS Devanagari table
  ("R^I" "ॠ")			      ; not in ITRANS Devanagari table
  ("LLI" "ॡ")			      ; not in ITRANS Devanagari table
  ("L^I" "ॡ")			      ; not in ITRANS Devanagari table
  (".N" "ँ")
  (".n" "ं")
  ("M" "ं")
  ("H" "ः")
  ("kH" "ᳵ") 
  ("pH" "ᳶ")
  (".a" "ऽ")
  (".h" "्")
  ("AUM" "ॐ")
  ("OM" "ॐ")
  ("$" "र्")			      ; not in ITRANS Devanagari table
  ((S-\ ) "‌")			      ; not in ITRANS Devanagari table
  ((C-@) "‍"))			      ; not in ITRANS Devanagari table

 (digit
  ("0" "०")
  ("1" "१")
  ("2" "२")
  ("3" "३")
  ("4" "४")
  ("5" "५")
  ("6" "६")
  ("7" "७")
  ("8" "८")
  ("9" "९")
  ((KP_0) "०")
  ((KP_1) "१")
  ((KP_2) "२")
  ((KP_3) "३")
  ((KP_4) "४")
  ((KP_5) "५")
  ((KP_6) "६")
  ((KP_7) "७")
  ((KP_8) "८")
  ((KP_9) "९"))

 (dependent
  ("a" (delete @-) "")
  ("aa" (delete @-) "ा")
  ("A" (delete @-) "ा")
  ("i" (delete @-) "ि")
  ("ii" (delete @-) "ी")
  ("I" (delete @-) "ी")
  ("u" (delete @-) "ु")
  ("uu" (delete @-) "ू")
  ("U" (delete @-) "ू")
  ("R" (delete @-) "ृ")
  ("RRi" (delete @-) "ृ")
  ("R^i" (delete @-) "ृ")
  ("LLi" (delete @-) "ॢ")	      ; not in ITRANS Devanagari table
  ("L^i" (delete @-) "ॢ")	      ; not in ITRANS Devanagari table
  (".c" (delete @-) "ॅ")        ; not in ITRANS Devanagari table
  ("ea" (delete @-) "ॅ")        ; not in ITRANS Devanagari table
  ("ee" (delete @-) (set CANDRA-E-O 0) "ॆ") ; not in ITRANS Devanagari table
  ("E" (delete @-) "ॆ")		      ; not in ITRANS Devanagari table
  ("e" (delete @-) (set CANDRA-E-O ?ॅ) "े")
  ("ai" (delete @-) "ै")
  ("oo" (delete @-) (set CANDRA-E-O 0) "ॊ") ; not in ITRANS Devanagari table
  ("O" (delete @-) "ॊ")		      ; not in ITRANS Devanagari table
  ("o" (delete @-) (set CANDRA-E-O ?ॉ) "ो")
  ("oa" "ॉ")
  ("au" (delete @-) "ौ")
  ("RR" (delete @-) "ॄ")	      ; not in ITRANS Devanagari table
  ("RRI" (delete @-) "ॄ")	      ; not in ITRANS Devanagari table
  ("R^I" (delete @-) "ॄ")	      ; not in ITRANS Devanagari table
  ("LLI" (delete @-) "ॣ")	      ; not in ITRANS Devanagari table
  ("L^I" (delete @-) "ॣ"))	      ; not in ITRANS Devanagari table

 (dot
  ("." (set DOT 1) "."))

 (eo-dot-c
  (".c" (delete @-) (insert CANDRA-E-O)))

 (danda
  (".." "।")			      ; not in ITRANS Devanagari table
  (".," "॥")			      ; not in ITRANS Devanagari table
  (". " "।" (pushback 1))
  ((?. Return) "।" (pushback 1))
  ((?. Tab) "।" (pushback 1))
  (".(" "।" (pushback 1))
  (".)" "।" (pushback 1))
  (".[" "।" (pushback 1))
  (".]" "।" (pushback 1))
  (".{" "।" (pushback 1))
  (".}" "।" (pushback 1))
  (".'" "।" (pushback 1))
  (".\"" "।" (pushback 1)))

 (commit-key
  ((S-C-Return)))

 (backspace
  ((BackSpace) (undo))))

(state
 (init
  (starter (pushback 1) (shift intermediate)))

 (intermediate
  ;; CANDRA-E-O is set to the character CANDRA E or CANDRA O when "e"
  ;; or "o" is typed, and in that case, if ".c" is typed, the
  ;; character set to CANDRA-E-O is inserted.
  (t (set CANDRA-E-O 0))
  ;; LAST-HALANT-POS is set to the position after a consonat + HALANT
  ;; sequence.  If the following key is for non-letter, that HALANT
  ;; character is removed.
  (consonant (mark LAST-HALANT-POS) (shift second))
  (independent (cond (CANDRA-E-O (shift after-eo)) (1 (shift init))))
  (digit (shift init))
  (danda (shift init))
  (backspace)
  (commit-key (shift init)))

 (second
  ;; CANDRA-E-O is set to the character CANDRA E or CANDRA O when "e"
  ;; or "o" is typed, and in that case, if ".c" is typed, the
  ;; character set to CANDRA-E-O is inserted.
  (t (set CANDRA-E-O 0))
  (consonant (mark LAST-HALANT-POS))
  (dependent (cond (CANDRA-E-O (shift after-eo)) (1 (shift init))))
  (danda
   (cond (trim-last-halant (move LAST-HALANT-POS) (delete @-) (move @>)))
   (shift init))
  (backspace)
  (commit-key (shift init))
  (nil (cond (trim-last-halant (move LAST-HALANT-POS) (delete @-) (move @>)))
       (shift init)))

 (after-eo
  (t (set DOT 0))
  (dot)
  (eo-dot-c (shift init))
  (danda (shift init))
  (commit-key (shift init))
  (nil (cond (DOT (delete @-) (pushback 1))) (shift init))))

;; Local Variables:
;; coding: utf-8
;; mode: emacs-lisp
;; End: