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(); }
private SentenceWordChain _toWordChain(IEnumerable<IPPI.SentenceWord> ippiWords) { var result = new SentenceWordChain(); result.Words.AddRange(ippiWords.Select(_toSentenceWord)); return result; }
private SentenceWordChain _toWordChain(IEnumerable<Compreno.SentenceElement> comprenoWords) { var result = new SentenceWordChain(); result.Words.AddRange(comprenoWords.Select(_toSentenceWord)); return result; }
public StageComparisonResultElement(SentenceWordChain uniforms) { UniformRow = uniforms; }
public StageComparisonResultElement(SentenceWordChain chain) { MeaningParts = chain; }
public StageComparisonResultElement(SentenceWordChain wordChain) { MainPartChain = wordChain; }
private static SentenceWordType _getChainType(SentenceWordChain masterChain) { var meaningWord = masterChain.Words.FirstOrDefault(word => !word.IsAuxilary) ?? masterChain.Words.First(word => word.Type != SentenceWordType.Void); return meaningWord.Type; }
private int _getSenteceId(SentenceWordChain objects, Sentence sentence) { var index = sentence.SimpleSentences.FindIndex( simpleSentence => simpleSentence.Words.Any(word => objects.Words.Any(objectWord => String.Compare(objectWord.Text, word.Text, StringComparison.InvariantCultureIgnoreCase) == 0))); return index; }