nepali_unicoder 0.1.1__tar.gz → 0.1.2__tar.gz
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.
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/PKG-INFO +24 -1
- nepali_unicoder-0.1.1/src/nepali_unicoder.egg-info/PKG-INFO → nepali_unicoder-0.1.2/README.md +19 -18
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/pyproject.toml +8 -2
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/src/nepali_unicoder/engine.py +2 -1
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/src/nepali_unicoder/rules.py +17 -0
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/src/nepali_unicoder/tokenizer.py +9 -4
- nepali_unicoder-0.1.1/README.md → nepali_unicoder-0.1.2/src/nepali_unicoder.egg-info/PKG-INFO +41 -0
- nepali_unicoder-0.1.2/src/nepali_unicoder.egg-info/requires.txt +5 -0
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/tests/test_conversion.py +54 -9
- nepali_unicoder-0.1.1/src/nepali_unicoder.egg-info/requires.txt +0 -3
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/LICENSE +0 -0
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/MANIFEST.in +0 -0
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/setup.cfg +0 -0
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/src/nepali_unicoder/__init__.py +0 -0
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/src/nepali_unicoder/__main__.py +0 -0
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/src/nepali_unicoder/convert.py +0 -0
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/src/nepali_unicoder/loader.py +0 -0
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/src/nepali_unicoder/trie.py +0 -0
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/src/nepali_unicoder/word_maps.json +0 -0
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/src/nepali_unicoder.egg-info/SOURCES.txt +0 -0
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/src/nepali_unicoder.egg-info/dependency_links.txt +0 -0
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/src/nepali_unicoder.egg-info/top_level.txt +0 -0
- {nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/tests/test_components.py +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nepali_unicoder
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: A Python package for Roman to Nepali (Devanagari) transliteration
|
|
5
5
|
Author-email: realsanjeev <075bei033.sanjeev@pcampus.edu.np>
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/realsanjeev/nepali_unicoder
|
|
8
|
+
Project-URL: Documentation, https://realsanjeev.github.io/nepali_unicoder/
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/realsanjeev/nepali_unicoder/issues
|
|
8
10
|
Keywords: nepali,unicoder,roman to devanagari,nepali transliteration,preeti to unicode
|
|
9
11
|
Classifier: Programming Language :: Python
|
|
10
12
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -14,12 +16,19 @@ Description-Content-Type: text/markdown
|
|
|
14
16
|
License-File: LICENSE
|
|
15
17
|
Provides-Extra: dev
|
|
16
18
|
Requires-Dist: pre-commit; extra == "dev"
|
|
19
|
+
Requires-Dist: mkdocs; extra == "dev"
|
|
20
|
+
Requires-Dist: mkdocs-material; extra == "dev"
|
|
17
21
|
Dynamic: license-file
|
|
18
22
|
|
|
19
23
|
# Nepali Unicoder
|
|
20
24
|
|
|
25
|
+
[](https://realsanjeev.github.io/nepali_unicoder/)
|
|
26
|
+
[](https://pypi.org/project/nepali-unicoder/)
|
|
27
|
+
|
|
21
28
|
A robust Python package for converting Romanized Nepali text and Preeti font text into Unicode Devanagari script. It uses a greedy matching algorithm for Roman transliteration and a two-phase conversion process for Preeti with contextual rules.
|
|
22
29
|
|
|
30
|
+
Read the **[Full Documentation](https://realsanjeev.github.io/nepali_unicoder/)** for detailed usage guides, Preeti mapping references, and API details.
|
|
31
|
+
|
|
23
32
|
## Features
|
|
24
33
|
|
|
25
34
|
- **Accurate Transliteration**: Uses a greedy matching algorithm to prioritize longer phonetic matches (e.g., 'kha' is matched before 'k' and 'h').
|
|
@@ -92,6 +101,7 @@ print(preeti_converter.convert(preeti_text))
|
|
|
92
101
|
# - Matra reordering: l (ि) moves after consonant
|
|
93
102
|
# - Special m transformations
|
|
94
103
|
# - Vowel combinations
|
|
104
|
+
# - Literal brackets: { and } are treated as normal characters in Preeti mode
|
|
95
105
|
```
|
|
96
106
|
|
|
97
107
|
#### Preeti Character Examples
|
|
@@ -103,6 +113,19 @@ print(preeti_converter.convert(preeti_text))
|
|
|
103
113
|
| `sl` | `कि` | ka + short i (reordered) |
|
|
104
114
|
| `qm` | `क्र` | Special m transformation |
|
|
105
115
|
| `!@#` | `१२३` | Nepali numbers |
|
|
116
|
+
| `Ù` / `Ú` | `;` / `:` | Literal punctuation |
|
|
117
|
+
| `«` / `»` | `्र` | Ra-foot (for ट, ठ, ड, ढ) |
|
|
118
|
+
| `¿` | `रू` | Combined ruu |
|
|
119
|
+
| `å` | `द्व` | Combined dva |
|
|
120
|
+
| `ˆ` | `फ्` | Half ph |
|
|
121
|
+
| `ª` | `ङ` | Consonant nga |
|
|
122
|
+
| `æ` / `Æ` | `“` / `”` | Curly quotes |
|
|
123
|
+
| `¥` | `र्` | Half ra |
|
|
124
|
+
| `¶` | `ठ्ठ` | Combined thth |
|
|
125
|
+
| `§` | `ट्ट` | Combined tt |
|
|
126
|
+
| `£` | `घ्` | Half gh |
|
|
127
|
+
| `Ë` / `Í` | `ङ्ग` / `ङ्क` | Combined nga-ga / nga-ka |
|
|
128
|
+
| `‰` | `झ्` | Half jh |
|
|
106
129
|
|
|
107
130
|
#### CLI for Preeti
|
|
108
131
|
|
nepali_unicoder-0.1.1/src/nepali_unicoder.egg-info/PKG-INFO → nepali_unicoder-0.1.2/README.md
RENAMED
|
@@ -1,25 +1,12 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: nepali_unicoder
|
|
3
|
-
Version: 0.1.1
|
|
4
|
-
Summary: A Python package for Roman to Nepali (Devanagari) transliteration
|
|
5
|
-
Author-email: realsanjeev <075bei033.sanjeev@pcampus.edu.np>
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/realsanjeev/nepali_unicoder
|
|
8
|
-
Keywords: nepali,unicoder,roman to devanagari,nepali transliteration,preeti to unicode
|
|
9
|
-
Classifier: Programming Language :: Python
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Operating System :: OS Independent
|
|
12
|
-
Requires-Python: >=3.7
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
License-File: LICENSE
|
|
15
|
-
Provides-Extra: dev
|
|
16
|
-
Requires-Dist: pre-commit; extra == "dev"
|
|
17
|
-
Dynamic: license-file
|
|
18
|
-
|
|
19
1
|
# Nepali Unicoder
|
|
20
2
|
|
|
3
|
+
[](https://realsanjeev.github.io/nepali_unicoder/)
|
|
4
|
+
[](https://pypi.org/project/nepali-unicoder/)
|
|
5
|
+
|
|
21
6
|
A robust Python package for converting Romanized Nepali text and Preeti font text into Unicode Devanagari script. It uses a greedy matching algorithm for Roman transliteration and a two-phase conversion process for Preeti with contextual rules.
|
|
22
7
|
|
|
8
|
+
Read the **[Full Documentation](https://realsanjeev.github.io/nepali_unicoder/)** for detailed usage guides, Preeti mapping references, and API details.
|
|
9
|
+
|
|
23
10
|
## Features
|
|
24
11
|
|
|
25
12
|
- **Accurate Transliteration**: Uses a greedy matching algorithm to prioritize longer phonetic matches (e.g., 'kha' is matched before 'k' and 'h').
|
|
@@ -92,6 +79,7 @@ print(preeti_converter.convert(preeti_text))
|
|
|
92
79
|
# - Matra reordering: l (ि) moves after consonant
|
|
93
80
|
# - Special m transformations
|
|
94
81
|
# - Vowel combinations
|
|
82
|
+
# - Literal brackets: { and } are treated as normal characters in Preeti mode
|
|
95
83
|
```
|
|
96
84
|
|
|
97
85
|
#### Preeti Character Examples
|
|
@@ -103,6 +91,19 @@ print(preeti_converter.convert(preeti_text))
|
|
|
103
91
|
| `sl` | `कि` | ka + short i (reordered) |
|
|
104
92
|
| `qm` | `क्र` | Special m transformation |
|
|
105
93
|
| `!@#` | `१२३` | Nepali numbers |
|
|
94
|
+
| `Ù` / `Ú` | `;` / `:` | Literal punctuation |
|
|
95
|
+
| `«` / `»` | `्र` | Ra-foot (for ट, ठ, ड, ढ) |
|
|
96
|
+
| `¿` | `रू` | Combined ruu |
|
|
97
|
+
| `å` | `द्व` | Combined dva |
|
|
98
|
+
| `ˆ` | `फ्` | Half ph |
|
|
99
|
+
| `ª` | `ङ` | Consonant nga |
|
|
100
|
+
| `æ` / `Æ` | `“` / `”` | Curly quotes |
|
|
101
|
+
| `¥` | `र्` | Half ra |
|
|
102
|
+
| `¶` | `ठ्ठ` | Combined thth |
|
|
103
|
+
| `§` | `ट्ट` | Combined tt |
|
|
104
|
+
| `£` | `घ्` | Half gh |
|
|
105
|
+
| `Ë` / `Í` | `ङ्ग` / `ङ्क` | Combined nga-ga / nga-ka |
|
|
106
|
+
| `‰` | `झ्` | Half jh |
|
|
106
107
|
|
|
107
108
|
#### CLI for Preeti
|
|
108
109
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "nepali_unicoder"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.2"
|
|
8
8
|
description = "A Python package for Roman to Nepali (Devanagari) transliteration"
|
|
9
9
|
authors = [
|
|
10
10
|
{ name="realsanjeev", email="075bei033.sanjeev@pcampus.edu.np" },
|
|
@@ -23,9 +23,15 @@ keywords = ["nepali", "unicoder", "roman to devanagari", "nepali transliteration
|
|
|
23
23
|
|
|
24
24
|
[project.urls]
|
|
25
25
|
"Homepage" = "https://github.com/realsanjeev/nepali_unicoder"
|
|
26
|
+
"Documentation" = "https://realsanjeev.github.io/nepali_unicoder/"
|
|
27
|
+
"Bug Tracker" = "https://github.com/realsanjeev/nepali_unicoder/issues"
|
|
26
28
|
|
|
27
29
|
[project.optional-dependencies]
|
|
28
|
-
dev = [
|
|
30
|
+
dev = [
|
|
31
|
+
"pre-commit",
|
|
32
|
+
"mkdocs",
|
|
33
|
+
"mkdocs-material"
|
|
34
|
+
]
|
|
29
35
|
|
|
30
36
|
[tool.pytest.ini_options]
|
|
31
37
|
pythonpath = [
|
|
@@ -100,6 +100,23 @@ PREETI_TO_UNICODE_MAPPING = {
|
|
|
100
100
|
"-": "(",
|
|
101
101
|
"=": ".",
|
|
102
102
|
"+": "ं",
|
|
103
|
+
"Ù": ";",
|
|
104
|
+
"Ú": ":",
|
|
105
|
+
"«": "्र",
|
|
106
|
+
"»": "्र",
|
|
107
|
+
"¿": "रू",
|
|
108
|
+
"å": "द्व",
|
|
109
|
+
"ˆ": "फ्",
|
|
110
|
+
"ª": "ङ",
|
|
111
|
+
"æ": "“",
|
|
112
|
+
"Æ": "”",
|
|
113
|
+
"¥": "र्",
|
|
114
|
+
"¶": "ठ्ठ",
|
|
115
|
+
"§": "ट्ट",
|
|
116
|
+
"£": "घ्",
|
|
117
|
+
"Ë": "ङ्ग",
|
|
118
|
+
"Í": "ङ्क",
|
|
119
|
+
"‰": "झ्",
|
|
103
120
|
},
|
|
104
121
|
# Post-processing rules applied after character mapping
|
|
105
122
|
# Format: [pattern, replacement] - applied in order using regex
|
|
@@ -9,17 +9,18 @@ class Token:
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class Tokenizer:
|
|
12
|
-
def tokenize(self, text: str) -> List[Token]:
|
|
12
|
+
def tokenize(self, text: str, use_blocks: bool = True) -> List[Token]:
|
|
13
13
|
"""
|
|
14
14
|
Split text into tokens.
|
|
15
15
|
This simple tokenizer handles {blocks}, numbers, and treats everything else as ROMAN for now.
|
|
16
|
+
If use_blocks is False, { and } are treated as normal characters.
|
|
16
17
|
"""
|
|
17
18
|
tokens = []
|
|
18
19
|
i = 0
|
|
19
20
|
n = len(text)
|
|
20
21
|
|
|
21
22
|
while i < n:
|
|
22
|
-
if text[i] == "{":
|
|
23
|
+
if use_blocks and text[i] == "{":
|
|
23
24
|
# Check for escape {{
|
|
24
25
|
if i + 1 < n and text[i + 1] == "{":
|
|
25
26
|
# Actually, if it's escaped, it should probably be treated as a literal '{' in the output.
|
|
@@ -38,7 +39,7 @@ class Tokenizer:
|
|
|
38
39
|
else: # Unclosed brace, treat as literal
|
|
39
40
|
tokens.append(Token(value="{", type="LITERAL"))
|
|
40
41
|
i += 1
|
|
41
|
-
elif text[i] == "}":
|
|
42
|
+
elif use_blocks and text[i] == "}":
|
|
42
43
|
# Unmatched closing brace, treat as literal
|
|
43
44
|
tokens.append(Token(value="}", type="LITERAL"))
|
|
44
45
|
i += 1
|
|
@@ -61,7 +62,11 @@ class Tokenizer:
|
|
|
61
62
|
else:
|
|
62
63
|
# Accumulate Roman text
|
|
63
64
|
j = i
|
|
64
|
-
while
|
|
65
|
+
while (
|
|
66
|
+
j < n
|
|
67
|
+
and (not use_blocks or text[j] not in "{}")
|
|
68
|
+
and not text[j].isdigit()
|
|
69
|
+
):
|
|
65
70
|
j += 1
|
|
66
71
|
tokens.append(Token(value=text[i:j], type="ROMAN"))
|
|
67
72
|
i = j
|
nepali_unicoder-0.1.1/README.md → nepali_unicoder-0.1.2/src/nepali_unicoder.egg-info/PKG-INFO
RENAMED
|
@@ -1,7 +1,34 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nepali_unicoder
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: A Python package for Roman to Nepali (Devanagari) transliteration
|
|
5
|
+
Author-email: realsanjeev <075bei033.sanjeev@pcampus.edu.np>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/realsanjeev/nepali_unicoder
|
|
8
|
+
Project-URL: Documentation, https://realsanjeev.github.io/nepali_unicoder/
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/realsanjeev/nepali_unicoder/issues
|
|
10
|
+
Keywords: nepali,unicoder,roman to devanagari,nepali transliteration,preeti to unicode
|
|
11
|
+
Classifier: Programming Language :: Python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Requires-Python: >=3.7
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
19
|
+
Requires-Dist: mkdocs; extra == "dev"
|
|
20
|
+
Requires-Dist: mkdocs-material; extra == "dev"
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
1
23
|
# Nepali Unicoder
|
|
2
24
|
|
|
25
|
+
[](https://realsanjeev.github.io/nepali_unicoder/)
|
|
26
|
+
[](https://pypi.org/project/nepali-unicoder/)
|
|
27
|
+
|
|
3
28
|
A robust Python package for converting Romanized Nepali text and Preeti font text into Unicode Devanagari script. It uses a greedy matching algorithm for Roman transliteration and a two-phase conversion process for Preeti with contextual rules.
|
|
4
29
|
|
|
30
|
+
Read the **[Full Documentation](https://realsanjeev.github.io/nepali_unicoder/)** for detailed usage guides, Preeti mapping references, and API details.
|
|
31
|
+
|
|
5
32
|
## Features
|
|
6
33
|
|
|
7
34
|
- **Accurate Transliteration**: Uses a greedy matching algorithm to prioritize longer phonetic matches (e.g., 'kha' is matched before 'k' and 'h').
|
|
@@ -74,6 +101,7 @@ print(preeti_converter.convert(preeti_text))
|
|
|
74
101
|
# - Matra reordering: l (ि) moves after consonant
|
|
75
102
|
# - Special m transformations
|
|
76
103
|
# - Vowel combinations
|
|
104
|
+
# - Literal brackets: { and } are treated as normal characters in Preeti mode
|
|
77
105
|
```
|
|
78
106
|
|
|
79
107
|
#### Preeti Character Examples
|
|
@@ -85,6 +113,19 @@ print(preeti_converter.convert(preeti_text))
|
|
|
85
113
|
| `sl` | `कि` | ka + short i (reordered) |
|
|
86
114
|
| `qm` | `क्र` | Special m transformation |
|
|
87
115
|
| `!@#` | `१२३` | Nepali numbers |
|
|
116
|
+
| `Ù` / `Ú` | `;` / `:` | Literal punctuation |
|
|
117
|
+
| `«` / `»` | `्र` | Ra-foot (for ट, ठ, ड, ढ) |
|
|
118
|
+
| `¿` | `रू` | Combined ruu |
|
|
119
|
+
| `å` | `द्व` | Combined dva |
|
|
120
|
+
| `ˆ` | `फ्` | Half ph |
|
|
121
|
+
| `ª` | `ङ` | Consonant nga |
|
|
122
|
+
| `æ` / `Æ` | `“` / `”` | Curly quotes |
|
|
123
|
+
| `¥` | `र्` | Half ra |
|
|
124
|
+
| `¶` | `ठ्ठ` | Combined thth |
|
|
125
|
+
| `§` | `ट्ट` | Combined tt |
|
|
126
|
+
| `£` | `घ्` | Half gh |
|
|
127
|
+
| `Ë` / `Í` | `ङ्ग` / `ङ्क` | Combined nga-ga / nga-ka |
|
|
128
|
+
| `‰` | `झ्` | Half jh |
|
|
88
129
|
|
|
89
130
|
#### CLI for Preeti
|
|
90
131
|
|
|
@@ -82,13 +82,17 @@ class TestPreetiUnicoder(unittest.TestCase):
|
|
|
82
82
|
self.converter = Converter(mode="preeti")
|
|
83
83
|
|
|
84
84
|
def test_qwerty_alphabet(self):
|
|
85
|
-
|
|
86
|
-
# self.assertEqual(self.converter.convert("qwertyuiop QWERTYUIOP"), "त्रधभचतथगष्यउ त्तध्भ्च्त्थ्ग्क्ष्इए")
|
|
85
|
+
"""Basic character mappings (a-z, A-Z)"""
|
|
87
86
|
self.assertEqual(
|
|
88
87
|
self.converter.convert("q w e r t y u i o p Q W E R T Y U I O P"),
|
|
89
88
|
"त्र ध भ च त थ ग ष् य उ त्त ध् भ् च् त् थ् ग् क्ष् इ ए",
|
|
90
89
|
)
|
|
91
|
-
|
|
90
|
+
|
|
91
|
+
def test_additional_consonants(self):
|
|
92
|
+
"""Additional consonants outside a-z range"""
|
|
93
|
+
self.assertEqual(self.converter.convert("ª"), "ङ")
|
|
94
|
+
self.assertEqual(self.converter.convert("`"), "ञ")
|
|
95
|
+
self.assertEqual(self.converter.convert("~"), "ञ्")
|
|
92
96
|
|
|
93
97
|
def test_arabic_numbers(self):
|
|
94
98
|
self.assertEqual(self.converter.convert("0123456789"), "ण्ज्ञद्दघद्धछटठडढ")
|
|
@@ -98,9 +102,15 @@ class TestPreetiUnicoder(unittest.TestCase):
|
|
|
98
102
|
self.assertEqual(self.converter.convert("!@#$%^&*()"), "१२३४५६७८९०")
|
|
99
103
|
|
|
100
104
|
def test_special_characters_to_unicoder(self):
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
"""Punctuation and special symbol mappings"""
|
|
106
|
+
self.assertEqual(self.converter.convert("Ù"), ";")
|
|
107
|
+
self.assertEqual(self.converter.convert("Ú"), ":")
|
|
108
|
+
self.assertEqual(self.converter.convert("æ"), "“")
|
|
109
|
+
self.assertEqual(self.converter.convert("Æ"), "”")
|
|
110
|
+
self.assertEqual(self.converter.convert("."), "।")
|
|
111
|
+
self.assertEqual(self.converter.convert("="), ".")
|
|
112
|
+
self.assertEqual(self.converter.convert("+"), "ं")
|
|
113
|
+
self.assertEqual(self.converter.convert("F"), "ँ")
|
|
104
114
|
|
|
105
115
|
def test_reph_positioning(self):
|
|
106
116
|
"""Test that { (reph) is correctly positioned"""
|
|
@@ -132,11 +142,46 @@ class TestPreetiUnicoder(unittest.TestCase):
|
|
|
132
142
|
# km should become फ (प + m = फ)
|
|
133
143
|
self.assertEqual(self.converter.convert("km"), "फ")
|
|
134
144
|
|
|
145
|
+
def test_combined_and_half_forms(self):
|
|
146
|
+
"""Test special combined and half form mappings"""
|
|
147
|
+
self.assertEqual(self.converter.convert("«"), "्र")
|
|
148
|
+
self.assertEqual(self.converter.convert("»"), "्र")
|
|
149
|
+
self.assertEqual(self.converter.convert("¿"), "रू")
|
|
150
|
+
self.assertEqual(self.converter.convert("å"), "द्व")
|
|
151
|
+
self.assertEqual(self.converter.convert("ˆ"), "फ्")
|
|
152
|
+
self.assertEqual(self.converter.convert("¶"), "ठ्ठ")
|
|
153
|
+
self.assertEqual(self.converter.convert("¥"), "र्")
|
|
154
|
+
self.assertEqual(self.converter.convert("§"), "ट्ट")
|
|
155
|
+
self.assertEqual(self.converter.convert("£"), "घ्")
|
|
156
|
+
self.assertEqual(self.converter.convert("Ë"), "ङ्ग")
|
|
157
|
+
self.assertEqual(self.converter.convert("Í"), "ङ्क")
|
|
158
|
+
self.assertEqual(self.converter.convert("‰"), "झ्")
|
|
159
|
+
|
|
135
160
|
def test_complex_words(self):
|
|
136
161
|
"""Test complex words with multiple contextual rules"""
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
162
|
+
self.assertEqual(self.converter.convert("k|L"), "प्री")
|
|
163
|
+
self.assertEqual(self.converter.convert("ef}"), "भौ")
|
|
164
|
+
self.assertEqual(self.converter.convert("hgtfÙ"), "जनता;")
|
|
165
|
+
self.assertEqual(self.converter.convert("/fli6«o"), "राष्ट्रिय")
|
|
166
|
+
self.assertEqual(self.converter.convert("zxLbx¿"), "शहीदहरू")
|
|
167
|
+
self.assertEqual(self.converter.convert("dfWodåf/f"), "माध्यमद्वारा")
|
|
168
|
+
self.assertEqual(self.converter.convert("cfˆgf]"), "आफ्नो")
|
|
169
|
+
self.assertEqual(
|
|
170
|
+
self.converter.convert("nflu æwd{lg/k]IfÆ"), "लागि “धर्मनिरपेक्ष”"
|
|
171
|
+
)
|
|
172
|
+
self.assertEqual(self.converter.convert("k'¥ofpg]"), "पुर्याउने")
|
|
173
|
+
self.assertEqual(self.converter.convert("k}+;¶L"), "पैंसठ्ठी")
|
|
174
|
+
self.assertEqual(self.converter.convert("kbfjlw"), "पदावधि")
|
|
175
|
+
self.assertEqual(self.converter.convert("kl§"), "पट्टि")
|
|
176
|
+
self.assertEqual(self.converter.convert("lj£g"), "विघ्न")
|
|
177
|
+
self.assertEqual(self.converter.convert("k§Ldf"), "पट्टीमा")
|
|
178
|
+
self.assertEqual(self.converter.convert("k§L"), "पट्टी")
|
|
179
|
+
self.assertEqual(self.converter.convert("k|;Ën]"), "प्रसङ्गले")
|
|
180
|
+
self.assertEqual(self.converter.convert("cglÍt"), "अनङ्कित")
|
|
181
|
+
self.assertEqual(self.converter.convert("a'‰g],"), "बुझ्ने,")
|
|
182
|
+
self.assertEqual(self.converter.convert(";ËLtsf]"), "सङ्गीतको")
|
|
183
|
+
self.assertEqual(self.converter.convert("5'§}"), "छुट्टै")
|
|
184
|
+
self.assertEqual(self.converter.convert("5'§f5'§}"), "छुट्टाछुट्टै")
|
|
140
185
|
|
|
141
186
|
def test_duplicate_removal(self):
|
|
142
187
|
"""Test that duplicate matras are removed"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nepali_unicoder-0.1.1 → nepali_unicoder-0.1.2}/src/nepali_unicoder.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|