示例#1
0
        public void CanHandleEmptyText()
        {
            var scoreDictionary = new Dictionary <string, int>
            {
                { "foo", -1 }
            };

            var analyzer = new RawNaiveSentimentAnalyzer(scoreDictionary);

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

            var analyzer = new RawNaiveSentimentAnalyzer(scoreDictionary);

            Assert.AreEqual(0, analyzer.GetSentimentScore("foo bar"));
        }