如何检索维基词典内容? [英] How to retrieve Wiktionary word content?

查看:281
本文介绍了如何检索维基词典内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用维基词典来确定一个词是否存在?

How may Wiktionary's API be used to determine whether or not a word exists?

推荐答案

维基词典API 可用于查询是否存在单词。

The Wiktionary API can be used to query whether or not a word exists.

现有和不存在的网页的示例:

Examples for existing and non-existing pages:


http://en.wiktionary.org/w/api.php?action=query&titles=test
http://en.wiktionary.org/w/api.php?action=query&titles=testx

第一个链接提供了可能更容易解析的其他类型格式的示例。

The first link provides examples on other types of formats that might be easier to parse.

要检索单词的数据一个小的XHTML格式(应该多于存在需要),请求可打印的版本e页:

To retrieve the word's data in a small XHTML format (should more than existence be required), request the printable version of the page:


http://en.wiktionary.org/w/index.php?title=test&printable=yes
http:// en .wiktionary.org / w / index.php?title = testx& printable = yes

然后可以使用任何标准XML解析器进行解析。

These can then be parsed with any standard XML parser.

这篇关于如何检索维基词典内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