Exemplo n.º 1
0
        public static int NumberOfResponses(this SentimentAnalysisContext context, SentimentClassification classification)
        {
            if (IsContextResponseDataNull(context))
            {
                return(0);
            }

            return(context.AnalysisResult.ResponseData.documents.Count(a => a.SentimentClassification == classification));
        }
Exemplo n.º 2
0
        public static IEnumerable <SentimentResultResponseItem> GetResults(this SentimentAnalysisContext context, SentimentClassification classification)
        {
            if (IsContextResponseDataNull(context))
            {
                return(null);
            }

            return(context.AnalysisResult.ResponseData.documents.Where(a => a.SentimentClassification == classification));
        }