|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object se.lth.cs.nlp.nlputils.annotations.Span
public class Span
A span, that is a contiguous piece of text.
Field Summary | |
---|---|
int |
end
The end of the span, exclusive. |
String |
id
|
String |
label
|
static Comparator<Span> |
NESTING_ORDER
A comparator that can be used to sort span according to nesting order. |
HashMap<String,Object> |
properties
Properties. |
int |
start
The start of the span, inclusive. |
int |
tokenEnd
The end of the span as counted in tokens, exclusive. |
int |
tokenStart
The start of the span as counted in tokens, inclusive. |
Constructor Summary | |
---|---|
Span()
|
Method Summary | |
---|---|
boolean |
matches(Span other)
Returns true if this span has the same start and end and the same label as the other span. |
boolean |
matchesPartially(Span other)
Returns true if this span overlaps and has the same label as the other span. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public String label
public String id
public int start
public int end
public int tokenStart
public int tokenEnd
public HashMap<String,Object> properties
public static final Comparator<Span> NESTING_ORDER
Constructor Detail |
---|
public Span()
Method Detail |
---|
public boolean matches(Span other)
other
- the span to compare this span to.
public boolean matchesPartially(Span other)
other
- the span to compare this span to.
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |