edu.northwestern.at.morphadorner.corpuslinguistics.textsegmenter

## Class C99TextSegmenter

- java.lang.Object
- - edu.northwestern.at.utils.IsCloseableObject
  - - edu.northwestern.at.morphadorner.corpuslinguistics.textsegmenter.AbstractTextSegmenter
    - - edu.northwestern.at.morphadorner.corpuslinguistics.textsegmenter.C99TextSegmenter

- All Implemented Interfaces:
    TextSegmenter, IsCloseable, UsesLogger
  Direct Known Subclasses:
    DefaultTextSegmenter

      public class C99TextSegmenter
      extends AbstractTextSegmenter
      implements TextSegmenter

  Freddy Choi's C99 linear text segmenter.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `maskSize` Mask size.
    `protected int` | `segmentsWanted` Number of segments wanted.

    - ### Fields inherited from class edu.northwestern.at.morphadorner.corpuslinguistics.textsegmenter.AbstractTextSegmenter

      `logger, stemmer, stopWords`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `C99TextSegmenter()` Create C99 segmenter.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getMaskSize()` Get mask size.
    `<T> java.util.List<java.lang.Integer>` | `getSegmentPositions(java.util.List<java.util.List<T>> sentences)` Segment text.
    `int` | `getSegmentsWanted()` Get number of segments wanted.
    `void` | `setMaskSize(int maskSize)` Set mask size.
    `void` | `setSegmentsWanted(int segmentsWanted)` Set segments wanted.

    - ### Methods inherited from class edu.northwestern.at.morphadorner.corpuslinguistics.textsegmenter.AbstractTextSegmenter

      `getLogger, getStemmer, getStopWords, setLogger, setStemmer, setStopWords`

    - ### Methods inherited from class edu.northwestern.at.utils.IsCloseableObject

      `close`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface edu.northwestern.at.utils.IsCloseable

      `close`

- - ### Field Detail

    - #### maskSize

          protected int maskSize

      Mask size.

    - #### segmentsWanted

          protected int segmentsWanted

      Number of segments wanted.

  - ### Constructor Detail

    - #### C99TextSegmenter

          public C99TextSegmenter()

      Create C99 segmenter.

  - ### Method Detail

    - #### getMaskSize

          public int getMaskSize()

      Get mask size.
      Returns:
        Mask size.

    - #### setMaskSize

          public void setMaskSize(int maskSize)

      Set mask size.
      Parameters:
        `maskSize` - The mask size.

    - #### getSegmentsWanted

          public int getSegmentsWanted()

      Get number of segments wanted.
      Returns:
        Number of segments wanted.

    - #### setSegmentsWanted

          public void setSegmentsWanted(int segmentsWanted)

      Set segments wanted.
      Parameters:
        `segmentsWanted` - The number of segments wanted.

    - #### getSegmentPositions

          public <T> java.util.List<java.lang.Integer> getSegmentPositions(java.util.List<java.util.List<T>> sentences)

      Segment text.
      Specified by:
        `getSegmentPositions` in interface `TextSegmenter`
      Specified by:
        `getSegmentPositions` in class `AbstractTextSegmenter`
      Parameters:
        `sentences` - The list of tokenized sentences to segment.
      Returns:
        A list of sentence indices which start a new text segment.