Reputation: 503
I'm looking for a Naive Bayesian Classifier for PHP, ideally something equivalent to the Reverend Bayes version written in Python. Does anyone know of such a library?
Basically I need to be able to train it with a set of labels and words i.e. GOOD = okay, happy, fun; BAD = wrong, rubbish, awful etc and then pass it a string value and have it return a best guess. Reverend does this perfectly but unfortunately the app it now has to be used in is not Python based and making a bridge between the two isn't doable.
Any suggestions will be much appreciated as most of the classes I've found seem to be medically orientated with just a few cases or set-up for spam filtering.
Upvotes: 3
Views: 940
Reputation: 273646
This looks like a nice set of tutorials on the subject. A similar question has been asked previously and the only real answer pointed to the same resource.
Bayesian filtering is a general approach. Even if examples you find are medical, the techniques are pretty much the same and can be applied anywhere.
Upvotes: 3