đ English to Kurdish Translation
This repository offers pre - trained multilingual translation models for fast and accurate translations between various languages, facilitating machine translation tasks and language localization projects.
đ Quick Start
The models in this repository are designed for fast and accurate translations between multiple languages, including Kurdish, Samoan, Xhosa, etc. They can be used to translate texts between these languages and English, which is suitable for machine translation, language localization, and building custom translation tools.
⨠Features
- English to Kurdish Translation: Specifically designed for translating between English and Kurdish.
- Support for Multiple Languages: Covers a wide range of languages such as Kurdish, Samoan, Xhosa, Lao, Corsican, Cebuano, Galician, Yiddish, Swahili, and Yoruba.
- Pre - trained and Optimized: Pre - trained and optimized for high - accuracy translations.
- Easy Integration: Can be easily integrated into existing translation workflows.
đĻ Installation
To run the models, you need to install ctranslate2
and sentencepiece
:
pip install ctranslate2 sentencepiece
đģ Usage Examples
Basic Usage
The following code demonstrates how to load and use a model for translation from English to Kurdish (en â ku
).
import sentencepiece as spm
from ctranslate2 import Translator
path_to_model = <here_is_your_path_to_the_model>
source = 'en'
target = 'ku'
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))
đ Documentation
Other Languages
The models support the following languages:
- Kurdish
- Samoan
- Xhosa
- Lao
- Corsican
- Cebuano
- Galician
- Yiddish
- Swahili
- Yoruba
Use Cases
- Machine Translation: For translating texts from under - represented languages.
- Localization: Localizing websites, apps, or documents into multiple languages.
- Multilingual NLP Tools: Developing multilingual NLP tools for research and production environments.
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
Contact
If you have any questions, just email info@lingvanex.com
đ License
This project is licensed under the MIT license.