You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+64-2Lines changed: 64 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -160,6 +160,68 @@ CyrTranslit can be used both programatically and via command line interface.
160
160
"Під лежачий камінь вода не тече"
161
161
```
162
162
163
+
### Accented Characters (Macedonian & Bulgarian)
164
+
165
+
CyrTranslit supports Cyrillic characters with grave accents used in Macedonian and Bulgarian for homograph disambiguation and stress marking. By default, accents are stripped during transliteration for cleaner output. Use the `preserve_accents` parameter to preserve them.
166
+
167
+
#### Supported Accented Characters
168
+
169
+
**Macedonian:**
170
+
-**Ѐ/ѐ** (U+0400/U+0450) - Cyrillic IE with grave
171
+
-**Purpose:** Distinguishes homographs (e.g., нѐ "us" vs не "no", сѐ "everything" vs се "reflexive pronoun")
172
+
-**Standard:** ISO 9:1968/1995, adopted by Macedonian Academy of Arts and Sciences (1970)
173
+
174
+
-**Ѝ/ѝ** (U+040D/U+045D) - Cyrillic I with grave
175
+
-**Purpose:** Distinguishes homographs (e.g., ѝ "her" vs и "and")
176
+
-**Standard:** ISO 9:1968/1995
177
+
178
+
**Bulgarian:**
179
+
-**Ѝ/ѝ** (U+040D/U+045D) - Cyrillic I with grave
180
+
-**Purpose:** Stress marking and homograph disambiguation (e.g., ѝ "her" vs и "and")
181
+
-**Standard:** ISO 9:1995
182
+
183
+
**Sources:**
184
+
- ISO 9:1995 - Information and documentation — Transliteration of Cyrillic characters into Latin characters
185
+
-[Wikipedia: I with grave (Cyrillic)](https://en.wikipedia.org/wiki/I_with_grave_(Cyrillic))
186
+
-[Wikipedia: Ye with grave](https://en.wikipedia.org/wiki/Ye_with_grave)
Sample command line call to transliterate a Russian text file:
165
227
```bash
@@ -202,8 +264,8 @@ Try CyrTranslit by running it directly on the Python command line interface, e.g
202
264
## How can I contribute?
203
265
Include support for other Cyrillic script alphabets. Follow these steps in order to do so:
204
266
205
-
1. Create a new transliteration dictionary in the **[mapping.py](https://github.com/opendatakosovo/cyrillic-transliteration/blob/master/cyrtranslit/mapping.py)**file and reference to it in the _**[TRANSLIT\_DICT](https://github.com/opendatakosovo/cyrillic-transliteration/blob/ab88bb466d12b9a9ad8d3eb6dc86d0bab871175d/cyrtranslit/mapping.py#L326-L360)**_ dictionary.
206
-
2. Watch out for cases where two consecutive Latin alphabet letters are meant to transliterate into a single Cyrillic script letter. These cases need to be explicitly checked for [inside the **to_cyrillic()** function in **\_\_init\_\_.py**](https://github.com/opendatakosovo/cyrillic-transliteration/blob/ab88bb466d12b9a9ad8d3eb6dc86d0bab871175d/cyrtranslit/__init__.py#L62-L191).
267
+
1. Create a new transliteration mapping file in the **[mapping/](https://github.com/opendatakosovo/cyrillic-transliteration/blob/master/cyrtranslit/mapping/)**directory (using the language code as the filename, e.g., `xx.py`) and reference to it in the _**[TRANSLIT\_DICT](https://github.com/opendatakosovo/cyrillic-transliteration/blob/master/cyrtranslit/mapping/__init__.py)**_ dictionary in **mapping/\_\_init\_\_.py**. If the language uses accented characters (like Macedonian and Bulgarian), create separate accented dictionaries (e.g., `XX_CYR_TO_LAT_ACCENTED_DICT`) following the pattern in **[mk.py](https://github.com/opendatakosovo/cyrillic-transliteration/blob/master/cyrtranslit/mapping/mk.py)** or **[bg.py](https://github.com/opendatakosovo/cyrillic-transliteration/blob/master/cyrtranslit/mapping/bg.py)**.
268
+
2. Watch out for cases where two consecutive Latin alphabet letters are meant to transliterate into a single Cyrillic script letter. These cases need to be explicitly checked for inside the **to_cyrillic()** function in **[\_\_init\_\_.py](https://github.com/opendatakosovo/cyrillic-transliteration/blob/master/cyrtranslit/__init__.py)**.
207
269
3. Add test cases inside of **[tests.py](https://github.com/opendatakosovo/cyrillic-transliteration/blob/master/tests.py)**.
208
270
4. Add test CLI input files in the **[tests](https://github.com/opendatakosovo/cyrillic-transliteration/tree/master/tests)** directory.
209
271
5. Update the documentation in the **[README.md](https://github.com/opendatakosovo/cyrillic-transliteration/blob/master/README.md)**.
0 commit comments