0.2.2 • Published 8 years ago

node-dictionary v0.2.2

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

node-dictionary

Build Status node npm version npm

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

  1. The target language cannot be auto.
  2. Cannot be same languages.
  3. In order to ensure the quality of the translation, please control the number of words.

Languages table

AbbrLanguage语言
autoAuto自动检测
zhChinese中文
enEnglish英语
yueCantonese粤语
wywClassical Chinese文言文
jpJapanese日语
korKorean韩语
fraFrench法语
spaSpanish西班牙语
thThai泰语
araArabic阿拉伯语
ruRussian俄语
ptPotuguese葡萄牙语
deGerman德语
itItalian意大利语
elGreek希腊语
nlDuctch荷兰语
plPolish波兰语
bulBulgarian保加利亚语
estEstonian爱沙尼亚语
danDanish丹麦语
finFinnish芬兰语
csCzech捷克语
romRomanian罗马尼亚语
sloSlovenian斯洛文尼亚语
sweSwedish瑞典语
huHungarian匈牙利语
chtTraditional Chinese繁体中文

License

MIT