Train Your Own Text Classifier (Naive Bayes, In Your Browser)

Train a small text classifier on your own labelled examples and use it immediately, privately.

Use the tool

Why this tool exists

Sometimes you do not need a big model: sorting support tickets, tagging notes or routing feedback can work with a few dozen labelled examples. This tool trains a multinomial Naive Bayes classifier on words and bigrams from your "label: text" lines, shows the strongest clue words per label, estimates accuracy by leave-one-out testing on your own examples and predicts labels with probabilities for the texts you add.

Naive Bayes is a simple baseline: it assumes words are independent, only knows words it has seen and always picks one of your labels, even for text that fits none. More and more varied examples help most. Training happens in your tab and the data is never sent anywhere.

How to use it

  1. Write training lines as label: text (at least two labels, a few examples each).
  2. Put the texts to classify in the second box, one per line.
  3. Read the predictions, the "unsure" marks and the accuracy estimate.

Frequently asked questions

How many examples do I need?

A dozen per label gives a rough start; dozens to hundreds are better.

Can it say "none of these"?

No. Add an "other" label with examples if you need that.

Is this AI?

It is classic machine learning, trained on your data in your browser.