Hi @romungi-MSFT , I've just tested with RecognizePiiEntitiesBatch and RestApi from C# using HttpClient, It ran without errors. I believe that the issue coming from the SDK when serializing object to json
This is my code
Thanks for your support
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi everyone, I have an issue with PII Recognition
document A: only hindi characters
nमेर चैनल म ूज और सद नह बढ़ रह ह"
document B: (english characters, emoji, hindi characters)
1/12/23, 1:54 PM YouTube Community\nView all posts\nWatch and subscribe (Desktop, Mobile and other devices)\nViews problem\nमेर चैनल म ूज और सद नह बढ़ रह ह \nYouTube Go is going away in August of this year Announcement\nView all\nUpload videos and manage my channel\nYouTube Handle unavailable\ncommunity tab for people with less than 500 subscriberz\nOrganization channel, managed by a tech person who has le , now how to manage the\nchannel\nView all\nConnect with Comments, Posts, Stories and more\n🎬 Ask the YouTube team (India) - Connecting with your audience Announcement\nRecent Repo s of Missing Comments\nUpdates to Captions and Audio Features on YouTube\nhttps://support.google.com/youtube/community?hl=en 2/4
1/12/23, 1:54
var client = new TextAnalyticsClient(endPoint, key);
var result = new List<NamedEntityRecognitionResult>();
TextAnalyticsActions actions = new TextAnalyticsActions(){
RecognizePiiEntitiesActions = new List<RecognizePiiEntitiesAction>() {
new() { DisableServiceLogs = true, }
}
};
var operation = await client.StartAnalyzeActionsAsync(documents, actions, "auto");
await foreach (var documentsInPage in operation.Value){
var recognizePiiEntitiesResults = documentsInPage.RecognizePiiEntitiesResults;
var docResults = recognizePiiEntitiesResults.FirstOrDefault()?.DocumentsResults.Where(x => !x.HasError);
}
with document B, I received the error at line
var operation = await client.StartAnalyzeActionsAsync(documents, actions, "auto");
If I remove
मेर चैनल म ूज और सद नह बढ़ रह ह
🎬
it works and I can extract the entities from result
with document A, It can pass line
var operation = await client.StartAnalyzeActionsAsync(documents, actions, "auto");
but it throws the exception because of unsupported language
Hi @romungi-MSFT , I've just tested with RecognizePiiEntitiesBatch and RestApi from C# using HttpClient, It ran without errors. I believe that the issue coming from the SDK when serializing object to json
This is my code
Thanks for your support
Mason Nguyen Since you are using the PII entities in the actions "Hindi" is not supported as language where the service can recognize PII. Please see the language support page here. So, for document A the response is expected because it detected the language as Hindi.
For document B the response might have failed due to unknown reason which can only be looked up through service request by providing the request id to the service team. As such, if I used the same text copied from this page it runs successfully with REST API using CURL.
In general, if you are planning to use text from a text box where multiple languages and other rich formatting is supported, please ensure to pre-process the text to remove unwanted characters or URLs or images.
-Please kindly accept the answer if the answer was helpful to support the community, thanks.