The purpose of this module is user-friendly translation and transliteration of Classical Tibetan.
Project description
mlotsawa
Description
The purpose of this module is user-friendly translation and transliteration of Classical Tibetan.
Currently, separate classes are provided for translation and transliteration tasks. Both classes will accept either a list of strings, or a single string. The output of each will be of the same type as the input.
Under the hood, this module uses the T5 transformer architecture, custom fine-tuned on data from Lotsawa House.
The models and datasets used by this project can be found on Hugging Face where you can find more information on training, data collection, and how to use these models and datasets for your own projects.
This module is part of the larger MLotsawa project for machine translation of Literary Tibetan. The code for the entire project, including this module is available on GitHub here.
Installation
pip install mlotsawa
Examples
For transliteration:
from mlotsawa.transliterator import Transliterator
tibetan_text = '<your Tibetan text>'
transliterator = Transliterator()
phonetics = transliterator.transliterate(tibetan_text)
For translation:
from mlotsawa.translator import Translator
tibetan_text = '<your Tibetan text>' # may be in Tibetan script or phoneticized
translator = Translator()
translation = translator.translate(tibetan_text)
License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Owner
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mlotsawa-0.4.1.tar.gz
.
File metadata
- Download URL: mlotsawa-0.4.1.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41135411e72fae74d633fbef7e03d2b92a09a383d6c47bab67b63d9c7e6c317f |
|
MD5 | 629194ad5cdba3705bf56579806e1f8e |
|
BLAKE2b-256 | 462c5c4a161bdc223ee23fc546c99f8fc10379efa2504e0b4f1783f10422a64d |
File details
Details for the file mlotsawa-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: mlotsawa-0.4.1-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bf08711b806d9bd13da8fa019faa956506ea09c195d15e7edc3f3e3065daccd |
|
MD5 | 189913b1667a91357cfe51235c6247f5 |
|
BLAKE2b-256 | 1751f6713089c054e703478a114f60609260b70bfa847830367c545593b3e971 |