private static async Task <Response <RecognizeEntitiesResultCollection> > CreateRecognizeEntitiesResponseAsync(Response response, IDictionary <string, int> idToIndexMap, CancellationToken cancellation)
        {
            RecognizeEntitiesResultCollection result = await TextAnalyticsServiceSerializer.DeserializeRecognizeEntitiesResponseAsync(response.ContentStream, idToIndexMap, cancellation).ConfigureAwait(false);

            return(Response.FromValue(result, response));
        }
Example #2
0
        private static async Task <Response <DocumentResultCollection <NamedEntity> > > CreateRecognizeEntitiesResponseAsync(Response response, CancellationToken cancellation)
        {
            DocumentResultCollection <NamedEntity> result = await TextAnalyticsServiceSerializer.DeserializeRecognizeEntitiesResponseAsync(response.ContentStream, cancellation).ConfigureAwait(false);

            return(Response.FromValue(result, response));
        }