Both models run in your browser. The text you check never leaves your device.
Why the SVM decided this
Highlighted text
Text analysed
How it works
Every input goes through the same cleaning used in training: HTML and links are removed, text is lower-cased, stop words and non-alphabetic tokens are dropped, and the remaining words are lemmatised. Tweet links are read through X’s public embed service first.
There’s no server doing the work: both models were exported from Python and run directly in your browser, the SVM as plain JavaScript and BERT through Transformers.js. That keeps the site free to host and means the text you check stays on your device.
The cleaned text then goes to one of two models, both trained on the Kaggle Fake and Real News dataset (44,898 articles):
- Check uses TF-IDF with a linear SVM. It runs in milliseconds and shows exactly which words drove the result.
- Deep check uses a fine-tuned BERT (bert-base-uncased) that reads words in context. It’s slower and can’t show per-word reasons.
Dissertation results
| Model | Test F1 |
|---|---|
| TF-IDF + Logistic Regression | 0.9719 |
| TF-IDF + Linear SVM Check | 0.9798 |
| BERT (bert-base-uncased) Deep check | 0.9825 |
| RoBERTa (roberta-base) | 0.9765 |
BERT scored highest, but only 0.27 points above the SVM, and RoBERTa came in below it. The transformers needed a GPU and roughly 100 minutes of training each; the SVM trains in about two minutes on a laptop. The dissertation concluded that TF-IDF + linear SVM gives the best balance of accuracy, efficiency and interpretability, which is why it’s the default check here.
The SVM on this site was retrained with calibrated probabilities (same features, same data split) and scores F1 0.9800 on the dissertation’s test set. BERT runs here at its training length of 256 tokens, compressed to 8 bits so it fits in a browser, and scores F1 0.9931 on the same test set (0.9936 before compression). The table above reports the dissertation’s 64-token re-evaluation.
What it can’t do
It judges writing style, not truth. 99% of the “real” articles in the training data come from Reuters, and every “fake” one comes from a different set of websites. The models learned to tell sober wire-service reporting apart from sensational partisan writing, which is a useful signal but not fact-checking. A false claim written in a calm Reuters voice can pass; try the “Fake claim, wire-service style” example above.
- The data covers 2016–2017, mostly US politics. Newer events, other countries and other topics are unfamiliar territory.
- It was trained on full articles. Headlines and tweets are much shorter, so results on them are less reliable.
- High confidence means the text strongly resembles one side of the training data, not that the claim has been verified.