Interface DetectEntitiesResponse.Builder

    • Method Detail

      • entities

        DetectEntitiesResponse.Builder entities​(Collection<Entity> 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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • entities

        DetectEntitiesResponse.Builder entities​(Entity... 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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • entities

        DetectEntitiesResponse.Builder entities​(Consumer<Entity.Builder>... 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.

        This is a convenience method that creates an instance of the Entity.Builder avoiding the need to create one manually via Entity.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #entities(List).

        Parameters:
        entities - a consumer that will call methods on Entity.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #entities(java.util.Collection)
      • documentMetadata

        DetectEntitiesResponse.Builder documentMetadata​(DocumentMetadata documentMetadata)

        Information about the document, discovered during text extraction. This field is present in the response only if your request used the Byte parameter.

        Parameters:
        documentMetadata - Information about the document, discovered during text extraction. This field is present in the response only if your request used the Byte parameter.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • documentType

        DetectEntitiesResponse.Builder documentType​(Collection<DocumentTypeListItem> 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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • documentType

        DetectEntitiesResponse.Builder documentType​(DocumentTypeListItem... 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.

        Parameters:
        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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • blocks

        DetectEntitiesResponse.Builder blocks​(Collection<Block> 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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • blocks

        DetectEntitiesResponse.Builder blocks​(Block... 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.

        Parameters:
        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.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • blocks

        DetectEntitiesResponse.Builder blocks​(Consumer<Block.Builder>... 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.

        This is a convenience method that creates an instance of the Block.Builder avoiding the need to create one manually via Block.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #blocks(List).

        Parameters:
        blocks - a consumer that will call methods on Block.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #blocks(java.util.Collection)
      • errors

        DetectEntitiesResponse.Builder errors​(Collection<ErrorsListItem> errors)

        Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.

        Parameters:
        errors - Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • errors

        DetectEntitiesResponse.Builder errors​(ErrorsListItem... errors)

        Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.

        Parameters:
        errors - Page-level errors that the system detected while processing the input document. The field is empty if the system encountered no errors.
        Returns:
        Returns a reference to this object so that method calls can be chained together.