public SentimentSeries GetSentimentByKeyword(string keyword, TimeLibrary.TimeInterval groupingInterval, DateTime startDate, DateTime endDate) { var tweets = _TweetRepo.GetTweetsByKeyword(keyword, startDate, endDate); var sentiment = _SentimentAnalyzer.GetSentiment(tweets, groupingInterval); var sentimentSeries = new SentimentSeries() { Keywords = new[] { keyword }, Sentiment = sentiment, }; return(sentimentSeries); }
public SentimentSeries GetSentimentByConfigId(long configId, TimeLibrary.TimeInterval groupingInterval, DateTime startDate, DateTime endDate) { var tweets = _TweetRepo.GetTweetsByConfigId(configId, startDate, endDate); var sentiment = _SentimentAnalyzer.GetSentiment(tweets, groupingInterval); var config = _ConfigRepository.GetConfigurationById(configId); var sentimentSeries = new SentimentSeries() { Keywords = new[] { config.Text }, Sentiment = sentiment, }; return(sentimentSeries); }