In [12]:
import warnings
warnings.filterwarnings('ignore')
from ds.models.model import Model
from ds.models.Explore import TextInterpret
In [13]:
sentiment = Model()
sentiment.load('sentiment')
In [14]:
TextInterpret('i love this product', sentiment.predict)
Out[14]:
In [17]:
sentiment.comments.display_history()
Out[17]:
In [9]:
new_comment = """
Looks decent, remind me again though what the class definitions are?
"""
sentiment.comments.add_comment(new_comment, 'Pramit')
In [18]:
sentiment.save()
In [24]:
from ds import datasets
reviews = datasets.load('movie_reviews')
sentence = " ".join(reviews.sents()[0])
TextInterpret(sentence, sentiment.predict)
Out[24]:
In [ ]: