unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#56323: 29.0.50; Add new customisable phonetic Tamil input method
@ 2022-06-30 12:13 Visuwesh
  2022-06-30 14:08 ` Visuwesh
                   ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: Visuwesh @ 2022-06-30 12:13 UTC (permalink / raw)
  To: 56323

[-- Attachment #1: Type: text/plain, Size: 4373 bytes --]

Tags: patch

The attached patchset adds a new customisable phonetic Tamil input
method.  I tried to reuse as much of the existing itrans input method
code since it greatly simplifies the creation of an Indic input method
(see `indian-make-hash').

The first patch fixes a fallout from bug#50143 asking to add TAMIL OM ௐ
to the itrans table, and this means that one can insert the TAMIL OM
character using the tamil-itrans input methods as well.  I'd prefer it
if this patch can be pushed quickly.

The second patch actually adds the new phonetic input method.  I will
leave the rationale for making it a _customisable_ input method in
footnote [1].  To reuse the existing code that calculates the various
tables for the tamil-itrans IM, I turned the code in defvars to defuns.
However, the definition of the almighty
quail-tamil-itrans-syllable-table is still huge since I needed to do a
whole lot to convert the indian-tml-base-table to a format that will
accepted by the new defun `quail-tamil-itrans-compute-syllable-table'.

The current quail rules is inspired by the one in
https://github.com/rnchzn/tamil-phonetic/raw/main/tamil-phonetic.el and
the comments in
https://emacsnotes.wordpress.com/2022/03/07/tamil-phonetic-input-method-in-emacs-emacs-%E0%AE%87%E0%AE%B2%E0%AF%8D-%E0%AE%A4%E0%AE%AE%E0%AE%BF%E0%AE%B4%E0%AF%8D-%E0%AE%83%E0%AE%AA%E0%AF%8A%E0%AE%A9%E0%AF%86%E0%AE%9F%E0%AE%BF%E0%AE%95%E0%AF%8D/.

Avid readers might notice that I went for a nil SIMPLE argument despite
my recent complaint in emacs-devel.  The reason for that is because we
need a way to end the ongoing translation (C-SPC).  E.g., if one decides
to transliterate ல் as "l" and ள் as "ll", then to type ல்ல the key
sequence will be

    l C-SPC la

without the C-SPC, "lla" would be translated to ள.  The better way
forward would be to present _both_ ல்ல and ள் for the sequence "lla" but I
have no idea how to do it.  Any pointers would be _highly_ appreciated.

I plan to modify indian--puthash-char to have one to many translations
i.e., "l" would translate to both ல் and ள் and then the user could decide
which one to insert.  This combined with the DETERMINISTIC argument to
quail-define-package would make it an attractive option, I think.  But
I'm leaving it out right now since I want the current patch to be
reviewed first.

I think adding an optional NAME argument to tamil--update-quail-rules
might be more flexible since then a user could let bind the relevant
defcustoms to define other Tamil input methods without hassle (like the
tamil99 layout, which I plan to get to at Some Point™).  WDYT?

The code for tamil--update-quail-rules is sort of convoluted because of
the conversion mentioned above.  tamil--make-trans-table is also kind of
complicated because,

    1. I couldn't make the tamil-vowel-translation (and consonant, and
       misc) alist have a character key since the Customize interface
       shows those characters as numbers!!  I really do not want to dig
       into the Customize UI code, sorry.  :(

    2. indian-tml-base-table has the character க in it but the defcustom
       tamil-consonant-translation has the character க் in it because the
       latter makes more sense to a native speaker and also because of
       (1) above.  More explanation as to why in footnote [2].

There are some FIXMEs spattered in the code but I will get to it in a
later revision.  I also don't have a :set function for the defcustoms
since I'm not sure if something along the following is the only way to
automagically recalculate the quail rules:

    (defun tamil--set-variable (sym val)
      (set-default sym val)
      (when (and (boundp 'tamil-vowel-translation)
                 (boundp 'tamil-consonant-translation)
                 (boundp 'tamil-misc-translation)
                 (boundp 'tamil-native-digits))
        (tamil--update-quail-rules)))

Comments on this, and general code review would be much appreciated.
I don't think I have missed anything and if you want me to add more
comments on some of the stuff, please do tell.  Thanks.

If Tamil speakers are reading this bug report, shout at me if you want
something else and if you have other general comments.  Or if I made an
embarrassing typo somewhere.  Thanks!


[-- Attachment #2: 0001-Fix-fallout-from-bug-50143.patch --]
[-- Type: text/x-diff, Size: 1700 bytes --]

From 8789592426031a2608ef74c22719ed826be0353c Mon Sep 17 00:00:00 2001
From: Visuwesh <visuweshm@gmail.com>
Date: Thu, 30 Jun 2022 16:49:31 +0530
Subject: [PATCH 1/2] Fix fallout from bug#50143

* lisp/language/ind-util.el (indian-tml-base-table)
(indian-tml-base-digits-table): Add TAMIL OM sign to the table
(bug#50143), and add more Sanskrit consonants.
---
 lisp/language/ind-util.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/language/ind-util.el b/lisp/language/ind-util.el
index 60ada03fa2..c725134a30 100644
--- a/lisp/language/ind-util.el
+++ b/lisp/language/ind-util.el
@@ -269,9 +269,9 @@ indian-tml-base-table
      ?ய ?ர ?ற ?ல ?ள ?ழ ?வ          ;; SEMIVOWELS
      nil ?ஷ ?ஸ ?ஹ                    ;; SIBILANTS
      nil nil nil nil nil nil nil nil      ;; NUKTAS
-     "ஜ்ஞ" "க்ஷ")
+     "ஜ்ஞ" "க்ஷ" "க்‌ஷ" ?ஶ)
     (;; Misc Symbols
-     nil ?ஂ ?ஃ nil ?் nil nil)
+     nil ?ஂ ?ஃ nil ?் ?ௐ nil)
     (;; Digits
      nil nil nil nil nil nil nil nil nil nil)
     (;; Inscript-extra (4)  (#, $, ^, *, ])
@@ -292,9 +292,9 @@ indian-tml-base-digits-table
      ?ய ?ர ?ற ?ல ?ள ?ழ ?வ          ;; SEMIVOWELS
      nil ?ஷ ?ஸ ?ஹ                    ;; SIBILANTS
      nil nil nil nil nil nil nil nil      ;; NUKTAS
-     "ஜ்ஞ" "க்ஷ")
+     "ஜ்ஞ" "க்ஷ" "க்‌ஷ" ?ஶ)
     (;; Misc Symbols
-     nil ?ஂ ?ஃ nil ?் nil nil)
+     nil ?ஂ ?ஃ nil ?் ?ௐ nil)
     (;; Digits
      ?௦ ?௧ ?௨ ?௩ ?௪ ?௫ ?௬ ?௭ ?௮ ?௯)
     (;; Inscript-extra (4)  (#, $, ^, *, ])
-- 
2.35.1


[-- Attachment #3: 0002-Add-new-customizable-phonetic-Tamil-input-method.patch --]
[-- Type: text/x-diff, Size: 16350 bytes --]

From 7ddd045ff337b100b30bc27db38b490877c3e1ea Mon Sep 17 00:00:00 2001
From: Visuwesh <visuweshm@gmail.com>
Date: Thu, 30 Jun 2022 17:01:07 +0530
Subject: [PATCH 2/2] Add new customizable phonetic Tamil input method

* lisp/leim/quail/indian.el
(quail-tamil-itrans-compute-syllable-table): New function extracted
from..
(quail-tamil-itrans-syllable-table): ... here.  Use above function.
(quail-tamil-itrans-compute-signs-table): Add new argument VARIOUS.
(quail-tamil-itrans-various-signs-and-digits-table)
(quail-tamil-itrans-various-signs-table): Adjust function call, and
add TAMIL OM sign translation.

(tamil): New phonetic Tamil input method.
(tamil-vowel-translation, tamil-consonant-translation)
(tamil-misc-translation, tamil-native-digits): New defcustoms to
change the translation rules of the input method.
(tamil-uyir-translation, tamil-mei-translation): Aliases to new
defcustom for better discoverability.
(tamil--syllable-table, tamil--signs-table, tamil--hashtables)
(tamil--vowel-signs): Internal variables used by the Tamil input
method.
(tamil--make-trans-table): Function to produce an itrans compatible
translation table.
(tamil--update-quail-rules): Function to update the translation rules
for the Tamil input method.

* lisp/language/indian.el ("Tamil"): Change the default input method
of the Tamil language environment to the phonetic input method.
---
 lisp/language/indian.el   |   2 +-
 lisp/leim/quail/indian.el | 276 +++++++++++++++++++++++++++++---------
 2 files changed, 211 insertions(+), 67 deletions(-)

diff --git a/lisp/language/indian.el b/lisp/language/indian.el
index 2887d410ad..91ad818533 100644
--- a/lisp/language/indian.el
+++ b/lisp/language/indian.el
@@ -109,7 +109,7 @@ 'devanagari
  "Tamil" '((charset unicode)
 	   (coding-system utf-8)
 	   (coding-priority utf-8)
-	   (input-method . "tamil-itrans")
+	   (input-method . "tamil")
            (sample-text . "Tamil (தமிழ்)	வணக்கம்")
 	   (documentation . "\
 South Indian Language Tamil is supported in this language environment."))
diff --git a/lisp/leim/quail/indian.el b/lisp/leim/quail/indian.el
index 8fffcc3511..120a446b44 100644
--- a/lisp/leim/quail/indian.el
+++ b/lisp/leim/quail/indian.el
@@ -127,47 +127,18 @@ "\\''"
  indian-mlm-itrans-v5-hash "malayalam-itrans" "Malayalam" "MlmIT"
  "Malayalam transliteration by ITRANS method.")
 
-(defvar quail-tamil-itrans-syllable-table
-  (let ((vowels
-	 '(("அ" nil "a")
-	   ("ஆ" "ா" "A")
-	   ("இ" "ி" "i")
-	   ("ஈ" "ீ" "I")
-	   ("உ" "ு" "u")
-	   ("ஊ" "ூ" "U")
-	   ("எ" "ெ" "e")
-	   ("ஏ" "ே" "E")
-	   ("ஐ" "ை" "ai")
-	   ("ஒ" "ொ" "o")
-	   ("ஓ" "ோ" "O")
-	   ("ஔ" "ௌ" "au")))
-	(consonants
-	 '(("க" "k")			; U+0B95
-	   ("ங" "N^")			; U+0B99
-	   ("ச" "ch")			; U+0B9A
-	   ("ஞ" "JN")			; U+0B9E
-	   ("ட" "T")			; U+0B9F
-	   ("ண" "N")			; U+0BA3
-	   ("த" "t")			; U+0BA4
-	   ("ந" "n")			; U+0BA8
-	   ("ப" "p")			; U+0BAA
-	   ("ம" "m")			; U+0BAE
-	   ("ய" "y")			; U+0BAF
-	   ("ர" "r")			; U+0BB0
-	   ("ல" "l")			; U+0BB2
-	   ("வ" "v")			; U+0BB5
-	   ("ழ" "z")			; U+0BB4
-	   ("ள" "L")			; U+0BB3
-	   ("ற" "rh")			; U+0BB1
-	   ("ன" "nh")			; U+0BA9
-	   ("ஜ" "j")			; U+0B9C
-	   ("ஶ" nil)			; U+0BB6
-	   ("ஷ" "Sh")			; U+0BB7
-	   ("ஸ" "s")			; U+0BB8
-	   ("ஹ" "h")			; U+0BB9
-	   ("க்ஷ" "x" )			; U+0B95
-	   ))
-	(virama #x0BCD)
+;; FIXME: This only accepts a single translation for vowels.  Ideally,
+;; we want it to support mutliple translation just like consonants.
+(defun quail-tamil-itrans-compute-syllable-table (vowels consonants)
+  "Return the syllable table for the input method as a string.
+VOWELS is a list of (VOWEL SIGN TRANS) where VOWEL is a string or
+character representing the Tamil vowel character, SIGN is the
+vowel sign corresponding to VOWEL or nil for none, and TRANS is
+the input sequence to insert VOWEL.
+CONSONANTS is a list of (CONSONANT TRANS...) where CONSONANT is
+the Tamil consonant character, and TRANS is one or more strings
+that describe how to insert CONSONANT."
+  (let ((virama #x0BCD)
 	clm)
     (with-temp-buffer
       (insert "\n")
@@ -197,21 +168,42 @@ quail-tamil-itrans-syllable-table
 	  (insert (propertize "\t" 'display (list 'space :align-to clm))
 		  (car c) (or (nth 1 v) ""))
 	  (setq clm (+ clm 6)))
-	(insert "\n" (or (nth 1 c) "")
-		(propertize "\t" 'display '(space :align-to 4))
-		"|")
-	(setq clm 6)
-
-	(dolist (v vowels)
-	  (apply #'insert (propertize "\t" 'display (list 'space :align-to clm))
-		 (if (nth 1 c) (list (nth 1 c) (nth 2 v)) (list "")))
-	  (setq clm (+ clm 6))))
+        (dolist (ct (cdr c))
+	  (insert "\n" (or ct "")
+		  (propertize "\t" 'display '(space :align-to 4))
+		  "|")
+	  (setq clm 6)
+          (dolist (v vowels)
+	    (apply #'insert (propertize "\t" 'display (list 'space :align-to clm))
+		   (if ct (list ct (nth 2 v)) (list "")))
+	    (setq clm (+ clm 6)))))
       (insert "\n")
       (insert "----+")
       (insert-char ?- 74)
       (insert "\n")
       (buffer-string))))
 
+(defvar quail-tamil-itrans-syllable-table
+  (quail-tamil-itrans-compute-syllable-table
+   (let ((vowels (car indian-tml-base-table))
+         trans v ret)
+     (dotimes (i (length vowels))
+       (when (setq v (nth i vowels))
+         (setq trans (nth i (car indian-itrans-v5-table-for-tamil)))
+         (push (append v (list (if (listp trans) (car trans) trans)))
+               ret)))
+     (setq ret (nreverse ret))
+     ret)
+   (let ((consonants (cadr indian-tml-base-table))
+         trans c ret)
+     (dotimes (i (length consonants))
+       (when (setq c (nth i consonants))
+         (setq trans (nth i (cadr indian-itrans-v5-table-for-tamil)))
+         (push (cons c (if (listp trans) trans (list trans)))
+               ret)))
+     (setq ret (nreverse ret))
+     ret)))
+
 (defvar quail-tamil-itrans-numerics-and-symbols-table
   (let ((numerics '((?௰ "பத்து") (?௱ "நூறு") (?௲ "ஆயிரம்")))
 	(symbols '((?௳ "நாள்") (?௴ "மாதம்") (?௵ "வருடம்")
@@ -244,25 +236,28 @@ quail-tamil-itrans-numerics-and-symbols-table
       (insert "\n")
       (buffer-string))))
 
-(defun quail-tamil-itrans-compute-signs-table (digitp)
+(defun quail-tamil-itrans-compute-signs-table (digitp various)
   "Compute the signs table for the tamil-itrans input method.
-If DIGITP is non-nil, include the digits translation as well."
-  (let ((various '((?ஃ . "H") ("ஸ்ரீ" . "srii") (?ௐ)))
-	(digits "௦௧௨௩௪௫௬௭௮௯")
+If DIGITP is non-nil, include the digits translation as well.
+If VARIOUS is non-nil, then it should a list of (CHAR . TRANS)
+where CHAR is the character/string to translate and TRANS is
+CHAR's translation."
+  (let ((digits "௦௧௨௩௪௫௬௭௮௯")
 	(width 6) clm)
     (with-temp-buffer
-      (insert "\n" (make-string 18 ?-) "+")
-      (when digitp (insert (make-string 60 ?-)))
+      (insert "\n" (make-string 18 ?-))
+      (when digitp
+        (insert "+" (make-string 60 ?-)))
       (insert "\n")
       (insert
        (propertize "\t" 'display '(space :align-to 5)) "various"
-       (propertize "\t" 'display '(space :align-to 18)) "|")
+       (propertize "\t" 'display '(space :align-to 18)))
       (when digitp
         (insert
-         (propertize "\t" 'display '(space :align-to 45)) "digits"))
-      (insert "\n" (make-string 18 ?-) "+")
+          "|" (propertize "\t" 'display '(space :align-to 45)) "digits"))
+      (insert "\n" (make-string 18 ?-))
       (when digitp
-        (insert (make-string 60 ?-)))
+        (insert "+" (make-string 60 ?-)))
       (insert "\n")
       (setq clm 0)
 
@@ -270,7 +265,8 @@ quail-tamil-itrans-compute-signs-table
 	(insert (propertize "\t" 'display (list 'space :align-to clm))
 		(car (nth i various)))
 	(setq clm (+ clm width)))
-      (insert (propertize "\t" 'display '(space :align-to 18)) "|")
+      (when digitp
+        (insert (propertize "\t" 'display '(space :align-to 18)) "|"))
       (setq clm 20)
       (when digitp
         (dotimes (i 10)
@@ -283,23 +279,26 @@ quail-tamil-itrans-compute-signs-table
 	(insert (propertize "\t" 'display (list 'space :align-to clm))
 		(or (cdr (nth i various)) ""))
 	(setq clm (+ clm width)))
-      (insert (propertize "\t" 'display '(space :align-to 18)) "|")
+      (when digitp
+        (insert (propertize "\t" 'display '(space :align-to 18)) "|"))
       (setq clm 20)
       (when digitp
         (dotimes (i 10)
 	  (insert (propertize "\t" 'display (list 'space :align-to clm))
 		  (format "%d" i))
 	  (setq clm (+ clm width))))
-      (insert "\n" (make-string 18 ?-) "+")
+      (insert "\n" (make-string 18 ?-))
       (when digitp
-        (insert (make-string 60 ?-) "\n"))
+        (insert "+" (make-string 60 ?-) "\n"))
       (buffer-string))))
 
 (defvar quail-tamil-itrans-various-signs-and-digits-table
-  (quail-tamil-itrans-compute-signs-table t))
+  (quail-tamil-itrans-compute-signs-table
+   t '((?ஃ . "H") ("ஸ்ரீ" . "srii") (?ௐ . "OM"))))
 
 (defvar quail-tamil-itrans-various-signs-table
-  (quail-tamil-itrans-compute-signs-table nil))
+  (quail-tamil-itrans-compute-signs-table
+   nil '((?ஃ . "H") ("ஸ்ரீ" . "srii") (?ௐ . "OM"))))
 
 (if nil
     (quail-define-package "tamil-itrans" "Tamil" "TmlIT" t "Tamil ITRANS"))
@@ -347,6 +346,151 @@ quail-tamil-itrans-various-signs-table
 
 Full key sequences are listed below:")
 
+;;;
+;;; Tamil phonetic input method
+;;;
+
+(defvaralias 'tamil-uyir-translation 'tamil-vowel-translation)
+(defcustom tamil-vowel-translation
+  '(("அ" "a") ("ஆ" "aa") ("இ" "i") ("ஈ" "ii")
+    ("உ" "u") ("ஊ" "uu") ("எ" "e") ("ஏ" "ee")
+    ("ஐ" "ai") ("ஒ" "o") ("ஓ" "oo") ("ஔ" "au" "ow"))
+  "List of input sequences to translate to Tamil vowels.
+Each element should be (VOWEL . TRANSLATIONS) where VOWEL is the
+Tamil vowel character (உயிரெழுத்து) and TRANSLATIONS is the
+list of input sequences to translate to that vowel."
+  :group 'leim
+  :type '(alist :key string :value-type (repeat string))
+  :options (delq nil
+                 (mapcar (lambda (x) (and (consp x) (string (car x))))
+                         (car indian-tml-base-table))))
+
+(defvaralias 'tamil-mei-translation 'tamil-consonant-translation)
+(defcustom tamil-consonant-translation
+  '(("க்" "k" "g") ("ங்" "ng") ("ச்" "ch" "s") ("ஞ்" "nj") ("ட்" "t" "d")
+    ("ண்" "N") ("த்" "th" "dh") ("ந்" "nh") ("ப்" "p" "b") ("ம்" "m")
+    ("ய்" "y") ("ர்" "r") ("ல்" "l") ("வ்" "v") ("ழ்" "z" "zh")
+    ("ள்" "L") ("ற்" "rh") ("ன்" "n")
+    ;; Sanskrit.
+    ("ஜ்" "j") ("ஸ்" "S") ("க்ஷ்" "ksH") ("ஷ்" "sh") ("ஹ்" "h")
+    ("க்‌ஷ்" "ksh") ("ஶ்" "Z"))
+  "List of input sequences to translate to Tamil consonants.
+Each element should be (VOWEL . TRANSLATIONS) where VOWEL is the
+Tamil consonant character (மெய் எழுத்து) and TRANSLATIONS is a list
+of input sequences to translate to that consonant."
+  :group 'leim
+  :type '(alist :key string :value-type (repeat string))
+  :options (delq nil
+                 (mapcar (lambda (x) (if (stringp x)
+                                         (concat x "்")
+                                       ;; #x0BCD = pulli/virama.
+                                       (and x (string x #x0BCD))))
+                         (cadr indian-tml-base-table))))
+
+(defcustom tamil-misc-translation
+  ;; ஃ is not a vowel or a consonant.
+  '(("ஃ" "F" "q")
+    ("ௐ" "OM"))
+  "List of input sequences to translate to various Tamil characters.
+Each should element should be (CHARACTER . TRANSLATIONS) where
+CHARACTER may be any string and TRANSLATIONS is a list of input
+sequences to translate to that CHARACTER."
+  :group 'leim
+  :type '(alist :key string :value-type (repeat string)))
+
+(defcustom tamil-native-digits nil
+  "When non-nil, use Tamil native digits instead of Arabic ones."
+  :group 'leim
+  :type 'boolean)
+
+(defvar tamil--syllable-table nil)
+(defvar tamil--signs-table nil)
+(defvar tamil--hashtables nil)
+(defvar tamil--vowel-signs
+  '(("அ" . nil) ("ஆ" . ?ா) ("இ" . ?ி) ("ஈ" . ?ீ)
+    ("உ" . ?ு) ("ஊ" . ?ூ) ("எ" . ?ெ) ("ஏ" . ?ே)
+    ("ஐ" . ?ை) ("ஓ" . ?ோ) ("ஒ" . ?ொ) ("ஔ" . ?ௌ)))
+
+(defun tamil--make-trans-table ()
+  `((;; Vowels.
+     ,@(mapcar
+        (lambda (v) (assoc-default (and v (string (car v))) tamil-vowel-translation))
+        (car indian-tml-base-table)))
+    (;; Consonants.
+     ,@(mapcar
+        (lambda (c)
+          (when c
+            (assoc-default (if (stringp c)
+                               (concat c "்")
+                             ;; #x0BCD = pulli/virama.
+                             (string c #x0BCD))
+                           tamil-consonant-translation)))
+        (nth 1 indian-tml-base-table)))
+    ;; Misc symbols.  We will ignore the base table here.
+    ()))
+
+(defun tamil--update-quail-rules ()
+  (let ((quail-current-package (assoc "tamil" quail-package-alist))
+        (hts (indian-make-hash (if tamil-native-digits
+                                   indian-tml-base-digits-table
+                                 indian-tml-base-table)
+                               (tamil--make-trans-table))))
+    ;; Do the misc characters here.
+    (indian--puthash-m (mapcar #'car tamil-misc-translation)
+                       (mapcar #'cdr tamil-misc-translation)
+                       hts)
+    (setq tamil--hashtables hts
+          tamil--syllable-table
+          (quail-tamil-itrans-compute-syllable-table
+           (mapcar (lambda (v) (list (car v) (assoc-default (car v) tamil--vowel-signs)
+                                     (cadr v)))
+                   tamil-vowel-translation)
+           (mapcar (lambda (c) (cons (substring (car c) 0 -1) (cdr c)))
+                   tamil-consonant-translation))
+          tamil--signs-table
+          ;; FIXME: This should also show how to input ஸ்ரீ (default: Srii).
+          (quail-tamil-itrans-compute-signs-table
+           tamil-native-digits
+           (mapcar (lambda (m) (cons (car m) (cadr m))) tamil-misc-translation)))
+    ;; (nth 2 ...) = quail-map.
+    (setf (nth 2 quail-current-package) '(nil))
+    (maphash (lambda (k v)
+               (quail-defrule k (if (length= v 1)
+                                    (string-to-char v)
+                                  (vector v))))
+             (cdr hts))))
+
+(quail-define-package
+ "tamil" "Tamil" "ழ" t
+ "Customisable Tamil phonetic input method.
+To change the translation of vowels (உயிரெத்துக்கள்), customize `tamil-vowel-translation'.
+To change the translation of consonants (மெய் எழுத்துக்கள்), customize
+ `tamil-consonant-translation'.
+To input miscellaneous characters (including ஃ), customize
+ `tamil-misc-translation'.
+To use native Tamil digits, customize `tamil-native-digits'.
+
+To end the current translation process, say \\<quail-translation-keymap>\\[quail-select-current] (defined in
+`quail-translation-keymap').  This is useful when there's a
+ conflict between two possible translation.
+
+The current input scheme is:
+
+### Basic syllables (உயிர்மெய் எழுத்துக்கள்) ###
+\\=\\<tamil--syllable-table>
+
+### Miscellaneous ####
+\\=\\<tamil--signs-table>
+
+The following characters have NO input sequence associated with
+them by default.  Their descriptions are included for easy
+reference.
+\\=\\<quail-tamil-itrans-numerics-and-symbols-table>
+
+Full key sequences are listed below:"
+ nil nil nil nil nil nil t)
+(tamil--update-quail-rules)
+
 ;;;
 ;;; Input by Inscript
 ;;;
-- 
2.35.1


[-- Attachment #4: Type: text/plain, Size: 1862 bytes --]



---

Footnotes:

1. The itrans input method is absolutely horrible for Tamil since unlike
   the other Indic languages, it doesn't have a lot of consonants
   HOWEVER, the consonant sound _changes_ depending on where it ends up.
   So ideally, the Tamil input method show allow multiple _ways_ to
   insert a single character.  As an example, consider the following
   words

        தும்பிக்கை - thumbikai            (tusk)
        படம் - padam                      (photograph/image)

    The consonant of interest is "ப".  The letter "பி" is pronounced in
    the first word as "bi" as in "bicycle" however, the letter "ப" is
    pronounced as "pa" as in "party".  This is just one of many
    examples.

    There are also pairs of very similar sounding consonants and when
    transliterated (when you type in "Tanglish" for example), all the
    characters in the pair use the same letter.  E.g., such a pair is
    the ல/ள family; when one causally chats in "Tanglish", we just type
    "lXX" as the transliteration for that family.  Obviously, when one
    is typing in _Tamil_, he/she needs to distinguish between these two
    characters.  Leaving the choice of input sequence to transliterate
    these characters to the writer is much better.  For more, please
    read the wordpress article I linked, thanks.

2. Opting to not go for character key in tamil-consonant-translation
   because of the Customize interface is only part of the reason.

   Having the key be TAMIL LETTER XXX + TAMIL SIGN VIRAMA is much more
   intuitive for the native speaker.  Take பு for example, the way you
   break it down into consonant and vowel is

        ப் + உ = பு
        (ippu + u = pu)

   and NOT

        ப + உ = பு
        (pa + u = pu)

    

^ permalink raw reply related	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2022-07-14  7:11 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30 12:13 bug#56323: 29.0.50; Add new customisable phonetic Tamil input method Visuwesh
2022-06-30 14:08 ` Visuwesh
2022-06-30 15:53 ` Visuwesh
2022-07-01 12:59 ` bug#56323: 29.0.50; [v2] " Visuwesh
2022-07-01 13:01   ` Visuwesh
2022-07-01 13:22   ` Eli Zaretskii
2022-07-01 13:47     ` Visuwesh
2022-07-01 14:06       ` Eli Zaretskii
2022-07-01 14:30         ` Visuwesh
2022-07-01 16:09           ` Eli Zaretskii
2022-07-01 16:37             ` Visuwesh
2022-07-01 18:16               ` Eli Zaretskii
2022-07-02  4:02                 ` Visuwesh
2022-07-02  6:35                   ` Eli Zaretskii
2022-07-02  6:54                     ` Visuwesh
2022-07-02  7:17                       ` Eli Zaretskii
2022-07-02  7:35                         ` Eli Zaretskii
2022-07-02  7:46                           ` Eli Zaretskii
2022-07-02  8:11                         ` Visuwesh
2022-07-02  8:29                           ` Eli Zaretskii
2022-07-02  8:40                             ` Visuwesh
2022-07-02  8:54                               ` Eli Zaretskii
2022-07-02  9:33                                 ` Visuwesh
2022-07-02  9:38                                   ` Eli Zaretskii
2022-07-02 10:31                                     ` Visuwesh
2022-07-02 10:46                                       ` Eli Zaretskii
2022-07-02 12:08                                         ` Visuwesh
2022-07-02 11:05                                       ` समीर सिंह Sameer Singh
2022-07-02 12:04                                         ` Visuwesh
2022-07-02 12:23                                         ` Eli Zaretskii
2022-07-02  6:58               ` Eli Zaretskii
2022-07-02  7:58                 ` Visuwesh
2022-07-02  8:39                   ` Eli Zaretskii
2022-07-02  9:28                     ` Visuwesh
2022-07-10  3:56                       ` Visuwesh
2022-07-10  5:34                         ` Eli Zaretskii
2022-07-10  6:42                           ` Visuwesh
2022-07-10  7:32                             ` Visuwesh
2022-07-14  6:34                               ` Eli Zaretskii
2022-07-14  7:11                                 ` Visuwesh
2022-07-02 12:15             ` Visuwesh
2022-07-03  3:57               ` Visuwesh

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).