Class Sentence.Builder

Enclosing class:
Sentence

public static class Sentence.Builder extends Attribute.Builder<Sentence,Sentence.Builder>
Builder for Sentence attributes.
  • Constructor Details

    • Builder

      public Builder(int startOffset, int endOffset)
      Constructs a builder from the required properties.
      Parameters:
      startOffset - start character offset
      endOffset - end character offset
    • 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(Sentence toCopy)
      Constructs a builder from the contents of an existing sentence.
      Parameters:
      toCopy - the object to copy
  • Method Details