Assigned
Status Update
Comments
ju...@google.com <ju...@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
Reproduction steps: Upon following this documentation
1. I saved a request.json in Cloud Shell.
{
"sourceLanguageCode": "ar",
"targetLanguageCode": "en",
"contents": "khatkz",
"mimeType": "text/plain"
}
2. I run this command
curl -X POST \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
The result is below
curl -X POST -H "Authorization: Bearer "$(gcloud auth application-default print-access-token) -H "Content-Ty
pe: application/json; charset=utf-8" -d @request.json
{
"translations": [
{
"translatedText": "khatkz"
}
]
}
HTTPS request: curl -X POST \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
Expected results: Upon checking the Google Translate Online which is also provided by the customer, khatkz translates to Streak for ar-en
Actual results: It returns the same word which is "khatkz"