The implementation is divided up into three parts:
The trainer is manifested in several classes:
hockey puck stick goalie forward defenseman referee ice checking slapshot helmet football field football pigskin referee helmet turf tacklewhere hockey and football are the labels and the remaining words are the features associated with those particular labels.
The output from the trainer is a {@link org.apache.hadoop.io.SequenceFile}.
The {@link org.apache.mahout.classifier.bayes.BayesModel} is the data structure used to represent the results of the training for use by the {@link org.apache.mahout.classifier.bayes.BayesClassifier}. A Model can be created by hand, or, if using the {@link org.apache.mahout.classifier.bayes.BayesDriver}, it can be created from the {@link org.apache.hadoop.io.SequenceFile} that is output. To create it from the SequenceFile, use the {@link org.apache.mahout.classifier.bayes.io.SequenceFileModelReader} located in the io subpackage.
The {@link org.apache.mahout.classifier.bayes.BayesClassifier} is responsible for using a {@link org.apache.mahout.classifier.bayes.BayesModel} to classify documents into categories.