@@ -0,0 +1,1201 @@
+package org.codelibs.analysis.en;%0A%0Aimport java.io.IOException;%0A%0Aimport org.apache.lucene.analysis.TokenFilter;%0Aimport org.apache.lucene.analysis.TokenStream;%0Aimport org.apache.lucene.analysis.tokenattributes.CharTermAttribute;%0Aimport org.apache.lucene.analysis.tokenattributes.KeywordAttribute;%0A%0Apublic class FlexiblePorterStemFilter extends TokenFilter %7B%0A    private final FlexiblePorterStemmer stemmer;%0A    private final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class);%0A    private final KeywordAttribute keywordAttr = addAttribute(KeywordAttribute.class);%0A%0A    public FlexiblePorterStemFilter(TokenStream in, boolean step1, boolean step2, boolean step3, boolean step4, boolean step5,%0A            boolean step6) %7B%0A        super(in);%0A        stemmer = new FlexiblePorterStemmer(step1, step2, step3, step4, step5, step6);%0A    %7D%0A%0A    @Override%0A    public final boolean incrementToken() throws IOException %7B%0A        if (!input.incrementToken())%0A            return false;%0A%0A        if ((!keywordAttr.isKeyword()) && stemmer.stem(termAtt.buffer(), 0, termAtt.length()))%0A            termAtt.copyBuffer(stemmer.getResultBuffer(), 0, stemmer.getResultLength());%0A        return true;%0A    %7D%0A%7D%0A

add FlexiblePorterStemFilter