edu.northwestern.at.morphadorner.tools.punktabbreviationdetector

## Class PunktAbbreviationDetector

- java.lang.Object
- - edu.northwestern.at.morphadorner.tools.punktabbreviationdetector.PunktAbbreviationDetector

-     public class PunktAbbreviationDetector
      extends java.lang.Object

  Find abbreviations in a set of texts using Punkt algorithm.

  `java -Xmx512m edu.northwestern.at.morphadorner.tools.punktabbreviationdetector.PunktAbbreviationDetector isolangcode abbrevs.txt text1.txt text2.txt ...`

  - isolangcode specifies the two or three character ISO language code in which the texts to be analyzed are written.
  - abbrevs.txt specifies the name of the output file to receive the abbreviations extracted from the texts.
  - text1 text2 ... specify the names of utf-8 encoded text files from which to extract potential abbreviations.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static int` | `INITPARAMS` # params before input file specs.
    `protected static java.io.PrintStream` | `printStream` Wrapper for printStream to allow utf-8 output.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `PunktAbbreviationDetector()` Allow overrides but not instantiation.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.util.Locale` | `languageCodeToLocale(java.lang.String languageCode)` Get a Java Locale from an ISO language code.
    `static void` | `main(java.lang.String[] args)` Main program.
    `static PunktToken` | `makePunktToken(java.lang.String token)` Create Punkt token from a string.

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

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

- - ### Field Detail

    - #### INITPARAMS

          protected static final int INITPARAMS

      # params before input file specs.
      See Also:
        Constant Field Values

    - #### printStream

          protected static java.io.PrintStream printStream

      Wrapper for printStream to allow utf-8 output.

  - ### Constructor Detail

    - #### PunktAbbreviationDetector

          protected PunktAbbreviationDetector()

      Allow overrides but not instantiation.

  - ### Method Detail

    - #### main

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

      Main program.
      Throws:
        `java.io.IOException`

    - #### languageCodeToLocale

          public static java.util.Locale languageCodeToLocale(java.lang.String languageCode)

      Get a Java Locale from an ISO language code.
      Parameters:
        `languageCode` - The ISO language code.
      Returns:
        The Java locale corresponding to the ISO language code.

    - #### makePunktToken

          public static PunktToken makePunktToken(java.lang.String token)

      Create Punkt token from a string.
      Parameters:
        `token` - The token.