Class BaseNounPhrase.Builder

Enclosing class:
BaseNounPhrase

public static class BaseNounPhrase.Builder extends Attribute.Builder<BaseNounPhrase,BaseNounPhrase.Builder>
Builder for base noun phrase attributes.
  • Constructor Details

    • Builder

      public Builder(int startOffset, int endOffset)
      Constructs a builder from the required properties.
      Parameters:
      startOffset - start offset in characters
      endOffset - end offset in characters
    • Builder

      public Builder(int[] tokenOffsets, int tokenStartIndex, int tokenEndIndex)
      Constructs a builder from the 'traditional Rosette' data structure. That data structure is an int[] in which the even-numbered items are token start offsets, and the odd-numbered items are token end offsets.
      Parameters:
      tokenOffsets - array of token start/end offsets
      tokenStartIndex - index in tokenOffsets for the start of the phrase
      tokenEndIndex - index in tokenOffsets for the end of the phrase
    • Builder

      public Builder(BaseNounPhrase toCopy)
      Constructs a builder from an existing BaseNounPhrase.
      Parameters:
      toCopy - the object to copy
  • Method Details