Sentiment-analysis

The code predicts if the news is real or fake using naive Bayees classifier.

About the code:

  • The code takes 2 csv files, of fake and real news.
  • It preprocesses the data by tokeninzing and removing stopwords.
  • The data is divided into training and test sets with 0.8:0.2 ratio
  • It then asks for input of news, by title.
  • The type of news in predicted by Naive Bayees classifier using nltk library.

Accuracy:

0.67