public MessageEmotionController()
        {
            IMessageVerifierAlgorithm algorithm = new SentimentVerifierAlgorithm();
            ILocalization localization = new En_Us_Localization();

            ExecutionEngine.GetInstance().RegisterAnalyzer(localization, algorithm);
        }
Beispiel #2
0
        public void TestAnalyzeScores()
        {
            IMessageVerifierAlgorithm algorithm = new SentimentVerifierAlgorithm();
            ILocalization localization = new En_Us_Localization();

            ExecutionEngine.GetInstance().RegisterAnalyzer(localization, algorithm);

            string messages = SampleData.request;

            string scoreResults = ExecutionEngine.GetInstance().AnalyzeScores("en-US", messages);

            Assert.IsNotNull(scoreResults);
        }
Beispiel #3
0
        public void TestAnalyzeScore()
        {
            IMessageVerifierAlgorithm algorithm = new SentimentVerifierAlgorithm();
            ILocalization localization = new  En_Us_Localization();

            ExecutionEngine.GetInstance().RegisterAnalyzer(localization, algorithm);

            string localizationCode = localization.LocalizationCode;
            IMessage message = new Message
            {
                 Content = new StringBuilder("I am sad")
            };

            double score = ExecutionEngine.GetInstance().AnalyzeScore(localizationCode, message);

            Assert.AreEqual(-0.857924, score);
        }