Edit model card

RuVi-Translation

Vietnamese-Russian and Russian-Vietnamese Translation models.

  • Developed by: Minggz

How to Use

import ctranslate2
import pyonmttok

text = "Всем привет, я NLP-инженер"
ruvi_model_dir = 'ruvi_ctranslate2'
#viru_model_dir = 'viru_ctranslate2'

ru_tokenizer=pyonmttok.Tokenizer(mode="none", sp_model_path = 'ru_spm.model')
vi_tokenizer=pyonmttok.Tokenizer(mode="none", sp_model_path = 'vi_spm.model')

tokenized=ru_tokenizer.tokenize(text)

translator = ctranslate2.Translator(ruvi_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 .