Interface Entity.Builder

    • Method Detail

      • score

        Entity.Builder score​(Float score)

        The level of confidence that Amazon Comprehend has in the accuracy of the detection.

        Parameters:
        score - The level of confidence that Amazon Comprehend has in the accuracy of the detection.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • type

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

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

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        EntityType, EntityType
      • type

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

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

        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        EntityType, EntityType
      • text

        Entity.Builder text​(String text)

        The text of the entity.

        Parameters:
        text - The text of the entity.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • beginOffset

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

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

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

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

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

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

        Entity.Builder blockReferences​(Collection<BlockReference> blockReferences)

        A reference to each block for this entity. This field is empty for plain-text input.

        Parameters:
        blockReferences - A reference to each block for this entity. This field is empty for plain-text input.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • blockReferences

        Entity.Builder blockReferences​(BlockReference... blockReferences)

        A reference to each block for this entity. This field is empty for plain-text input.

        Parameters:
        blockReferences - A reference to each block for this entity. This field is empty for plain-text input.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • blockReferences

        Entity.Builder blockReferences​(Consumer<BlockReference.Builder>... blockReferences)

        A reference to each block for this entity. This field is empty for plain-text input.

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

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

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