有谁知道用于查找单词定义的 Web 服务能够以 JSON 返回结果吗?
我发现 http://words.bighugelabs.com/api.php 但没有这样的定义/词典。
理想情况下,我会获取一个字典文件并为此构建自己的 API,但这只是一个演示,我们需要一些可以从 javascript 函数中调用的短期内容。
I found http://words.bighugelabs.com/api.php but nothing like this for definitions/dictionary.
Ideally I'd grab a dictionary file and build my own API for this, but this is for a demo and we need something short-term that can be called from within a javascript function.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
wiktionary.org 提供了一个 API 例如:
回馈
wiktionary.org provides an API for example:
gives back
我认为这就是您正在寻找的
I think this is what you are looking for
不确定它是否适合您的需求,但answers.com有网站站长工具提供各种服务,包括字典查找。不知道是否可以从 javascript 调用。
Not sure if it would fit your needs, but answers.com has webmaster tools that offer various services, including dictionary lookup. Don't know if any can be called from javascript.
您可以在短时间内在服务器上设置一个反向代理,让您可以 AJAX 您最喜欢的词典网站,然后从返回的文档中“抓取”定义。显然这不是一个长期的解决方案,但就一次而言,您可能不会遇到麻烦。
At short notice you could set up a reverse-proxy on your server that lets you AJAX your favorite dictionary website and then 'scrape' the definitions from the document that is returned. It's obviously not a long term solution but for a one time thing, you probably won't get into trouble.
这是一个 Web 服务,有多个词典:
http://services.aonaware.com/DictService/DictService .asmx
PS我没有注意到你问题的JSON部分。
This is a web service and have several dictionaries:
http://services.aonaware.com/DictService/DictService.asmx
P.S. I did not notice the JSON part of your question.