edu.northwestern.at.morphadorner.corpuslinguistics.textsegmenter

## Class TextTilingTextSegmenter

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

- All Implemented Interfaces:
    TextSegmenter, IsCloseable, UsesLogger

      public class TextTilingTextSegmenter
      extends AbstractTextSegmenter
      implements TextSegmenter

  Marti Hearst's TextTiling linear text segmenter.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `slidingWindowSize` Sliding window size.
    `protected int` | `stepSize` Step size.

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

      `logger, stemmer, stopWords`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TextTilingTextSegmenter()` Create segmenter.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> java.util.List<java.lang.Integer>` | `getSegmentPositions(java.util.List<java.util.List<T>> sentences)` Segment text.
    `int` | `getSlidingWindowSize()` Get sliding window size.
    `int` | `getStepSize()` Get step size.
    `void` | `setSlidingWindowSize(int slidingWindowSize)` Set sliding window size.
    `void` | `setStepSize(int stepSize)` Set step size.

    - ### 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

    - #### slidingWindowSize

          protected int slidingWindowSize

      Sliding window size.

    - #### stepSize

          protected int stepSize

      Step size.

  - ### Constructor Detail

    - #### TextTilingTextSegmenter

          public TextTilingTextSegmenter()

      Create segmenter.

  - ### Method Detail

    - #### getSlidingWindowSize

          public int getSlidingWindowSize()

      Get sliding window size.
      Returns:
        Sliding window size.

    - #### setSlidingWindowSize

          public void setSlidingWindowSize(int slidingWindowSize)

      Set sliding window size.
      Parameters:
        `slidingWindowSize` - The sliding window size.

    - #### getStepSize

          public int getStepSize()

      Get step size.
      Returns:
        The step size.

    - #### setStepSize

          public void setStepSize(int stepSize)

      Set step size.
      Parameters:
        `stepSize` - The step size.

    - #### 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.