コード例 #1
0
ファイル: clsMemory.cs プロジェクト: galantida/LanguageAI
        /*********************************************************************
        * calls for general learning
        *********************************************************************/
        public void learn(clsConcept subjectConcept, clsConcept typeConcept, clsConcept objectConcept)
        {
            clsRelationship relationship = subjectConcept.objectRelationship(typeConcept, objectConcept);

            if (relationship == null)
            {
                subjectConcept.connectObject(typeConcept, objectConcept);
            }
        }
コード例 #2
0
ファイル: clsConcept.cs プロジェクト: galantida/LanguageAI
 public void connectObject(clsRelationship relationship)
 {
     if (relationship.subjectConcept == this)
     {
         if (!_objectRelationships.Contains(relationship))
         {
             _objectRelationships.Add(relationship);
         }
     }
 }
コード例 #3
0
ファイル: clsConcept.cs プロジェクト: galantida/LanguageAI
        // make a parent relationship between this object and a subject (subject is object)
        public clsRelationship connectObject(clsConcept typeConcept, clsConcept objectConcept)
        {
            clsRelationship relationship = this.objectRelationship(typeConcept, objectConcept);

            if (relationship == null)
            {
                relationship = new clsRelationship(this, typeConcept, objectConcept);
                _objectRelationships.Add(relationship);
                objectConcept.connectSubject(relationship);
            }
            return(relationship);
        }
コード例 #4
0
ファイル: clsConcept.cs プロジェクト: galantida/LanguageAI
        // make a child relationship between this subject and an object (subject is object)
        public clsRelationship connectSubject(clsConcept typeConcept, clsConcept subjectConcept)
        {
            clsRelationship relationship = this.subjectRelationship(typeConcept, subjectConcept);

            if (relationship == null)
            {
                relationship = new clsRelationship(subjectConcept, typeConcept, this);
                _subjectRelationships.Add(relationship);
                subjectConcept.connectObject(relationship);
            }
            return(relationship);
        }