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

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

问题描述

如何可能维基的API被用于确定是否存在一个字?

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:

<一个href=\"http://en.wiktionary.org/w/api.php?action=query&titles=test\"><$c$c>http://en.wiktionary.org/w/api.php?action=query&titles=test
  <一href=\"http://en.wiktionary.org/w/api.php?action=query&titles=testx\"><$c$c>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格式(应超过所需的存在)的数据,请求页面的打印版本:

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

<一个href=\"http://en.wiktionary.org/w/index.php?title=test&printable=yes\"><$c$c>http://en.wiktionary.org/w/index.php?title=test&printable=yes
  <一href=\"http://en.wiktionary.org/w/index.php?title=testx&printable=yes\"><$c$c>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天全站免登陆