Package edu.stanford.nlp.sempre

Examples of edu.stanford.nlp.sempre.Example$Builder


    List<List<List<Integer>>> deltasPerIterPerExample = new ArrayList<List<List<Integer>>>();
    int e = 0, iter = 0, beamSize = 0;
    for (List<Example> row : Vis.zipExamples(files)) {
      LogInfo.log("example " + e);
      final Example targetExample = row.get(row.size() - 1);
      final Map<Derivation, Integer> targetBeamPositions = Utils.indicesOf(targetExample.getPredDerivations());
      beamSize = targetBeamPositions.size();

      List<List<Integer>> deltasPerIter = new ArrayList<List<Integer>>();
      for (iter = 0; iter < row.size(); iter++) {
        List<Integer> deltas = new ArrayList<Integer>();
View Full Code Here


    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

    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

TOP

Related Classes of edu.stanford.nlp.sempre.Example$Builder

Copyright © 2018 www.massapicom. 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.