|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TextLabels
Access assertions about 'types' and 'properties' of contiguous Spans of these Seq's. TextLabels's are immutable.
Method Summary | |
---|---|
void |
annotateWith(java.lang.String annotationType,
java.lang.String fileToLoad)
Annotate labels with annotator named fileToLoad |
java.util.Iterator<Span> |
closureIterator(java.lang.String type)
Returns the spans s for in the given type is 'closed'. |
java.util.Iterator<Span> |
closureIterator(java.lang.String type,
java.lang.String documentId)
Returns the spans S inside the given document in which the given type is 'closed'. |
Details |
getDetails(Span span,
java.lang.String type)
Retrieve additional information associated with an assertion 'span S has type T'. |
java.lang.String |
getProperty(Span span,
java.lang.String prop)
Get the value of the named property which has been associated with this Span. |
java.lang.String |
getProperty(Token token,
java.lang.String prop)
Get the property value associated with this TextToken. |
java.util.Set<java.lang.String> |
getSpanProperties()
Get a set of all previously-defined properties. |
java.util.Iterator<Span> |
getSpansWithProperty(java.lang.String prop)
Find all spans that have a non-null value for this property. |
java.util.Iterator<Span> |
getSpansWithProperty(java.lang.String prop,
java.lang.String documentId)
Find all spans in the named document that have a non-null value for this property. |
TextBase |
getTextBase()
Returns the TextBase which is annotated by this TextLabels, or null if that isn't set yet. |
java.util.Set<java.lang.String> |
getTokenProperties()
Get a set of all properties. |
java.util.Set<java.lang.String> |
getTypes()
Return a set of all type names. |
java.util.Set<Span> |
getTypeSet(java.lang.String type,
java.lang.String documentId)
Return the Set of all Spans with a given type in a given document |
boolean |
hasDictionary(java.lang.String dictionary)
|
boolean |
hasType(Span span,
java.lang.String type)
Query if a span has a given type. |
boolean |
inDict(Token token,
java.lang.String dict)
Returns true if the value of the Token is in the named dictionary. |
java.util.Iterator<Span> |
instanceIterator(java.lang.String type)
Get all instances of a given type. |
java.util.Iterator<Span> |
instanceIterator(java.lang.String type,
java.lang.String documentId)
Get all instances of a given type. |
boolean |
isAnnotatedBy(java.lang.String s)
See if the TextLabels contains a particular type of annotation |
boolean |
isType(java.lang.String type)
True if the given string names a type. |
void |
require(java.lang.String annotationType,
java.lang.String fileToLoad)
Ensure that this TextLabels contains a particular type of annotation. |
void |
require(java.lang.String annotationType,
java.lang.String fileToLoad,
AnnotatorLoader loader)
Ensure that this TextLabels contains a particular type of annotation. |
java.lang.String |
showTokenProp(TextBase base,
java.lang.String prop)
For debugging. |
Method Detail |
---|
boolean isAnnotatedBy(java.lang.String s)
void require(java.lang.String annotationType, java.lang.String fileToLoad)
void annotateWith(java.lang.String annotationType, java.lang.String fileToLoad)
void require(java.lang.String annotationType, java.lang.String fileToLoad, AnnotatorLoader loader)
TextBase getTextBase()
boolean hasDictionary(java.lang.String dictionary)
dictionary
- String name of the dictionary
boolean inDict(Token token, java.lang.String dict)
java.lang.String getProperty(Token token, java.lang.String prop)
java.util.Set<java.lang.String> getTokenProperties()
java.lang.String getProperty(Span span, java.lang.String prop)
java.util.Iterator<Span> getSpansWithProperty(java.lang.String prop)
java.util.Iterator<Span> getSpansWithProperty(java.lang.String prop, java.lang.String documentId)
java.util.Set<java.lang.String> getSpanProperties()
boolean hasType(Span span, java.lang.String type)
java.util.Iterator<Span> instanceIterator(java.lang.String type)
java.util.Iterator<Span> instanceIterator(java.lang.String type, java.lang.String documentId)
java.util.Set<java.lang.String> getTypes()
java.util.Set<Span> getTypeSet(java.lang.String type, java.lang.String documentId)
boolean isType(java.lang.String type)
java.util.Iterator<Span> closureIterator(java.lang.String type)
java.util.Iterator<Span> closureIterator(java.lang.String type, java.lang.String documentId)
java.lang.String showTokenProp(TextBase base, java.lang.String prop)
Details getDetails(Span span, java.lang.String type)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |