public String sgm(int idx)
    {
        if(idx<0 || idx>=super.size()){
            return null;
        }
        String s = new String(_tokens[super.get(idx).beg()]);
        for(int i = super.get(idx).beg() + 1; i < super.get(idx).end(); i++){
            s += " " + _tokens[i];
        }
        return s;
    }
Contains the segmentation() method.

@author  Peter Boros
fsa/src/main/java/com/yahoo/fsa/segmenter/Segments.java