Class Entity.Builder

  • Enclosing class:
    Entity

    public static class Entity.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • offset

        public Entity.Builder offset​(Integer offset)
        The number of Unicode code points preceding this entity in the submitted text.
        Parameters:
        offset - the value to set
        Returns:
        this builder
      • length

        public Entity.Builder length​(Integer length)
        Length of entity text
        Parameters:
        length - the value to set
        Returns:
        this builder
      • text

        public Entity.Builder text​(String text)
        Entity text like name of person, location, and so on.
        Parameters:
        text - the value to set
        Returns:
        this builder
      • type

        public Entity.Builder type​(String type)
        Type of entity text like PER, LOC, GPE and NOPE.
        Parameters:
        type - the value to set
        Returns:
        this builder
      • isPii

        public Entity.Builder isPii​(Boolean isPii)
        This flag is to indicate if it is PII entity or not.
        Parameters:
        isPii - the value to set
        Returns:
        this builder
      • score

        public Entity.Builder score​(Double score)
        Score or confidence of extracted entity type.

        Example: 0.9999856066867399

        Parameters:
        score - the value to set
        Returns:
        this builder
      • build

        public Entity build()