nspam / v2.2 /README.md
barrydeen's picture
Upload nspam model v2.2
8e31525 verified
|
Raw
History Blame Contribute Delete
866 Bytes
# 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:
1. **Feature extraction** — reproduce preprocessing + hashing + structural
features. See `config.json` for the exact layout.
2. **Model inference** — load `model.txt` via LightGBM4j (Kotlin/Java),
LightGBM C API, or ONNX conversion.
3. **Calibration** — piecewise-linear interpolate the raw score through
`calibration.npz` knots.
Validate your port against `parity_fixtures.jsonl`.