Java implementation of Naive Bayes Classifier