Esempio n. 1
0
        /// <summary>
        /// Gets the negative words count using the repository
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        public int GetNegativeWordsCount(string content)
        {
            // get the list of negative words
            var badWords = _wordsRepository.GetNegativeWords();

            // get the count of negative words
            var badWordsCount = _textAnalyserService.GetNegativeWordsCount(content, badWords);

            return(badWordsCount);
        }
 private IList <string> EnsureNegativeWords(IList <string> negativeWords)
 {
     return(negativeWords ?? _wordsRepository.GetNegativeWords(Constants.DefaultBannedWordsFile));
 }