EntityAnnotation

Stay organized with collections Save and categorize content based on your preferences.
public final class EntityAnnotation extends Object

An annotation of a piece of text.

The identified annotation refers to a substring of the text from the start index returned by getStart() to the end index returned by getEnd(), exclusively, with getEntities() returning a list of possible entities it could refer to.

Public Method Summary

boolean
equals(Object o)
Indicates whether some other object is "equal to" this one.
String
getAnnotatedText()
The text segment within the original text that this annotation refers to (from the start index returned by getStart() to the end index returned by getEnd(), exclusively).
int
getEnd()
The end index (in Java chars) of the annotation in the original text, exclusive.
List<Entity>
getEntities()
A list of possible entities that this annotation could refer to.
int
getStart()
The start index (in Java chars) of the annotation in the original text, inclusive.
int
hashCode()
Returns a hash code value for the object.
String
toString()
Returns a string represents EntityAnnotation.

Inherited Method Summary

Public Methods

public boolean equals (Object o)

Indicates whether some other object is "equal to" this one.

public String getAnnotatedText ()

The text segment within the original text that this annotation refers to (from the start index returned by getStart() to the end index returned by getEnd(), exclusively).

public int getEnd ()

The end index (in Java chars) of the annotation in the original text, exclusive.

public List<Entity> getEntities ()

A list of possible entities that this annotation could refer to. It has at least one entity and order is non-deterministic.

public int getStart ()

The start index (in Java chars) of the annotation in the original text, inclusive.

public int hashCode ()

Returns a hash code value for the object.

public String toString ()

Returns a string represents EntityAnnotation.