Save This Page
Home » lucene-2.3.2-src » org.apache » lucene » analysis » standard » [javadoc | source]
org.apache.lucene.analysis.standard
public class: StandardTokenizer [javadoc | source]
java.lang.Object
   org.apache.lucene.analysis.TokenStream
      org.apache.lucene.analysis.Tokenizer
         org.apache.lucene.analysis.standard.StandardTokenizer
A grammar-based tokenizer constructed with JFlex

This should be a good tokenizer for most European-language documents:

Many applications have specific tokenizer needs. If this tokenizer does not suit your application, please consider copying this source code directory to your project and maintaining your own grammar-based tokenizer.
Field Summary
public static final  int ALPHANUM     
public static final  int APOSTROPHE     
public static final  int ACRONYM     
public static final  int COMPANY     
public static final  int EMAIL     
public static final  int HOST     
public static final  int NUM     
public static final  int CJ     
public static final  int ACRONYM_DEP   
     
    public static final  String[] TOKEN_TYPES    String token types that correspond to token type int constants 
    public static final  String[] tokenImage   
       
      Fields inherited from org.apache.lucene.analysis.Tokenizer:
      input
      Constructor:
       public StandardTokenizer(Reader input) 
        Creates a new instance of the StandardTokenizer . Attaches the input to a newly created JFlex scanner.
       public StandardTokenizer(Reader input,
          boolean replaceInvalidAcronym) 
        Parameters:
        input - The input reader
        replaceInvalidAcronym - Set to true to replace mischaracterized acronyms with HOST. See http://issues.apache.org/jira/browse/LUCENE-1068
      Method from org.apache.lucene.analysis.standard.StandardTokenizer Summary:
      getMaxTokenLength,   isReplaceInvalidAcronym,   next,   reset,   reset,   setInput,   setMaxTokenLength,   setReplaceInvalidAcronym
      Methods from org.apache.lucene.analysis.Tokenizer:
      close,   reset
      Methods from org.apache.lucene.analysis.TokenStream:
      close,   next,   next,   reset
      Methods from java.lang.Object:
      equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
      Method from org.apache.lucene.analysis.standard.StandardTokenizer Detail:
       public int getMaxTokenLength() 
       public boolean isReplaceInvalidAcronym() 
      Deprecated! Remove - in 3.X and make true the only valid value

        Prior to https://issues.apache.org/jira/browse/LUCENE-1068, StandardTokenizer mischaracterized as acronyms tokens like www.abc.com when they should have been labeled as hosts instead.
       public Token next(Token result) throws IOException 
       public  void reset() throws IOException 
       public  void reset(Reader reader) throws IOException 
        void setInput(Reader reader) 
       public  void setMaxTokenLength(int length) 
        Set the max allowed token length. Any token longer than this is skipped.
       public  void setReplaceInvalidAcronym(boolean replaceInvalidAcronym) 
      Deprecated! Remove - in 3.X and make true the only valid value See https://issues.apache.org/jira/browse/LUCENE-1068