小牛免费翻译
xiaoniu-tr-free的Python项目详细描述
小牛Tr自由
小牛翻译为免费-本地缓存加节流(1.5调用/s从第五百零一调用)。希望能持续下去。
安装
pip install xiaoniu-tr-free -U
或
- 安装(pip或其他)必要的需求,例如
pip install requests_cache langid
或pip install -r requirements.txt
- 在PythOnPoad中的任何文件夹中删除文件NyNuuTr.Py(与导入sys检查;打印(sys .PATH) )
- 或克隆RPO(例如,^ {CD4}}或下载https://github.com/ffreemt/xiaoniu-tr-free/archive/master.zip和unzip),并将其更改为“小牛Tr-免费文件夹”,并执行^ {< CD5> }
使用量
from xiaoniu_tr import xiaoniu_tr
print(xiaoniu_tr('hello world')) # -> '你好世界'
print(xiaoniu_tr('Good morning', to_lang='de')) # ->'Guten Morgen, wow'
print(xiaoniu_tr('hello world', to_lang='fr')) # ->'Bonjour le monde'
print(xiaoniu_tr('hello world', to_lang='ja')) # ->'こんにちは世界'
致谢
- 感谢所有使用代码的人