0

I have similar problem like below

Why did NLTK NaiveBayes classifier misclassify one record?

In my case, I queried positive feed and built positive_vocab and then queried negative feed and built negative_voca. I get the data from feed clean and built the classifier. How do I build the neutral_vocab. Is there a way I can instruct NLTK classifier to return neutral label when the given word is not found in the negative_voca and positive_vocab. How do I do that?

In my current implementation, if I give a word which is not present in the both sets it tells positive by default. Instead it should tell, neutral or notfound

Raj
  • 401
  • 6
  • 20
  • You need to train a three-way classifier with a three-way training set. – alexis Dec 04 '18 at 11:57
  • I have data for positive and negative vocabulary I can get them from a feed. I don't have a feed for neutral vocabulary. So, if the given input doesn't match positive or negative then it should return as neutral. How can I do this? – Raj Dec 04 '18 at 14:35
  • 1
    I heard you. You need to train a three-way classifier with a three-way training set. – alexis Dec 04 '18 at 22:41

0 Answers0