text-classification · 125.91 MB WASM q8 · 3-Class TweetEval · RoBERTa-base · CC-BY-4.0

Twitter-RoBERTa Sentiment Latest — Social Media & Emoji Classifier

cardiffnlp/twitter-roberta-base-sentiment-latest (CC-BY-4.0) is a RoBERTa-base model trained on ~124M tweets (2018–2021) and fine-tuned on TweetEval for 3-class sentiment (negative, neutral, positive). Loaded via Xenova/twitter-roberta-base-sentiment-latest (q8 WASM, 125.91 MB), it handles emojis, hashtags, slang, and CardiffNLP's official @user / http normalization off the main thread.

Upstream Model cardiffnlp/twitter-roberta-base-sentiment-latest
ONNX Build Xenova/twitter-roberta-base-sentiment-latest
Pipeline Task text-classification
Artifact & Quant 125.91 MB · WASM q8
3-Class Labels negative · neutral · positive
License CC-BY-4.0

1. Live Social Sentiment & CardiffNLP Preprocessing Inspector

Why CardiffNLP preprocessing matters: During training on ~124M tweets, handles became @user and links became http. Toggle normalization below to compare the exact Normalized vs Raw 3-class probabilities side-by-side in ~90 ms on WASM q8.

Pick a social-post preset, edit text, paste anywhere, or drop/upload a .txt, .csv, .json, or .md file:

Uses pipeline("text-classification", ..., { top_k: 3 }) in a dedicated Web Worker.

Drop a .txt, .csv, .json, or .md file here, paste from clipboard, or choose a file.

Dominant sentiment–
Top confidence–
Net polarity (Pos−Neg)–
Shannon entropy–
Latency (2 passes)–
Tokens · NaN check–

Active Run · 3-Class Distribution

Initialize the model above to score this social post.

Net sentiment polarity (−1.00 negative to +1.00 positive)
−1.00 · Negative 0.00 · Balanced +1.00 · Positive

Preprocessing Side-by-Side (@user / http)

Waiting for run to compare normalized vs raw input.
RAW TEXT
–
CARDIFFNLP NORMALIZED
–

Alternate mode probabilities will appear here.

2. Architecture & Source Code

Show the code · twitter-roberta-core.mjs — preprocessTwitterText() (@user & http normalization)
Show the code · worker.js — runSingleClassify() & classify() (top_k: 3 WASM q8)