class JiebaAnalyzer implements Analyzer {

    public static final List<String> SUPPORT_MODES = ImmutableList.of(
            "SEARCH",
            "INDEX"
    );

    private static final JiebaSegmenter JIEBA_SEGMENTER = new JiebaSegmenter();

    private final JiebaSegmenter.SegMode segMode;

    public JiebaAnalyzer(String mode) {
        if (!SUPPORT_MODES.contains(mode)) {
            throw new ConfigException(
                    "Unsupported segment mode '%s' for jieba analyzer, " +
                    "the available values are %s", mode, SUPPORT_MODES);
        }
        this.segMode = JiebaSegmenter.SegMode.valueOf(mode);
    }

    @Override
    public Set<String> segment(String text) {<FILL_FUNCTION_BODY>}
}

        Set<String> result = InsertionOrderUtil.newSet();
        for (SegToken token : JIEBA_SEGMENTER.process(text, this.segMode)) {
            result.add(token.word);
        }
        return result;
    
<no_super_class>