Ejemplo n.º 1
0
        public void CanHandleEmptyText()
        {
            var scoreDictionary = new Dictionary <string, int>
            {
                { "foo", -1 }
            };

            var analyzer = new NormalizedNaiveSentimentAnalyzer(scoreDictionary);

            Assert.AreEqual(0, analyzer.GetSentimentScore(""));
        }
Ejemplo n.º 2
0
        public void CanScoreNeutralText()
        {
            var scoreDictionary = new Dictionary <string, int>
            {
                { "foo", -1 },
                { "bar", 1 }
            };

            var analyzer = new NormalizedNaiveSentimentAnalyzer(scoreDictionary);

            Assert.AreEqual(0, analyzer.GetSentimentScore("foo bar"));
        }
Ejemplo n.º 3
0
 public void CanHandleEmptySentimentDictionary()
 {
     var analyzer = new NormalizedNaiveSentimentAnalyzer(new Dictionary <string, int>());
 }
Ejemplo n.º 4
0
 public void CanHandleNullSentimentDictionary()
 {
     var analyzer = new NormalizedNaiveSentimentAnalyzer(null);
 }