Class Util


  • public class Util
    extends java.lang.Object
    A place for sharing code.
    • Constructor Summary

      Constructors 
      Constructor Description
      Util()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addCharSequence​(LangProfile langProfile, java.lang.CharSequence text)  
      static double[] makeInternalPrioMap​(@NotNull java.util.Map<LdLocale,​java.lang.Double> langWeightingMap, @NotNull java.util.List<LdLocale> langlist)  
      static double normalizeProb​(double[] prob)
      normalize probabilities and check convergence by the maximum probability
      static java.lang.String unicodeEncode​(java.lang.String s)
      unicode encoding (for verbose mode)
      static java.lang.String wordProbToString​(double[] prob, java.util.List<LdLocale> langlist)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

    • Constructor Detail

      • Util

        public Util()
    • Method Detail

      • addCharSequence

        public static void addCharSequence​(LangProfile langProfile,
                                           java.lang.CharSequence text)
      • unicodeEncode

        public static java.lang.String unicodeEncode​(java.lang.String s)
        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

        public static java.lang.String wordProbToString​(double[] prob,
                                                        java.util.List<LdLocale> langlist)
      • makeInternalPrioMap

        public static double[] makeInternalPrioMap​(@NotNull
                                                   @NotNull java.util.Map<LdLocale,​java.lang.Double> langWeightingMap,
                                                   @NotNull
                                                   @NotNull java.util.List<LdLocale> langlist)