Skip to main content

jurebes 🐾

Just-sklearn Utility for Reproducible Evaluation of Baselines, Estimators and Solvers.

A classical-ML text classification research framework, built on plain scikit-learn. It uses no NLTK and no padacioso.

Jurebes wires any sklearn featurizer to any sklearn classifier behind a small text-classification API. It also includes a registry of ready-to-use baselines, a benchmark harness, dataset loaders, a CLI, and an OVOS pipeline plugin.

Intent classification is the main use case, but the core works with any single-label text task. Spam, sentiment, topic, and language-ID tasks run on the same API. See the general text classification guide.

Named in memory of Jurebes, the best dog.

Install

pip install jurebes
# optional extras
pip install jurebes[hf]              # HuggingFace dataset loader
pip install jurebes[search-bayes]    # Bayesian hyperparameter search (skopt)
pip install jurebes[search-genetic]  # Genetic-algorithm search (sklearn-genetic-opt)
pip install jurebes[search-all]      # both bayes and genetic
pip install jurebes[bench-plot]      # matplotlib-based comparison plots
pip install jurebes[test]            # pytest stack

Quickstart

from jurebes import IntentClassifier, BASELINES

clf = IntentClassifier(BASELINES.build("logreg"))
clf.add_intent("hello", ["hello", "hi", "hey there"])
clf.add_intent("joke",  ["tell me a joke", "say a joke", "make me laugh"])
clf.fit()

result = clf.predict("hi there")
print(result.intent, result.confidence, result.entities)

Pass any sklearn Pipeline or estimator instead of a baseline name. Jurebes wraps non-probabilistic estimators with CalibratedClassifierCV automatically, so predict_proba always works.

Documentation

Full documentation lives under docs/:

  • Getting started: install, first classifier, core concepts, troubleshooting.
  • Guides: choosing a baseline, slots, calibration, reproducibility, debugging.
  • Theory: classical-ML foundations: featurization, linear models, kernels, ensembles, statistical comparison.
  • API reference: every public module, function, dataclass, and CLI flag.

Research

Jurebes is built as a research framework:

  • 48 named baselines tagged into groups (linear, kernel, tree, naive_bayes, neural, reduced_dim, online, strategy, feature_engineering, ensemble, discriminant, categorical). This includes neural-bottleneck autoencoder pipelines (autoencoder_*) and dict-input categorical pipelines (categorical_*).
  • A hyperparameter search subsystem (jurebes.search) with grid, random, successive-halving, Bayesian (optional), and genetic (optional) backends.
  • A benchmark harness with multi-metric scoring (f1_macro, accuracy, log_loss, top_k_accuracy, ...) and pooled tail-latency percentiles.
  • See docs/research.md and docs/search.md.

Baselines

BASELINES is a registry of 48 named factories. It covers naive Bayes, logistic regression, linear/RBF SVMs, kNN, online learners (SGD, perceptron, passive-aggressive, ridge), tree ensembles (random forest, extra trees, gradient boosting, HistGBM, bagging), a shallow MLP, voting, stacking, reduced-dim methods (LSA/NMF/LDA/autoencoder), multi-class strategy wrappers (OvR/OvO), discriminant analysis, text-statistics composites, and dict-input categorical pipelines. List them:

jurebes list-baselines

Registry table

