Package edu.stanford.nlp.fsm

Examples of edu.stanford.nlp.fsm.DFSATransition.score()


      double minCost = Double.POSITIVE_INFINITY;
      DFSATransition bestTransition = null;
      for (Iterator iter = inputs.iterator(); iter.hasNext();) {
        Object predictSpace = iter.next();
        DFSATransition transition = tSource.transition(predictSpace);
        double transitionCost = transition.score();
        if(transitionCost < minCost) {
          if(predictSpace != null) {
            System.err.printf("mincost (%s): %e -> %e\n", predictSpace.toString(), minCost, transitionCost);
            minCost = transitionCost;
            answerConstraint = predictSpace;
View Full Code Here


          newCost = 0.0;
        }
      }
      assert(curChr != null);
      newAnswer.append(curChr);
      newCost += transition.score();
      if(newCost < flags.searchGraphPrune || isLetterASCII(curChr.charAt(0)))
        tagLatticeToAnswerLattice(tDest, newASource, newAnswer, nodeId, pos+1, newCost, stateLinks, answerLattice, docArray);
    }
  }
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.