Examples of ask()


Examples of aima.core.logic.fol.kb.FOLKnowledgeBase.ask()

    Function ffa = new Function("F", terms);
    terms = new ArrayList<Term>();
    terms.add(ffa);
    Predicate query = new Predicate("P", terms);

    InferenceResult answer = akb.ask(query);

    Assert.assertTrue(null != answer);
    if (expectedToFail) {
      Assert.assertTrue(answer.isPossiblyFalse());
      Assert.assertFalse(answer.isTrue());
View Full Code Here

Examples of aima.core.logic.fol.kb.FOLKnowledgeBase.ask()

    List<Term> terms = new ArrayList<Term>();
    terms.add(new Variable("x"));
    Predicate query = new Predicate("Criminal", terms);

    InferenceResult answer = kb.ask(query);

    System.out.println("Weapons Knowledge Base:");
    System.out.println(kbStr);
    System.out.println("Query: " + query);
    for (Proof p : answer.getProofs()) {
View Full Code Here

Examples of aima.core.logic.fol.kb.FOLKnowledgeBase.ask()

    List<Term> terms = new ArrayList<Term>();
    terms.add(new Constant("Curiosity"));
    terms.add(new Constant("Tuna"));
    Predicate query = new Predicate("Kills", terms);

    InferenceResult answer = kb.ask(query);

    System.out.println("Loves Animal Knowledge Base:");
    System.out.println(kbStr);
    System.out.println("Query: " + query);
    for (Proof p : answer.getProofs()) {
View Full Code Here

Examples of aima.core.logic.fol.kb.FOLKnowledgeBase.ask()

    String kbStr = kb.toString();

    TermEquality query = new TermEquality(new Constant("A"), new Constant(
        "C"));

    InferenceResult answer = kb.ask(query);

    System.out.println("ABC Equality Axiom Knowledge Base:");
    System.out.println(kbStr);
    System.out.println("Query: " + query);
    for (Proof p : answer.getProofs()) {
View Full Code Here

Examples of aima.core.logic.fol.kb.FOLKnowledgeBase.ask()

    String kbStr = kb.toString();

    TermEquality query = new TermEquality(new Constant("A"), new Constant(
        "C"));

    InferenceResult answer = kb.ask(query);

    System.out.println("ABC Equality No Axiom Knowledge Base:");
    System.out.println(kbStr);
    System.out.println("Query: " + query);
    for (Proof p : answer.getProofs()) {
View Full Code Here

Examples of com.barchart.feed.api.model.data.Book.Top.ask()

          .append(" EventTime=")
          .append(value.updated());

        final Top top = value.book().top();
       
        Entry entry = top.ask();
       
        if (!entry.isNull()) {
          sb.append(" ASK TOP").append(" price=")
              .append(entry.price().asDouble())
              .append(" qty=").append(entry.size().asDouble());
View Full Code Here

Examples of com.complexible.stardog.api.Connection.ask()

   */
  public boolean ask(String sparql, Map<String, Object> args) {
    Connection connection = dataSource.getConnection();
    Boolean result = null;
    try {
      BooleanQuery query = connection.ask(sparql);
     
      if (args != null) {
        for (Entry<String, Object> arg : args.entrySet()) {          
          query.parameter(arg.getKey(), arg.getValue());
        }
View Full Code Here

Examples of com.franz.agbase.SPARQLQuery.ask()

    else if ( query.isConstructType() ) {
      tripleIter = sq.construct();
    }
    // ASK
    else if ( query.isAskType() ) {
      askResult = Boolean.valueOf(sq.ask());
    }

    if ( valSetIter != null ) {
      queryResult.setIsEmpty(! valSetIter.hasNext());
      String res;
View Full Code Here

Examples of com.sissi.ucenter.relation.roster.RosterRelation.ask()

  private final String[] relations = new String[] { RosterSubscription.NONE.toString(), RosterSubscription.FROM.toString() };

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    RosterRelation roster = super.ourRelation(super.build(protocol.getTo()), context.jid()).cast(RosterRelation.class);
    return roster.in(this.relations) && roster.ask();
  }
}
View Full Code Here

Examples of com.sissi.ucenter.relation.roster.RosterRelation.ask()

  private final String[] relations = new String[] { RosterSubscription.TO.toString(), RosterSubscription.BOTH.toString() };

  @Override
  public boolean input(JIDContext context, Protocol protocol) {
    RosterRelation roster = super.ourRelation(super.build(protocol.getTo()), context.jid()).cast(RosterRelation.class);
    return roster.in(this.relations) || roster.ask();
  }
}
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.