[lang][library] Languages: liber-lang (words with UTF-16 offsets, lemmatizer trait with tables and hand-written rules, coverage, warm-up, levels, Ludus concept ids, Gale-Church alignment with anchors); known words, the known band, familiar books and editions as events

This commit is contained in:
2026-11-17 19:33:45 +01:00
parent 4e68eec3c4
commit 7dca9de95c
25 changed files with 2272 additions and 8 deletions
+19 -1
View File
@@ -1,6 +1,6 @@
//! Events: what a device did, with a hybrid logical clock. The order of events is total and the same everywhere.
use crate::library::{BookFile, BookInfo, Colour, Field, GoalKind, HabitGoal, Mark, Outcome, Person};
use crate::library::{BookFile, BookInfo, Colour, Field, GoalKind, HabitGoal, Mark, Outcome, Person, WordMark};
use serde::{Deserialize, Serialize};
use std::cmp::Ordering;
@@ -168,4 +168,22 @@ pub enum Op {
MedalSeen {
medal: String,
},
/// Day 3: the reader marked a word (a folded lemma, see `liber_lang::fold`). Last writer wins.
Word {
lang: String,
lemma: String,
mark: WordMark,
},
/// Day 3: the band of a frequency list the reader knows.
KnownBand {
lang: String,
list: String,
upto: u32,
},
/// Day 3: a book file is an edition in another language (`None`: it is the book's own language again).
Edition {
book: String,
sha256: String,
language: Option<String>,
},
}