private static Response <RecognizeLinkedEntitiesResultCollection> CreateLinkedEntityResponse(Response response, IDictionary <string, int> idToIndexMap) =>
 Response.FromValue(TextAnalyticsServiceSerializer.DeserializeLinkedEntityResponse(response.ContentStream, idToIndexMap), response);
Example #2
0
 private static Response <DetectLanguageResultCollection> CreateDetectLanguageResponse(Response response) =>
 Response.FromValue(TextAnalyticsServiceSerializer.DeserializeDetectLanguageResponse(response.ContentStream), response);
 private static Response <ExtractKeyPhrasesResultCollection> CreateKeyPhraseResponse(Response response, IDictionary <string, int> idToIndexMap) =>
 Response.FromValue(TextAnalyticsServiceSerializer.DeserializeKeyPhraseResponse(response.ContentStream, idToIndexMap), response);
        private static async Task <Response <RecognizeLinkedEntitiesResultCollection> > CreateLinkedEntityResponseAsync(Response response, IDictionary <string, int> idToIndexMap, CancellationToken cancellation)
        {
            RecognizeLinkedEntitiesResultCollection result = await TextAnalyticsServiceSerializer.DeserializeLinkedEntityResponseAsync(response.ContentStream, idToIndexMap, cancellation).ConfigureAwait(false);

            return(Response.FromValue(result, response));
        }
Example #5
0
 private static Response <IEnumerable <Sentiment> > CreateAnalyzeSentimentResponseSimple(Response response) =>
 Response.FromValue(TextAnalyticsServiceSerializer.DeserializeSentimentCollection(response.ContentStream), response);
 private static Response <AnalyzeSentimentResultCollection> CreateAnalyzeSentimentResponse(Response response, IDictionary <string, int> idToIndexMap) =>
 Response.FromValue(TextAnalyticsServiceSerializer.DeserializeAnalyzeSentimentResponse(response.ContentStream, idToIndexMap), response);
Example #7
0
 private static Response <SentimentResultCollection> CreateAnalyzeSentimentResponse(Response response) =>
 Response.FromValue(TextAnalyticsServiceSerializer.DeserializeAnalyzeSentimentResponse(response.ContentStream), response);
Example #8
0
 private static Response <IEnumerable <IEnumerable <string> > > CreateKeyPhraseResponseSimple(Response response) =>
 Response.FromValue(TextAnalyticsServiceSerializer.DeserializeKeyPhraseCollection(response.ContentStream), response);
Example #9
0
 private static Response <IEnumerable <DetectedLanguage> > CreateDetectLanguageResponseSimple(Response response) =>
 Response.FromValue(TextAnalyticsServiceSerializer.DeserializeDetectedLanguageCollection(response.ContentStream), response);
Example #10
0
 private static Response <IEnumerable <IEnumerable <NamedEntity> > > CreateRecognizeEntitiesResponseSimple(Response response) =>
 Response.FromValue(TextAnalyticsServiceSerializer.DeserializeEntityCollection(response.ContentStream), response);
Example #11
0
        private static async Task <Response <IEnumerable <DetectedLanguage> > > CreateDetectLanguageResponseSimpleAsync(Response response, CancellationToken cancellation)
        {
            IEnumerable <DetectedLanguage> result = await TextAnalyticsServiceSerializer.DeserializeDetectedLanguageCollectionAsync(response.ContentStream, cancellation).ConfigureAwait(false);

            return(Response.FromValue(result, response));
        }
Example #12
0
 private static Response <DocumentResultCollection <LinkedEntity> > CreateLinkedEntityResponse(Response response) =>
 Response.FromValue(TextAnalyticsServiceSerializer.DeserializeLinkedEntityResponse(response.ContentStream), response);
Example #13
0
        private static async Task <Response <DocumentResultCollection <LinkedEntity> > > CreateLinkedEntityResponseAsync(Response response, CancellationToken cancellation)
        {
            DocumentResultCollection <LinkedEntity> result = await TextAnalyticsServiceSerializer.DeserializeLinkedEntityResponseAsync(response.ContentStream, cancellation).ConfigureAwait(false);

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

            return(Response.FromValue(result, response));
        }
Example #15
0
        private static async Task <Response <IEnumerable <Sentiment> > > CreateAnalyzeSentimentResponseSimpleAsync(Response response, CancellationToken cancellation)
        {
            var result = await TextAnalyticsServiceSerializer.DeserializeSentimentCollectionAsync(response.ContentStream, cancellation).ConfigureAwait(false);

            return(Response.FromValue(result, response));
        }
Example #16
0
 private static Response <RecognizeEntitiesResultCollection> CreateRecognizeEntitiesResponse(Response response) =>
 Response.FromValue(TextAnalyticsServiceSerializer.DeserializeRecognizeEntitiesResponse(response.ContentStream), response);
Example #17
0
 private static Response <DocumentResultCollection <string> > CreateKeyPhraseResponse(Response response) =>
 Response.FromValue(TextAnalyticsServiceSerializer.DeserializeKeyPhraseResponse(response.ContentStream), response);