Exercise: Word Frequencies
Consider a program wfreq to process text files (via stdin ):
- treat the input file as a sequence of words
- count the number of times each word occurs
- print a list of words and their occurrence frequencies
Use the /usr/bin/time command to measure execution cost of wfreq
- on small, medium and "large" text files
Determine the approximate cost per byte of input.
|