Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Textblob sentiment algorithm

Does anyone know how textblob sentiment is working? I know it is working based on Pattern but I could not find any article or document explain how pattern assigns polarity value to a sentence.

like image 232
Sahar Avatar asked Dec 11 '22 11:12

Sahar


1 Answers

Here is the code of textblog sentiment module: https://github.com/sloria/TextBlob/blob/90cc87ab0f9e25f37379079840ec43aba59af440/textblob/en/sentiments.py

As you can see, it has a training set with preclassified movie reviews, when you give a new text for analysis, it uses NaiveBayes classifier to classify the new text's polarity in pos and neg probabilities.

like image 119
DhruvPathak Avatar answered Jan 18 '23 11:01

DhruvPathak