Package cc.mallet.fst.Transducer

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


          logger.fine (" Starting Forward transition iteration from state "
              + s.getName() + " on input " + input.get(ip).toString()
              + " and output "
              + (output==null ? "(null)" : output.get(ip).toString()));
        while (iter.hasNext()) {
          State destination = iter.nextState();
          boolean legalTransition = true;
          // check constraints to see if node at <ip,i> can transition to destination
          if (ip+1 < constraints.length && constraints[ip+1] > 0 && ((constraints[ip+1]-1) != destination.getIndex())) {
            logger.fine ("Destination state does not match positive constraint. Assigning -infinite weight. position="+(ip+1)+", constraint="+(constraints[ip+1]-1)+", source ="+i+", destination="+destination.getIndex());
            legalTransition = false;
View Full Code Here


          // be correct, but since alpha is -infinite anyway, it shouldn't matter.
          continue;
        State s = t.getState(i);
        TransitionIterator iter = s.transitionIterator (input, ip, output, ip);
        while (iter.hasNext()) {
          State destination = iter.nextState();
          if (logger.isLoggable (Level.FINE))
            logger.fine ("Backward Lattice[inputPos="+ip
                +"][source="+s.getName()
                +"][dest="+destination.getName()+"]");
          int j = destination.getIndex();
View Full Code Here

          logger.fine (" Starting Foward transition iteration from state "
              + s.getName() + " on input " + input.get(ip).toString()
              + " and output "
              + (output==null ? "(null)" : output.get(ip).toString()));
        while (iter.hasNext()) {
          State destination = iter.nextState();
          if (logger.isLoggable (Level.FINE))
            logger.fine ("Forward Lattice[inputPos="+ip
                +"][source="+s.getName()
                +"][dest="+destination.getName()+"]");
          LatticeNode destinationNode = getLatticeNode (ip+1, destination.getIndex());
View Full Code Here

          // be correct, but since alpha is infinite anyway, it shouldn't matter.
          continue;
        State s = t.getState(i);
        TransitionIterator iter = s.transitionIterator (input, ip, output, ip);
        while (iter.hasNext()) {
          State destination = iter.nextState();
          if (logger.isLoggable (Level.FINE))
            logger.fine ("Backward Lattice[inputPos="+ip
                +"][source="+s.getName()
                +"][dest="+destination.getName()+"]");
          int j = destination.getIndex();
View Full Code Here

          logger.fine (" Starting Forward transition iteration from state "
              + s.getName() + " on input " + input.get(ip).toString()
              + " and output "
              + (output==null ? "(null)" : output.get(ip).toString()));
        while (iter.hasNext()) {
          State destination = iter.nextState();
          boolean legalTransition = true;
          // check constraints to see if node at <ip,i> can transition to destination
          if (ip+1 < constraints.length && constraints[ip+1] > 0 && ((constraints[ip+1]-1) != destination.getIndex())) {
            logger.fine ("Destination state does not match positive constraint. Assigning -infinite weight. position="+(ip+1)+", constraint="+(constraints[ip+1]-1)+", source ="+i+", destination="+destination.getIndex());
            legalTransition = false;
View Full Code Here

          // be correct, but since alpha is infinite anyway, it shouldn't matter.
          continue;
        State s = t.getState(i);
        TransitionIterator iter = s.transitionIterator (input, ip, output, ip);
        while (iter.hasNext()) {
          State destination = iter.nextState();
          if (logger.isLoggable (Level.FINE))
            logger.fine ("Backward Lattice[inputPos="+ip
                +"][source="+s.getName()
                +"][dest="+destination.getName()+"]");
          int j = destination.getIndex();
View Full Code Here

          logger.fine (" Starting Foward transition iteration from state "
              + s.getName() + " on input " + input.get(ip).toString()
              + " and output "
              + (output==null ? "(null)" : output.get(ip).toString()));
        while (iter.hasNext()) {
          State destination = iter.nextState();
          if (logger.isLoggable (Level.FINE))
            logger.fine ("Forward Lattice[inputPos="+ip+"][source="+s.getName()+"][dest="+destination.getName()+"]");
          LatticeNode destinationNode = getLatticeNode (ip+1, destination.getIndex());
          destinationNode.output = iter.getOutput();
          double transitionWeight = iter.getWeight();
View Full Code Here

          // be correct, but since alpha is infinite anyway, it shouldn't matter.
          continue;
        State s = t.getState(i);
        TransitionIterator iter = s.transitionIterator (input, ip, output, ip);
        while (iter.hasNext()) {
          State destination = iter.nextState();
          if (logger.isLoggable (Level.FINE))
            logger.fine ("Backward Lattice[inputPos="+ip+"][source="+s.getName()+"][dest="+destination.getName()+"]");
          int j = destination.getIndex();
          LatticeNode destinationNode = nodes[ip+1][j];
          if (destinationNode != null) {
View Full Code Here

          logger.fine (" Starting Foward transition iteration from state "
              + s.getName() + " on input " + input.get(ip).toString()
              + " and output "
              + (output==null ? "(null)" : output.get(ip).toString()));
        while (iter.hasNext()) {
          State destination = iter.nextState();
          if (logger.isLoggable (Level.FINE))
            logger.fine ("Forward Lattice[inputPos="+ip+"][source="+s.getName()+"][dest="+destination.getName()+"]");
          LatticeNode destinationNode = getLatticeNode (ip+1, destination.getIndex());
          destinationNode.output = iter.getOutput();
          double transitionWeight = iter.getWeight();
View Full Code Here

          // be correct, but since alpha is infinite anyway, it shouldn't matter.
          continue;
        State s = t.getState(i);
        TransitionIterator iter = s.transitionIterator (input, ip, output, ip);
        while (iter.hasNext()) {
          State destination = iter.nextState();
          if (logger.isLoggable (Level.FINE))
            logger.fine ("Backward Lattice[inputPos="+ip+"][source="+s.getName()+"][dest="+destination.getName()+"]");
          int j = destination.getIndex();
          LatticeNode destinationNode = nodes[ip+1][j];
          if (destinationNode != null) {
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.