public final class LanguageProfileImpl extends Object implements LanguageProfile
This class is immutable.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
getFrequency(String gram) |
List<Integer> |
getGramLengths()
Tells what the n in n-grams are used here.
|
LdLocale |
getLocale() |
long |
getMaxGramCount(int gramLength)
Tells how often the n-gram with the highest amount of occurrences used in this profile occurred.
|
long |
getMinGramCount(int gramLength)
Tells how often the n-gram with the lowest amount of occurrences used in this profile occurred.
|
long |
getNumGramOccurrences(int gramLength)
Tells how often all n-grams of a certain length occurred, combined.
|
int |
getNumGrams()
Tells how many n-grams there are for all n-gram sizes combined.
|
int |
getNumGrams(int gramLength)
Tells how many different n-grams there are for a certain n-gram size.
|
int |
hashCode() |
Iterable<Map.Entry<String,Integer>> |
iterateGrams()
Iterates all ngram strings with frequency.
|
Iterable<Map.Entry<String,Integer>> |
iterateGrams(int gramLength)
Iterates all gramLength-gram strings with frequency.
|
String |
toString() |
@NotNull public LdLocale getLocale()
getLocale in interface LanguageProfile@NotNull public List<Integer> getGramLengths()
LanguageProfilegetGramLengths in interface LanguageProfilepublic int getFrequency(String gram)
getFrequency in interface LanguageProfilegram - for example "a" or "foo".public int getNumGrams(int gramLength)
LanguageProfilegetNumGrams in interface LanguageProfilegramLength - 1-npublic int getNumGrams()
LanguageProfilegetNumGrams in interface LanguageProfilepublic long getNumGramOccurrences(int gramLength)
LanguageProfileLanguageProfile.getNumGrams(int).getNumGramOccurrences in interface LanguageProfilegramLength - 1-npublic long getMinGramCount(int gramLength)
LanguageProfilegetMinGramCount in interface LanguageProfilegramLength - 1-npublic long getMaxGramCount(int gramLength)
LanguageProfilegetMaxGramCount in interface LanguageProfilegramLength - 1-n@NotNull public Iterable<Map.Entry<String,Integer>> iterateGrams()
LanguageProfileiterateGrams in interface LanguageProfile@NotNull public Iterable<Map.Entry<String,Integer>> iterateGrams(int gramLength)
LanguageProfileiterateGrams in interface LanguageProfileCopyright © 2015. All rights reserved.