I'm trying to get Google Vision API to detect the Language "Dhivehi" (languageHints Code 'dv') which is Listed under Experimental Languages in their OCR Language Support page.
Despite the service detecting characters from the language (characters only unique to the language) there isn't a single detection of "dv" in the JSON result. Adding or removing the Language hints doesn't seem to affect the results.
In addition, from the JSON result, the detectedLanguages property only shows "en" with very low confidence
"property": {
"detectedLanguages": [
{
"languageCode": "en",
"confidence": 0.11
}
],
"detectedBreak": null
},
Second attempt showed a confidence score of 0.12. So its consistently low.
This is my current implementation of the API (only the relevant part included)
// ...paths
Feature feature = new Feature
{
Type = Feature.Types.Type.DocumentTextDetection
};
// create an imageContext class and add the languageHints code to it
var imageContext = new ImageContext();
imageContext.LanguageHints.Add("dv");
// inputConfig and outputConfig are defined above
var asyncRequest = new AsyncAnnotateFileRequest() { InputConfig = inputConfig, OutputConfig = outputConfig, ImageContext = imageContext };
asyncRequest.Features.Add(feature);
// create and execute requests
List<AsyncAnnotateFileRequest> requests = new List<AsyncAnnotateFileRequest>();
requests.Add(asyncRequest);
var client = ImageAnnotatorClient.Create();
var operation = client.AsyncBatchAnnotateFiles(requests);
operation.PollUntilCompleted();
This behavior seems like a bug but posting here to be sure I haven't missed out anything