Skip to main content

Module spam

Module spam 

Source
Expand description

sioul spam: the spam filter learned on this computer (crates/sioul-learn).

fetch downloads the training corpus, each message checked as Sioul checks the mail it stores (--verify: only the checks of the messages kept without them), train trains on demand (a trial with --no-replace), eval tests the table in place, status says where all stands, dry-run says what the filter would do now with the mail in each inbox, review lists the review queue, label says a message is spam or not, job follows what runs apart. Each says it in lines, or as JSON with --json (report). A message is listed by its sender’s address and its subject, masked as the MCP masks them; never by its text. import brings outside training material (JSON lines, docs/spam-filter.md, “Outside material”), kept apart, never shared, and takes it away. why names a message’s words: it is for you, in your terminal; the MCP server offers none of it (docs/ai.md).

The MCP’s spam tools (mcp/spam.rs) say the same through report; its long ones start sioul spam fetch|train --job <id> apart (jobs).

Modules§

by_itself 🔒
The spam filter’s training by itself, from the command line’s side (sioul_learn::auto decides; docs/spam-filter.md, “Training by itself”): its job started apart, at once (start: for the window’s minute, through sioul spam train --by-itself, and for sioul watch’s own minute, every_minute), then run (run: the lowest priority, its power watched, its end kept).
jobs 🔒
Long jobs run apart (docs/mcp.md, “The spam filter’s tools”): the MCP’s spam_fetch and spam_train start a detached sioul spam fetch|train --job <id> and answer at once with its id. The job writes where it stands, then its result, into $XDG_STATE_HOME/sioul/spam/jobs/<id>.json, which spam_job and sioul spam job read.
report 🔒
What sioul spam says: in lines for a person, as data for a program (--json), the same for the MCP’s spam tools (mcp/spam.rs). The corpus and the table (status), a download (fetch), a training (train), the table’s test with its worst errors (eval), what the matrix would do now (dry_run), the review queue (review), a label (label), a job (job).

Structs§

MatrixArgs 🔒
What a dry run tries instead of your settings: an action for a verdict, a threshold.
SettingsArgs 🔒
fastText’s and the SVM’s settings for one training, instead of the defaults; recorded in what the training says (trained.toml when it replaces the table).
Shown 🔒
Progress on one line that rewrites itself in a terminal; stages on lines of their own. Piped (to a file, a program, an agent), one line per step and per folder downloaded, at its end, never a carriage return.

Enums§

SpamCommand 🔒

Functions§

import 🔒
Imports a file of outside material: counts only, never a message.
long 🔒
A long command: its progress on standard error (one line per step or folder when piped), its report at the end; or, as a job (--job), its progress and its end written into the job’s file, stopping when asked.
outside_pairs 🔒
A source’s name, counts and dates, as the strings take them.
remove_source 🔒
run 🔒
say 🔒
A report printed: its lines, or its data as JSON.
signed 🔒
why 🔒