in reply to extracting keyword frequency from files
You may wish to take a look at the Ngram Statistics Package, by Ted Pedersen.
HTH,