Skip to content

Sentiment Analysis in Python with a Fine-Tuned Transformer

Train a sentiment analysis model on your own labelled text with one YAML config and one command.

sentiment is a domain-specific single-label classification task. Use it when labels mean polarity/rating.

Examples:

negative, neutral, positive
1-star, 2-star, 3-star, 4-star, 5-star
angry, calm, satisfied

Train:

python -m jenga_nlp train \
  --config examples/configs/fixture_mpesa_sentiment_cpu.yaml \
  --device cpu

Next steps