Last modified on February 19, 2007, at 09:30 AM (see updates)
These methods should use
ZipfStatistics.class. Download it and save it in the same directory as your source file. It contains the following methods:
double slope(double wordFrequencies)
double rSquared(double wordFrequencies)
Download a few books from Project Gutenberg and see if their word distributions follow Zipf's law.
For control try loading
TextAnalyzer with random words. (Hint: Use
Math.random() to generate such words.)
README.TXT file, include the names and URLs of the books you tried, their slopes and R2 values, and the slope(s) and R2 values of the random text(s). Also state your conclusion.
In the submitted
.jar file, also include the system driver(s) you developed to explore this question.