# bentrevett/pytorch-sentiment-analysis

Tutorials on getting started with PyTorch and TorchText for sentiment analysis.

Repository: https://github.com/bentrevett/pytorch-sentiment-analysis
Canonical: https://ross.abutalabs.com/products/pytorch-sentiment-analysis
Language: Jupyter Notebook
License: MIT
License Family: permissive
Topics: pytorch, sentiment-analysis, tutorial, rnn, lstm, fasttext, torchtext, sentiment-classification, cnn, cnn-text-classification, lstm-sentiment-analysis, pytorch-tutorial, pytorch-tutorials, pytorch-nlp, nlp, natural-language-processing, recurrent-neural-networks, word-embeddings, transformers, bert
Last push: 2024-03-27T17:27:27+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3185, "days_push": 889, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4613, forks 1169 (observed 2026-08-28T04:08:55.069706+00:00)

## What it is
A collection of Jupyter notebook tutorials teaching sequence classification with PyTorch, using sentiment analysis on movie reviews as the running example. It progresses from neural bag-of-words through RNNs/LSTMs, CNNs, and pre-trained transformers like BERT.

## Use cases
- learn pytorch for nlp
- sentiment analysis tutorial
- train lstm for text classification
- fine-tune bert for sentiment classification
- understand rnn and lstm theory with code
- cnn text classification example
- getting started with torchtext

## When to choose
- you want hands-on, notebook-based learning of text classification in PyTorch
- you want to see progressively more advanced models (bag-of-words, RNN, CNN, transformer) on the same task
- you are a beginner to NLP deep learning with some Python background

## When to avoid
- you need production-ready sentiment analysis code
- you want a maintained library rather than educational notebooks
- you need tasks beyond sequence classification, such as generation or NER

## Facets
- artifact type: learning-resource
- maturity: active
- function: machine-learning, nlp, deep-learning
- domain: machine-learning, tutorials
- platform: python
- tags: pytorch, torchtext, sentiment-analysis, jupyter-notebooks, lstm, cnn, transformers, bert, text-classification, natural-language-processing

## Member repositories
- bentrevett/pytorch-sentiment-analysis (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:55.069706+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:19:41.951812+00:00, confidence not recorded.
  - readme: https://github.com/bentrevett/pytorch-sentiment-analysis (fetched 2026-08-28T04:08:55.069706+00:00, sha 1ca7d991afa6)
- Data as of 2026-08-30T08:39:29.467469+00:00.
