Examples of ZeroProbabilityException


Examples of edu.umd.hooka.alignment.ZeroProbabilityException

    reporter.addFactor(best, J - 1);
    //System.out.println(viterbi);
    int e = best_s;
    for (int f=J-1; f>0; f--) {
      if (e <= 0) {
        throw new ZeroProbabilityException("  Error f=" +f+" e="+e+
            "  sentence + \n" + viterbi + "\n" + emission + "\n" + transition + "\n" + backtrace);
      } else {
        if (viterbi.get(f, e) < 0.0) {
          // hack to avoid errors
          try {
View Full Code Here

Examples of edu.umd.hooka.alignment.ZeroProbabilityException

      for (int i = 0; i < r; i++) {
        sb.append(' ').append(data[cur]);
        cur += width;
      }
      sb.append(" sum=0.0");
      throw new ZeroProbabilityException(sb.toString());
    }
    cur = c;
    for (int i = 0; i < r; i++) {
      data[cur] /= sum;
      cur += width;
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.