如何使用Bing Translation API?

问题描述 投票:13回答:3

我正在尝试使用Bing Translation API,但我感到困惑。似乎有很多可能性(旧的和新的),但我不知道该怎么办。

有人可以帮我吗?

我想发送一个像http://api.microsofttranslator.com/V2/Ajax.svc/Translate?appId=<AppId>&to=de&text=World这样的HTTP请求并获得翻译。从哪里获取AppId?

到目前为止我所做的:

  1. 已登录以免费使用API​​(https://datamarket.azure.com/dataset/bing/microsofttranslator
  2. 创建应用:https://datamarket.azure.com/developer/applications

现在我有了Client_ID和Client_Secret,而且还有一个帐户密钥(在此处https://datamarket.azure.com/account可见]

现在要做什么?

非常感谢或提供任何帮助!

api localization bing language-translation microsoft-translator
3个回答
5
投票

AppID已过时。您需要如何执行以下步骤:

  1. https://datamarket.azure.com中注册您的clientID,clientSecter
  2. 然后您的代码必须获得登录BingTranslator API的访问令牌

阅读有关http://msdn.microsoft.com/en-us/library/dd576287.aspx的更多详细信息委托>

NB Microsoft Translator已被Bing Translate取代,它似乎没有现成的API。


4
投票

跟随http://api.microsofttranslator.com上的链接。 API在appid参数中获取访问令牌。请参阅文档中的“获取访问令牌”一节,以了解如何获取该令牌。


2
投票

随意使用此说明(如果您正在使用php

© www.soinside.com 2019 - 2024. All rights reserved.