public class Entity
extends java.lang.Object
implements java.io.Serializable
Provides information about an entity.
Constructor and Description |
---|
Entity() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.Integer |
getBeginOffset()
A character offset in the input text that shows where the entity begins
(the first character is at position 0).
|
java.lang.Integer |
getEndOffset()
A character offset in the input text that shows where the entity ends.
|
java.lang.Float |
getScore()
The level of confidence that Amazon Comprehend has in the accuracy of the
detection.
|
java.lang.String |
getText()
The text of the entity.
|
java.lang.String |
getType()
The entity's type.
|
int |
hashCode() |
void |
setBeginOffset(java.lang.Integer beginOffset)
A character offset in the input text that shows where the entity begins
(the first character is at position 0).
|
void |
setEndOffset(java.lang.Integer endOffset)
A character offset in the input text that shows where the entity ends.
|
void |
setScore(java.lang.Float score)
The level of confidence that Amazon Comprehend has in the accuracy of the
detection.
|
void |
setText(java.lang.String text)
The text of the entity.
|
void |
setType(EntityType type)
The entity's type.
|
void |
setType(java.lang.String type)
The entity's type.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Entity |
withBeginOffset(java.lang.Integer beginOffset)
A character offset in the input text that shows where the entity begins
(the first character is at position 0).
|
Entity |
withEndOffset(java.lang.Integer endOffset)
A character offset in the input text that shows where the entity ends.
|
Entity |
withScore(java.lang.Float score)
The level of confidence that Amazon Comprehend has in the accuracy of the
detection.
|
Entity |
withText(java.lang.String text)
The text of the entity.
|
Entity |
withType(EntityType type)
The entity's type.
|
Entity |
withType(java.lang.String type)
The entity's type.
|
public java.lang.Float getScore()
The level of confidence that Amazon Comprehend has in the accuracy of the detection.
The level of confidence that Amazon Comprehend has in the accuracy of the detection.
public void setScore(java.lang.Float score)
The level of confidence that Amazon Comprehend has in the accuracy of the detection.
score
- The level of confidence that Amazon Comprehend has in the accuracy of the detection.
public Entity withScore(java.lang.Float score)
The level of confidence that Amazon Comprehend has in the accuracy of the detection.
Returns a reference to this object so that method calls can be chained together.
score
- The level of confidence that Amazon Comprehend has in the accuracy of the detection.
public java.lang.String getType()
The entity's type.
Constraints:
Allowed Values: PERSON, LOCATION, ORGANIZATION, COMMERCIAL_ITEM,
EVENT, DATE, QUANTITY, TITLE, OTHER
The entity's type.
EntityType
public void setType(java.lang.String type)
The entity's type.
Constraints:
Allowed Values: PERSON, LOCATION, ORGANIZATION, COMMERCIAL_ITEM,
EVENT, DATE, QUANTITY, TITLE, OTHER
type
- The entity's type.
EntityType
public Entity withType(java.lang.String type)
The entity's type.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: PERSON, LOCATION, ORGANIZATION, COMMERCIAL_ITEM,
EVENT, DATE, QUANTITY, TITLE, OTHER
type
- The entity's type.
EntityType
public void setType(EntityType type)
The entity's type.
Constraints:
Allowed Values: PERSON, LOCATION, ORGANIZATION, COMMERCIAL_ITEM,
EVENT, DATE, QUANTITY, TITLE, OTHER
type
- The entity's type.
EntityType
public Entity withType(EntityType type)
The entity's type.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: PERSON, LOCATION, ORGANIZATION, COMMERCIAL_ITEM,
EVENT, DATE, QUANTITY, TITLE, OTHER
type
- The entity's type.
EntityType
public java.lang.String getText()
The text of the entity.
Constraints:
Length: 1 -
The text of the entity.
public void setText(java.lang.String text)
The text of the entity.
Constraints:
Length: 1 -
text
- The text of the entity.
public Entity withText(java.lang.String text)
The text of the entity.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 -
text
- The text of the entity.
public java.lang.Integer getBeginOffset()
A character offset in the input text that shows where the entity begins (the first character is at position 0). The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
A character offset in the input text that shows where the entity begins (the first character is at position 0). The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
public void setBeginOffset(java.lang.Integer beginOffset)
A character offset in the input text that shows where the entity begins (the first character is at position 0). The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
beginOffset
- A character offset in the input text that shows where the entity begins (the first character is at position 0). The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
public Entity withBeginOffset(java.lang.Integer beginOffset)
A character offset in the input text that shows where the entity begins (the first character is at position 0). The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
Returns a reference to this object so that method calls can be chained together.
beginOffset
- A character offset in the input text that shows where the entity begins (the first character is at position 0). The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
public java.lang.Integer getEndOffset()
A character offset in the input text that shows where the entity ends. The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
A character offset in the input text that shows where the entity ends. The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
public void setEndOffset(java.lang.Integer endOffset)
A character offset in the input text that shows where the entity ends. The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
endOffset
- A character offset in the input text that shows where the entity ends. The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
public Entity withEndOffset(java.lang.Integer endOffset)
A character offset in the input text that shows where the entity ends. The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
Returns a reference to this object so that method calls can be chained together.
endOffset
- A character offset in the input text that shows where the entity ends. The offset returns the position of each UTF-8 code point in the string. A code point is the abstract character from a particular graphical representation. For example, a multi-byte UTF-8 character maps to a single code point.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.