@Override
      public int compare(Map.Entry<ArrayList<String>,Double> o1,
                         Map.Entry<ArrayList<String>,Double> o2) {
        return o1.getValue().compareTo(o2.getValue());
      }
Trims an n-gram estimation down to either 'pf' * 'k' n-grams, or 'k' n-grams if
finalTrim is true.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/NGramEstimator.java