Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        // ***************************************************************
        #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);
            }
        }
Esempio n. 3
0
        /*********************************************************************
        * 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);
        }
Esempio n. 4
0
 public List <clsRelationship> recallSubjectRelationship(clsPattern typePattern, clsPattern objectPattern)
 {
     return(objectPattern.firstConcept.subjectRelationships(typePattern.firstConcept));
 }
Esempio n. 5
0
 // one link could have multiple indirect objects
 // example - is first person, is second person
 public clsConcept(clsPattern pattern)
 {
     this._patterns.Add(pattern);
 }