Interface Entity.Builder

    • Method Detail

      • id

        Entity.Builder id​(Integer id)

        The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather than a global unique identifier.

        Parameters:
        id - The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather than a global unique identifier.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • beginOffset

        Entity.Builder beginOffset​(Integer beginOffset)

        The 0-based character offset in the input text that shows where the entity begins. The offset returns the UTF-8 code point in the string.

        Parameters:
        beginOffset - The 0-based character offset in the input text that shows where the entity begins. The offset returns the UTF-8 code point in the string.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • endOffset

        Entity.Builder endOffset​(Integer endOffset)

        The 0-based character offset in the input text that shows where the entity ends. The offset returns the UTF-8 code point in the string.

        Parameters:
        endOffset - The 0-based character offset in the input text that shows where the entity ends. The offset returns the UTF-8 code point in the string.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • score

        Entity.Builder score​(Float score)

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

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

        Entity.Builder text​(String text)

        The segment of input text extracted as this entity.

        Parameters:
        text - The segment of input text extracted as this entity.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • category

        Entity.Builder category​(String category)

        The category of the entity.

        Parameters:
        category - The category of the entity.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        EntityType, EntityType
      • category

        Entity.Builder category​(EntityType category)

        The category of the entity.

        Parameters:
        category - The category of the entity.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        EntityType, EntityType
      • type

        Entity.Builder type​(String type)

        Describes the specific type of entity with category of entities.

        Parameters:
        type - Describes the specific type of entity with category of entities.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        EntitySubType, EntitySubType
      • type

        Entity.Builder type​(EntitySubType type)

        Describes the specific type of entity with category of entities.

        Parameters:
        type - Describes the specific type of entity with category of entities.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        EntitySubType, EntitySubType
      • traits

        Entity.Builder traits​(Collection<Trait> traits)

        Contextual information for the entity.

        Parameters:
        traits - Contextual information for the entity.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • traits

        Entity.Builder traits​(Trait... traits)

        Contextual information for the entity.

        Parameters:
        traits - Contextual information for the entity.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • traits

        Entity.Builder traits​(Consumer<Trait.Builder>... traits)

        Contextual information for the entity.

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

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

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

        Entity.Builder attributes​(Collection<Attribute> attributes)

        The extracted attributes that relate to this entity.

        Parameters:
        attributes - The extracted attributes that relate to this entity.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • attributes

        Entity.Builder attributes​(Attribute... attributes)

        The extracted attributes that relate to this entity.

        Parameters:
        attributes - The extracted attributes that relate to this entity.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • attributes

        Entity.Builder attributes​(Consumer<Attribute.Builder>... attributes)

        The extracted attributes that relate to this entity.

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

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

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