Пример #1
0
 private void EditText()
 {
     for (int i = 0; i < arraySent.Length; i++)
     {
         Sent a = arraySent[i];
         for (int j = 0; j < a.GetLenArrayW; j++)
         {
             Word   b     = a.GetW(j);
             string x1    = b.GetLet(0).GetLet;
             string x2    = b.GetLet(b.GetLenArrayLet - 1).GetLet;
             Punct  punct = new Punct();
             if (punct.Cont(x2))
             {
                 if (listcons.Contains(x1) == false | b.GetLenArrayLet != givlen + 1)
                 {
                     result += b.GetWord + " ";
                 }
             }
             else
             {
                 if (listcons.Contains(x1) == false | b.GetLenArrayLet != givlen)
                 {
                     result += b.GetWord + " ";
                 }
             }
         }
         result += ".";
     }
 }
Пример #2
0
 public Text(string t, int g)
 {
     this.givlen = g;
     string[] textArraySent = t.Split(new char[] { '!', '?', '.' }, StringSplitOptions.RemoveEmptyEntries);
     arraySent = new Sent[textArraySent.Length];
     for (int i = 0; i < textArraySent.Length; i++)
     {
         Sent s = new Sent(textArraySent[i]);
         arraySent[i] = s;
     }
     EditText();
 }