public interface TaggingAttribute extends Attribute
Tagger
to decide if a token can start a
new tag
.
By default this Attribute will return true
, but it might be
reset by some TokenFilter
added to the TokenStream
used
to analyze the parsed text. Typically this will be done based on NLP
processing results (e.g. to only lookup Named Entities).
NOTE: that all Tokens are used to advance existing tags
.
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_TAGGABLE
By default this Attribute will be initialised with
true . |
Modifier and Type | Method and Description |
---|---|
boolean |
isTaggable()
Getter for the taggable state of the current Token
|
void |
setTaggable(boolean lookup)
Setter for the taggable state.
|
static final boolean DEFAULT_TAGGABLE
true
.
This ensures that all tokens are taggable by default (especially if
the TaggingAttribute
is not set by any component in the configured
TokenStream
boolean isTaggable()
void setTaggable(boolean lookup)
TokenStream.incrementToken()
.lookup
- the stateCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.