Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.47k stars 4.8k forks source link

[SEARCH] Add support for language auto-detection in OcrSkill #24384

Closed tiantun closed 2 years ago

tiantun commented 3 years ago

Library or service name. Microsoft.Azure.Search Azure.Search.Documents

Is your feature request related to a problem? Please describe. Enabling auto-detection on the OCR Skill requires setting the "defaultLanguageCode" to "unk". See OCR cognitive skill: "If the language code is unspecified or null, the language will be set to English. If the language is explicitly set to "unk", the language will be auto-detected." This seems to be the behaviour since at least early 2019: Set to "unk" to have system auto-detect language. However, this is currently not possible in the Search SDKs.

tiantun commented 3 years ago

The code seems to be auto-generated based on /stable/2019-05-06/searchservice.json . The most recent preview version of this is preview/2020-06-30/searchservice.json .

Created a branch with what seem to be the required changes: Add "unk" value for "OcrSkillLanguage"

jsquire commented 3 years ago

Thank you for your feedback. Tagging and routing to the team member best able to assist.

Mohit-Chakraborty commented 3 years ago

Thanks @tiantun for reporting the issue and suggesting a change to fix the issue.

Mohit-Chakraborty commented 3 years ago

I see a PR has been created against the target branch - https://github.com/Azure/azure-rest-api-specs/pull/16279

tiantun commented 3 years ago

Thank you @Mohit-Chakraborty . Looks like the changes were already merged into the API specs.

Can we keep this one open until the generated code in the SDK is updated as well? That would simplify tracking of the "unk" value's availability in the SDK.

Mohit-Chakraborty commented 3 years ago

Sure. Since this issue is in the .NET SDK repo, we will keep it open till we consume the change in the SDK.

salilponde commented 2 years ago

Do we know when this will be available in the SDK?

Mohit-Chakraborty commented 2 years ago

It was added in '11.4.0-beta.6'. The Changelog has a mention.

I will close the issue. Let me know if there are issues.