com.twitter.common.text.token.attribute
Interface PartOfSpeechAttribute

All Superinterfaces:
org.apache.lucene.util.Attribute
All Known Implementing Classes:
PartOfSpeechAttributeImpl

public interface PartOfSpeechAttribute
extends org.apache.lucene.util.Attribute

Attribute representing the part of speech of a token. When a tokenizer segments text into a series of token, it may provide the part of speech (e.g., Noun, Verb) of each token. This interface can be used to expose POS information.


Field Summary
static int UNKNOWN
           
 
Method Summary
 int getPOS()
          Return PartOfSpeech (POS) of this token.
 void setPOS(int pos)
          Set PartOfSpeech (POS) of this token.
 

Field Detail

UNKNOWN

static final int UNKNOWN
See Also:
Constant Field Values
Method Detail

setPOS

void setPOS(int pos)
Set PartOfSpeech (POS) of this token.

Parameters:
pos - POS of this token.

getPOS

int getPOS()
Return PartOfSpeech (POS) of this token.

Returns:
POS of this token.