File size: 2,659 Bytes
b30299a 0c52632 b30299a 0c52632 b30299a 79b16b7 b30299a 0c52632 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
---
language:
- lo
- en
tags:
- translation
- ctranslate2
license: mit
---
# Lao to English Translation
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.
# Key Features:
Lao to English Translation
Support for multiple languages (see full list below)
Pre-trained and optimized for accuracy
Easy integration into existing translation workflows
# Other Languages:
Kurdish
Samoan
Xhosa
Lao
Corsican
Cebuano
Galician
Yiddish
Swahili
Yoruba
# Use Cases:
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
# Requirements:
To run the models, you need to install ctranslate2 and sentencepiece:
pip install ctranslate2 sentencepiece
# Simple Usage Example
The following code demonstrates how to load and use a model for translation from Lao to English (lo → en).
```python
import sentencepiece as spm
from ctranslate2 import Translator
path_to_model = <here_is_your_path_to_the_model>
source = 'lo'
target = 'en'
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))
```
# Keywords:
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
# License
This project is licensed under the cc-by-nc-4.0 License.
# Contact:
If you have any questions, just email [email protected] |