public static int NumberOfResponses(this SentimentAnalysisContext context, SentimentClassification classification) { if (IsContextResponseDataNull(context)) { return(0); } return(context.AnalysisResult.ResponseData.documents.Count(a => a.SentimentClassification == classification)); }
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)); }