nspam — Nostr reply-spam classifier (v2.2)
On-device spam scoring for Nostr reply notes. See model_card.md for details.
Files
| file | purpose |
|---|---|
model.txt / model.json |
trained model |
calibration.npz |
isotonic calibration table |
config.json |
feature layout + hashing convention |
parity_fixtures.jsonl |
reference inputs + expected scores |
hash_fixtures.jsonl |
token-level hash checks |
Integrating
A port needs:
- Feature extraction — reproduce preprocessing + hashing + structural
features. See
config.jsonfor the exact layout. - Model inference — load
model.txtvia LightGBM4j (Kotlin/Java), LightGBM C API, or ONNX conversion. - Calibration — piecewise-linear interpolate the raw score through
calibration.npzknots.
Validate your port against parity_fixtures.jsonl.