Example #1
0
        public SelectedWords(PhraseWords phrase, bool correctOnly = true)
        {
            string pomStr;

            selected = phrase.Idxs.Where(idx => correctOnly ? idx.Len > 0 : true).Select((idx, i) => new SelectedWord {
                idx = i, word = pomStr = phrase.Text.Substring(idx.Pos, idx.Len), ftxWord = pomStr.Substring(0, Math.Min(idx.Len, PhraseWords.maxWordLen)).ToLower()
            }).ToArray();
        }
Example #2
0
 public PhraseWords(PhraseWords phr) : this(phr.Text)
 {
     Idxs = phr.Idxs;
 }