docs: private double calculateEntropy(MapCount<String> mc) {
          double totalFrequency = 0.;
          Set<Map.Entry<String, Double>> entrySet = mc.get().entrySet();
          for (Map.Entry<String, Double> entry : entrySet) {
              totalFrequency += entry.getValue();
          }
  
          double entropy = 0., p;
          for (Map.Entry<String, Double> entry : entrySet) {
              p = entry.getValue() / totalFrequency;
              entropy += -p * Math.log(p);
          }
  
          return entropy;
      }