3

I'm using NaiveBayesClassifier function of TextBlob to classify some phrases and it works fine at the moment.

My problem is, I need explain how the function works with table test. How NaiveBayesClassifier of TextBlob works to classify one phrase and how to get the probabilistic number that the "prob_classify(text)" function generates?

I used http://textblob.readthedocs.org/en/latest/classifiers.html to learning about this function.

  • textblob is a bit of a blackbox, which is kind of why it's so easy to handle. If you want more control of what is happening you might be better off using NLTK directly, training a Naive Bayes Classifier with features you actually know about. – lenz May 25 '15 at 07:32
  • That is not entirely true. You can actually go into the source code and see that TextBlob is just wrapping the NLTK Naive Bayes classifier that is well explained within their code found here: https://github.com/nltk/nltk/blob/develop/nltk/classify/naivebayes.py Hope this helps. – Salvador Medina Aug 03 '16 at 12:10

0 Answers0