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']))