pythainlp.translate

The pythainlp.translate for machine translation.

Modules

pythainlp.translate.download_model_all()None[source]

Download all translation models in advanced

class pythainlp.translate.EnThTranslator[source]
translate(text: str)str[source]

Translate text from English to Thai

Parameters

text (str) – input text in source language

Returns

translated text in target language

Return type

str

class pythainlp.translate.ThEnTranslator[source]
translate(text: str)str[source]

Translate text from Thai to English

Parameters

text (str) – input text in source language

Returns

translated text in target language

Return type

str