-
Build an alphabetical list of words that occur in the
text below (a word is a continious sequence of
alphanumerics).
-
For each word compute its frequency.
-
Output:
the alphabetical list of words along with the frequencies.
The Pythagorean Theorem employed 24 words, the Lord's Prayer
has 66 words, Archimedes Principle has 67 words, the 10
commandments have 179 words, the Gettysburg Address had 286
words, the Declaration of Independence, 1,300 words and finally
the European Commission's regulation on the sale of cabbage:
26,911 words.
While writing the code please keep in mind that the following
projects will require building a similar dictionary for a large
text collection. It would be useful to design the code in such
a way that it can be used as a module in a larger future
project.