|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.process.CoreLabelTokenFactory
public class CoreLabelTokenFactory
Constructs CoreLabel
s from Strings optionally with
beginning and ending (character after the end) offset positions in
an original text. The makeToken method will put the token in the
WordAnnotation AND CurrentAnnotation, and optionally records
begin and position after offsets in BeginPositionAnnotation and
EndPositionAnnotation.
Constructor Summary | |
---|---|
CoreLabelTokenFactory()
Constructor for a new token factory which will add in the word, the "current" annotation, and the begin/end position annotations. |
|
CoreLabelTokenFactory(boolean addIndices)
Constructor that allows one to choose if index annotation indicating begin/end position will be included in the label |
Method Summary | |
---|---|
CoreLabel |
makeToken(java.lang.String str,
int begin,
int length)
Constructs a CoreLabel as a String with a corresponding BEGIN and END position. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CoreLabelTokenFactory()
public CoreLabelTokenFactory(boolean addIndices)
addIndices
- if true, begin and end position annotations will be included (this is the default)Method Detail |
---|
public CoreLabel makeToken(java.lang.String str, int begin, int length)
makeToken
in interface LexedTokenFactory<CoreLabel>
str
- The String extracted by the lexer.begin
- The offset in the document of the first character
in this string.length
- The number of characters the string takes up in
the document.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |