Examples of transitionIterator()


Examples of cc.mallet.fst.Transducer.State.transitionIterator()

        if (nodes[ip][i] == null || nodes[ip][i].alpha == Transducer.IMPOSSIBLE_WEIGHT)
          // Note that skipping here based on alpha means that beta values won't
          // 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

Examples of cc.mallet.fst.Transducer.State.transitionIterator()

      for (int i = 0; i < t.numStates(); i++) {
        if (lattice[position][i] == null || lattice[position][i].delta == Transducer.IMPOSSIBLE_WEIGHT)
          continue;
        State s = t.getState(i);
        TransitionIterator iter =
          s.transitionIterator (input, position, providedOutput, position);
        while (iter.hasNext()) {
          State d = iter.next();
          cache.weight[i][d.getIndex()] = iter.getWeight();
        }
      }       
View Full Code Here

Examples of cc.mallet.fst.Transducer.State.transitionIterator()

    for (int ip = 0; ip < latticeLength-1; ip++)
      for (int i = 0; i < numStates; i++) {
        if (lattice[ip][i] == null || lattice[ip][i].delta == Transducer.IMPOSSIBLE_WEIGHT)
          continue;
        State s = t.getState(i);
        TransitionIterator iter = s.transitionIterator (input, ip, providedOutput, ip);
        if (logger.isLoggable (Level.FINE))
          logger.fine (" Starting Viterbi transition iteration from state "
              + s.getName() + " on input " + input.get(ip));
        while (iter.hasNext()) {
          State destination = iter.next();
View Full Code Here

Examples of cc.mallet.fst.Transducer.State.transitionIterator()

        if (nodes[ip][i] == null || nodes[ip][i].alpha == Transducer.IMPOSSIBLE_WEIGHT)
          // xxx if we end up doing this a lot,
          // we could save a list of the non-null ones
          continue;
        State s = t.getState(i);
        TransitionIterator iter = s.transitionIterator (input, ip, output, ip);
        if (logger.isLoggable (Level.FINE))
          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()));
View Full Code Here

Examples of cc.mallet.fst.Transducer.State.transitionIterator()

        if (nodes[ip][i] == null || nodes[ip][i].alpha == Transducer.IMPOSSIBLE_WEIGHT)
          // Note that skipping here based on alpha means that beta values won't
          // 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

Examples of cc.mallet.fst.Transducer.State.transitionIterator()

        //  continue;


        State s = t.getState(i);

        TransitionIterator iter = s.transitionIterator (input, ip, output, ip);
        if (logger.isLoggable (Level.FINE))
          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()));
View Full Code Here

Examples of cc.mallet.fst.Transducer.State.transitionIterator()

        if (nodes[ip][i] == null || nodes[ip][i].alpha == Transducer.IMPOSSIBLE_WEIGHT)
          // Note that skipping here based on alpha means that beta values won't
          // 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()
View Full Code Here

Examples of cc.mallet.fst.Transducer.State.transitionIterator()

          logger.fine ("-INFINITE weight or NULL...skipping");
          continue;
        }
        State s = t.getState(i);

        TransitionIterator iter = s.transitionIterator (input, ip, output, ip);
        if (logger.isLoggable (Level.FINE))
          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()));
View Full Code Here

Examples of cc.mallet.fst.Transducer.State.transitionIterator()

        if (nodes[ip][i] == null || nodes[ip][i].alpha == Transducer.IMPOSSIBLE_WEIGHT)
          // Note that skipping here based on alpha means that beta values won't
          // 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()
View Full Code Here

Examples of cc.mallet.fst.Transducer.State.transitionIterator()

    for (int ip = 0; ip < latticeLength - 1; ip++) {
      for (int i = 0; i < numStates; i++) {
        if (isInvalidNode(ip, i))
          continue;
        State s = t.getState(i);
        TransitionIterator iter = s.transitionIterator(input, ip,
            output, ip);
        while (iter.hasNext()) {
          State destination = iter.next();
          LatticeNode destinationNode = getLatticeNode(ip + 1,
              destination.getIndex());
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.