public Dictionary(Random random, int entries, int minWordLen, int maxWordLen,
int freqRatio) {
Binomial binomial = new Binomial(random, minWordLen, maxWordLen, BINOMIAL_P);
lead = Math.max(0,
(int) (entries / (Math.exp(Math.log(freqRatio) / SIGMA) - 1)) - 1);
zipf = new Zipf(random, lead, entries + lead, 1.1);
dict = new String[entries];
// Use a set to ensure no dup words in dictionary
Set<String> dictTmp = new HashSet<String>();
for (int i = 0; i < entries; ++i) {
while (true) {