Examples of Example


Examples of edu.stanford.nlp.sempre.Example

    final double ct = 0.5d;
    final double pt = 0.5d;

    for (List<Example> row : Vis.zipExamples(files)) {
      for (int i = 0; i < n; i++) {
        Example ex = row.get(i);
        ConfusionMatrix softM = softMs.get(i);
        ConfusionMatrix hardM = hardMs.get(i);
        updateConfusionMatrix(softMs.get(i), ex, -1.0d, -1.0d);
        updateConfusionMatrix(hardMs.get(i), ex, ct, pt);
      }
View Full Code Here

Examples of edu.stanford.nlp.sempre.Example

    LogInfo.log("Writing " + basePath);
    pushLog(out);

    int i = 0;
    for (List<Example> row : Vis.zipExamples(files)) {
      Example first = row.get(0);
      LogInfo.begin_track("Example %d: %s [%s]", i, first.getUtterance(), first.getId());
      List<Map<Derivation, Integer>> rowDerivIndices = getRowDerivIndices(row);
      List<Derivation> firstDerivs = first.getPredDerivations();

      LogInfo.logs("STAT %s", first.getEvaluation().summary());

      for (int j = 0; j < firstDerivs.size(); j++) {
        Derivation firstDeriv = firstDerivs.get(j);
        LogInfo.begin_track("Ex %d, derivation %d", i, j);
        if (firstDeriv.getCompatibility() == 1.0d)
View Full Code Here

Examples of fr.irit.halterego.ggp_agent.algorithms.tg.Example

            }
        }
     
        if(result == null || existing_q != null)
        {
            tree.addExample(new Example(state, action, q));
        }
    }
View Full Code Here

Examples of fr.uhp.example.Example


public class ExampleTest {
  @Test
  public void AddTest() {
    assertTrue(new Example().add(1,1) == 2);
  }
View Full Code Here

Examples of io.dropwizard.configuration.ConfigurationFactoryTest.Example

    }
           
     @Test
     public void createDefaultFactory() throws Exception {
         ConfigurationFactory<Example> factory = factoryFactory.create(Example.class, validator, Jackson.newObjectMapper(), "dw");        
         final Example example = factory.build(validFile);
         assertThat(example.getName())
                 .isEqualTo("Coda Hale");
     }
View Full Code Here

Examples of net.sf.gluebooster.java.booster.essentials.meta.Example

      for (Annotation annotation : method.getAnnotations()) {
        // getLog().debug(
        // method.getName() + " has annotation " + annotation);

        if (annotation instanceof Example) {
          Example example = (Example) annotation;
          Class clasz = example.clasz();
          String methodname = example.method();
          if (methodname != null && !methodname.isEmpty()) {
            boolean foundMethod = false;
            for (Method classMethod : clasz.getMethods()) {
              if (classMethod.getName().equals(methodname)) {
                foundMethod = true;
View Full Code Here

Examples of org.apache.stanbol.enhancer.topic.api.training.Example

                    Collection<Object> labelValues = result.getFieldValues(topicUrisField);
                    Collection<Object> textValues = result.getFieldValues(exampleTextField);
                    if (textValues == null) {
                        continue;
                    }
                    items.add(new Example(exampleId, labelValues, textValues));
                }
            }
        } catch (SolrServerException e) {
            String msg = String.format(
                "Error while fetching positive examples for topics ['%s'] on Solr Core '%s'.",
View Full Code Here

Examples of org.crank.crud.criteria.Example

    Employee employee = new Employee();
    employee.setActive(true);
    employee.setAge(40);
    employee.setFirstName("Rick");
    employee.setLastName("Rick");
    Example example = Example.like(employee).excludeProperty("lastName");
    assertEquals(
        "1",
        "(AND [active_EQ_true, age_EQ_40, firstName_LIKE_CONTAINS_Rick])",
        example.toString());

    example = Example.createExample(employee).excludeZeroes();
    employee.setAge(0);
    employee.setLastName(null);
    assertEquals("2", "(AND [active_EQ_true, firstName_EQ_Rick])", example
        .toString());

    example = Example.createExample(employee).excludeZeroes();
    employee.setAge(40);
    employee.setLastName(null);
    assertEquals("3",
        "(AND [active_EQ_true, age_EQ_40, firstName_EQ_Rick], numberOfPromotions_EQ_0, tasks_EQ_[]])", example
            .toString());

    example = Example.createExample(employee).excludeZeroes().excludeNone();
    employee.setAge(0);
    employee.setLastName(null);
    assertEquals(
        "4",
        "(AND [active_EQ_true, address_EQ_null, department_EQ_null, description_EQ_null, firstName_EQ_Rick, id_EQ_null, lastName_EQ_null, numberOfPromotions_EQ_null, rank_EQ_null, status_EQ_null])",
        example.toString());

  }
View Full Code Here

Examples of org.crank.crud.criteria.Example

    employee.setNumberOfPromotions(1);
    employee.setFirstName("Rick");
    employee.setLastName("Rick");
    employee.setTasks(null);

    Example ex =  like(employee).excludeProperty("lastName").excludeProperty("tasks");
    System.out.println(ex);
//    List<Employee> employees =
    employeeDao.find(ex);
    //    AssertJUnit.assertTrue(employees.size() > 0);
View Full Code Here

Examples of org.hibernate.criterion.Example

  public static Example getExampleCriterion(Object entity) {
    return getExampleCriterion(entity, null, MatchMode.ANYWHERE);
  }

  public static Example getExampleCriterion(Object entity, String[] excludePropertes, MatchMode mode) {
    Example example = Example.create(entity).setPropertySelector(new NotEmptyPropertySelector());
    if (null != mode) {
      example.enableLike(mode);
    }
    if (null != excludePropertes) {
      for (int i = 0; i < excludePropertes.length; i++) {
        example.excludeProperty(excludePropertes[i]);
      }
    }
    return example;
  }
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.