edu.stanford.nlp.ling
Interface HasOffset

All Superinterfaces:
Serializable
All Known Implementing Classes:
CategoryWordTag, CoreLabel, CyclicCoreLabel, IndexedWord, LabeledWord, NegraLabel, StringLabel, TaggedWord, Word

public interface HasOffset
extends Serializable

Something that implements the HasOffset interface bears a offset reference to the original text

Author:
Richard Eckart (Technische Universitat Darmstadt)

Method Summary
 int beginPosition()
          Return the beginning character offset of the label (or -1 if none).
 int endPosition()
          Return the ending character offset of the label (or -1 if none).
 void setBeginPosition(int beginPos)
          Set the beginning character offset for the label.
 void setEndPosition(int endPos)
          Set the ending character offset of the label (or -1 if none).
 

Method Detail

beginPosition

int beginPosition()
Return the beginning character offset of the label (or -1 if none).

Returns:
the beginning position for the label

setBeginPosition

void setBeginPosition(int beginPos)
Set the beginning character offset for the label. Setting this key to "-1" can be used to indicate no valid value.

Parameters:
beginPos - The beginning position

endPosition

int endPosition()
Return the ending character offset of the label (or -1 if none).

Returns:
the end position for the label

setEndPosition

void setEndPosition(int endPos)
Set the ending character offset of the label (or -1 if none).

Parameters:
endPos - The end character offset for the label


Stanford NLP Group