PixelDock
← All guides

Train a small text classifier with your own examples

A local Naive Bayes classifier can learn your labels. Its usefulness depends on the examples you supply.

Prepare labeled examples

Use a JSON array of objects with label and text fields. Supply 4–60 examples, 2–10 labels and at least two examples for each label. Labels are limited to 60 characters and individual example texts to 1,000 characters, within the overall training-input limit.

Represent the distinction you care about

Use examples that resemble the text you will classify. If one category contains only product language and another only sports language, those word patterns drive the result. Repeating nearly identical examples does not demonstrate that the classifier works on new text.

Interpret relative weights carefully

The tool trains multinomial Naive Bayes in page memory. The displayed weights are relative model scores, not measured generalization accuracy or calibrated confidence. With no vocabulary overlap, it reports that limitation instead of choosing an arbitrary label.

Test unfamiliar examples before relying on it

Try text that was not part of training, ambiguous wording and unrelated topics. Review misclassifications and improve your examples. The model and training text are not saved as an account or browser database; downloaded results remain on your device.

Put it into practice.

Open the tool