public FromComprenoModel AddSimpleSentence(IOrderedEnumerable<Compreno.SentenceElement> words) { var simpleSentece = new SimpleSentence(); simpleSentece.Words.AddRange(words.Select(_toSentenceWord)); _comparisonSentence.SimpleSentences.Add(simpleSentece); return this; }
private static SimpleSentence _flattenSentence(SimpleSentence sentence) { var result = new SimpleSentence(); result.Words.AddRange( sentence.Words.SelectMany( word => word.Text.Split(' ').Select(wordPart => new SentenceWord(wordPart, word.Type, word.IsAuxilary)))); result.Id = sentence.Id; return result; }
public FromIppiModel AddSimpleSentence(IOrderedEnumerable<IPPI.SentenceWord> words) { var simpleSentece = new SimpleSentence(); simpleSentece.Words.AddRange(words.Select(_toSentenceWord)); _comparisonSentence.SimpleSentences.Add(simpleSentece); return this; }
private static SimpleSentence wordIndexesToSimpleSentence(WordIndexesList indexes, SentenceWord[] words) { var result = new SimpleSentence(); result.Words.AddRange(indexes.WordIndexes.Select(i => words[i])); return result; }
private void _writeSimpleSentenceStats(SimpleSentenceStats stats, SimpleSentence simpleSentence, int santenceId, int? samepleSSId, int? targetSSId) { XlHelper.AddMargin(); _writeHeader(stats, simpleSentence, santenceId, samepleSSId, targetSSId); _writeBody(stats); _writeSummaryByLoType(stats); _writeSentenceSummary(stats); }
private void _writeHeader(SimpleSentenceStats stats, SimpleSentence simpleSentence, int id, int? samepleSSId, int? targetSSId) { XlHelper.WriteRow(() => { XlHelper.WriteValue(Labels.SentenceNum, Colors.SummaryHeader); XlHelper.WriteValue(id, Colors.SummaryHeader); }); XlHelper.WriteRow(() => { XlHelper.WriteValue(Labels.SampleSSNum, Colors.SummaryHeader); if (samepleSSId != null) { XlHelper.WriteValue((int)samepleSSId, Colors.SummaryHeader); } else { XlHelper.WriteValue("нет", Colors.SummaryHeader); } }); XlHelper.WriteRow(() => { XlHelper.WriteValue(Labels.TargetSSNum, Colors.SummaryHeader); if (targetSSId != null) { XlHelper.WriteValue((int)targetSSId, Colors.SummaryHeader); } else { XlHelper.WriteValue("нет", Colors.SummaryHeader); } }); XlHelper.WriteRow(() => { XlHelper.WriteValue(Labels.SampleSentence); XlHelper.WriteValue(simpleSentence.Text); }); XlHelper.WriteRow(() => _writeFirstHeaderRow(stats)); XlHelper.WriteRow(() => _writeSecontHeaderRow(stats)); XlHelper.WriteRow(() => _writeThirdHeaderRow(stats)); }
public StageComparisonResultElement(SimpleSentence simpleSentence) { SimpleSentence = simpleSentence; }
private int _getSSIndex(SimpleSentence ss, Sentence fullSentence) { return fullSentence.SimpleSentences.FindIndex(sentence => sentence.Text == ss.Text); }