Class LinguisticsUtils

java.lang.Object
org.episteme.social.linguistics.LinguisticsUtils

public final class LinguisticsUtils extends Object
Utility class providing mathematical models used in linguistics, such as Zipf's law for word frequency distribution.
Since:
2.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • calculateZipf

      public static double calculateZipf(double k, double s, double n)
      Calculates Zipf's law probability. P(k) = 1 / (k^s * H(n, s)) where H is the generalized harmonic number.
      Parameters:
      k - rank of the word
      s - value of the exponent characterizing the distribution
      n - total number of elements
      Returns:
      the probability of the k-th element
      See Also: