public interface RandomTextProvider
| Modifier and Type | Method and Description |
|---|---|
String |
generateQueryString(int words,
double approximateFrequency)
Generate a query string that may match in some way against the corpus of generated documents as a whole.
|
String |
generateQueryString(long seed,
int words,
int wordLimit)
Generate a query string that exactly matches the specific random content in some way
|
InputStream |
getInputStream(long seed,
long length,
String... strings)
Generate a repeatable input stream made up of random words.
|
InputStream getInputStream(long seed, long length, String... strings) throws IOException
seed - - the initial seed for the state of the generator - to give repeatable contentlength - - the length of content required in bytesstrings - - an optional array of strings. The first will be in 100% of streams generated, the next 10%, the next 1% etc.
Null values will be skipped, so you could add a fixed word to 10% and 0.1% of documents using ...., null, "10", null, ".1")IOExceptionString generateQueryString(long seed, int words, int wordLimit)
seed - - the initial seed for the state of the generator - to give repeatable contentwords - - the number of words required in the query stringwordLimit - - the number of words to consider from the generated stream.String generateQueryString(int words, double approximateFrequency)
words - - the number of words required in the query stringCopyright © 2015. All rights reserved.