private int getSegmentIndex(String segment) {
        FSA.State s = fsa.getState();
        s.delta(segment);
        if (s.isFinal()) {
            return s.hash();
        }
        return -1;
    }
Returns the index (hash value) of the input segment in the FSA.
@param segment   The segment string to find index for.
@return Index for this segment in the FSA.
fsa/src/main/java/com/yahoo/fsa/topicpredictor/TopicPredictor.java