AIMA.Core.Logic.FOL.KB.FOLKnowledgeBase.tell C# (CSharp) Method

tell() public method

public tell ( String aSentence ) : Sentence
aSentence String
return Sentence
        public Sentence tell(String aSentence)
        {
            Sentence s = parser.parse(aSentence);
            tell(s);
            return s;
        }

Same methods

FOLKnowledgeBase::tell ( List sentences ) : void
FOLKnowledgeBase::tell ( Sentence aSentence ) : void

Usage Example

Beispiel #1
0
        // Note: see -
        // http://logic.stanford.edu/classes/cs157/2008/lectures/lecture15.pdf
        // slide 12 for where this test example was taken from.
        public static FOLKnowledgeBase createABCEqualityKnowledgeBase(
            InferenceProcedure infp, bool includeEqualityAxioms)
        {
            FOLDomain domain = new FOLDomain();

            domain.addConstant("A");
            domain.addConstant("B");
            domain.addConstant("C");

            FOLKnowledgeBase kb = new FOLKnowledgeBase(domain, infp);

            kb.tell("B = A");
            kb.tell("B = C");

            if (includeEqualityAxioms)
            {
                // Reflexivity Axiom
                kb.tell("x = x");
                // Symmetry Axiom
                kb.tell("(x = y => y = x)");
                // Transitivity Axiom
                kb.tell("((x = y AND y = z) => x = z)");
            }

            return(kb);
        }
All Usage Examples Of AIMA.Core.Logic.FOL.KB.FOLKnowledgeBase::tell