java - classifier4J problem -


I am using the BayesianClassifier class to classify the spam. The problem is that Mixed words are not being recognized.

For example, if I add led Peplin as a match, then one sentence in it will not be recognized as a match, though it should be done.

To add a match I am using SimpleWordsDataSource

of addMatch ()

Any ideas about how to fix it iMatch () is using?

Thanks in advance!


OK, thanks for the insights. I am attaching more source code.

  SimpleWordsDataSource wds = New SimpleWordsDataSource (); BayesianClassifier Classifier = New BayesianClassifier (wds); Wds.addMatch ("queen"); Wds.addMatch ("Lead Tessepelin"); Wds.addMatch ("Beatles"); Classifier.isMatch ("I Listen Queen"); // This match is identified as Classifier. Ismail ("I listen to Lead Tessepelin"); // It was not recognized as match classifier. Iismemel ("I listen Beatles"); // It has not been identified as a match  

Now I am using BayesianClassifier's taught match method and I have different results Lead Tessepelin < A sentence containing / em> has been classified as a match, which is fine. A sentence with leadership is also classified as a match, which is wrong.

Here is the relevant code:

  BayesianClassifier classifier = new BayesianClassifier (); Classifier Tech match ("lead perspelline"); Classifier.isMatch ("I listen to Lead Tasepelin"); // True Classifier. This match (I listen to "I Lead"); // True  

You need to train it with more data.

Work by creating statistical models of Bayesian classifiers, what is considered to be a match and what is not.

If you give enough data to it, then it will learn that "leadership and touchpelin" is a match, but "leadership" is not itself


Comments