edu.northwestern.at.morphadorner.tools.taggertrainer.ngram

## Class NGramTaggerTrainer

- java.lang.Object
- - edu.northwestern.at.morphadorner.tools.taggertrainer.ngram.NGramTaggerTrainer

-     public class NGramTaggerTrainer
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static java.lang.String` | `sepChars` Separator character(s) for tokens in input text.
    `protected static int` | `trainingDataCount` Number of lines/words in training data.
    `protected static java.lang.String` | `trainingDataFileName` The input training data file to process.
    `protected static TransitionMatrix` | `transitionMatrix` Part of speech transition probability matrix.
    `protected static java.lang.String` | `transitionMatrixFileName` Transition matrix file name.
    `protected static Lexicon` | `wordLexicon` The word lexicon.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NGramTaggerTrainer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected static void` | `getProgramParameters(java.lang.String[] args)` Get program parameters.
    `protected static java.net.URL` | `getURL(java.lang.String fileNameOrURL)` Get URL from file name or URL.
    `protected static void` | `help()` Prints the help message.
    `protected static void` | `loadTrainingData()` Load training data.
    `static void` | `main(java.lang.String[] args)` Create and run a part of speech tagger trainer.

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

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

- - ### Field Detail

    - #### wordLexicon

          protected static Lexicon wordLexicon

      The word lexicon.

    - #### trainingDataFileName

          protected static java.lang.String trainingDataFileName

      The input training data file to process.

    - #### trainingDataCount

          protected static int trainingDataCount

      Number of lines/words in training data.

    - #### transitionMatrix

          protected static TransitionMatrix transitionMatrix

      Part of speech transition probability matrix.

    - #### transitionMatrixFileName

          protected static java.lang.String transitionMatrixFileName

      Transition matrix file name.

    - #### sepChars

          protected static java.lang.String sepChars

      Separator character(s) for tokens in input text.

  - ### Constructor Detail

    - #### NGramTaggerTrainer

          public NGramTaggerTrainer()

  - ### Method Detail

    - #### getProgramParameters

          protected static void getProgramParameters(java.lang.String[] args)
                                              throws java.io.IOException

      Get program parameters.
      Parameters:
        `args` - Command line parameters.
      Throws:
        `java.io.IOException`

    - #### loadTrainingData

          protected static void loadTrainingData()
                                          throws java.io.IOException

      Load training data.
      Throws:
        `java.io.IOException`

    - #### main

          public static void main(java.lang.String[] args)

      Create and run a part of speech tagger trainer.

    - #### getURL

          protected static java.net.URL getURL(java.lang.String fileNameOrURL)

      Get URL from file name or URL.
      Parameters:
        `fileNameOrURL` - The file name or URL string.
      Returns:
        A URL for the specified file name or URL.

    - #### help

          protected static void help()

      Prints the help message.