简体   繁体   English

Google输入工具“API” - 可以使用吗?

[英]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.

相关问题 谷歌关键词工具 API - Google Keyword Tools API 集成Google网站站长工具api - Integrating the Google Webmaster Tools api 可以将SimpleMembership与Google API v3,OAuth2身份验证一起使用吗? - Can SimpleMembership be used with Google API v3, OAuth2 authentication? Google + API是否可以用于自定义域和gmail? - Does Google + API can be used for both custom domain and gmail? 可以使用 Google Calendar API 创建可扩展的日程安排服务吗? - Can Google Calendar API be used to create scalable scheduling service? 可以通过AJAX使用Google Maps / Places的“自动填充”API吗? - Can Google Maps/Places 'autocomplete' API be used via AJAX? 是否有可供第三方产品使用的Google Forms API? - Is there a Google Forms API that can be used by 3rd party products? 使用python向Google输入工具发送请求 - Send request to Google input tools in python 如何使用.NET DataTable从Google图表工具/虚拟化API创建组织结构图? - How can I create an organisational chart from the google chart tools / virtualization api using a .NET DataTable? 单个Google API密钥可以用于街景视图,地理编码和Google地图服务吗? - Can single google API key be used for streetview, geocoding and google maps services?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM