This package allows you to obtain translations from Masakhane JoeyNMT based models. Masakhane is a grassroots research community aiming to revive and strengthen African languages through AI.
Project description
AfroTranslate
This package allows you to obtain translations from Masakhane JoeyNMT based models with very few lines of code. Masakhane is a grassroots research community aiming to revive and strengthen African languages through AI.
Available models can be found here.
Note: Please, install the cuda supported version of pytorch to use the GPU. Ex: pip install torch==1.8.0+cu111 -f https://download.pytorch.org/whl/torch_stable.html.
Installation
pip install AfroTranslate
Example
from afrotranslate import MasakhaneTranslate
Translation using the English to Fon model
translator = MasakhaneTranslate(model_name="en-fon")
translator.translate("I love you so much!", n_best=1)
'Un yí wǎn nú we tawun'
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
Hashes for AfroTranslate-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0aa56aba2e5f613f013722c10673f34a9a5dd46d875a5382cc19a58f9069ab22 |
|
MD5 | 443f7bd65a25a2a74f6060223ae3c6b3 |
|
BLAKE2b-256 | fe20de6f0f03bfe5bcd68e0e4e6d16d8a6aa84c7da98e1e8d7a3acd9200e6500 |