Skip to main content

Module words

Module words 

Source
Expand description

The words Sioul looks for (docs/words.md): every list a recogniser matches text against (one-time codes, bills, letters, folders, brands, the spam filter’s tokenizer…), out of the code and into data that you can change.

Three layers make each list:

  1. language packs, shipped: crates/sioul-core/data/words/<language>.toml, a file per language, as the .ftl files are;
  2. country packs, shipped: data/words/countries/<code>.toml, the names of a country (its public bodies, its brands, its banks’ services), and data/words/international.toml, always in use: the words of mail programs, servers and apps in any language, brands of every country, shared mail providers;
  3. your changes, in config.toml under [words]: for each list, the words you added (add) and the shipped ones you took away (remove), never a copy of the list, so that a newer Sioul’s words still reach you.

A list as Sioul uses it: the words of the packs in use, less the shipped words you took away, plus yours; compared folded (text::fold: capitals and accents aside), each once, the first spelling kept. A word both taken away and added is there: you put it back.

The packs in use: the languages of [words] languages, else the interface’s and English; the countries of [words] countries, else [contacts] region, else the locale’s; and the international pack. A newer pack on disk ($XDG_DATA_HOME/sioul/words/, then each of $XDG_DATA_DIRS’ sioul/words/) wins over the built-in one by its checked date, as the site presets do (presets.rs): a distribution updates them without building Sioul; your own changes never go there.

[words]
languages = ["fr", "en"]
countries = ["FR"]

[words.codes.code]
add = ["Bestätigungscode"]
remove = ["code temporaire"]

[words.brands.brands]
add = { "Ma Banque" = ["mabanque.example"] }
remove = ["Banque Exemple"]

Structs§

AccountWords
Money moved between your own accounts (accounts).
Approvals
Other apps’ notifications that hand a code over or ask for an approval now (appnotes).
BankAbove
Lines above a CSV export’s header.
BankColumns
A CSV export’s columns, by their names (bank).
BankWords
Bank and payment-processor exports (bank).
BrandWords
Senders who borrow a name (lookalike).
CallWords
A site’s notification that someone calls (sites).
CaptureWords
Quick capture (capture).
Codes
One-time codes, passwords, resets, sign-in links, addresses to confirm (codes).
Compared
The lists in use, as dotted paths: the packs’ alone (shipped) and with your changes (yours), for the settings that show what you changed.
ContractKinds
The kinds of contract, by the words a label, a subject or a sender carries (contracts).
ContractWords
FolderWords
Mail folders by their names (folders).
LetterKinds
What a letter is, the gravest first.
LetterWords
Paper letters, read by OCR (letters).
MoneyWords
Amounts in mail and letters (money).
OcrWords
Reading scans.
Pack
One pack: what it is for, when it was checked, its lists.
PaperKinds
The kinds of paper, by the words a file’s name or a subject carries (papers).
PaperWords
Payments
Mail about money (payments).
Quotes
A message’s quoted history (reading).
Replies
Prefixes of a subject already answered or forwarded (compose).
SenderWords
Automatic senders (porch).
ShieldTopics
A topic’s words, for the shield.
ShieldWords
The shield of a public address (shield).
SpamWords
The spam filter’s tokenizer (spam::tokenize). A table keeps the words it was trained with, and reads every message with them (spam::table::Meta).
TaskKinds
Words by the kind of task they say (tasks::KINDS).
TaskWords
Words of your tasks’ categories.
VoicemailWords
Voicemail an operator sends by mail (voicemail).
Weekdays
The days of the week.
Words
Every list Sioul looks for, as the packs in use and your changes make them.

Enums§

Node
A pack’s lists, or a list’s words: tables keep their order, as the file writes them.

Constants§

FIRST_COUNTRIES
The country whose names were read before the configuration said: France’s.
FIRST_LANGUAGES
The languages read before the configuration says: Sioul’s first two, as every list was until 8 October 2026.
MAPS
The lists that are named lists (Named): their entries are names, not words.
SHIPPED 🔒
The packs built into Sioul: their file, under data/words/, and their text.

Statics§

BUILTIN 🔒
CURRENT 🔒
The words of the configuration this program loaded last (set_current).

