Class Util
- java.lang.Object
-
- com.optimaize.langdetect.cybozu.util.Util
-
public class Util extends Object
A place for sharing code.- Author:
- Fabian Kessler
-
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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
unicodeEncode(String s)
unicode encoding (for verbose mode)static String
wordProbToString(double[] prob, List<LdLocale> langlist)
-
-
-
Method Detail
-
addCharSequence
public static void addCharSequence(LangProfile langProfile, CharSequence text)
-
normalizeProb
public static double normalizeProb(double[] prob)
normalize probabilities and check convergence by the maximum probability- Returns:
- maximum of probabilities
-
-