AIMA.Core.Logic.Propositional.Visitors.SymbolCollector.getSymbolsIn C# (CSharp) Method

getSymbolsIn() public method

public getSymbolsIn ( Sentence s ) : List
s AIMA.Core.Logic.Propositional.Parsing.Ast.Sentence
return List
        public List<Symbol> getSymbolsIn(Sentence s)
        {
            if (s == null)
            {// empty knowledge bases == null fix this later
                return new List<Symbol>();
            }
            return (List<Symbol>)s.accept(this, new List<Symbol>());
        }
    }

Usage Example

Example #1
0
 public bool ttEntails(KnowledgeBase kb, String alpha)
 {
     Sentence kbSentence = kb.asSentence();
     Sentence querySentence = (Sentence)new PEParser().parse(alpha);
     SymbolCollector collector = new SymbolCollector();
     List<Symbol> kbSymbols = collector.getSymbolsIn(kbSentence);
     List<Symbol> querySymbols = collector.getSymbolsIn(querySentence);
     List<Symbol> symbols = SetOps.union(kbSymbols, querySymbols);
     List<Symbol> symbolList = symbols;
     return ttCheckAll(kbSentence, querySentence, symbolList, new Model());
 }
All Usage Examples Of AIMA.Core.Logic.Propositional.Visitors.SymbolCollector::getSymbolsIn