bazingagin/npc_gzip
Code for Paper: “Low-Resource” Text Classification: A Parameter-Free Classification Method with Compressors observed · 2026-08-28
Health v2 · maintenance only
20/100
- Activity 0
- Release rhythm 8
- Longevity 85
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 1196
- days_rel: n/a
- days_push: 1122
- n_releases_24m: 0
Adoption not part of the score
1780 stars · 157 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A Python library and research codebase implementing the parameter-free 'kNN-gzip' text classification method from the ACL 2023 paper, which classifies text using compression-based distances (gzip, lzma, bz2) instead of trained models. It is installable via pip and includes CLI scripts for running experiments on standard datasets or custom data.
Use cases
- classify text without training a model
- low-resource text classification for languages with little data
- run gzip-based kNN classification experiments
- benchmark compression-based classifiers on AG News or DBpedia
- classify a custom labeled dataset with compressors
- reproduce ACL 2023 paper results
When to choose
- you need a parameter-free, training-free text classifier
- you have very few labeled examples per class
- you want to reproduce or extend the kNN-gzip paper
- you want a simple baseline that avoids GPU/model training
When to avoid
- you need state-of-the-art accuracy on large datasets
- you need fast low-latency inference at scale
- you want embeddings or fine-tuning with transformers
- your text is very long, since compression distances scale poorly
Facets
library · maturity maintenance
nlp machine-learning compression cli machine-learning data-science python cli cross-platform text-classification gzip-classifier knn low-resource-nlp research-code acl2023 natural-language-processing
2 sources
- readme: https://github.com/bazingagin/npc_gzip · fetched 2026-08-28 · 21cb148abfaf
- registry_pypi: https://pypi.org/pypi/npc_gzip/json · fetched 2026-08-29 · 6d9f7dc24464
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| bazingagin/npc_gzip | main | 20 |
For agents
markdown · JSON · MCP: product_card(name="bazingagin/npc_gzip")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem