tagCount + " tags, " + uniqueCount + " unique tags");
System.err.println(pastCutoff + " tags occur " + cutoff + " or more times");
System.err.println("Ranking tags...");
int maxTags = pastCutoff < limit ? pastCutoff : limit;
final ScoreTagQueue queue = new ScoreTagQueue(maxTags);
tagCounts.forEachPair(new ObjectIntProcedure<String> () {
@Override
public boolean apply(String first, int second) {
if (second >= cutoff) {
queue.insertWithOverflow(new ScoreTag(first, second));
}
return true;
}
});
ScoreTag[] rankedTags = new ScoreTag[maxTags];
int pos = maxTags;
while (queue.size() > 0) {
rankedTags[--pos] = queue.pop();
}
System.err.println("Least tag count " + rankedTags[maxTags-1].getCount());
System.err.println("Dumping Ranked Tags...");
System.err.flush();