biglam/on_the_books
Viewer • Updated • 1.79k • 169 • 2
A text classification model fine-tuned on biglam/on_the_books to identify Jim Crow laws in historical US legislative text.
This model classifies sections of US state legislation as either Jim Crow laws (discriminatory laws targeting racial minorities) or non-Jim Crow laws. It was fine-tuned from answerdotai/ModernBERT-base, which supports up to 8,192 tokens of context.
Evaluated on a stratified 15% held-out test set (268 samples):
| Metric | Score |
|---|---|
| F1 | 0.9487 |
| Accuracy | 0.9701 |
| Precision | 0.9367 |
| Recall | 0.9610 |
from transformers import pipeline
classifier = pipeline("text-classification", model="davanstrien/jim-crow-laws-ml-agent")
text = "The Commission shall provide separate sleeping quarters and separate eating space for the different races."
result = classifier(text)
print(result)
# [{'label': 'jim_crow', 'score': 0.99...}]
The On the Books dataset contains 1,785 sections of North Carolina state legislation from the Jim Crow era, annotated by historians as either Jim Crow laws or non-Jim Crow laws. The dataset is imbalanced: 71% non-Jim Crow, 29% Jim Crow.
no_jim_crow (0): Non-discriminatory legislationjim_crow (1): Jim Crow law (racially discriminatory legislation)Base model
answerdotai/ModernBERT-base