← all repositories
adeshpande3/LSTM-Sentiment-Analysis

A 2017 time capsule: LSTM sentiment analysis, still running on TF 1.1

Companion code for an O'Reilly tutorial that shows how to classify text sentiment with LSTMs in TensorFlow.

1k stars Jupyter Notebook LearningLanguage Models
LSTM-Sentiment-Analysis
Velocity · 7d
+0.3
★ / day
Trend
steady
star history

What it does

This repo packages the code and data for an O’Reilly tutorial on training LSTM networks for sentiment analysis. You get a Jupyter notebook that walks through the model, pre-trained checkpoints, and a separate notebook (Pre-Trained LSTM.ipynb) where you can feed in your own text and watch the network opine on its emotional valence.

The interesting bit

The project is essentially a frozen educational artifact: every dependency is pinned to 2017-era versions, and the README documents the archaeology required to make it run on anything newer. That checkpoint-conversion dance for TensorFlow 1.2+ is a small masterclass in how quickly deep-learning infrastructure rots.

Key highlights

  • Pre-trained model included (pretrained_lstm.ckpt-90000) so you can skip training
  • Docker setup provided for those who want to containerize their nostalgia
  • Explicitly tied to the O’Reilly tutorial; not a standalone framework
  • Requires manual tarball extraction of models and training data before first run

Caveats

  • TensorFlow 1.1 is hard-coded; running on modern TF demands checkpoint conversion or code surgery
  • No mention of dataset size, accuracy metrics, or comparison baselines in the README
  • Docker instructions contain placeholder values (@yourname, @YourDir) that need manual editing

Verdict

Grab this if you’re working through the specific O’Reilly tutorial or need a concrete, minimal LSTM example to dissect. Skip it if you want a maintained, production-ready sentiment tool—Hugging Face has you covered there.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.