0.2.2 • Published 8 years ago
node-dictionary v0.2.2
node-dictionary
Installation
Prerequisity: Node.js (>=6.x)
$ npm install -g node-dictionary
Usage
Usage: dict <command> [options]
Commands:
query|q <word> query word by youdao dictionary
trans|t <text> translate text by baidu translator
langs|l [from] [to] toggle translator, default from [auto] to [zh]
show|s [options] show current or all translator
help [cmd] display help for [cmd]
Options:
-h, --help output usage information
-V, --version output the version number
Example
Query word
$ dict query apple
英 ['æp(ə)l] 美 ['æpl]
n. 苹果,苹果树,苹果似的东西;[美俚]炸弹,手榴弹,(棒球的)球;[美俚]人,家伙。
网络释义
APPLE 苹果,苹果,苹果公司
Apple Lossless Apple Lossless,Apple Lossless,애플 무손실
Apple Store 苹果商店,苹果零售店,苹果商店
Powered by Youdao
Translate text
$ dict trans Apple is not an apple
English 英语 => Chinese 中文
Apple is not an apple => 苹果不是一个苹果
Powered by Baidu
Support
Query by Youdao
Only English-Chinese or Chinese-English querying support.
Translator by Baidu
Baidu translator support 27 kinds of languages.
Check languages table and choose two abbreviations via:
$ dict langs zh jp
Attention
- The target language cannot be auto.
- Cannot be same languages.
- In order to ensure the quality of the translation, please control the number of words.
Languages table
Abbr | Language | 语言 |
---|---|---|
auto | Auto | 自动检测 |
zh | Chinese | 中文 |
en | English | 英语 |
yue | Cantonese | 粤语 |
wyw | Classical Chinese | 文言文 |
jp | Japanese | 日语 |
kor | Korean | 韩语 |
fra | French | 法语 |
spa | Spanish | 西班牙语 |
th | Thai | 泰语 |
ara | Arabic | 阿拉伯语 |
ru | Russian | 俄语 |
pt | Potuguese | 葡萄牙语 |
de | German | 德语 |
it | Italian | 意大利语 |
el | Greek | 希腊语 |
nl | Ductch | 荷兰语 |
pl | Polish | 波兰语 |
bul | Bulgarian | 保加利亚语 |
est | Estonian | 爱沙尼亚语 |
dan | Danish | 丹麦语 |
fin | Finnish | 芬兰语 |
cs | Czech | 捷克语 |
rom | Romanian | 罗马尼亚语 |
slo | Slovenian | 斯洛文尼亚语 |
swe | Swedish | 瑞典语 |
hu | Hungarian | 匈牙利语 |
cht | Traditional Chinese | 繁体中文 |