public WordToken this[int index]
 {
     get
     {
         WordToken wt = new WordToken();
         tokens.Add(index, wt);
         return(tokens[index]);
     }
 }
Example #2
0
 //indexation
 public WordToken this[int index]
 {
     get
     {
         WordToken wt = new WordToken();
         textCollection.Add(index, wt);
         return(textCollection[index]);
     }
 }
        public Sentence(string plainText)
        {
            var text = plainText;

            _splittedText = text.Split();
            _wordToken    = new WordToken[_splittedText.Length];

            for (int i = 0; i < _wordToken.Length; i++)
            {
                _wordToken[i] = new WordToken();
            }
        }