当我将中文文本的片段传递给detection语言检测方法时,文本被错误地识别为pt --葡萄牙语:
curl -X POST -d "outputMode=json" \
"https://gateway.watsonplatform.net/language-translation/api/v2/identify" \
--data-urlencode "text=中国的工厂" \
--header "content-type: text/plain" \
--user "MY_USERNAME:MY_PASSWORD"我是把文字编码错了,还是做了别的错事?
还是IBM的语言识别模型在某些情况下没有用,因为葡萄牙语被作为某种默认值返回?
发布于 2017-05-15 07:41:26
你指的是旧的废弃服务。我很惊讶你能得到任何结果。您应该使用的当前服务记录的API在这里文档化- https://www.ibm.com/watson/developercloud/language-translator/api/v2/?curl#identify。
示例curl命令是:
curl -u "{username}":"{password}" \
-H "content-type: text/plain" \
-H "accept: application/json" \
-X POST \
-d "this is a test" \
"https://gateway.watsonplatform.net/language-translator/api/v2/identify"https://stackoverflow.com/questions/43969636
复制相似问题