Exemple #1
0
        protected DigestOutputResult GetDigestOutputResult(TestSent sent)
        {
            using (var client = new DigestWcfClient(ENDPOINT_CONFIGURATION_NAME))
            {
                var inputParams = new DigestInputParams(sent.Text, InputTextFormat.PlainText)
                {
                    ExecuteTonalityMarking = true,
                };
                var result = client.ExecuteDigest(inputParams);

                return(result);
            }
        }
        protected DigestOutputResult GetDigestOutputResult(TestSent sent)
        {
            var lingvisticResult = _LingvisticsServer.Value.ProcessText
                                   (
                sent.Text,
                false,
                DateTime.Now,
                LingvisticsResultOptions.OpinionMiningWithTonality,
                SelectEntitiesMode.Full,
                false
                                   );

            return(lingvisticResult.OpinionMiningWithTonalityResult);
        }
 public static void AddDiv4OkMessage(this ControlCollection controls, TestRule rule, TestSent sent)
 {
     controls.AddDiv(rule.ToString() + '.' + sent.ToString() + " - OK");
 }
        public static void AddDiv4ExceptionMessage(this ControlCollection controls, Exception ex, TestRule rule, TestSent sent)
        {
            var div = new HtmlGenericControl("div")
            {
                InnerHtml = rule.ToString() + '.' + sent.ToString() + " - " + (ex is TestException ? ex.Message : ex.ToString().GetNoLongest(250).ToHtmlBold())
            };

            div.Style[HtmlTextWriterStyle.Color] = "red";

            controls.Add(div);
        }