Mr.Victor

梦里不知身是客,一晌贪欢!
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

金山词霸查词API

Posted on 2011-08-20 18:22  Mr-Victor  阅读(5166)  评论(0编辑  收藏  举报

接口:
http://dict-co.iciba.com/api/dictionary.php?w=$userSearch

说明:
$userSearch 为用户要查的词或短句,请使用url转码。

返回数据的格式为xml
以词good为例

输入:http://dict-co.iciba.com/api/dictionary.php?w=good
输出:
<?xml version="1.0" encoding="UTF-8"?>
<dict num="219" id="219" name="219">
<key>good</key>
<ps>ɡʊd</ps>
<pron>http://res.iciba.com/resource/amp3/7/5/755f85c2723bb39381c7379a604160d8.mp3</pron>
<pos>n.</pos>
<acceptation>好, 好事, 慷慨的行为, 好处, 利益</acceptation>
<pos>adj.</pos>
<acceptation>优良的, 上等的, 虔诚的, 愉快的, 慈善的, 好心的, 有益的</acceptation>
<sent>
<orig>Good - bye! happy landing !</orig>
<pron>http://res.iciba.com/resource/phrase_mp3/0/2/0247f3dd84906223785fddb18353bafe.mp3</pron>
<trans>再见!一路平安(坐飞机轮船用)</trans>
</sent>
<sent>
<orig>Good - humoured mockery seems to be a proper rod but great caution and skill are necessary in the use of it or you may happen to catch a tartar.</orig>
<pron>http://res.iciba.com/resource/phrase_mp3/a/f/af4d426552127de5e0989f12574864ef.mp3</pron>
<trans>善意的嘲笑看起来是一根合适的棍棒,但运用时必须非常谨慎,并注意技巧,否则你可能骑虎难下。</trans>
</sent>
<sent>
<orig>Good - bye, I 'll contact you again.</orig>
<pron>http://res.iciba.com/resource/phrase_mp3/3/a/3a9eb45fa45f2ea725176aaa5d3646ac.mp3</pron>
<trans>再见,我会再同您联系。</trans>
</sent>
<sent>
<orig>Good - bye and thank you for all you have done for me.</orig>
<pron>http://res.iciba.com/resource/phrase_mp3/7/9/79edb6793892f9199772154d56d17360.mp3</pron>
<trans>再见了,谢谢你为我做的一切。</trans>
</sent>
<sent>
<orig>Good - bye, Xiao Lin.</orig>
<pron>http://res.iciba.com/resource/phrase_mp3/8/3/83f344600d15cbf1ed5cb005db32f994.mp3</pron>
<trans>再见,小林。</trans>
</sent></dict>

Xml标签说明:
返回xml以<dict>开始以</dict>结束
Key 用户查询内容
Ps 音标
Pron 发音
Pos 词性
Acceptation 解释
Sent 短句
Orig 短句内容
Trans 翻译

注意:
多个词性会有多个解释
当前版本的短句会返回5条记录