Functions§

apply 🔒
Your changes put on the merged lists: [words.<list>] tables with add and remove. A list’s add is words; a named list’s add is names and their words, its remove names. The shipped words you took away go first, then yours come: one both taken away and added is there.
apply_one 🔒
array 🔒
available_countries
The countries Sioul has a pack for: “FR”.
available_languages
The languages Sioul has a pack for: “en”, “fr”.
base_language 🔒
changes_table 🔒
The table of a list’s changes in the configuration ([words.codes.code]), made with the tables above it, those implicit, so the file says only it.
compared
The lists of a configuration, shipped and changed.
countries
The countries whose names are read: [words] countries, else [contacts] region, else the locale’s.
current
The words of the configuration this program loaded last, else the built-in ones: for the few readers deep in other crates that see no configuration (a server’s folder names, folders::role_of). The window and the command line say them (set_current) when they read the configuration; tests never do, so they read the built-in ones.
deduplicated 🔒
drop_changes 🔒
Takes a list’s changes out, and the tables above them left empty.
folded
A word as lists compare it: trimmed, lowercase, without its accents (text::fold).
holds_word
Whether a folded text holds one of a list’s words as a whole word, as docs/words.md says words are matched: no letter or digit right before it, nor right after, where the word itself begins or ends with one (“du” in “part du 01…”, never in “durée”; “de :” before anything). A word added in [words] is trimmed, and needs no spaces. The voicemail’s callers’ leads and the sites’ call words are read so.
in_use 🔒
The packs in use, in their order: the languages’, the countries’, the international one.
is_named
Whether a word (a category, a folder’s name) is one of a list’s, folded.
keep_first
For a configuration older than these words (a config.toml without a [words] table, written before 8 October 2026): writes the languages and the country every list was written for until then, so that nothing changes until you change it. Returns whether it wrote.
keep_first_once
keep_first, once on each device: at the first start of a Sioul with these words. A configuration from before keeps its French, English and France; one made afterwards (a new person’s, by this Sioul) is left to its interface’s language and English (languages). marker says it was done.
languages
The languages read in your mail: [words] languages, else the interface’s and English.
lists 🔒
The lists made from these packs, with these changes (none: the packs alone).
merge 🔒
Each pack’s lists added to into, in order: a list’s words after those already there.
named_in
Whether one of these words (a task’s categories) is one of a list’s, folded.
newest 🔒
The packs, each the newest of the built-in one and the copies on disk, by checked.
node_of_item 🔒
node_of_value 🔒
older_settings 🔒
The settings that held whole lists before [words] (filed_words, [quiet] personal and work): while written, and while [words] says nothing of the same list, they are the list, as they were.
places 🔒
Where newer packs may be: yours first, then the system’s (as presets::places).
reset
Takes every change of a recogniser out (“codes”: [words.codes…]): back to the shipped lists.
reset_lists
Takes the changes of these lists out (“folders.trash”…): one line of the words tab back to the shipped lists, the other lists of its recognisers kept.
set_current
Says which words this program uses now (current).
shipped 🔒
The packs built in, as shipped: no copy on disk read.
strings 🔒
tidy 🔒
Each list’s words once, compared folded, the first spelling kept; empty words dropped.
typed 🔒
value_of 🔒
The merged lists as the typed structs read them: a named list as pairs, in order.
write_list
Writes a list’s changes so that it holds wanted, compared with what the packs alone give (shipped): the words not shipped go to add, the shipped ones not wanted to remove. Wanting the shipped list takes the changes out. A named list (MAPS) is not written here: see write_names.
write_names
Writes a named list’s changes (MAPS: brands and their domains, bodies and their words) so that it holds wanted, compared with what the packs alone give (shipped), names and words folded: a name not shipped goes to add with its words; a shipped name not wanted to remove; a shipped name given more words, those words to add; a shipped name given fewer, to remove and back in add with the words wanted (added wins). Wanting the shipped list takes the changes out.
write_setting
Writes [words] languages (codes, “fr”) or countries (“FR”), the order kept.

Type Aliases§

Named
Named lists, in their order: brands and their domains, bodies and the words their letters carry, months by their number.