public void learn(string subjectPatternString, string typePatternString, string objectPatternString) { clsPattern subjectPattern = this.recallCreatePattern(subjectPatternString); clsPattern typePattern = this.recallCreatePattern(typePatternString); clsPattern objectPattern = this.recallCreatePattern(objectPatternString); this.learn(subjectPattern.firstConcept, typePattern.firstConcept, objectPattern.firstConcept); }
// *************************************************************** #region Linking and Learning // assign a pattern to make this concept searchable public void connectPattern(clsPattern pattern) { if (!_patterns.Contains(pattern)) { _patterns.Add(pattern); pattern.linkConcept(this); } }
/********************************************************************* * calls for learning and recalling patterns *********************************************************************/ // learn a single concept public clsPattern learnPattern(string patternString) { clsPattern pattern = this.recallPattern(patternString); if (pattern == null) { pattern = new clsPattern(patternString); _patterns.Add(pattern); } return(pattern); }
public List <clsRelationship> recallSubjectRelationship(clsPattern typePattern, clsPattern objectPattern) { return(objectPattern.firstConcept.subjectRelationships(typePattern.firstConcept)); }
// one link could have multiple indirect objects // example - is first person, is second person public clsConcept(clsPattern pattern) { this._patterns.Add(pattern); }