S ScienceFairProjects.info
Medium⏱ time2 hr$ cost0

Sentiment Analyzer

Feed in movie reviews and the model tells you whether each one is positive or negative.

Start building ↓
fig — working model Result first

The build

Step 01

Clean reviews

Lowercase and strip punctuation.

Step 02

Build features

Count words or use TF-IDF.

Step 03

Train

Fit a classifier on labelled sentiment.

Step 04

Predict

Type a review and read its sentiment.

Working Principle

The model learns which words signal positive vs negative feeling, then weighs a new review's words to predict its mood.

The science behind it

A closer look

TF-IDF highlights words that are distinctive to a review; the classifier learns their link to sentiment.

Take it further

Variables to test

  • 1 Test sarcasm — where does it slip?
  • 2 Compare counts vs TF-IDF features.

More AI