谷歌翻译 V2,某些文本似乎破坏了它

发布于 2024-12-02 20:35:59 字数 536 浏览 3 评论 0原文

我正在尝试通过 .NET API 使用新版本的 Google Translate API (V2)。似乎以下文本破坏了它:

rt
@@




?????wwweryxc cet3f64

我以为这可能只是 .NET 包装器,但它似乎也破坏了 URL 调用,如果您向其传递任何普通文本,它会正常返回,如果您将此文本传递给 .NET API将完全挂起并且不会返回任何内容或抛出错误。如果您通过网络调用执行此操作,则浏览器中不会返回文件,而您可以处理其他文本。

您可以在此处在线测试 API:https ://code.google.com/apis/explorer/#_s=translate&_v=v2&_m=translations.list

有人知道为什么吗?我希望它只返回未翻译的相同评论。

I'm trying to use the new version of the Google Translate API (V2) via the .NET API. It seems that the following text breaks it:

rt
@@




?????wwweryxc cet3f64

I thought maybe it was just the .NET wrapper but it seems to break the URL call as well, if you pass it any normal text it returns fine, if you pass this text the .NET API will just completely hang and not return anything or throw an error. If you do it via the web call you don't get a file returned in the browser, whereas you do with other text.

You can test the API online here: https://code.google.com/apis/explorer/#_s=translate&_v=v2&_m=translations.list

Does anyone know why? I'd expect it to just return the same comment not translated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

红墙和绿瓦 2024-12-09 20:35:59

我对以下句子也有同样的问题:

  • 所有新类别必须是字母的子类别。

  • 所有新类别必须是描述的子类别。

设置源语言可以解决这个问题。

虽然这确实很奇怪,因为将类别更改为类别也可以使其工作......看起来似乎后端存在一些故障,在某些特殊情况下会触发。

另外,这句话也有效:

  • 所有新类别都必须是 Items 的子类别。

I had the same issue with the following sentences:

  • All new categories must be a subcategory of Letters.

  • All new categories must be a subcategory of Descriptions.

Setting the source language solves it.

Though it is really is strange as changing categories to category also makes it work... it definitely seems as though there's some glitch in the backend that gets triggered in some unique cases.

Also, this sentence works:

  • All new categories must be a subcategory of Items.
儭儭莪哋寶赑 2024-12-09 20:35:59

显然,自动语言检测不喜欢随机文本,但预计会向 .NET 抛出错误。所以需要确保传入源语言(如果你知道的话)

Apparantly the auto language detection just doesn't like random text, would have expected an error to be thrown to .NET though. So need to make sure to pass in the source language if you know it

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文