public override HighLightData GetHighlightData() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); foreach (var algResult in Result.Items.FindAll(x => x.ObjectType == IPPI.LO.MainParts.Algorithms.ObjectType.Subject)) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), Color.LightPink)); foreach (var algResult in Result.Items.FindAll(x => x.ObjectType == IPPI.LO.MainParts.Algorithms.ObjectType.Predicate)) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), Color.LemonChiffon)); return highlightResult; }
public override HighLightData GetHighlightData() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); foreach (var algResult in Result.Items) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), Color.Yellow)); return highlightResult; }
public override HighLightData GetHighlightData() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); foreach (var algResult in Result.Items) { Color color = Color.White; if (algResult.SyntacticRole.Value != SyntacticRole.Predicate.Value) color = Color.LightSkyBlue; else color = Color.LightGoldenrodYellow; highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), color)); } return highlightResult; }
public override HighLightData GetHighlightData() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); foreach (var algResult in Result.Items) { Color color; if (algResult.ObjectType == Compreno.LO.UniformParts.Algorithms.ObjectType.MainWord) color = Color.LightCyan; else color = Color.LightGreen; highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), color)); } return highlightResult; }
public HighLightData GetHighlightDataStage4() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); int j = 0; Color[] schrWordsInRowColors = { Color.LightBlue, Color.LightCoral, Color.LightPink, Color.LightGreen, Color.LightSteelBlue }; foreach (var algResult in Result.Items) { highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), schrWordsInRowColors[j])); foreach (var word in algResult.SeviceParts) { highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(word.Id), _sentence.WordHighlightLengthById(word.Id), schrWordsInRowColors[j])); } } return highlightResult; }
public override HighLightData GetHighlightData() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); Color[] relatedWordsInRowColors = { Color.LightBlue, Color.LightCoral, Color.LightPink, Color.LightGreen, Color.LightSteelBlue }; int i = 0; var groupedResults = Result.Items .GroupBy(x => x.RowId) .Select(grp => grp.ToList()) .ToList(); foreach (var grpAlgResult in groupedResults) { foreach (var algResult in grpAlgResult) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), relatedWordsInRowColors[i])); i++; if (i == relatedWordsInRowColors.Length) i = 0; } foreach (var algResult in Result.Items) { Color color; if (algResult.ObjectType == Compreno.LO.UniformParts.Algorithms.ObjectType.MainWord) { color = Color.LightCyan; } else { color = Color.LightGreen; } if (algResult.IsConfirmed) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), color)); } return highlightResult; }
public override HighLightData GetHighlightData() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); Color[] relatedWordsInRowColors = { Color.LightBlue, Color.LightCoral, Color.LightPink, Color.LightGreen, Color.LightSteelBlue }; Color[] MainWordsInRowColors = { Color.Blue, Color.Coral, Color.Pink, Color.Green, Color.SteelBlue }; int h = 0; foreach (var algResult in Result.Items) { highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), MainWordsInRowColors[h])); foreach (var wordId in algResult.ChainWordsIds.All.Values) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(wordId), _sentence.WordHighlightLengthById(wordId), relatedWordsInRowColors[h])); h++; if (h == relatedWordsInRowColors.Length) h = 0; } return highlightResult; }
public override HighLightData GetHighlightData() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); Color[] relatedWordsInRowColors = { Color.LightBlue, Color.LightCoral, Color.LightPink, Color.LightGreen, Color.LightSteelBlue }; int i = 0; var groupedResults = Result.Items .GroupBy(x => x.RowId) .Select(grp => grp.ToList()) .ToList(); foreach (var grpAlgResult in groupedResults) { foreach (var algResult in grpAlgResult) { highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), relatedWordsInRowColors[i])); foreach (var sp in algResult.ServiceParts) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(sp.Id), _sentence.WordHighlightLengthById(sp.Id), Color.LightCyan)); } i++; if (i == relatedWordsInRowColors.Length) i = 0; } return highlightResult; }
public override HighLightData GetHighlightData() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); foreach (var algResult in Result.Items) { Color fontColor = Color.Black; Color mainColor = Color.Yellow; Color addedColor = Color.Green; highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), mainColor, fontColor)); foreach (var addedWord in algResult.ServiceParts) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(addedWord.Id), _sentence.WordHighlightLengthById(addedWord.Id), addedColor)); } return highlightResult; }
public override HighLightData GetHighlightData() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); foreach (var algResult in Result.Items) { Color color = Color.White; if (algResult.IsWordConfirmed) color = Color.GreenYellow; else color = Color.LightCoral; highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), color)); } return highlightResult; }
public override HighLightData GetHighlightData() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); foreach (var algResult in Result.Items) { highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), Color.Yellow)); foreach (var sp in algResult.ServiceParts) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(sp.Id), _sentence.WordHighlightLengthById(sp.Id), Color.LightGreen)); foreach (var sp in algResult.AddedWordsCase1) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(sp.Id), _sentence.WordHighlightLengthById(sp.Id), Color.LightBlue)); foreach (var sp in algResult.AddedWordsCase2) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(sp.Id), _sentence.WordHighlightLengthById(sp.Id), Color.LightBlue)); } return highlightResult; }
public override HighLightData GetHighlightData() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); foreach (var algResult in Result.Items) { Color color = Color.White; Color fontColor = Color.White; if (algResult.SyntacticRole.Value == SyntacticRole.Subject.Value || algResult.GrammarInfo.PartOfSpeech.Value == GrammarInfoPartOfSpeech.Noun.Value) color = Color.Blue; else color = Color.BlueViolet; highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), color, fontColor)); foreach (var addedWord in algResult.ServiceParts) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(addedWord.Id), _sentence.WordHighlightLengthById(addedWord.Id), color, fontColor)); } return highlightResult; }
public override HighLightData GetHighlightData() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); Color[] simpleSentencesColors = { Color.LightBlue, Color.LightCoral, Color.LightPink, Color.LightGreen, Color.LightSteelBlue }; int i = 0; foreach (var algResult in Result.Items.FindAll(x => x.IsCorrect)) { highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), simpleSentencesColors[i])); foreach (var wordId in algResult.ChainWordsIds.All.Values) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(wordId), _sentence.WordHighlightLengthById(wordId), simpleSentencesColors[i])); i++; if (i == simpleSentencesColors.Length) i = 0; } return highlightResult; }
public override HighLightData GetHighlightData() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); Color fontColor = Color.White; foreach (var algResult in Result.Items.FindAll(x => x.ObjectType == IPPI.LO.MainParts.Algorithms.ObjectType.Subject)) { highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), Color.Blue, fontColor)); foreach (var sp in algResult.ServiceParts.Concat(algResult.AddedWordsCase1).Concat(algResult.AddedWordsCase2)) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(sp.Id), _sentence.WordHighlightLengthById(sp.Id), Color.Blue, fontColor)); } foreach (var algResult in Result.Items.FindAll(x => x.ObjectType == IPPI.LO.MainParts.Algorithms.ObjectType.Predicate)) { highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), Color.BlueViolet, fontColor)); foreach (var sp in algResult.ServiceParts.Concat(algResult.AddedWordsCase1).Concat(algResult.AddedWordsCase2)) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(sp.Id), _sentence.WordHighlightLengthById(sp.Id), Color.BlueViolet, fontColor)); } return highlightResult; }
public HighLightData GetHighlightDataStageFinal() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); Color[] relatedWordsInRowColorsFinal = { Color.LightBlue, Color.LightCoral, Color.LightPink, Color.LightGreen, Color.LightSteelBlue }; int k = 0; var groupedResultsFinal = Result.Items .GroupBy(x => x.RowId) .Select(grp => grp.ToList()) .ToList(); foreach (var grpAlgResult in groupedResultsFinal) { foreach (var algResult in grpAlgResult) { highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), relatedWordsInRowColorsFinal[k])); foreach (var word in algResult.SeviceParts.Where(x => (x.SyntacticRole.Value != SyntacticRole.CoordinatingConjunction.Value) && (x.SyntacticRole.Value != SyntacticRole.SubordinatingConjunction.Value))) { highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(word.Id), _sentence.WordHighlightLengthById(word.Id), relatedWordsInRowColorsFinal[k])); } } k++; if (k == relatedWordsInRowColorsFinal.Length) k = 0; } return highlightResult; }
public override HighLightData GetHighlightData() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); foreach (var algResult in Result.Items) { Color color = Color.DarkGreen; Color fontColor = Color.White; highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), color, fontColor)); foreach (var addedWord in algResult.AddedWordsCase1.Concat(algResult.AddedWordsCase2)) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(addedWord.Id), _sentence.WordHighlightLengthById(addedWord.Id), color)); } return highlightResult; }
public override HighLightData GetHighlightData() { Debug.Assert(_sentence != null); HighLightData highlightResult = new HighLightData(); foreach (var algResult in Result.Items.FindAll(x => x.ObjectType == IPPI.LO.MainParts.Algorithms.ObjectType.Subject)) { highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), Color.LimeGreen)); foreach (var sp in algResult.ServiceParts) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(sp.Id), _sentence.WordHighlightLengthById(sp.Id), Color.LightGreen)); } foreach (var algResult in Result.Items.FindAll(x => x.ObjectType == IPPI.LO.MainParts.Algorithms.ObjectType.Predicate)) { highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(algResult.Id), _sentence.WordHighlightLengthById(algResult.Id), Color.CornflowerBlue)); foreach (var sp in algResult.ServiceParts) highlightResult.Add(new HightLightDataElement(_sentence.WordHighlightStartById(sp.Id), _sentence.WordHighlightLengthById(sp.Id), Color.LightSkyBlue)); } return highlightResult; }