/// <summary> /// Проверка значения /// </summary> public bool IsValue(string word, SemObjectType typ = SemObjectType.Undefined) { if (typ != SemObjectType.Undefined) { if (typ != Typ) { return(false); } } if (Morph.NormalFull == word || Morph.NormalCase == word) { return(true); } Pullenti.Semantic.Utils.DerivateGroup gr = Concept as Pullenti.Semantic.Utils.DerivateGroup; if (gr != null) { if (gr.Words[0].Spelling == word) { return(true); } } return(false); }
/// <summary> /// Найти объект, кторый связан с текущим исходящий связью (Source = this) /// </summary> public SemObject FindFromObject(string word, SemLinkType typ = SemLinkType.Undefined, SemObjectType otyp = SemObjectType.Undefined) { foreach (SemLink li in LinksFrom) { if (typ != SemLinkType.Undefined && typ != li.Typ) { continue; } if (li.Target.IsValue(word, otyp)) { return(li.Target); } } return(null); }