Java implementation of Dr.Dobb's Naive Bayesian Text Classifier.
import catalinc.tools.text_classifier.NaiveBayesianClassifier;
public class Main {
public static void main(String[] args) {
TextClassifier classifier = new TextClassifier();
classifier.train("The big dog barks", "dog");
classifier.train("The small cat meows", "cat");
System.out.println(classifier.classify("something that barks")); // -> dog
System.out.println(classifier.classify("something small that meows")); // -> cat
}
}