Package cc.mallet.fst.MEMM

Examples of cc.mallet.fst.MEMM.TransitionIterator.nextState()


          FeatureVector fv = (FeatureVector) instance.getData ();
          String labelString = (String) instance.getTarget ();
          TransitionIterator iter = new TransitionIterator (s, fv, gatherConstraints?labelString:null, memm);
          while (iter.hasNext ()) {
            // gsc
            iter.nextState(); // advance the iterator
//            State destination = (MEMM.State) iter.nextState();  // Just to advance the iterator
            double weight = iter.getWeight();
            factorIncrementor.incrementTransition(iter, Math.exp(weight) * instWeight);
            //iter.incrementCount (Math.exp(weight) * instWeight);
            if (!gatherConstraints && iter.getOutput() == labelString) {
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.