an implementation of the Bernoulli formulation of Naive Bayes in Scala