Examples of PEParser


Examples of aima.core.logic.propositional.parsing.PEParser

   *            the query, a sentence in propositional logic
   *
   * @return the answer to the specified question using PL-Resolution.
   */
  public boolean plResolution(KnowledgeBase kb, String alpha) {
    return plResolution(kb, (Sentence) new PEParser().parse(alpha));
  }
View Full Code Here

Examples of aima.core.logic.propositional.parsing.PEParser

  }

  public boolean plResolution(String kbs, String alphaString) {
    KnowledgeBase kb = new KnowledgeBase();
    kb.tell(kbs);
    Sentence alpha = (Sentence) new PEParser().parse(alphaString);
    return plResolution(kb, alpha);
  }
View Full Code Here

Examples of aima.core.logic.propositional.parsing.PEParser

   *            a String representation of a Sentence in propositional logic
   *
   * @return <code>true</code> if the specified sentence is satisfiable.
   */
  public boolean dpllSatisfiable(String string) {
    Sentence sen = (Sentence) new PEParser().parse(string);
    return dpllSatisfiable(sen, new Model());
  }
View Full Code Here

Examples of aima.core.logic.propositional.parsing.PEParser

   * @return a satisfying model or failure (null).
   */
  public Model findModelFor(String logicalSentence, int numberOfFlips,
      double probabilityOfRandomWalk) {
    myModel = new Model();
    Sentence s = (Sentence) new PEParser().parse(logicalSentence);
    CNFTransformer transformer = new CNFTransformer();
    CNFClauseGatherer clauseGatherer = new CNFClauseGatherer();
    SymbolCollector sc = new SymbolCollector();

    List<Symbol> symbols = new Converter<Symbol>().setToList(sc
View Full Code Here

Examples of aima.core.logic.propositional.parsing.PEParser

   *            the query, a sentence in propositional logic
   *
   * @return the answer to the specified question using PL-Resolution.
   */
  public boolean plResolution(KnowledgeBase kb, String alpha) {
    return plResolution(kb, (Sentence) new PEParser().parse(alpha));
  }
View Full Code Here

Examples of aima.core.logic.propositional.parsing.PEParser

  }

  public boolean plResolution(String kbs, String alphaString) {
    KnowledgeBase kb = new KnowledgeBase();
    kb.tell(kbs);
    Sentence alpha = (Sentence) new PEParser().parse(alphaString);
    return plResolution(kb, alpha);
  }
View Full Code Here

Examples of aima.core.logic.propositional.parsing.PEParser

    return dpllSatisfiable(s, new Model());
  }

  public boolean dpllSatisfiable(String string) {
    Sentence sen = (Sentence) new PEParser().parse(string);
    return dpllSatisfiable(sen, new Model());
  }
View Full Code Here

Examples of aima.core.logic.propositional.parsing.PEParser

   * @return the answer to the specified question using the TT-Entails
   *         algorithm.
   */
  public boolean ttEntails(KnowledgeBase kb, String alpha) {
    Sentence kbSentence = kb.asSentence();
    Sentence querySentence = (Sentence) new PEParser().parse(alpha);
    SymbolCollector collector = new SymbolCollector();
    Set<Symbol> kbSymbols = collector.getSymbolsIn(kbSentence);
    Set<Symbol> querySymbols = collector.getSymbolsIn(querySentence);
    Set<Symbol> symbols = SetOps.union(kbSymbols, querySymbols);
    List<Symbol> symbolList = new Converter<Symbol>().setToList(symbols);
View Full Code Here

Examples of aima.core.logic.propositional.parsing.PEParser

  private Random random = new Random();

  public Model findModelFor(String logicalSentence, int numberOfFlips,
      double probabilityOfRandomWalk) {
    myModel = new Model();
    Sentence s = (Sentence) new PEParser().parse(logicalSentence);
    CNFTransformer transformer = new CNFTransformer();
    CNFClauseGatherer clauseGatherer = new CNFClauseGatherer();
    SymbolCollector sc = new SymbolCollector();

    List<Symbol> symbols = new Converter<Symbol>().setToList(sc.getSymbolsIn(s));
View Full Code Here

Examples of aima.core.logic.propositional.parsing.PEParser

  private PEParser parser;

  public KnowledgeBase() {
    sentences = new ArrayList<Sentence>();
    parser = new PEParser();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.