/* * Copyright 2010-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.amazonaws.services.comprehend.model; import java.io.Serializable; public class DetectEntitiesResult implements Serializable { /** *
* A collection of entities identified in the input text. For each entity, * the response provides the entity text, entity type, where the entity text * begins and ends, and the level of confidence that Amazon Comprehend has * in the detection. *
** If your request uses a custom entity recognition model, Amazon Comprehend * detects the entities that the model is trained to recognize. Otherwise, * it detects the default entity types. For a list of default entity types, * see Entities in the Comprehend Developer Guide. *
*/ private java.util.List
* Information about the document, discovered during text extraction. This
* field is present in the response only if your request used the
* Byte
parameter.
*
* The document type for each page in the input document. This field is
* present in the response only if your request used the Byte
* parameter.
*
* Information about each block of text in the input document. Blocks are * nested. A page block contains a block for each line of text, which * contains a block for each word. *
*
* The Block
content for a Word input document does not include
* a Geometry
field.
*
* The Block
field is not present in the response for
* plain-text inputs.
*
* Page-level errors that the system detected while processing the input * document. The field is empty if the system encountered no errors. *
*/ private java.util.List* A collection of entities identified in the input text. For each entity, * the response provides the entity text, entity type, where the entity text * begins and ends, and the level of confidence that Amazon Comprehend has * in the detection. *
** If your request uses a custom entity recognition model, Amazon Comprehend * detects the entities that the model is trained to recognize. Otherwise, * it detects the default entity types. For a list of default entity types, * see Entities in the Comprehend Developer Guide. *
* * @return* A collection of entities identified in the input text. For each * entity, the response provides the entity text, entity type, where * the entity text begins and ends, and the level of confidence that * Amazon Comprehend has in the detection. *
** If your request uses a custom entity recognition model, Amazon * Comprehend detects the entities that the model is trained to * recognize. Otherwise, it detects the default entity types. For a * list of default entity types, see Entities in the Comprehend Developer Guide. *
*/ public java.util.List* A collection of entities identified in the input text. For each entity, * the response provides the entity text, entity type, where the entity text * begins and ends, and the level of confidence that Amazon Comprehend has * in the detection. *
** If your request uses a custom entity recognition model, Amazon Comprehend * detects the entities that the model is trained to recognize. Otherwise, * it detects the default entity types. For a list of default entity types, * see Entities in the Comprehend Developer Guide. *
* * @param entities* A collection of entities identified in the input text. For * each entity, the response provides the entity text, entity * type, where the entity text begins and ends, and the level of * confidence that Amazon Comprehend has in the detection. *
** If your request uses a custom entity recognition model, Amazon * Comprehend detects the entities that the model is trained to * recognize. Otherwise, it detects the default entity types. For * a list of default entity types, see Entities in the Comprehend Developer Guide. *
*/ public void setEntities(java.util.Collection* A collection of entities identified in the input text. For each entity, * the response provides the entity text, entity type, where the entity text * begins and ends, and the level of confidence that Amazon Comprehend has * in the detection. *
** If your request uses a custom entity recognition model, Amazon Comprehend * detects the entities that the model is trained to recognize. Otherwise, * it detects the default entity types. For a list of default entity types, * see Entities in the Comprehend Developer Guide. *
** Returns a reference to this object so that method calls can be chained * together. * * @param entities
* A collection of entities identified in the input text. For * each entity, the response provides the entity text, entity * type, where the entity text begins and ends, and the level of * confidence that Amazon Comprehend has in the detection. *
** If your request uses a custom entity recognition model, Amazon * Comprehend detects the entities that the model is trained to * recognize. Otherwise, it detects the default entity types. For * a list of default entity types, see Entities in the Comprehend Developer Guide. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DetectEntitiesResult withEntities(Entity... entities) { if (getEntities() == null) { this.entities = new java.util.ArrayList* A collection of entities identified in the input text. For each entity, * the response provides the entity text, entity type, where the entity text * begins and ends, and the level of confidence that Amazon Comprehend has * in the detection. *
** If your request uses a custom entity recognition model, Amazon Comprehend * detects the entities that the model is trained to recognize. Otherwise, * it detects the default entity types. For a list of default entity types, * see Entities in the Comprehend Developer Guide. *
** Returns a reference to this object so that method calls can be chained * together. * * @param entities
* A collection of entities identified in the input text. For * each entity, the response provides the entity text, entity * type, where the entity text begins and ends, and the level of * confidence that Amazon Comprehend has in the detection. *
** If your request uses a custom entity recognition model, Amazon * Comprehend detects the entities that the model is trained to * recognize. Otherwise, it detects the default entity types. For * a list of default entity types, see Entities in the Comprehend Developer Guide. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DetectEntitiesResult withEntities(java.util.Collection
* Information about the document, discovered during text extraction. This
* field is present in the response only if your request used the
* Byte
parameter.
*
* Information about the document, discovered during text
* extraction. This field is present in the response only if your
* request used the Byte
parameter.
*
* Information about the document, discovered during text extraction. This
* field is present in the response only if your request used the
* Byte
parameter.
*
* Information about the document, discovered during text
* extraction. This field is present in the response only if your
* request used the Byte
parameter.
*
* Information about the document, discovered during text extraction. This
* field is present in the response only if your request used the
* Byte
parameter.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param documentMetadata
* Information about the document, discovered during text
* extraction. This field is present in the response only if your
* request used the Byte
parameter.
*
* The document type for each page in the input document. This field is
* present in the response only if your request used the Byte
* parameter.
*
* The document type for each page in the input document. This field
* is present in the response only if your request used the
* Byte
parameter.
*
* The document type for each page in the input document. This field is
* present in the response only if your request used the Byte
* parameter.
*
* The document type for each page in the input document. This
* field is present in the response only if your request used the
* Byte
parameter.
*
* The document type for each page in the input document. This field is
* present in the response only if your request used the Byte
* parameter.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param documentType
* The document type for each page in the input document. This
* field is present in the response only if your request used the
* Byte
parameter.
*
* The document type for each page in the input document. This field is
* present in the response only if your request used the Byte
* parameter.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param documentType
* The document type for each page in the input document. This
* field is present in the response only if your request used the
* Byte
parameter.
*
* Information about each block of text in the input document. Blocks are * nested. A page block contains a block for each line of text, which * contains a block for each word. *
*
* The Block
content for a Word input document does not include
* a Geometry
field.
*
* The Block
field is not present in the response for
* plain-text inputs.
*
* Information about each block of text in the input document. * Blocks are nested. A page block contains a block for each line of * text, which contains a block for each word. *
*
* The Block
content for a Word input document does not
* include a Geometry
field.
*
* The Block
field is not present in the response for
* plain-text inputs.
*
* Information about each block of text in the input document. Blocks are * nested. A page block contains a block for each line of text, which * contains a block for each word. *
*
* The Block
content for a Word input document does not include
* a Geometry
field.
*
* The Block
field is not present in the response for
* plain-text inputs.
*
* Information about each block of text in the input document. * Blocks are nested. A page block contains a block for each line * of text, which contains a block for each word. *
*
* The Block
content for a Word input document does
* not include a Geometry
field.
*
* The Block
field is not present in the response
* for plain-text inputs.
*
* Information about each block of text in the input document. Blocks are * nested. A page block contains a block for each line of text, which * contains a block for each word. *
*
* The Block
content for a Word input document does not include
* a Geometry
field.
*
* The Block
field is not present in the response for
* plain-text inputs.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param blocks
* Information about each block of text in the input document. * Blocks are nested. A page block contains a block for each line * of text, which contains a block for each word. *
*
* The Block
content for a Word input document does
* not include a Geometry
field.
*
* The Block
field is not present in the response
* for plain-text inputs.
*
* Information about each block of text in the input document. Blocks are * nested. A page block contains a block for each line of text, which * contains a block for each word. *
*
* The Block
content for a Word input document does not include
* a Geometry
field.
*
* The Block
field is not present in the response for
* plain-text inputs.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param blocks
* Information about each block of text in the input document. * Blocks are nested. A page block contains a block for each line * of text, which contains a block for each word. *
*
* The Block
content for a Word input document does
* not include a Geometry
field.
*
* The Block
field is not present in the response
* for plain-text inputs.
*
* Page-level errors that the system detected while processing the input * document. The field is empty if the system encountered no errors. *
* * @return* Page-level errors that the system detected while processing the * input document. The field is empty if the system encountered no * errors. *
*/ public java.util.List* Page-level errors that the system detected while processing the input * document. The field is empty if the system encountered no errors. *
* * @param errors* Page-level errors that the system detected while processing * the input document. The field is empty if the system * encountered no errors. *
*/ public void setErrors(java.util.Collection* Page-level errors that the system detected while processing the input * document. The field is empty if the system encountered no errors. *
** Returns a reference to this object so that method calls can be chained * together. * * @param errors
* Page-level errors that the system detected while processing * the input document. The field is empty if the system * encountered no errors. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DetectEntitiesResult withErrors(ErrorsListItem... errors) { if (getErrors() == null) { this.errors = new java.util.ArrayList* Page-level errors that the system detected while processing the input * document. The field is empty if the system encountered no errors. *
** Returns a reference to this object so that method calls can be chained * together. * * @param errors
* Page-level errors that the system detected while processing * the input document. The field is empty if the system * encountered no errors. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DetectEntitiesResult withErrors(java.util.Collection