Class Chunk

java.lang.Object
org.tribuo.classification.sgd.crf.Chunk

public class Chunk extends Object
Chunk class used for chunk level confidence prediction in the CRFModel.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final int
    The starting point of this chunk.
    final int[]
    The labels for the next labels.length values.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Chunk(int begin, int[] labels)
    Constructs a chunk.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    unpack(int[] constraints)
    Copies the labels into the constraints array starting at begin.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • begin

      public final int begin
      The starting point of this chunk.
    • labels

      public final int[] labels
      The labels for the next labels.length values.
  • Constructor Details

    • Chunk

      public Chunk(int begin, int[] labels)
      Constructs a chunk.
      Parameters:
      begin - The starting point of this chunk.
      labels - The chunk labels.
  • Method Details

    • unpack

      public void unpack(int[] constraints)
      Copies the labels into the constraints array starting at begin.
      Parameters:
      constraints - The constraints array.