Downloads · 30 days
21
11% of all-time downloads
lingvanex/english-to-lao-translation
english-to-lao-translation is a translation model from lingvanex. Use it when you need text moved from one language to another. The card lists the license as mit.
This repository provides pre-trained multilingual translation models designed for fast and accurate translations between various languages, such as Kurdish, Samoan, Xhosa, Lao, Corsican, Cebuano, Galician, Yiddish, Sw…
Downloads · 30 days
21
11% of all-time downloads
All-time downloads
191
Public
Repo size
121 MB
Likes
1
Public
Click a slice to open those files.
.bin119 MB · 98%
From the Hugging Face model README
This repository provides pre-trained multilingual translation models designed for fast and accurate translations between various languages, such as Kurdish, Samoan, Xhosa, Lao, Corsican, Cebuano, Galician, Yiddish, Swahili, and Yoruba. These models can be used to translate texts from these languages into English and vice versa, making them suitable for machine translation tasks, language localization projects, and building custom translation tools.
English to Lao Translation Support for multiple languages (see full list below) Pre-trained and optimized for accuracy Easy integration into existing translation workflows
Kurdish Samoan Xhosa Lao Corsican Cebuano Galician Yiddish Swahili Yoruba
Machine translation of texts from underrepresented languages Localization of websites, apps, or documents into multiple languages Developing multilingual NLP tools for research and production environments
To run the models, you need to install ctranslate2 and sentencepiece:
pip install ctranslate2 sentencepiece
The following code demonstrates how to load and use a model for translation from English to Lao (en → lo).
import sentencepiece as spm
from ctranslate2 import Translator
path_to_model = <here_is_your_path_to_the_model>
source = 'en'
target = 'lo'
translator = Translator(path_to_model, compute_type='int8')
source_tokenizer = spm.SentencePieceProcessor(f'{path_to_model}/{source}.spm.model')
target_tokenizer = spm.SentencePieceProcessor(f'{path_to_model}/{target}.spm.model')
text = [
'I need to make a phone call.',
'Can I help you prepare food?',
'We want to go for a walk.'
]
input_tokens = source_tokenizer.EncodeAsPieces(text)
translator_output = translator.translate_batch(
input_tokens,
batch_type='tokens',
beam_size=2,
max_input_length=0,
max_decoding_length=256
)
output_tokens = [item.hypotheses[0] for item in translator_output]
translation = target_tokenizer.DecodePieces(output_tokens)
print('\n'.join(translation))
Kurdish to English Translation, Samoan to English Translation, Xhosa Translation, Lao to English, Corsican Translation, Cebuano Translation, Galician to English Translation, Yiddish to English Translation, Swahili Translation, Yoruba to English Translation, Multilingual Machine Translation, NLP, Neural Networks, eLearning
If you have any questions, just email [email protected]