如何在bing翻译程序中使用访问令牌? [英] how to use the access token in bing translation program?

查看:133
本文介绍了如何在bing翻译程序中使用访问令牌?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi:


    I  发布这些文字 到Bing翻译API地址  :  

http://api.microsofttranslator.com/v2/Http .svc / TranslateArray


 

<?xml version ='1.0'?> 
< TranslateArrayRequest>
< AppId> 3D9A7F3 ************************ BFD849< / AppId>
< From> en< / From>
< Texts>
< string xmlns =" http://schemas.microsoft.com/2003/10/Serialization/Arrays"> good products< / string>
< /文字>
< To> fr< / To>
< / TranslateArrayRequest>



然后我可以得到正确的 结果。


 


 


现在,我想使用Access Token 功能,我将发布什么文本 到&NBSP;这个地址 ?


我认为需要发布这些文字:

<?xml version ='1.0'?> 
< TranslateArrayRequest>
< clientId> 001< / clientId>
< clientSecret> + PXAk9cLwkfDQ ************** UoYEIfPpUG0EA =< / clientSecret>
< AppId> 3D9A7F3 ************************ BFD849< / AppId>
< From> en< / From>
< Texts>
< string xmlns =" http://schemas.microsoft.com/2003/10/Serialization/Arrays"> good products< / string>
< /文字>
< To> fr< / To>
< / TranslateArrayRequest>

是否正确?请告诉我 。谢谢。


 

解决方案

< blockquote>

您好,


首先,您从Azure Marketplace获取访问令牌,然后将访问令牌传递给"appid"中的Microsoft Translator API。参数。


这个位置的示例中描述了这些步骤:
http://msdn.microsoft.com/en-us/library/hh454950.aspx


如果有帮助,请告诉我们,

Chris Wendt

Microsoft Translator


hi:

    i   post these texts  to Bing translate API address  :   http://api.microsofttranslator.com/v2/Http.svc/TranslateArray

 

<?xml version='1.0'?>
<TranslateArrayRequest>
<AppId>3D9A7F3************************BFD849</AppId>
<From>en</From>
<Texts>
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">good products</string>
</Texts>
<To>fr</To>
</TranslateArrayRequest>


Then i can get the correct  result.

 

 

Now, I want to use Access Token  function, what the texts i will POST  to  this address  ?

i think need post these texts:

<?xml version='1.0'?>
<TranslateArrayRequest>
<clientId>001</clientId>
<clientSecret>+PXAk9cLwkfDQ**************UoYEIfPpUG0EA=</clientSecret>
<AppId>3D9A7F3************************BFD849</AppId>
<From>en</From>
<Texts>
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">good products</string>
</Texts>
<To>fr</To>
</TranslateArrayRequest>

is it correct? please tell me . thanks.

 

解决方案

Hi Very,

first, you obtain an access token from Azure Marketplace, then you pass the Access Token to the Microsoft Translator API in the "appid" parameter.

The steps are described in the example at this location: http://msdn.microsoft.com/en-us/library/hh454950.aspx.

Let us know if this helps,
Chris Wendt
Microsoft Translator


这篇关于如何在bing翻译程序中使用访问令牌?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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