Examples of NgramPrecisionModel


Examples of opennlp.ccg.ngrams.NgramPrecisionModel

          return new Pair<Edge,Boolean>(edge, true);
      }
      // check 4-gram precision
      Edge retval = null;
      double bestScore = 0;
      NgramPrecisionModel oracle = new NgramPrecisionModel(new String[]{target});
      for (Edge edge : edges) {
        double score = oracle.score(edge.getSign(), true);
        if (score > bestScore) {
          retval = edge; bestScore = score;
        }
      }
      // done
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.