public class Entity extends GenericModel
| Constructor and Description |
|---|
Entity(java.lang.String entity,
java.lang.String value,
java.lang.Integer[] location)
Instantiates a new entity.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getEntity()
Returns the name of the entity.
|
java.lang.Integer[] |
getLocation()
Returns the location of the entity within the input string, the array will have two values: a start index and end
index.
|
java.lang.String |
getValue()
Returns the detected value of the entity.
|
void |
setEntity(java.lang.String entity)
Sets the entity detected by the system for the given input.
|
void |
setLocation(java.lang.Integer... location)
Sets the location of the entity detected by the system (i.e.
|
void |
setValue(java.lang.String value)
Sets the value of the entity as detected by the system.
|
equals, hashCode, toStringpublic Entity(java.lang.String entity,
java.lang.String value,
java.lang.Integer[] location)
entity - the entityvalue - the valuelocation - the locationpublic java.lang.String getEntity()
getValue() of the input would be
"pepperoni".public java.lang.Integer[] getLocation()
public java.lang.String getValue()
public void setEntity(java.lang.String entity)
entity - the new entitypublic void setLocation(java.lang.Integer... location)
location - an array of Integers representing a start and end indexpublic void setValue(java.lang.String value)
value - the new value