Code example for LinkedHashSet

Methods: add

      // It is possible that a label is never seen in the training data. In that 
      // case the true number of labels will not be equal to the size of the 
      // label (target) alphabet until the state with the unseen label is added 
      // to the label alphabet while constructing the FST, add such a label 
      // here. 
      LinkedHashSet<Integer> stateIndices = new LinkedHashSet<Integer>();
      labelToState.put(labelIndex, stateIndices); 
    stateToLabel.put(stateIndex, labelIndex);
    return stateIndex;