fr.gouv.culture.sdx.search.lucene.analysis.filter
Class ISOLatin1AccentFilter

java.lang.Object
  extended byorg.apache.lucene.analysis.TokenStream
      extended byorg.apache.lucene.analysis.TokenFilter
          extended byfr.gouv.culture.sdx.search.lucene.analysis.filter.ISOLatin1AccentFilter
All Implemented Interfaces:
org.apache.avalon.framework.logger.LogEnabled

public class ISOLatin1AccentFilter
extends org.apache.lucene.analysis.TokenFilter
implements org.apache.avalon.framework.logger.LogEnabled

A filter that transforms accented characters in the ISO Latin 1 character set to their unaccented counterparts.

For example, the letter '�' will be converted to 'e'.

This filter does'nt change the character case. If one wants to lowercase letters, it should also use another filter.


Field Summary
 
Fields inherited from class org.apache.lucene.analysis.TokenFilter
input
 
Constructor Summary
ISOLatin1AccentFilter()
          Builds a new filter
 
Method Summary
 void enableLogging(org.apache.avalon.framework.logger.Logger logger)
          Set's the logger
 org.apache.lucene.analysis.Token next()
          Transform ISOLatin1 accented characters to their unaccented counterparts.
 void setUp(org.apache.lucene.analysis.TokenStream in)
          Builds a filter from a token stream.
 
Methods inherited from class org.apache.lucene.analysis.TokenFilter
close
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ISOLatin1AccentFilter

public ISOLatin1AccentFilter()
Builds a new filter

Method Detail

setUp

public void setUp(org.apache.lucene.analysis.TokenStream in)
Builds a filter from a token stream.

Parameters:
in - The input token stream.

next

public final org.apache.lucene.analysis.Token next()
                                            throws java.io.IOException
Transform ISOLatin1 accented characters to their unaccented counterparts.

Throws:
java.io.IOException

enableLogging

public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
Set's the logger

Specified by:
enableLogging in interface org.apache.avalon.framework.logger.LogEnabled
Parameters:
logger - The logger to use.


Copyright © 2000-2004 Ministere de la culture et de la communication / AJLSM. All Rights Reserved.