Assigned
Status Update
Comments
wa...@google.com <wa...@google.com>
va...@google.com <va...@google.com>
nr...@google.com <nr...@google.com> #2
I have informed our engineering team of this feature request. There is currently no ETA for its implementation.
A current workaround would be to check the returned "boundingPoly" [1] "vertices" for the returned "textAnnotations". If the calculated rectangle's heights > widths, than your image is sideways.
[1]https://cloud.google.com/vision/reference/rest/v1/images/annotate#boundingpoly
A current workaround would be to check the returned "boundingPoly" [1] "vertices" for the returned "textAnnotations". If the calculated rectangle's heights > widths, than your image is sideways.
[1]
Description
Summary:
The customer is asking about the language detection in a single string in translation v2. If the language is not detected, what kind of result will be returned.
Affected services: translation v2
Findings:
The following three scenarios were reproduced in our environment by using REST:
1).Change request.JSON content to special characters:
{
"q": "#¥%…………&%@#"
}
The result is:
{
"data": {
"detections": [
[
{
"isReliable": false,
"confidence": 0,
"language": "und"
}
]
]
}
}
2). Change the request.JSON content to numbers:
{
"q": "2658009734"
}
The result is:
{
"data": {
"detections": [
[
{
"confidence": 0,
"isReliable": false,
"language": "und"
}
]
]
}
}
3).Change the request.JSON content to more than one languages:
{
"q": "甜蜜梦境sweetdreams"
}
The result is:
{
"data": {
"detections": [
[
{
"confidence": 1,
"isReliable": false,
"language": "zh-CN"
}
]
]
}
}
It can be seen that if it is special characters or numbers, the language code will be displayed as "und" ("undetermined"), which is used when one or more languages must be indicated but the language cannot be recognized. We checked this is an ISO 639 code.
The customer did not replied for a week and ghost protocol asked me to close this case. After the case closure cx just replied back and case got reopened.
However, in customer environment is like:
结束调用:AbcTranslateClient#languageDetect,耗时:387ms,入参:{"args":[{"bizID":"cs-chat","appID":"C6CAA15AB6784825804B2A3910A3C3E9","channel":null,"texts":["444"],"format":null}]},返回值:{"code":"0","msg":"","info":[{"language":"not_lang","confidence":1.0}],"bbl":null}
结束调用:AbcTranslateClient#languageDetect,耗时:376ms,入参:{"args":[{"bizID":"cs-chat","appID":"C6CAA15AB6784825804B2A3910A3C3E9","channel":null,"texts":["44"],"format":null}]},返回值:{"code":"0","msg":"","info":[{"language":"not_lang","confidence":1.0}],"bbl":null}
结束调用:AbcTranslateClient#languageDetect,耗时:438ms,入参:{"args":[{"bizID":"cs-chat","appID":"C6CAA15AB6784825804B2A3910A3C3E9","channel":null,"texts":["31"],"format":null}]},返回值:{"code":"0","msg":"","info":[{"language":"not_lang","confidence":1.0}],"bbl":null}
Since the result the customer provided is not the same as ours. We asked the cx what SDK they are used, they said JAVA. They wanted to clarify this question like what else would the result return if the language cannot be defined. Since this is not written in the public documentation, it is hard to reproduce in our environment with multiple SDKs. We had a discussion with TSE and they suggested we create an FR for the documentation update about the result return.
Request:
1. Can we update the public documentation about the results returned if the language cannot be detected?