Examples of Sentence


Examples of aima.core.logic.fol.parsing.ast.Sentence

      this.inferenceProcedure = inferenceProcedure;
    }
  }

  public Sentence tell(String sentence) {
    Sentence s = parser.parse(sentence);
    tell(s);
    return s;
  }
View Full Code Here

Examples of aima.core.logic.propositional.parsing.ast.Sentence

   *            the query, a sentence in propositional logic
   *
   * @return the answer to the specified question using PL-Resolution.
   */
  public boolean plResolution(KnowledgeBase kb, Sentence alpha) {
    Sentence kBAndNotAlpha = new BinarySentence("AND", kb.asSentence(),
        new UnarySentence(alpha));
    Set<Sentence> clauses = new CNFClauseGatherer()
        .getClausesFrom(new CNFTransformer().transform(kBAndNotAlpha));
    clauses = filterOutClausesWithTwoComplementaryLiterals(clauses);
    Set<Sentence> newClauses = new HashSet<Sentence>();
View Full Code Here

Examples of com.netflix.template.common.Sentence

        webResource = client.resource(location + "/talk");
    }

    @Override
    public Sentence greeting() {
        Sentence s = webResource.accept(MediaType.APPLICATION_XML).get(Sentence.class);
        return s;
    }
View Full Code Here

Examples of edu.mayo.bmi.uima.core.type.textspan.Sentence

    ArrayList<ArrayList<String>> arrayOfLines = new ArrayList<ArrayList<String>>();
   
    //ArrayList<ApiConcept> apiConceptList = new ArrayList<ApiConcept>();
    for (Annotation annotation : sentenceAnnotationIndex)
    {
      Sentence sentence = (Sentence)annotation;
      int sentenceBegin = sentence.getBegin();
      int sentenceEnd = sentence.getEnd();
     
      AnnotationIndex<Annotation> tokenAnnotationIndex = jcas.getAnnotationIndex(BaseToken.type);
      FSIterator<Annotation> tokensInThisSentenceIterator = tokenAnnotationIndex.subiterator(sentence);
      ArrayList<String> arrayOfTokens = new ArrayList<String>();
      //for (Annotation baseTokenAnnotationUntyped : tokenAnnotationIndex)
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.coder.model.Sentence

        if(isException(s.toString()))
          continue;
       
       
        // save sentence
        sentences.add(new Sentence(s.toString(),s_offs,Sentence.TYPE_PROSE))
       
        // move start
        //st = i+1;
        s = new StringBuffer();
        s_offs = offset+i+1;
      }
    }
    // mop up in case you don't have a period at the end
    if(s.toString().trim().length() >0){
      sentences.add(new Sentence(s.toString(),s_offs,Sentence.TYPE_PROSE)); //+"." bad idea, we don't want to mess with offsets
    }
   
    return sentences;
  }
View Full Code Here

Examples of er.neo4jadaptor.query.expression.sentence.Sentence

    } else if (q instanceof EOOrQualifier) {
      Collection<Sentence> components = convertCollection(((EOOrQualifier) q).qualifiers());
     
      return new BinaryJoined(BinaryOperator.OR, components);
    } else if (q instanceof EONotQualifier) {
      Sentence component = convert(((EONotQualifier) q).qualifier());
     
      return new Negation(component);
    } else if (q instanceof EOKeyValueQualifier) {
      return convertComparison((EOKeyValueQualifier) q);
    } else {
View Full Code Here

Examples of games.stendhal.common.parser.Sentence

    final SpeakerNPC barMaid = (SpeakerNPC) zone.getNPCList().get(0);
    assertThat(barMaid.getName(), is("Siandra"));
    final Engine engine = barMaid.getEngine();
    engine.setCurrentState(ConversationStates.IDLE);

    Sentence sentence = new SentenceImplementation(new Expression("hi", ExpressionType.VERB));
    engine.step(PlayerTestHelper.createPlayer("bob"), sentence);
    assertThat(engine.getCurrentState(), is(ConversationStates.ATTENDING));
    assertThat(getReply(barMaid), is("Hi!"));

    sentence = new SentenceImplementation(new Expression("bye", ExpressionType.VERB));
View Full Code Here

Examples of games.stendhal.common.parser.Sentence

    final SpeakerNPC barMaid = (SpeakerNPC) zone.getNPCList().get(0);
    assertThat(barMaid.getName(), is("Siandra"));
    final Engine engine = barMaid.getEngine();
    engine.setCurrentState(ConversationStates.ATTENDING);

    Sentence sentence = new SentenceImplementation(new Expression("job", ExpressionType.VERB));
    engine.step(PlayerTestHelper.createPlayer("bob"), sentence);
    assertThat(engine.getCurrentState(), is(ConversationStates.ATTENDING));
    assertThat("job text", getReply(barMaid),
        is("I'm a bar maid. But we've run out of food to feed our customers, can you #offer any?"));
View Full Code Here

Examples of games.stendhal.common.parser.Sentence

    final SpeakerNPC barMaid = (SpeakerNPC) zone.getNPCList().get(0);
    assertThat(barMaid.getName(), is("Siandra"));
    final Engine engine = barMaid.getEngine();
    engine.setCurrentState(ConversationStates.ATTENDING);

    Sentence sentence = new SentenceImplementation(new Expression("offer", ExpressionType.VERB));
    engine.step(PlayerTestHelper.createPlayer("bob"), sentence);
    assertThat(engine.getCurrentState(), is(ConversationStates.ATTENDING));
    assertThat("offer text", getReply(barMaid), equalTo("I buy pieces of cheese, pieces of meat, spinaches, pieces of ham, sacks of flour, and porcini."));

    final Expression sell = new Expression("sell", ExpressionType.VERB);
View Full Code Here

Examples of games.stendhal.common.parser.Sentence

  }

  private void addTriggers(Iterable<String> triggers) {
    SimilarExprMatcher matcher = new SimilarExprMatcher();
    for (String trigger : triggers) {
      final Sentence expected = ConversationParser.parse(trigger, matcher);
      this.triggers.add(expected);
    }
  }
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.