Package joshua.decoder.ff.state_maintenance

Examples of joshua.decoder.ff.state_maintenance.DPState


   
    HashMap<Integer,DPState> allDPStates = null;
   
    if(stateComputers!=null){
      for(StateComputer stateComputer : stateComputers){
        DPState dpState = stateComputer.computeState(rule, antNodes, i, j, srcPath);         
       
        if(allDPStates==null)
          allDPStates = new HashMap<Integer,DPState>();
        allDPStates.put(stateComputer.getStateID(), dpState);
      }
    }
   
    //=== compute feature logPs
    double transitionLogPSum    = 0.0;
    double futureLogPEstimation = 0.0;
   
    for (FeatureFunction ff : featureFunctions) {   
      transitionLogPSum +=
        ff.getWeight() * ff.transitionLogP(rule, antNodes, i, j, srcPath, sentID);
     
      DPState dpState = null;
      if(allDPStates!=null)
        dpState = allDPStates.get(ff.getStateID());
      futureLogPEstimation +=
        ff.getWeight() * ff.estimateFutureLogP(rule, dpState, sentID);
     
View Full Code Here

TOP

Related Classes of joshua.decoder.ff.state_maintenance.DPState

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.