@vm75/inditrans 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,10 +22,17 @@ Khmer, Malayalam, Oriya, Sinhala, Tamil, Tamil-Extended, Telugu, Thai, Tibetan
22
22
  [IAST](https://en.wikipedia.org/wiki/International_Alphabet_of_Sanskrit_Transliteration) ·
23
23
  [IPA](https://en.wikipedia.org/wiki/International_Phonetic_Alphabet) ·
24
24
  [ISO 15919](https://en.wikipedia.org/wiki/ISO_15919) ·
25
- [ITRANS](https://en.wikipedia.org/wiki/ITRANS) ·
25
+ [ITRANS](https://www.aczoom.com/itrans/) ·
26
26
  [TITUS](https://titus.uni-frankfurt.de/indexe.htm) ·
27
27
  ReadableLatin
28
28
 
29
+ ### ITRANS notation notes
30
+
31
+ `inditrans` implements uniform phonemic vowel mapping adhering to the [ITRANS specification](https://www.aczoom.com/itrans/):
32
+ - **Short vowels**: `e` and `o` encode short vowels (e.g. Kannada `ಎ` / `ೆ`, Telugu `ఎ` / `ె`, Tamil `எ` / `ெ`, Malayalam `എ` / `െ`, Devanagari `ऎ` / `ॆ`). `^e` and `^o` remain supported as aliases.
33
+ - **Long vowels**: `E` and `O` encode long vowels (e.g. Kannada `ಏ` / `ೇ`, Telugu `ఏ` / `ే`, Tamil `ஏ` / `ே`, Malayalam `ഏ` / `േ`, Devanagari `ए` / `े`).
34
+ - Examples: `te` $\to$ `तॆ` / `ತೆ`, `tE` $\to$ `ते` / `ತೇ`; `tere bina` $\to$ `ತೆರೆ ಬಿನ` (Kannada), `tErE bina` $\to$ `ತೇರೇ ಬಿನ` (Kannada) / `तेरे बिन` (Devanagari).
35
+
29
36
  ## Requirements
30
37
 
31
38
  - Node.js ≥ 18.3 (or modern browser with WebAssembly support)
@@ -91,6 +98,9 @@ Returns `true` when the given script name is recognised.
91
98
  | `Option.IgnoreVedicAccents` | `8` | Strip Vedic accent markers |
92
99
  | `Option.RetainSpecialMarkers` | `16` | Keep non-standard character markers |
93
100
  | `Option.NoXMLTagHandling` | `32` | Treat XML/HTML tags as plain text |
101
+ | `Option.DisableInference` | `64` | Disable anuswara assimilation and contextual Tamil pronunciation/letter inference |
102
+
103
+ For Tamil **source** text, `Option.TamilSuperscripted` automatically enables `DisableInference`. The same flag on Tamil **output** does not disable inference. When disabled, a mapped anuswara spelling is emitted rather than assimilated to the next consonant.
94
104
 
95
105
  Combine flags with the bitwise OR operator: `Option.IgnoreVedicAccents | Option.TamilSuperscripted`.
96
106
 
@@ -5,5 +5,6 @@ export declare enum Option {
5
5
  ASCIINumerals = 4,
6
6
  IgnoreVedicAccents = 8,
7
7
  RetainSpecialMarkers = 16,
8
- NoXMLTagHandling = 32
8
+ NoXMLTagHandling = 32,
9
+ DisableInference = 64
9
10
  }
@@ -20,5 +20,7 @@ var Option;
20
20
  Option[Option["RetainSpecialMarkers"] = 16] = "RetainSpecialMarkers";
21
21
  /// Do not check for xml/html tags, and treat them as normal text
22
22
  Option[Option["NoXMLTagHandling"] = 32] = "NoXMLTagHandling";
23
+ /// Disable contextual pronunciation inference (including anuswara assimilation and Tamil reading/writing rules)
24
+ Option[Option["DisableInference"] = 64] = "DisableInference";
23
25
  })(Option || (exports.Option = Option = {}));
24
26
  //# sourceMappingURL=Option.js.map
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm75/inditrans",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "A functional transliterator library for the most common Indic/Brahmic scripts.",
5
5
  "main": "./dist/src/index.js",
6
6
  "author": "VM75",