public final class UAX29URLEmailTokenizer extends Tokenizer
AttributeSource.State
Modifier and Type | Field and Description |
---|---|
static int |
ALPHANUM
Alpha/numeric token type
|
static int |
EMAIL
Email token type
|
static int |
EMOJI
Emoji token type.
|
static int |
HANGUL
Hangul token type
|
static int |
HIRAGANA
Hiragana token type
|
static int |
IDEOGRAPHIC
Ideographic token type
|
static int |
KATAKANA
Katakana token type
|
static int |
MAX_TOKEN_LENGTH_LIMIT
Absolute maximum sized token
|
static int |
NUM
Numeric token type
|
static int |
SOUTHEAST_ASIAN
Southeast Asian token type
|
static String[] |
TOKEN_TYPES
String token types that correspond to token type int constants
|
static int |
URL
URL token type
|
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
Constructor and Description |
---|
UAX29URLEmailTokenizer()
Creates a new instance of the UAX29URLEmailTokenizer.
|
UAX29URLEmailTokenizer(AttributeFactory factory)
Creates a new UAX29URLEmailTokenizer with a given
AttributeFactory |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
end() |
int |
getMaxTokenLength() |
boolean |
incrementToken() |
void |
reset() |
void |
setMaxTokenLength(int length)
Set the max allowed token length.
|
correctOffset, setReader
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
public static final int ALPHANUM
public static final int NUM
public static final int SOUTHEAST_ASIAN
public static final int IDEOGRAPHIC
public static final int HIRAGANA
public static final int KATAKANA
public static final int HANGUL
public static final int URL
public static final int EMAIL
public static final int EMOJI
public static final String[] TOKEN_TYPES
public static final int MAX_TOKEN_LENGTH_LIMIT
public UAX29URLEmailTokenizer()
input
to the newly created JFlex scanner.public UAX29URLEmailTokenizer(AttributeFactory factory)
AttributeFactory
public void setMaxTokenLength(int length)
LengthFilter
to remove long tokens. The default is
UAX29URLEmailAnalyzer.DEFAULT_MAX_TOKEN_LENGTH
.IllegalArgumentException
- if the given length is outside of the
range [1, 1048576].public int getMaxTokenLength()
setMaxTokenLength(int)
public final boolean incrementToken() throws IOException
incrementToken
in class TokenStream
IOException
public final void end() throws IOException
end
in class TokenStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Tokenizer
IOException
public void reset() throws IOException
reset
in class Tokenizer
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.