edu.northwestern.at.morphadorner

## Class SentenceNumberAdder

- java.lang.Object
- - edu.northwestern.at.morphadorner.SentenceNumberAdder

-     public class SentenceNumberAdder
      extends java.lang.Object

  Add word numbers, sentence numbers, and sentence milestones to adorned text.

  Reads an adorned XML file and adds word and sentence numbers numbers to each and tag using a list of SentenceAndWordNumber entries. Also adds elements for sentences.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static java.lang.String` | `LINE_SEPARATOR` Line separator.
    `protected static java.lang.String` | `milestoneFormat` Milestone formats.
    `protected static java.lang.String` | `milestoneWithPathFormat`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SentenceNumberAdder(java.lang.String inputFileName, java.lang.String outputFileName, SortedArrayList<SentenceAndWordNumber> sortedWords, MorphAdornerSettings morphAdornerSettings)` Add sentence and word numbers to adorned output.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.lang.String` | `makeMilestone(java.lang.String position, int number, java.lang.String indent, java.lang.String path)` Make a milestone marker for a sentence.

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

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

- - ### Field Detail

    - #### LINE_SEPARATOR

          protected static final java.lang.String LINE_SEPARATOR

      Line separator.

    - #### milestoneFormat

          protected static java.lang.String milestoneFormat

      Milestone formats.

    - #### milestoneWithPathFormat

          protected static java.lang.String milestoneWithPathFormat

  - ### Constructor Detail

    - #### SentenceNumberAdder

          public SentenceNumberAdder(java.lang.String inputFileName,
                             java.lang.String outputFileName,
                             SortedArrayList<SentenceAndWordNumber> sortedWords,
                             MorphAdornerSettings morphAdornerSettings)

      Add sentence and word numbers to adorned output.
      Parameters:
        `inputFileName` - Adorned input file name.
        `outputFileName` - Updated adorned output file name.
        `sortedWords` - Sentence and word number data.
        `morphAdornerSettings` - MorphAdorner settings.

  - ### Method Detail

    - #### makeMilestone

          protected java.lang.String makeMilestone(java.lang.String position,
                                       int number,
                                       java.lang.String indent,
                                       java.lang.String path)

      Make a milestone marker for a sentence.
      Parameters:
        `position` - Position ("start" or "end").
        `number` - The sentence number.
        `indent` - Leading indentation.
        `path` - Associated word path.