org.apache.lucene.analysis.standard

Class StandardTokenizer

public class StandardTokenizer extends Tokenizer implements StandardTokenizerConstants

A grammar-based tokenizer constructed with JavaCC.

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
Tokenjj_nt
Tokentoken
StandardTokenizerTokenManagertoken_source
Constructor Summary
StandardTokenizer(Reader reader)
Constructs a tokenizer for this Reader.
StandardTokenizer(CharStream stream)
StandardTokenizer(StandardTokenizerTokenManager tm)
Method Summary
voiddisable_tracing()
voidenable_tracing()
ParseExceptiongenerateParseException()
TokengetNextToken()
TokengetToken(int index)
Tokennext()
Returns the next token in the stream, or null at EOS.
voidReInit(CharStream stream)
voidReInit(StandardTokenizerTokenManager tm)

Field Detail

jj_nt

public Token jj_nt

token

public Token token

token_source

public StandardTokenizerTokenManager token_source

Constructor Detail

StandardTokenizer

public StandardTokenizer(Reader reader)
Constructs a tokenizer for this Reader.

StandardTokenizer

public StandardTokenizer(CharStream stream)

StandardTokenizer

public StandardTokenizer(StandardTokenizerTokenManager tm)

Method Detail

disable_tracing

public final void disable_tracing()

enable_tracing

public final void enable_tracing()

generateParseException

public ParseException generateParseException()

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

next

public final Token next()
Returns the next token in the stream, or null at EOS.

The returned token's type is set to an element of {@link StandardTokenizerConstants#tokenImage}.

ReInit

public void ReInit(CharStream stream)

ReInit

public void ReInit(StandardTokenizerTokenManager tm)
Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.