Package cc.mallet.fst

Class SumLatticeConstrained

    • Constructor Detail

      • SumLatticeConstrained

        public SumLatticeConstrained​(Transducer trans,
                                     Sequence input,
                                     Sequence output,
                                     Transducer.Incrementor incrementor,
                                     LabelAlphabet outputAlphabet,
                                     int[] constraints)
        Create a lattice that constrains its transitions such that the pairs in "constraints" are adhered to. constraints is an array where each entry is the index of the required label at that position. An entry of 0 means there are no constraints on that . Positive values mean the path must pass through that state. Negative values mean the path must _not_ pass through that state. NOTE - constraints.length must be equal to output.size() + 1. A lattice has one extra position for the initial state. Generally, this should be unconstrained, since it does not produce an observation.