Examples of evaluate()


Examples of opennlp.tools.sentdetect.SDCrossValidator.evaluate()

      Dictionary abbreviations = SentenceDetectorTrainerTool.loadDict(params
          .getAbbDict());
      validator = new SDCrossValidator(params.getLang(), mlParams,
          abbreviations, errorListener);
     
      validator.evaluate(sampleStream, params.getFolds());
    }
    catch (IOException e) {
      CmdLineUtil.printTrainingIoError(e);
      throw new TerminateToolException(-1);
    }

Examples of opennlp.tools.sentdetect.SentenceDetectorEvaluator.evaluate()

    System.out.print("Evaluating ... ");
      ObjectStream<SentenceSample> sampleStream = SentenceDetectorTrainerTool.openSampleData("Test",
          trainingDataInFile, encoding);
     
      try {
      evaluator.evaluate(sampleStream);
      }
      catch (IOException e) {
        CmdLineUtil.printTrainingIoError(e);
        throw new TerminateToolException(-1);
      }

Examples of opennlp.tools.tokenize.TokenizerCrossValidator.evaluate()

      Dictionary dict = TokenizerTrainerTool.loadDict(params.getAbbDict());

      validator = new opennlp.tools.tokenize.TokenizerCrossValidator(
          params.getLang(), dict, params.getAlphaNumOpt(), mlParams, listener);

      validator.evaluate(sampleStream, params.getFolds());
    }
    catch (IOException e) {
      CmdLineUtil.printTrainingIoError(e);
      throw new TerminateToolException(-1);
    }

Examples of opennlp.tools.tokenize.TokenizerEvaluator.evaluate()

    ObjectStream<TokenSample> sampleStream = TokenizerTrainerTool
        .openSampleData("Test", testData, encoding);

    try {
      evaluator.evaluate(sampleStream);
    } catch (IOException e) {
      System.err.println("failed");
      System.err.println("Reading test data error " + e.getMessage());
      throw new TerminateToolException(-1);
    } finally {

Examples of org.activiti.engine.impl.Condition.evaluate()

    List<PvmTransition> outgoingTransitions = execution.getActivity().getOutgoingTransitions();
    for (PvmTransition outgoingTransition : outgoingTransitions) {
      if (defaultSequenceFlow == null || !outgoingTransition.getId().equals(defaultSequenceFlow)) {
        Condition condition = (Condition) outgoingTransition.getProperty(BpmnParse.PROPERTYNAME_CONDITION);
        if (condition == null || !checkConditions || condition.evaluate(execution)) {
          transitionsToTake.add(outgoingTransition);
        }
      }
    }

Examples of org.activiti.engine.impl.scripting.ScriptingEngines.evaluate()

      .getProcessEngineConfiguration()
      .getScriptingEngines();

    boolean noErrors = true;
    try {
      Object result = scriptingEngines.evaluate(script, language, execution);
     
      if (resultVariable != null) {
        execution.setVariable(resultVariable, result);
      }

Examples of org.apache.abdera.xpath.XPath.evaluate()

   
    InputStream in = FOMTest.class.getResourceAsStream("/simple.xml");
    Document<Feed> doc = getParser().parse(in);
    Feed feed = doc.getRoot();
    XPath xpath = getXPath();
    assertEquals(xpath.evaluate("count(/a:feed)", feed), 1.0d);
    assertTrue(xpath.booleanValueOf("/a:feed/a:entry", feed));
    assertEquals(xpath.numericValueOf("count(/a:feed)", feed), 1.0d);
    assertEquals(xpath.valueOf("/a:feed/a:entry/a:title", feed), "Atom-Powered Robots Run Amok");
    assertEquals(xpath.selectNodes("/a:feed/a:entry", feed).size(), 1);
    assertTrue(xpath.selectSingleNode("/a:feed", feed) instanceof Feed);

Examples of org.apache.accumulo.core.security.VisibilityEvaluator.evaluate()

  @Test
  public void testVisibilityEvaluator() throws VisibilityParseException {
    VisibilityEvaluator ct = new VisibilityEvaluator(ByteArraySet.fromStrings("one", "two", "three", "four"));
   
    // test for and
    assertTrue("'and' test", ct.evaluate(new ColumnVisibility("one&two")));
   
    // test for or
    assertTrue("'or' test", ct.evaluate(new ColumnVisibility("foor|four")));
   
    // test for and and or

Examples of org.apache.activemq.filter.PropertyExpression.evaluate()

            throw new NullPointerException("Property name cannot be null");
        }

        // PropertyExpression handles converting message headers to properties.
        PropertyExpression expression = new PropertyExpression(name);
        return expression.evaluate(this);
    }

    public boolean getBooleanProperty(String name) throws JMSException {
        Object value = getObjectProperty(name);
        if (value == null) {

Examples of org.apache.ambari.server.controller.spi.Predicate.evaluate()

    Resource resource = new ResourceImpl(Resource.Type.HostComponent);
    String propertyId = PropertyHelper.getPropertyId("category1", "foo");
    Predicate predicate = new EqualsPredicate<String>(propertyId, "bar");

    resource.setProperty(propertyId, "monkey");
    Assert.assertFalse(predicate.evaluate(resource));

    resource.setProperty(propertyId, "bar");
    Assert.assertTrue(predicate.evaluate(resource));

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.