命令行下[中英,中俄,中日,中韩,中法,中德,中西]文互翻译工具(Command line translation tool for Chinese English,Chinese French, Chinese Japanese, Chinese Korean, Chinese German),翻译服务基于有道翻译。
Project description
dict
命令行下[中英,中俄,中日,中韩,中法,中德,中西]文互翻译工具(Command line translation tool for Chinese English, Chinese French, Chinese Japanese, Chinese Korean, Chinese German),目前支持中英互译,翻译服务基于有道翻译。 同时也支持程序调用
安装(Install)
::
sudo pip3 install dictfire
用法(Usage)
命令行使用
中译英(Chinese To English)
^^^^^^^^^^^^^^^^^^^^^^^^^^
1. 单词(Word)
::
$ dict 测试
####################################################################
#
# 测试
#
# test
#
####################################################################
2. 句子(sentence)
::
$ dict 我爱你
####################################################################
#
# 我爱你
#
# I love you
#
####################################################################
英译中(English To Chinese)
^^^^^^^^^^^^^^^^^^^^^^^^^^
1. 单词(Word)
::
$ dict test
####################################################################
#
# test
#
# 测试
#
####################################################################
2. 句子(sentence)
::
$ dict I love you
####################################################################
#
# I love you
#
# 我爱你。
#
####################################################################
--------------
程序调用
~~~~~~~~
::
result = DictFire(is_command=False).translate("I love you")
或者
d = DictFire(is_command=False)
result = d.translate("I love you")
print(result)
1. 返回成功:
::
{
"code": 0,
"type": "EN2ZH_CN",
"src": "I love you",
"tgt": "我爱你",
"msg": "获取成功"
}
2. 返回失败:
::
{
"code": 20,
"type": "EN2ZH_CN",
"src": "I love you",
"tgt": "",
"msg": "WORD TO LONG"
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dictfire-1.1.20.win-amd64.zip
(63.2 kB
view details)
Built Distributions
dictfire-1.1.20-py3.7.egg
(20.8 kB
view details)
File details
Details for the file dictfire-1.1.20.win-amd64.zip
.
File metadata
- Download URL: dictfire-1.1.20.win-amd64.zip
- Upload date:
- Size: 63.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.42.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a5414f52f1d549c41d664008372dc1d2acca0af48170e7880835b55ade009a8 |
|
MD5 | 82c782c4b5bf1c70c1cba9e1f0ade817 |
|
BLAKE2b-256 | 6d6f34f8c05c3ba87769958705b6960d4affaf573591045feba62f9221b1142f |
File details
Details for the file dictfire-1.1.20-py3.7.egg
.
File metadata
- Download URL: dictfire-1.1.20-py3.7.egg
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.42.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c81bb570874110db58a391144a046a15bccfdb86b2cf910855c729b8fd38d85a |
|
MD5 | 5ad24da355b531d280160678bbae16ab |
|
BLAKE2b-256 | 4b952e3280b95cca500ef43a240429da16ce90259b20b7efade8cc87fb79e541 |
File details
Details for the file dictfire-1.1.20-py2.py3-none-any.whl
.
File metadata
- Download URL: dictfire-1.1.20-py2.py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.42.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3c1d8adc33da79d3a8a3a8ab47e535b98979308d42f55a1fa001529318f927c |
|
MD5 | ebed35bf5b0ec41d638bcd2968a9b885 |
|
BLAKE2b-256 | 396349f20fa0b0fd0846185c935d59df066a16c3c0af5883db1b594d117d1676 |