diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d45cc7..1376380 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Ahom numeral system - Warang Citi numeral system - Bhaiksuki numeral system +- Tamil numeral system +### Changed +- `README.md` updated ## [1.3] - 2026-01-28 ### Added - English full stop mode @@ -151,4 +154,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. [0.4]: https://github.com/openscilab/xnum/compare/v0.3...v0.4 [0.3]: https://github.com/openscilab/xnum/compare/v0.2...v0.3 [0.2]: https://github.com/openscilab/xnum/compare/v0.1...v0.2 -[0.1]: https://github.com/openscilab/xnum/compare/2ed44ad...v0.1 \ No newline at end of file +[0.1]: https://github.com/openscilab/xnum/compare/2ed44ad...v0.1 diff --git a/README.md b/README.md index 133198e..24f5fdf 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,12 @@ It can automatically detect mixed numeral formats in a piece of text and convert - Ahom - Warang Citi - Bhaiksuki +- Tamil + +> [!NOTE] +> XNum performs digit-by-digit conversion using positional notation. +> While most supported systems are positional, a small subset are non-positional and follow different numeric conventions. +> For them, XNum converts only individual digit symbols and does not interpret or generate non-positional number forms. ## Issues & bug reports diff --git a/tests/test_conversion.py b/tests/test_conversion.py index 42cf42c..f75f7c8 100644 --- a/tests/test_conversion.py +++ b/tests/test_conversion.py @@ -92,6 +92,7 @@ NumeralSystem.AHOM: "𑜰𑜱𑜲𑜳𑜴𑜵𑜶𑜷𑜸𑜹", NumeralSystem.WARANG_CITI: "𑣠𑣡𑣢𑣣𑣤𑣥𑣦𑣧𑣨𑣩", NumeralSystem.BHAIKSUKI: "𑱐𑱑𑱒𑱓𑱔𑱕𑱖𑱗𑱘𑱙", + NumeralSystem.TAMIL: "௦௧௨௩௪௫௬௭௮௯", } diff --git a/xnum/params.py b/xnum/params.py index d06aa27..0e7f07d 100644 --- a/xnum/params.py +++ b/xnum/params.py @@ -76,6 +76,7 @@ AHOM_DIGITS = ['𑜰', '𑜱', '𑜲', '𑜳', '𑜴', '𑜵', '𑜶', '𑜷', '𑜸', '𑜹'] WARANG_CITI_DIGITS = ['𑣠', '𑣡', '𑣢', '𑣣', '𑣤', '𑣥', '𑣦', '𑣧', '𑣨', '𑣩'] BHAIKSUKI_DIGITS = ['𑱐', '𑱑', '𑱒', '𑱓', '𑱔', '𑱕', '𑱖', '𑱗', '𑱘', '𑱙'] +TAMIL_DIGITS = ['௦', '௧', '௨', '௩', '௪', '௫', '௬', '௭', '௮', '௯'] NUMERAL_MAPS = { "english": ENGLISH_DIGITS, @@ -150,6 +151,7 @@ "ahom": AHOM_DIGITS, "warang_citi": WARANG_CITI_DIGITS, "bhaiksuki": BHAIKSUKI_DIGITS, + "tamil": TAMIL_DIGITS, } ALL_DIGIT_MAPS = {} @@ -233,6 +235,7 @@ class NumeralSystem(Enum): AHOM = "ahom" WARANG_CITI = "warang_citi" BHAIKSUKI = "bhaiksuki" + TAMIL = "tamil" AUTO = "auto"