Implemented naive bayes for newsgroups document classification.