[英]Google Input Tools “API” — can it be used?
I noticed that Google accepts transliteration and IME requests in any language through the url: 我注意到Google通过网址接受任何语言的音译和IME请求:
https://inputtools.google.com/request?text=$&itc=$&num=$\
&cp=0&cs=1&ie=utf-8&oe=utf-8&app=test
where $
is a variable below, for any language and text. 其中
$
是下面的变量,适用于任何语言和文本。
For example, French ( try it ): 例如,法语( 试一试 ):
var text = "ca me plait",
itc = "fr-t-i0-und",
num = 10;
// Result:
[
"SUCCESS",
[
[
"ca me plait",
[
"ça me plaît"
]
]
]
]
Or, Mandarin ( try it ): 或者,普通话( 试试 ):
var text = "shide",
itc = "zh-t-i0-pinyin",
num = 5;
// Result:
[
"SUCCESS",
[
[
"shide",
[
"使得",
"似的",
"是的",
"实德",
"似地"
],
[],
{
"annotation": [
"shi de",
"shi de",
"shi de",
"shi de",
"shi de"
]
}
]
]
]
All languages work and return great suggestions. 所有语言都有效,并提供很好的建议 The thing is I can't find documentation for this anywhere on the web, although it clearly looks like an API.
问题是我无法在网络上的任何地方找到这方面的文档,尽管它看起来像API。 Does anyone know if there is an official Google client or if they're okay with raw, unauthenticated requests?
有没有人知道是否有正式的Google客户端,或者他们是否可以使用原始的,未经身份验证的请求?
It's used perhaps unofficially by plugins like jQuery.chineseIME.js , but I would appreciate any official usage information. 它可能非常像jQuery.chineseIME.js这样的插件使用,但我会很感激任何官方使用信息。
Whatever. 随你。 I created my own plugin that uses it for Chinese, and can be extended easily: https://bitbucket.org/purohit/jquery.intlkeyboard.js .
我创建了自己的插件,用于中文,可以轻松扩展: https : //bitbucket.org/purohit/jquery.intlkeyboard.js 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.