group baseline
linear hashing_sgd_hinge
linear hashing_sgd_log
linear linear_svc
linear linear_svc_char
linear linear_svc_hinge
linear logreg
linear logreg_char
linear logreg_elasticnet
linear logreg_l1
linear passive_aggressive
linear perceptron
linear ridge
linear sgd_hinge
linear sgd_log
linear sgd_modified_huber
kernel knn
kernel lsa_rbf_svc
kernel nusvc
kernel rbf_svc
tree bagging_logreg
tree decision_tree
tree extra_trees
tree gradient_boosting
tree hist_gbm
tree random_forest
naive_bayes complement_nb_count
naive_bayes nb_bernoulli
naive_bayes nb_complement
naive_bayes nb_multinomial
neural mlp_shallow
reduced_dim lda_logreg
reduced_dim lsa_linear_svc
reduced_dim lsa_logreg
reduced_dim lsa_rbf_svc
reduced_dim nmf_logreg
online hashing_sgd_hinge
online hashing_sgd_log
online sgd_hinge
online sgd_log
online sgd_modified_huber
strategy ovo_linear_svc
strategy ovr_linear_svc
feature_engineering text_stats_logreg
feature_engineering union_text_stats_logreg
ensemble bagging_logreg
ensemble stacking
ensemble union_logreg
ensemble voting_soft
reduced_dim autoencoder_linear_svc
reduced_dim autoencoder_logreg
reduced_dim autoencoder_rbf_svc
discriminant lda_classifier
discriminant qda_classifier
categorical categorical_logreg
categorical categorical_random_forest

Rows total more than 48 because some baselines (for example bagging_logreg, sgd_log, hashing_sgd_hinge) belong to multiple groups. The registry itself holds 48 unique factories.

The categorical_* pipelines accept list[dict[str, str]] instead of raw text. They are available through the programmatic API only, and text-fixture benchmarks skip them.

Register your own:

from jurebes import BASELINES
BASELINES.register("my_pipeline", lambda: build_my_sklearn_pipeline())

Benchmark

jurebes benchmark --dataset data.csv \
    --baselines logreg,nb_multinomial,linear_svc --cv 5 \
    --out report.md

Or programmatically:

from jurebes.benchmark import compare, to_markdown
from jurebes.datasets import load_csv

X, y = load_csv("data.csv")
result = compare(["logreg", "linear_svc", "nb_multinomial"], X, y, k=5)
print(to_markdown(result))

RunResult captures accuracy, macro/micro F1, per-class F1, training time, predict-latency p50/p95/p99, model size, and the confusion matrix.

Slots

Five pluggable taggers cover dictionary, template, sklearn IOB, hybrid cascade, and CRF (optional extra). All are available through the TAGGERS registry and share the same protocol.

from jurebes import IntentClassifier, BASELINES
from jurebes.slots import TAGGERS, SklearnIOBTagger

clf = IntentClassifier(BASELINES.build("logreg"), tagger=SklearnIOBTagger())
# or by name:
clf = IntentClassifier(BASELINES.build("logreg"), tagger="hybrid")

clf.add_entity("name", ["bob", "alice"])
clf.add_intent("name", ["my name is {name}", "call me {name}"])
clf.add_intent("hello", ["hello", "hi"])
clf.fit()
clf.predict("my name is bob").entities  # -> {"name": "bob"}

TAGGERS.names()  # ['dictionary', 'template', 'sklearn_iob', 'hybrid', 'crf']

See docs/ for the research guide, slot tagger details, and the OVOS deployment notes:

Examples

Runnable, cell-marked scripts live in examples/notebooks/:

Both examples need pip install jurebes[hf,bench-plot].

Metadata

Release files for jurebes 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jurebes 0.4.0
File Size Uploaded
jurebes-0.4.0.tar.gz 92.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jurebes 0.4.0
File Interpreter ABI Platform
jurebes-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 182.6 kB

Release files / jurebes-0.4.0.tar.gz

Download URL jurebes-0.4.0.tar.gz
Size 92.7 kB
Tags Source
SHA-256 checksum
How to use checksums
222adbf181f9e1f5ee09e1d0c03d458d915f449ca6cb55989b0bf69e4cee30a2
BLAKE2b-256 checksum
How to use checksums
1b7e8b472470979665f05f2e027a4412ded2726ef8610ca87062dffbbee1b058
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / jurebes-0.4.0-py3-none-any.whl

Download URL jurebes-0.4.0-py3-none-any.whl
Size 90.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
705ba6137a3b27aa940492bbe9939abf1a5f5ae159378705d4342533de4c450e
BLAKE2b-256 checksum
How to use checksums
134a7b12f4fe502cdeeeb87112c5c24890d6c7be5cabff5c8e4c9cb961962829
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page