|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Span
A series of of adjacent Token's from the same document.
Method Summary | |
---|---|
java.lang.String |
asString()
Find the string contained in a Span. |
Span |
charIndexProperSubSpan(int charLo,
int charHi)
Create a the largest Span containing TextToken's which are contained in the character boundaries charLo, charHi of this span. |
Span |
charIndexSubSpan(int charLo,
int charHi)
Create a new Span containing TextToken's which are as close as possible to the character boundaries charLo, charHi of thisspan. |
boolean |
contains(Span other)
Check containment |
Span |
documentSpan()
If this was a subspan, create a copy of its parent. |
int |
documentSpanStartIndex()
Find the index of this span within its document. |
int |
getCharOffset()
|
java.lang.String |
getDocumentContents()
Return a string containing the entire content of the document that this span lives in. |
java.lang.String |
getDocumentGroupId()
Return the id of the group of documents this span belongs to |
java.lang.String |
getDocumentId()
Return the name of the document for these TextToken's. |
int |
getHiChar()
Returns the Char index of where the span ends in the document |
Span |
getLeftBoundary()
A length-zero span for the left boundary |
int |
getLoChar()
Returns the Char index of where the span starts in the document |
int |
getLoTextToken()
Returns the low text token |
Span |
getRightBoundary()
A length-zero span for the left boundary |
TextToken |
getTextToken(int i)
Access the i-th Token as a TextToken |
Token |
getToken(int i)
Access the i-th Token. |
boolean |
overlaps(Span other)
Check overlap |
void |
setCharOffset(int charOffset)
|
int |
size()
Number of TextToken's in the span. |
Span |
subSpan(int lo,
int len)
Create a new Span containing TextToken's lo, lo+1, ..., lo+len. |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Method Detail |
---|
int size()
Token getToken(int i)
TextToken getTextToken(int i)
Span subSpan(int lo, int len)
Span charIndexSubSpan(int charLo, int charHi)
Span charIndexProperSubSpan(int charLo, int charHi)
java.lang.String getDocumentId()
Span documentSpan()
java.lang.String getDocumentGroupId()
java.lang.String getDocumentContents()
Note: this differs subtly from documentSpan().asString(), which returns the string between the beginning of the first token and the end of the last token in the containing document.
int documentSpanStartIndex()
span.documentSpan().subSpan( span.documentSpanStartIndex(), span.length())
java.lang.String asString()
Span getLeftBoundary()
Span getRightBoundary()
boolean contains(Span other)
boolean overlaps(Span other)
int getLoTextToken()
int getLoChar()
int getHiChar()
void setCharOffset(int charOffset)
int getCharOffset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |