Skip to main content

Module spam

Module spam 

Source
Expand description

Sioul’s own spam filter in the window (docs/spam-filter.md): what the mail settings say of it, under “Your own spam filter” (SpamFilter.qml), and on a computer its training on demand, “Train now”.

Training brings the corpus up to date from every address, then learns (crates/sioul-learn, train::run), on a thread of its own at a lower priority, so that the computer stays usable while fastText takes every core. Its progress is said as it goes (spam_changed), at most a few times a second; “Stop” stops it at its next step, what was downloaded kept. A phone never trains: it says where its table comes from (another device’s, brought sealed by the sharing: docs/database.md) and what it measured.

Numbers only, never a message: the window shows what sioul spam status prints, in your language.

One computer trains, by hand: two computers training tables of their own is not supported (the later one’s table would win everywhere; the other, kept by the sharing as a conflict copy beside it, is read by nothing).

After each fetch, on every device (the window’s watchers, a phone’s background step), what the filter judges as you chose “Move to spam” for goes into the account’s Junk folder on the server, and what it judges as you chose “Flag only” for is written in this device’s log of its flags, which the training reads (after_fetch).

Modules§

training 🔒
The training, on a computer (crates/sioul-learn is never built for a phone).

Structs§

Status 🔒
What the settings show of the filter, every line said already (SpamFilter.qml).

Functions§

after_fetch 🔒
Mail just fetched into an account’s inbox (new; nothing on its first fetch, which brings two weeks of it, nor what was there before), judged as the Porch judges it, protections first: what your own filter judges, of a class you chose “Move to spam” for, goes into the account’s Junk folder on the server, as the Junk button does but without a keyword nor a label; of a class you chose “Flag only” for, it stays where it is. Each move and each flag goes into this device’s logs of what the filter did: the Porch lists them among its catches (“Not spam” brings one back), and the training learns from them until you say otherwise. It reaches the server: never on the window’s thread, nor inside a watcher’s own. How many moved.
by_itself 🔒
The window’s minute, on a computer: training again by itself when everything allows it (sioul_learn::auto), as a job apart (sioul spam train --by-itself); the settings said again while one runs or just ended. Never a notification. Off the window’s thread: it may ask the system.
chosen 🔒
Among messages judged, those whose class you chose action for (move them into a Junk folder, or flag them where they are): among the filter’s catches by its verdict, and not moved yet.
grouped 🔒
A count with this language’s thousands separator: “41,200”, “41 200”.
percent 🔒
A share as a percentage, with places decimals: “0.4%”, “0,4 %”.
read_table_lines 🔒
status 🔒
The filter’s state for the settings, as JSON.
status_now 🔒
stop 🔒
The training running stops at its next step.
table_lines 🔒
The table’s lines, kept while its file and the one before stay as they are: the settings ask often while a training runs, and it is two megabytes.
train 🔒
“Train now”: the corpus brought up to date, then a training, on a thread of its own; spam_changed says how it goes. Why it did not start, else “”.
when 🔒
“on Tuesday 6 October at 10:00”, in your language.