FileDocCategorySizeDatePackage
ISOLatin1AccentFilter.javaAPI DocApache Lucene 2.1.04370Wed Feb 14 10:46:38 GMT 2007org.apache.lucene.analysis

ISOLatin1AccentFilter

public class ISOLatin1AccentFilter extends TokenFilter
A filter that replaces accented characters in the ISO Latin 1 character set (ISO-8859-1) by their unaccented equivalent. The case will not be altered.

For instance, 'à' will be replaced by 'a'.

Fields Summary
Constructors Summary
public ISOLatin1AccentFilter(TokenStream input)

		super(input);
	
Methods Summary
public final org.apache.lucene.analysis.Tokennext()

		final Token t = input.next();
    if (t != null)
      t.setTermText(removeAccents(t.termText()));
    return t;
	
public static final java.lang.StringremoveAccents(java.lang.String input)
To replace accented characters in a String by unaccented equivalents.

		final StringBuffer output = new StringBuffer();
		for (int i = 0; i < input.length(); i++) {
			switch (input.charAt(i)) {
				case '\u00C0" : // Ã