Enum Language

java.lang.Object
java.lang.Enum<Language>
org.ujmp.core.text.Language
All Implemented Interfaces:
Serializable, Comparable<Language>

public enum Language extends Enum<Language>
  • Enum Constant Details

    • ENGLISH

      public static final Language ENGLISH
    • GERMAN

      public static final Language GERMAN
  • Field Details

    • alphabet

      private final char[] alphabet
    • allowedCharacters

      private final char[] allowedCharacters
    • charFrequencies

      private final Matrix charFrequencies
    • charBigramFrequencies

      private final Matrix charBigramFrequencies
    • averageWordLength

      private final double averageWordLength
  • Constructor Details

    • Language

      private Language(char[] alphabet, char[] allowedCharacters, Matrix charFrequencies, Matrix charBigramFrequencies, double averageWordLength)
  • Method Details

    • values

      public static Language[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Language valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getAlphabet

      public char[] getAlphabet()
    • getAllowedCharacters

      public char[] getAllowedCharacters()
    • guess

      public static final Language guess(File file)
    • getAverageWordLength

      public double getAverageWordLength()
    • guess

      public static final Language guess(String string)
    • getCharacterFrequencies

      public Matrix getCharacterFrequencies()
    • getCharacterBigramFrequencies

      public Matrix getCharacterBigramFrequencies()