microsoft-cognitive - 如何在微软翻译中设置语言偏好?
问题描述
要求:
curl -X POST "https://api.cognitive.microsofttranslator.com/detect?api-version=3.0" -H "Ocp-Apim-Subscription-Key: <client-secret>" -H "Content-Type: application/json" -d "[{'Text':'No'}]"
回复:
[{"language":"es","score":1.0,"isTranslationSupported":true,"isTransliterationSupported":false}]
我能理解的是,“不”这个词在英语和西班牙语中都是一样的,但是有没有办法告诉翻译,如果发生冲突,那么更喜欢英语。
解决方案
Detect api does not support setting a preference for language when multiple languages are possible. We recommend using longer sentences to get a more accurate result.
推荐阅读
- c# - 异常:OpenQA.Selenium.WebDriverException:
- webhooks - 如何重播错过的 Pusher 事件
- reactjs - Panel.Heading 颜色变化
- ios - iOS 上的 EXC_BAD_ACCESS (SIGBUS)
- scala - 无标签最终效果传播
- java - 为了线程安全,必须同步哪些映射方法?
- python - 用户个人资料 gmail api 中的历史记录 ID 是什么?
- javascript - 如何从 IE11 打印大量图像?
- drupal - Drupal Commerce 下订单后编辑订单
- android - 如何使用 adjustPan 滚动布局