ybc_translation模块(翻译模块)

zh2en( text )

功能

汉译英

参数

·text:要翻译的汉语内容

返回值

翻译后的英文内容(字符串)

例子

import ybc_translation

en = ybc_translation.zh2en('你好')
print(en)

en2zh( text )

功能

英译汉

参数

·text:要翻译的英文内容

返回值

翻译后的汉语内容(字符串)

例子

import ybc_translation

zh = ybc_translation.en2zh('hello')
print(zh)