Skip to content

catalinc/naive-bayesian-classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

naive-bayesian-classifier

Java implementation of Dr.Dobb's Naive Bayesian Text Classifier.

example

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
    }
}

About

Naive bayesian text classifier

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages