예제 #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;
 }
예제 #5
0
 public StageComparisonResultElement(SentenceWordChain chain)
 {
     MeaningParts = chain;
 }
예제 #6
0
 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;
        }