public final class LowerCaseTokenizer extends LetterTokenizer
Note: this does a decent job for most European languages, but does a terrible job for some Asian languages, where words are not separated by spaces.
AttributeSource.State
DEFAULT_MAX_WORD_LEN
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
Constructor and Description |
---|
LowerCaseTokenizer()
Construct a new LowerCaseTokenizer.
|
LowerCaseTokenizer(AttributeFactory factory)
Construct a new LowerCaseTokenizer using a given
AttributeFactory . |
LowerCaseTokenizer(AttributeFactory factory,
int maxTokenLen)
Construct a new LowerCaseTokenizer using a given
AttributeFactory . |
Modifier and Type | Method and Description |
---|---|
protected int |
normalize(int c)
Converts char to lower case
Character.toLowerCase(int) . |
isTokenChar
end, fromSeparatorCharPredicate, fromSeparatorCharPredicate, fromSeparatorCharPredicate, fromSeparatorCharPredicate, fromTokenCharPredicate, fromTokenCharPredicate, fromTokenCharPredicate, fromTokenCharPredicate, incrementToken, reset
close, correctOffset, setReader
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
public LowerCaseTokenizer()
public LowerCaseTokenizer(AttributeFactory factory)
AttributeFactory
.factory
- the attribute factory to use for this Tokenizer
public LowerCaseTokenizer(AttributeFactory factory, int maxTokenLen)
AttributeFactory
.factory
- the attribute factory to use for this Tokenizer
maxTokenLen
- maximum token length the tokenizer will emit.
Must be greater than 0 and less than MAX_TOKEN_LENGTH_LIMIT (1024*1024)IllegalArgumentException
- if maxTokenLen is invalid.protected int normalize(int c)
Character.toLowerCase(int)
.normalize
in class CharTokenizer
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.