public static enum TokenizerUtilities.SentenceViewGenerators extends Enum<TokenizerUtilities.SentenceViewGenerators> implements ViewGenerator
SENTENCE
.
Most of the time, you will not have to use this view generator.
Each element of SentenceViewGenerators
implements the
getViewGenerator()
function, which creates a view from a
TextAnnotation
.
Elements of this enumeration, in addition to generating the view, also
tokenize the sentence. Since a TextAnnotation
can be
tokenized only once, only elements of this enumeration should be used to
tokenize sentences unless you want a custom tokenizer.
Enum Constant and Description |
---|
LBJSentenceViewGenerator
This sentence view generator tokenizes text with the
Tokenizer.LBJTokenizer and uses the LBJ sentence splitter to
split sentences. |
WhiteSpaceSentenceViewGenerator
This sentence view generator uses the LBJ sentence splitter, but
tokenizes on white space, using the
Tokenizer.WhiteSpaceTokenizer |
Modifier and Type | Method and Description |
---|---|
String |
getViewName()
Returns the name of the sentence view (
ViewNames#SENTENCE .) |
static TokenizerUtilities.SentenceViewGenerators |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TokenizerUtilities.SentenceViewGenerators[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getView
public static final TokenizerUtilities.SentenceViewGenerators LBJSentenceViewGenerator
Tokenizer.LBJTokenizer
and uses the LBJ sentence splitter to
split sentences.public static final TokenizerUtilities.SentenceViewGenerators WhiteSpaceSentenceViewGenerator
Tokenizer.WhiteSpaceTokenizer
public static TokenizerUtilities.SentenceViewGenerators[] values()
for (TokenizerUtilities.SentenceViewGenerators c : TokenizerUtilities.SentenceViewGenerators.values()) System.out.println(c);
public static TokenizerUtilities.SentenceViewGenerators valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getViewName()
ViewNames#SENTENCE
.)getViewName
in interface ViewGenerator
Copyright © 2015. All rights reserved.