Naive Bayes Implementation in Java with Spam Filtering example