FileDocCategorySizeDatePackage
GreekLowerCaseFilter.javaAPI DocApache Lucene 1.91744Mon Feb 20 09:18:48 GMT 2006org.apache.lucene.analysis.el

GreekLowerCaseFilter

public final class GreekLowerCaseFilter extends TokenFilter
Normalizes token text to lower case, analyzing given ("greek") charset.
author
Panagiotis Astithas, past@ebs.gr

Fields Summary
char[]
charset
Constructors Summary
public GreekLowerCaseFilter(TokenStream in, char[] charset)

        super(in);
        this.charset = charset;
    
Methods Summary
public final org.apache.lucene.analysis.Tokennext()

        Token t = input.next();

        if (t == null)
            return null;

        String txt = t.termText();

        char[] chArray = txt.toCharArray();
        for (int i = 0; i < chArray.length; i++)
        {
            chArray[i] = GreekCharsets.toLowerCase(chArray[i], charset);
        }

        String newTxt = new String(chArray);
        // create new token
        Token newToken = new Token(newTxt, t.startOffset(), t.endOffset());

        return newToken;