Beispiel #1
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));
        }
Beispiel #2
0
        private static async Task <Response <DocumentResultCollection <DetectedLanguage> > > CreateDetectLanguageResponseAsync(Response response, CancellationToken cancellation)
        {
            DocumentResultCollection <DetectedLanguage> result = await TextAnalyticsServiceSerializer.DeserializeDetectLanguageResponseAsync(response.ContentStream, cancellation).ConfigureAwait(false);

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