Domovyk
A package to transliterate various Cyrillic alphabets to and from the Latin alphabet using the American Library Association-Library of Congress Romanization tables.
Installation
Install using pip:
pip3 install domovyk
Or download the GitHub repo and the install the only dependency (for sentence tokenization):
pip3 install nltk
Usage
The package uses the ALA-LC Romanization tables to transliterate each of the following languages:
- Belarusian
- Bulgarian
- Carpatho-Rusyn
- Church Slavonic
- Macedonian
- Russian
- Serbian
- Ukrainian
Four functions can be called for each language:
- transliterate(var, lang) - Transliterates a Cyrillic string or list of strings (var) from a specified language (lang) into the Latin alphabet. Returns a string.
- translatinate(var, lang) - Transliterates a string or list of strings in the Latin alphabet (var) to a specified Cyrillic script (lang). Returns a string.
- transliterateSents(var, lang) - Tokenizes a given Cyrillic (var) into a list of sentences, then transliterates those sentences from a specified language (lang) into the Latin alphabet. Returns a list.
- translatinateSents(var, lang) - Tokenizes a given string in the Latin alphabet (var) into a list of sentences, then transliterates those sentences to a specified Cyrillic script (lang). Returns a list.
Some usage examples are below:
from domovyk import translit
belarusian_to_latin = translit.transliterate('Як справы?', 'bel')
latin_to_macedonian = translit.translatinate('Hi, how are you?', 'mac')
ukrainian_to_latin_sents = translit.transliterateSents('Єхидна, ґава, їжак ще й шиплячі плазуни бігцем форсують Янцзи.', 'ukr')
latin_to_russian_sents = translit.translatinateSents('Hello, how are you doing?', 'rus')
The languages can be called in the code using the following abbreviations:
- Belarusian - 'bel'
- Bulgarian - 'bulg'
- Carpatho-Rusyn - 'carp'
- Church Slavonic - 'church'
- Macedonian - 'mac'
- Russian 'rus'
- Serbian - 'serb'
- Ukrainian - 'ukr'
Release files for domovyk 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| domovyk-1.0.1.tar.gz | 39.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| domovyk-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 86.1 kB
Release files / domovyk-1.0.1.tar.gz
| Download URL | domovyk-1.0.1.tar.gz |
|---|---|
| Size | 39.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2bdc5e94b43e49c457150b567707836e2a7a66c40d06f22d5604e85fe8ce2726
|
|
BLAKE2b-256 checksum How to use checksums |
68c22d92952276ccec40cef2c5ef290ffa1d81202dc8de52048ef3c0684e9863
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.5
|
Release files / domovyk-1.0.1-py3-none-any.whl
| Download URL | domovyk-1.0.1-py3-none-any.whl |
|---|---|
| Size | 46.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f3f4a0d1d734492eda0c78a6e6e59c36e1b87301f1bba624918f723a651211e
|
|
BLAKE2b-256 checksum How to use checksums |
c5cb05274a2d62f24362f931f96b002d6858b4cc84916e6cbd96aebf28d48fcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.5
|