tika.translate module

tika.translate.auto_from_buffer(string, destLang, serverEndpoint='http://localhost:9998', requestOptions={})[source]

Translates content to desired language by auto detecting the source language :param string: input content which needs translation :param destLang: name of the desired language for translation :param serverEndpoint: Tika server end point (Optional) :return:

tika.translate.auto_from_file(filename, destLang, serverEndpoint='http://localhost:9998', requestOptions={})[source]

Translates contents of a file to desired language by auto detecting the source language :param filename: file whose contents needs translation :param destLang: name of the desired language for translation :param serverEndpoint: Tika server end point (Optional) :return:

tika.translate.from_buffer(string, srcLang, destLang, serverEndpoint='http://localhost:9998', requestOptions={})[source]

Translates content from source language to desired destination language :param string: input content which needs translation :param srcLang: name of language of the input content :param destLang: name of the desired language for translation :param serverEndpoint: :return:

tika.translate.from_file(filename, srcLang, destLang, serverEndpoint='http://localhost:9998', requestOptions={})[source]

Traslates the content of source file to destination language :param filename: file whose contents needs translation :param srcLang: name of language of input file :param destLang: name of language of desired language :param serverEndpoint: Tika server end point (Optional) :return: translated content