Esempio n. 1
0
        public void SplitSentence()
        {
            SentenceProcessor sp   = new SentenceProcessor();
            string            test =
                @"mi pilin pona. mi ken ala ken lukin e ni? ni li suli! mi wile e ni: jan li pona.";

            Collection <Sentence> sentences = sp.SplitIntoSentences(test);

            Assert.AreEqual(5, sentences.Count);
        }
        protected void btnGloss_Click(object sender, EventArgs e)
        {
            SentenceProcessor sp        = new SentenceProcessor();
            string            toConvert = Server.HtmlEncode(txtInput.Text);

            Collection <Sentence> sentences = sp.SplitIntoSentences(toConvert.ToLower().Trim());

            StringBuilder sb = new StringBuilder();

            foreach (Sentence sentence in sentences)
            {
                sb.Append(GlossASentence(sentence));
            }
            txtOutput.Text  = sb.ToString();
            Session["html"] = sb.ToString();
        }