@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class Entity extends Object implements Serializable, Cloneable, StructuredPojo
Provides information about an entity.
Constructor and Description |
---|
Entity() |
Modifier and Type | Method and Description |
---|---|
Entity |
clone() |
boolean |
equals(Object obj) |
Integer |
getBeginOffset()
The zero-based offset from the beginning of the source text to the first character in the entity.
|
List<BlockReference> |
getBlockReferences()
A reference to each block for this entity.
|
Integer |
getEndOffset()
The zero-based offset from the beginning of the source text to the last character in the entity.
|
Float |
getScore()
The level of confidence that Amazon Comprehend has in the accuracy of the detection.
|
String |
getText()
The text of the entity.
|
String |
getType()
The entity type.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setBeginOffset(Integer beginOffset)
The zero-based offset from the beginning of the source text to the first character in the entity.
|
void |
setBlockReferences(Collection<BlockReference> blockReferences)
A reference to each block for this entity.
|
void |
setEndOffset(Integer endOffset)
The zero-based offset from the beginning of the source text to the last character in the entity.
|
void |
setScore(Float score)
The level of confidence that Amazon Comprehend has in the accuracy of the detection.
|
void |
setText(String text)
The text of the entity.
|
void |
setType(String type)
The entity type.
|
String |
toString()
Returns a string representation of this object.
|
Entity |
withBeginOffset(Integer beginOffset)
The zero-based offset from the beginning of the source text to the first character in the entity.
|
Entity |
withBlockReferences(BlockReference... blockReferences)
A reference to each block for this entity.
|
Entity |
withBlockReferences(Collection<BlockReference> blockReferences)
A reference to each block for this entity.
|
Entity |
withEndOffset(Integer endOffset)
The zero-based offset from the beginning of the source text to the last character in the entity.
|
Entity |
withScore(Float score)
The level of confidence that Amazon Comprehend has in the accuracy of the detection.
|
Entity |
withText(String text)
The text of the entity.
|
Entity |
withType(EntityType type)
The entity type.
|
Entity |
withType(String type)
The entity type.
|
public void setScore(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 Float getScore()
The level of confidence that Amazon Comprehend has in the accuracy of the detection.
public Entity withScore(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 void setType(String type)
The entity type. For entity detection using the built-in model, this field contains one of the standard entity types listed below.
For custom entity detection, this field contains one of the entity types that you specified when you trained your custom model.
type
- The entity type. For entity detection using the built-in model, this field contains one of the standard
entity types listed below.
For custom entity detection, this field contains one of the entity types that you specified when you trained your custom model.
EntityType
public String getType()
The entity type. For entity detection using the built-in model, this field contains one of the standard entity types listed below.
For custom entity detection, this field contains one of the entity types that you specified when you trained your custom model.
For custom entity detection, this field contains one of the entity types that you specified when you trained your custom model.
EntityType
public Entity withType(String type)
The entity type. For entity detection using the built-in model, this field contains one of the standard entity types listed below.
For custom entity detection, this field contains one of the entity types that you specified when you trained your custom model.
type
- The entity type. For entity detection using the built-in model, this field contains one of the standard
entity types listed below.
For custom entity detection, this field contains one of the entity types that you specified when you trained your custom model.
EntityType
public Entity withType(EntityType type)
The entity type. For entity detection using the built-in model, this field contains one of the standard entity types listed below.
For custom entity detection, this field contains one of the entity types that you specified when you trained your custom model.
type
- The entity type. For entity detection using the built-in model, this field contains one of the standard
entity types listed below.
For custom entity detection, this field contains one of the entity types that you specified when you trained your custom model.
EntityType
public void setText(String text)
The text of the entity.
text
- The text of the entity.public String getText()
The text of the entity.
public Entity withText(String text)
The text of the entity.
text
- The text of the entity.public void setBeginOffset(Integer beginOffset)
The zero-based offset from the beginning of the source text to the first character in the entity.
This field is empty for non-text input.
beginOffset
- The zero-based offset from the beginning of the source text to the first character in the entity.
This field is empty for non-text input.
public Integer getBeginOffset()
The zero-based offset from the beginning of the source text to the first character in the entity.
This field is empty for non-text input.
This field is empty for non-text input.
public Entity withBeginOffset(Integer beginOffset)
The zero-based offset from the beginning of the source text to the first character in the entity.
This field is empty for non-text input.
beginOffset
- The zero-based offset from the beginning of the source text to the first character in the entity.
This field is empty for non-text input.
public void setEndOffset(Integer endOffset)
The zero-based offset from the beginning of the source text to the last character in the entity.
This field is empty for non-text input.
endOffset
- The zero-based offset from the beginning of the source text to the last character in the entity.
This field is empty for non-text input.
public Integer getEndOffset()
The zero-based offset from the beginning of the source text to the last character in the entity.
This field is empty for non-text input.
This field is empty for non-text input.
public Entity withEndOffset(Integer endOffset)
The zero-based offset from the beginning of the source text to the last character in the entity.
This field is empty for non-text input.
endOffset
- The zero-based offset from the beginning of the source text to the last character in the entity.
This field is empty for non-text input.
public List<BlockReference> getBlockReferences()
A reference to each block for this entity. This field is empty for plain-text input.
public void setBlockReferences(Collection<BlockReference> blockReferences)
A reference to each block for this entity. This field is empty for plain-text input.
blockReferences
- A reference to each block for this entity. This field is empty for plain-text input.public Entity withBlockReferences(BlockReference... blockReferences)
A reference to each block for this entity. This field is empty for plain-text input.
NOTE: This method appends the values to the existing list (if any). Use
setBlockReferences(java.util.Collection)
or withBlockReferences(java.util.Collection)
if you
want to override the existing values.
blockReferences
- A reference to each block for this entity. This field is empty for plain-text input.public Entity withBlockReferences(Collection<BlockReference> blockReferences)
A reference to each block for this entity. This field is empty for plain-text input.
blockReferences
- A reference to each block for this entity. This field is empty for plain-text input.public String toString()
toString
in class Object
Object.toString()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.