Class Util
java.lang.Object
com.optimaize.langdetect.cybozu.util.Util
A place for sharing code.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addCharSequence
(LangProfile langProfile, CharSequence text) static double[]
makeInternalPrioMap
(@NotNull Map<LdLocale, Double> langWeightingMap, @NotNull List<LdLocale> langlist) static double
normalizeProb
(double[] prob) normalize probabilities and check convergence by the maximum probabilitystatic String
unicode encoding (for verbose mode)static String
wordProbToString
(double[] prob, List<LdLocale> langlist)
-
Field Details
-
ngramExtractor
-
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
addCharSequence
-
unicodeEncode
unicode encoding (for verbose mode) -
normalizeProb
public static double normalizeProb(double[] prob) normalize probabilities and check convergence by the maximum probability- Returns:
- maximum of probabilities
-
wordProbToString
-
makeInternalPrioMap
-