When a custom state machine is constructed while training a CRF, it is possible that several states map to the same label. In this case, there will be a discrepancy between the number of states used in the lattice and the number of output labels (targets). Use this mapping if such an FST is used in training a CRF model.
If the number of states in the lattice is expected to be equal to the number of output labels, then set isOneToOneMap to true in the constructor.
This map associates the state with the appropriate label (indexing is zero onwards).
Note: Add the states to the map in the same order in which they are added to the CRF while constructing the FST. This is necessary to keep a correct mapping of the state indices in this map to the state indices used within the CRF. @author Gaurav Chandalia
|
|