示例#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();
            }
示例#2
0
 private SentenceWordChain _toWordChain(IEnumerable<IPPI.SentenceWord> ippiWords)
 {
     var result = new SentenceWordChain();
     result.Words.AddRange(ippiWords.Select(_toSentenceWord));
     return result;
 }
示例#3
0
 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;
 }
示例#7
0
 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;
 }
示例#8
0
        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;
        }