from ml.Sentiment import Sentiments, Util from ml.Model import LogisticRegression import matplotlib.pyplot as plt sentiments = Sentiments() sentiments.restore_from_pos_neg_file('../8_ML/rt-polarity.pos', '../8_ML/rt-polarity.neg') sentiments.shuffle() sentiments.save('../8_ML/70_sentiment.txt') import random import re from itertools import chain from nltk.stem.porter import PorterStemmer from stop