public class LangProfile
extends java.lang.Object
LangProfile
is a Language Profile Class.
Users don't use this class directly.Modifier and Type | Field and Description |
---|---|
java.util.HashMap<java.lang.String,java.lang.Integer> |
freq |
int[] |
n_words |
java.lang.String |
name |
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
|
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.
|
public java.lang.String name
public java.util.HashMap<java.lang.String,java.lang.Integer> freq
public int[] n_words
public LangProfile()
public LangProfile(java.lang.String name)
name
- language namepublic LangProfile(java.lang.String name, java.util.HashMap<java.lang.String,java.lang.Integer> freq, int[] n_words)
public void add(java.lang.String gram)
gram
- public void omitLessFreq()
public void update(java.lang.String text)
text
- (fragmented) text to extract n-grams