有谁知道用于查找单词定义的 Web 服务能够以 JSON 返回结果吗?

发布于 2024-08-04 22:38:12 字数 216 浏览 6 评论 0原文

我发现 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

自控 2024-08-11 22:38:12

wiktionary.org 提供了一个 API 例如:

http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=Television&format=json

回馈

    {
       "query": {"searchinfo": {"totalhits": 208862},
       "search": [{ 
           "ns": 0, 
           "title": "Television", 
           "snippet": "<span class='searchmatch'>Television<\/span> (TV) is a widely used telecommunication  medium  for transmitting and receiving moving images , either monochromatic  (\"black  <b>...<\/b> ",
           "size": 28228, 
           "wordcount": 3566, 
           "timestamp": "2009-10-02T15:09:56Z"},
...
       ]},
       "query-continue": {"search": {"sroffset":10}}
    }

wiktionary.org provides an API for example:

http://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=Television&format=json

gives back

    {
       "query": {"searchinfo": {"totalhits": 208862},
       "search": [{ 
           "ns": 0, 
           "title": "Television", 
           "snippet": "<span class='searchmatch'>Television<\/span> (TV) is a widely used telecommunication  medium  for transmitting and receiving moving images , either monochromatic  (\"black  <b>...<\/b> ",
           "size": 28228, 
           "wordcount": 3566, 
           "timestamp": "2009-10-02T15:09:56Z"},
...
       ]},
       "query-continue": {"search": {"sroffset":10}}
    }
向地狱狂奔 2024-08-11 22:38:12

我认为这就是您正在寻找的

I think this is what you are looking for

御守 2024-08-11 22:38:12

不确定它是否适合您的需求,但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.

埋葬我深情 2024-08-11 22:38:12

您可以在短时间内在服务器上设置一个反向代理,让您可以 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.

神经暖 2024-08-11 22:38:12

这是一个 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文