Beispiel #1
0
 public virtual KeyPhraseSentimentResponse GetKeyPhrases(SentimentRequest request)
 {
     return(PolicyService.ExecuteRetryAndCapture400Errors(
                "TextAnalyticsService.GetKeyPhrases",
                ApiKeys.TextAnalyticsRetryInSeconds,
                () =>
     {
         var result = TextAnalyticsRepository.GetKeyPhrases(request);
         return result;
     },
                null));
 }
Beispiel #2
0
        public virtual KeyPhraseSentimentResponse GetKeyPhrases(SentimentRequest request)
        {
            try
            {
                var result = TextAnalyticsRepository.GetKeyPhrases(request);

                return(result);
            }
            catch (Exception ex)
            {
                Logger.Error("SentimentService.GetKeyPhrasesAsync failed", this, ex);
            }

            return(null);
        }