Downloads · 30 days
0
lmoody68/leads-doctype-classifier
leads-doctype-classifier is a text classification model from lmoody68. Use it when you need a label for a piece of text. It is set up for sklearn. The card lists the license as other.
Part of L.E.A.D.S. (Legal Education & Analytical Deep-Search). This is an auxiliary metadata tagger: it predicts a legal document's type — bill, opinion, regulation, statute — from sentence embeddings.
Downloads · 30 days
0
Access
Public
Updated Jun 14, 2026
Repo size
13.3 KB
Likes
0
Public
Click a slice to open those files.
.joblib13.3 KB · 71%
From the Hugging Face model README
Part of L.E.A.D.S. (Legal Education & Analytical Deep-Search). This is an auxiliary metadata tagger: it predicts a legal document's type — bill, opinion, regulation, statute — from sentence embeddings.
sentence-transformers/all-MiniLM-L6-v2 embeddings (384-d, ONNX — no torch).LogisticRegression (class_weight="balanced").| Metric | Value |
|---|---|
| Held-out accuracy | 0.9252 |
| Held-out macro-F1 | 0.897 |
| 5-fold CV macro-F1 | 0.8091 ± 0.1075 |
| class | precision | recall | F1 | test support |
|---|---|---|---|---|
| bill | 0.929 | 0.929 | 0.929 | 14 |
| opinion | 0.673 | 0.946 | 0.787 | 37 |
| regulation | 0.945 | 0.922 | 0.933 | 334 |
| statute | 0.953 | 0.926 | 0.939 | 243 |
Classes excluded (too few samples, <20): docket (12), statistic (8)
import joblib, numpy as np
from huggingface_hub import hf_hub_download
from sentence_transformers import SentenceTransformer # or any all-MiniLM-L6-v2 encoder
clf = joblib.load(hf_hub_download("lmoody68/leads-doctype-classifier", "doctype_clf.joblib"))
enc = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
X = enc.encode(["The debt collector shall not communicate with third parties..."])
print(clf.predict(np.asarray(X)))
This model classifies document type only. It is NOT legal advice, not a model of the law, and must never be used to answer legal questions. Trained on public legal text for educational/portfolio purposes.
Auto-generated model card. Trained 2026-06-14T18:45:53+00:00.