@Deprecated public class LangProfile extends Object implements Serializable
LangProfile
is a Language Profile Class.
Users don't use this class directly.
TODO split into builder and immutable class.
TODO currently this only makes n-grams with the space before a word included. no n-gram with the space after the word.
Example: "foo" creates " fo" as 3gram, but not "oo ". Either this is a bug, or if intended then needs documentation.Constructor and Description |
---|
LangProfile()
Deprecated.
Constructor for JSONIC
|
LangProfile(String name)
Deprecated.
Normal Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(@NotNull String gram)
Deprecated.
Add n-gram to profile
|
Map<String,Integer> |
getFreq()
Deprecated.
|
String |
getName()
Deprecated.
|
int[] |
getNWords()
Deprecated.
|
void |
omitLessFreq()
Deprecated.
Removes ngrams that occur fewer times than MINIMUM_FREQ to get rid of rare ngrams.
|
void |
setFreq(Map<String,Integer> freq)
Deprecated.
|
void |
setName(String name)
Deprecated.
|
void |
setNWords(int[] nWords)
Deprecated.
|
public LangProfile()
public LangProfile(String name)
name
- language namepublic void add(@NotNull @NotNull String gram)
gram
- public void omitLessFreq()
public String getName()
public void setName(String name)
public int[] getNWords()
public void setNWords(int[] nWords)
Copyright © 2024. All rights reserved.