Edit model card

LaoVi-Translation

Vietnamese-Lao and Lao-Vietnamese Translation models.

  • Developed by: Minggz

How to Use


text = "ສະບາຍດີ, ຂ້ອຍເປັນວິສະວະກອນ NLP"
laovi_model_dir = 'laovi_ctranslate2'
#viru_model_dir = 'viru_ctranslate2'

lao_tokenizer=pyonmttok.Tokenizer(mode="none", sp_model_path = 'laovi_ctranslate2/source.model')
vi_tokenizer=pyonmttok.Tokenizer(mode="none", sp_model_path = 'laovi_ctranslate2/target.model')

tokenized=lao_tokenizer.tokenize(text)

translator = ctranslate2.Translator(laovi_model_dir)
translated = translator.translate_batch([tokenized[0]])
print(vi_tokenizer.detokenize(translated[0][0]['tokens']))

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Examples
Unable to determine this model's library. Check the docs .