Package com.complexible.stardog.docs.nlp
Class Span
- java.lang.Object
 - 
- com.complexible.stardog.docs.nlp.Annotated
 - 
- com.complexible.stardog.docs.nlp.Span
 
 
 
- 
public class Span extends Annotated
- Since:
 - 5.2
 - Version:
 - 5.2
 - Author:
 - Pedro Oliveira
 
 
- 
- 
Field Summary
- 
Fields inherited from class com.complexible.stardog.docs.nlp.Annotated
mAnnotations 
 - 
 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Tokenfirst()First tokeninthashCode()Tokenlast()Last tokenintsize()Number of tokensSpansubspan(int theBegin, int theEnd)Returns aSpanthat is a subspan of this onejava.lang.Stringtext()Tokens in the span as a space separated stringjava.lang.Stringtext(java.lang.String theDelimiter)Tokens in the span as a delimiter separated stringTokentoken(int theIndex)Token at indexToken[]tokens()The tokens as an arrayjava.lang.StringtoString() 
 - 
 
- 
- 
Constructor Detail
- 
Span
public Span(Document theDocument, int theSentence, int theBegin, int theEnd)
 
 - 
 
- 
Method Detail
- 
tokens
public Token[] tokens()
The tokens as an array 
- 
token
public Token token(int theIndex)
Token at index 
- 
first
public Token first()
First token 
- 
last
public Token last()
Last token 
- 
size
public int size()
Number of tokens 
- 
text
public java.lang.String text()
Tokens in the span as a space separated string 
- 
text
public java.lang.String text(java.lang.String theDelimiter)
Tokens in the span as a delimiter separated string 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classjava.lang.Object
 
- 
equals
public boolean equals(java.lang.Object obj)
- Overrides:
 equalsin classjava.lang.Object
 
 - 
 
 -