Examples of evaluate()


Examples of com.volantis.xml.expression.Expression.evaluate()

        items[2] = factory.createStringValue("c");    
        context.getCurrentScope().declareVariable(
                   new ImmutableExpandedName("", "myVar"),
                   factory.createSequence(items));
       Expression exp = compileExpression("$myVar=(\"a\",\"b\",\"c\")");
       Value result = exp.evaluate(context);   
 
       assertTrue("Sequence comparison failed :" +
           "'(\"a\",\"b\",\"c\")=(\"a\",\"d\")'",
            ((BooleanValue) result).asJavaBoolean());

Examples of de.tuhrig.thofu.types.LList.evaluate()

       
        LObject result = LNull.NULL;
       
        while(condition.evaluate(innerEnvironment, tokens) == LBoolean.TRUE) {
         
          result = block.evaluate(innerEnvironment, tokens);
         
          increment.evaluate(innerEnvironment, tokens);
        }

        return result;

Examples of edu.isi.karma.mapreduce.function.CollectJSONObject.evaluate()

public class TestJSONCollector {
  @Test
  public void testMerge() {
    CollectJSONObject test = new CollectJSONObject();
    String a = "{\r\n\"@type\":\"http://dig.isi.edu/ontology/URLEntity\",\r\n\"dig:snapshot\":[\r\n{\r\n\"dig:hasTitlePart\":{\r\n\"@type\":\"http://schema.org/WebPageElement\",\r\n\"@id\":\"https://karmadigstorage.blob.core.windows.net/arch/churl/20140301/inlandempire.backpage.com/FemaleEscorts/smoking-hot-snow-bunny-nice-round-booty-colton-215-fwy-25/38941250/title\"\r\n},\r\n\"dig:hasBodyPart\":{\r\n\"dig:mentionsPhoneNumber\":{\r\n\"dig:tenDigitPhoneNumber\":\"7024104348\",\r\n\"schema:location\":{\r\n\"@type\":\"http://schema.org/Place\",\r\n\"@id\":\"http://dig.isi.edu/data/exchange/702410\"\r\n},\r\n\"@type\":\"http://dig.isi.edu/ontology/PhoneNumber\",\r\n\"@id\":\"http://dig.isi.edu/data/phonenumber/7024104348\"\r\n},\r\n\"@type\":\"http://schema.org/WebPageElement\",\r\n\"@id\":\"https://karmadigstorage.blob.core.windows.net/arch/churl/20140301/inlandempire.backpage.com/FemaleEscorts/smoking-hot-snow-bunny-nice-round-booty-colton-215-fwy-25/38941250/body\"\r\n},\r\n\"@type\":\"http://schema.org/WebPage\",\r\n\"@id\":\"https://karmadigstorage.blob.core.windows.net/arch/churl/20140301/inlandempire.backpage.com/FemaleEscorts/smoking-hot-snow-bunny-nice-round-booty-colton-215-fwy-25/38941250\"\r\n},\r\n{\r\n\"dig:hasTitlePart\":{\r\n\"@type\":\"http://schema.org/WebPageElement\",\r\n\"@id\":\"https://karmadigstorage.blob.core.windows.net/arch/churl/20140302/inlandempire.backpage.com/FemaleEscorts/smoking-hot-snow-bunny-nice-round-booty-colton-215-fwy-25/38941250/title\"\r\n},\r\n\"dig:hasBodyPart\":{\r\n\"dig:mentionsPhoneNumber\":{\r\n\"dig:tenDigitPhoneNumber\":\"7024104348\",\r\n\"schema:location\":{\r\n\"@type\":\"http://schema.org/Place\",\r\n\"@id\":\"http://dig.isi.edu/data/exchange/702410\"\r\n},\r\n\"@type\":\"http://dig.isi.edu/ontology/PhoneNumber\",\r\n\"@id\":\"http://dig.isi.edu/data/phonenumber/7024104348\"\r\n},\r\n\"@type\":\"http://schema.org/WebPageElement\",\r\n\"@id\":\"https://karmadigstorage.blob.core.windows.net/arch/churl/20140302/inlandempire.backpage.com/FemaleEscorts/smoking-hot-snow-bunny-nice-round-booty-colton-215-fwy-25/38941250/body\"\r\n},\r\n\"@type\":\"http://schema.org/WebPage\",\r\n\"@id\":\"https://karmadigstorage.blob.core.windows.net/arch/churl/20140302/inlandempire.backpage.com/FemaleEscorts/smoking-hot-snow-bunny-nice-round-booty-colton-215-fwy-25/38941250\"\r\n}\r\n],\r\n\"@id\":\"http://inlandempire.backpage.com/FemaleEscorts/smoking-hot-snow-bunny-nice-round-booty-colton-215-fwy-25/38941250\"\r\n}";
    Text result = test.evaluate(new Text(a), new Text("$.dig:snapshot.dig:hasBodyPart.dig:mentionsPhoneNumber.schema:location._id"));
    System.out.println(result.toString());
  }
}

Examples of edu.isi.karma.mapreduce.function.MergeJSON.evaluate()

  @Test
  public void testMerge() {
    MergeJSON test = new MergeJSON();
    String a = " {\"syll:twitterId\":\"caknoblock\",\"@type\":\"http://lod.isi.edu/ontology/syllabus/Person\",\"foaf:homepage\":{\"@type\":\"http://xmlns.com/foaf/0.1/Document\",\"@id\":\"http://www.isi.edu/~knoblock\"},\"foaf:name\":\"Craig Knoblock\",\"foaf:lastName\":\"Knoblock\",\"@id\":\"http://lod.isi.edu/cs548/person/Knoblock\",\"id\":\"http://lod.isi.edu/cs548/person/Knoblock\",\"foaf:depiction\":{\"@type\":\"http://xmlns.com/foaf/0.1/Image\",\"@id\":\"http://www.isi.edu/integration/people/knoblock/img/CraigKnoblock.jpg\",\"foaf:depicts\":\"<http://lod.isi.edu/cs548/person/Knoblock>\"},\"foaf:title\":\"Prof\",\"foaf:mbox\":\"mailto:knoblock@isi.edu\"}";
    String b = " {\"rdfs:label\":\"knoblock@isi.edu\",\"@type\":\"http://www.w3.org/2002/07/owl#Thing\",\"@id\":\"mailto:knoblock@isi.edu\",\"id\":\"mailto:knoblock@isi.edu\"}";
    Text result = test.evaluate(new Text(a), new Text(b), new Text("foaf:mbox"));
    String expected = "{\"id\":\"http://lod.isi.edu/cs548/person/Knoblock\",\"syll:twitterId\":\"caknoblock\",\"@type\":\"http://lod.isi.edu/ontology/syllabus/Person\",\"foaf:homepage\":{\"@type\":\"http://xmlns.com/foaf/0.1/Document\",\"@id\":\"http://www.isi.edu/~knoblock\"},\"foaf:lastName\":\"Knoblock\",\"foaf:name\":\"Craig Knoblock\",\"foaf:depiction\":{\"@type\":\"http://xmlns.com/foaf/0.1/Image\",\"@id\":\"http://www.isi.edu/integration/people/knoblock/img/CraigKnoblock.jpg\",\"foaf:depicts\":\"<http://lod.isi.edu/cs548/person/Knoblock>\"},\"@id\":\"http://lod.isi.edu/cs548/person/Knoblock\",\"foaf:title\":\"Prof\",\"foaf:mbox\":{\"id\":\"mailto:knoblock@isi.edu\",\"rdfs:label\":\"knoblock@isi.edu\",\"@type\":\"http://www.w3.org/2002/07/owl#Thing\",\"@id\":\"mailto:knoblock@isi.edu\"}}";
    Assert.assertEquals(result.toString(), expected);
  }
 
  @Test

Examples of edu.isi.karma.modeling.alignment.learner.SortableSemanticModel.evaluate()

      if (topHypotheses != null)
        for (int k = 0; k < topHypotheses.size(); k++) {

          SortableSemanticModel m = topHypotheses.get(k);

          me = m.evaluate(correctModel);

          String label = "candidate" + k +
              m.getSteinerNodes().getScoreDetailsString() +
              "cost:" + roundDecimals(m.getCost(), 6) +
              //                "-distance:" + me.getDistance() +

Examples of edu.mit.simile.backstage.util.MyTupleQuery.evaluate()

                  Order order = "value".equals(_sortMode) ?
                      new Order(projection, new OrderElem(_valueVar, "forward".equals(_sortDirection))) :
                      new Order(projection, new OrderElem(_countVar, !"forward".equals(_sortDirection)));
                 
                  TupleQuery query = new MyTupleQuery(new ParsedTupleQuery(order), connection);
                  TupleQueryResult queryResult = query.evaluate();
                  try {
                    return createComponentState(queryResult);
                  } finally {
                      queryResult.close();
                  }

Examples of edu.pitt.dbmi.nlp.noble.ontology.ILogicExpression.evaluate()

      return false;
   
    // if any of values fits, that we are good
    ILogicExpression exp = getParameter();
    for(int i=0;i<values.length;i++){
      if(exp.evaluate(values[i])){
        return true;
      }
    }
    return false;
  }

Examples of edu.pitt.ontology.ILogicExpression.evaluate()

    if(exp.getExpressionType() == ILogicExpression.OR){
      for(int i=0;i<exp.size();i++){
        if(exp.get(i) instanceof ILogicExpression){
          ILogicExpression e = (ILogicExpression) exp.get(i);
          // if this pattern matches
          if(e.evaluate(inst)){
            result.add(exp.get(i));
          }
        }
      }
    }

Examples of edu.stanford.nlp.ling.tokensregex.types.Expression.evaluate()

  public Value getValue(String varname)
  {
    Expression expr = (Expression) env.get(varname);
    if (expr != null) {
      return expr.evaluate(env);
    } else {
      throw new RuntimeException("Unable get expression for variable " + varname);
    }
  }

Examples of edu.stanford.nlp.parser.metrics.AbstractEval.evaluate()

        //tc.transformTree(tree).pennPrint();
        pcfgPE.evaluate(tc.transformTree(tree2), tc.transformTree(tree), pw);
        pcfgCB.evaluate(tc.transformTree(tree2), tc.transformTree(tree), pw);
        Tree tree4b = null;
        if (op.doDep) {
          comboDE.evaluate((bothPassed ? tree4 : tree3), binaryTree, pw);
          tree4b = tree4;
          tree4 = debinarizer.transformTree(tree4);
          if (op.nodePrune) {
            NodePruner np = new NodePruner(parser, debinarizer);
            tree4 = np.prune(tree4);
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.