Interface KeywordAttribute
-
- All Superinterfaces:
Attribute
- All Known Implementing Classes:
KeywordAttributeImpl
public interface KeywordAttribute extends Attribute
This attribute can be used to mark a token as a keyword. Keyword awareTokenStreams can decide to modify a token based on the return value ofisKeyword()if the token is modified. Stemming filters for instance can use this attribute to conditionally skip a term ifisKeyword()returnstrue.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisKeyword()Returnstrueiff the current token is a keyword, otherwisefalse/voidsetKeyword(boolean isKeyword)Marks the current token as keyword iff set totrue.
-
-
-
Method Detail
-
isKeyword
boolean isKeyword()
Returnstrueiff the current token is a keyword, otherwisefalse/- Returns:
trueiff the current token is a keyword, otherwisefalse/
-
setKeyword
void setKeyword(boolean isKeyword)
Marks the current token as keyword iff set totrue.- Parameters:
isKeyword-trueiff the current token is a keyword, otherwisefalse.
-
-