Beispiel #1
0
            private static List<SentenceWordChain> wordIndexesListsToWordChains(WordIndexesList[] indexesLists, SentenceWord[] words)
            {
                return indexesLists.Select(list =>
                {
                    var result = new SentenceWordChain();

                    result.Words.AddRange(list.WordIndexes.Select(i => words[i]));

                    return result;
                }).ToList();
            }
Beispiel #2
0
 private static SimpleSentence wordIndexesToSimpleSentence(WordIndexesList indexes, SentenceWord[] words)
 {
     var result = new SimpleSentence();
     result.Words.AddRange(indexes.WordIndexes.Select(i => words[i]));
     return result;
 }