com.cybozu.labs.langdetect.util

## Class LangProfile

- java.lang.Object
- - com.cybozu.labs.langdetect.util.LangProfile

-     public class LangProfile
      extends java.lang.Object

  `LangProfile` is a Language Profile Class. Users don't use this class directly.
  Author:
    Nakatani Shuyo

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.util.HashMap<java.lang.String,java.lang.Integer>` | `freq`
    `int[]` | `n_words`
    `java.lang.String` | `name`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LangProfile()` Constructor for JSONIC
    `LangProfile(java.lang.String name)` Normal Constructor
    `LangProfile(java.lang.String name, java.util.HashMap<java.lang.String,java.lang.Integer> freq, int[] n_words)` Alternative constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(java.lang.String gram)` Add n-gram to profile
    `void` | `omitLessFreq()` Eliminate below less frequency n-grams and noise Latin alphabets
    `void` | `update(java.lang.String text)` Update the language profile with (fragmented) text.

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

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

- - ### Field Detail

    - #### name

          public java.lang.String name

    - #### freq

          public java.util.HashMap<java.lang.String,java.lang.Integer> freq

    - #### n_words

          public int[] n_words

  - ### Constructor Detail

    - #### LangProfile

          public LangProfile()

      Constructor for JSONIC

    - #### LangProfile

          public LangProfile(java.lang.String name)

      Normal Constructor
      Parameters:
        `name` - language name

    - #### LangProfile

          public LangProfile(java.lang.String name,
                     java.util.HashMap<java.lang.String,java.lang.Integer> freq,
                     int[] n_words)

      Alternative constructor

  - ### Method Detail

    - #### add

          public void add(java.lang.String gram)

      Add n-gram to profile
      Parameters:
        `gram` -

    - #### omitLessFreq

          public void omitLessFreq()

      Eliminate below less frequency n-grams and noise Latin alphabets

    - #### update

          public void update(java.lang.String text)

      Update the language profile with (fragmented) text. Extract n-grams from text and add their frequency into the profile.
      Parameters:
        `text` - (fragmented) text to extract n-grams