public class WordGenerator extends Object
| Constructor and Description |
|---|
WordGenerator() |
WordGenerator(int initialSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
addWord(String word,
long frequency)
Add a word.
|
String |
get(int words,
double approximateFrequency) |
String |
getWord(double value)
Get a word from the distribution based on a uniform distribution between 0 and 1
|
int |
getWordCount() |
Set<String> |
getWordSet() |
public WordGenerator()
public WordGenerator(int initialSize)
public void addWord(String word, long frequency)
frequency - - per million wordspublic String getWord(double value)
public int getWordCount()
public String get(int words, double approximateFrequency)
Copyright © 2015. All rights reserved.