feat(blocklist): Stopword-Blocklist 4-Ebenen-Kaskade (B13/B14-Fix)
Erweitert is_invalid_learn_keyword um die 4-Ebenen-Kaskade (Konzept
Analysen/Stopword-Blocklist-Architektur_Rainer.md §3):
1. E1 Stopword — DE ∪ EN Funktionswoerter (stopwords-iso, statisch als
stopwords_de.json 620 + stopwords_en.json 1298 Woerter, MIT-Lizenz)
plus plugin-spezifische Add-Ons (A6: thema/raum/channel/doku/...).
2. E2 Raumname — P-112 (identisch/Substring, unveraendert).
3. E3 Domaenenwort — room_map.blocked_keywords (Modellnamen, CLI-Flags,
Technik-Begriffe; konfigurierbar pro Instanz).
4. E4 Struktur — Proton-UID (25-32 alphanumerisch mit Ziffer), reine
Zahlen, reine Sonderzeichen.
Rueckgabe Optional[str] mit Begruendungs-String (Telemetrie).
- blocklist.py: Kaskade + Lazy-Load-Cache (FM1) + get_stopwords().
- keyword_extractor.py: lokale STOPWORDS-Liste ersetzt durch Loader
(single source of truth, FM5). Schichten 4a/4b/4c/4d rufen zentrale
Blocklist.
- room_map.py: blocked_keywords Property + _from_dict/save/reload.
- room-map.schema.json: blocked_keywords (list[str], default []).
- templates/room-map.json: Initial-Befuellung (17 Woerter).
- adapter.py-Aufrufstellen UNVERAENDERT (additiv, A5).
Spike verifiziert: A1 (620/1298 Woerter), A4 (Proton-UID-Regex korrigiert
auf alphanumerisch+Ziffer — Konzept-Regex ^[a-z]{25,32}$ war falsch),
A7 (10000 Aufrufe 3.4ms < 100ms).
Tests: +23 (test_blocklist 25, test_keyword_extractor 18, test_room_map
+3). 1997 passed, 1 vorbestehender flaky Test (test_user_visible, auch
auf HEAD rot — geteilte /tmp/test_map.json).
This commit is contained in:
@@ -69,6 +69,12 @@
|
||||
"type": "object",
|
||||
"description": "Admin-corrected keyword→room mappings (learned from !r overrides). Optional.",
|
||||
"additionalProperties": { "type": "string" }
|
||||
},
|
||||
"blocked_keywords": {
|
||||
"type": "array",
|
||||
"description": "Domänenspezifische Ausschlusswörter (E3 der Stopword-Blocklist-Kaskade): Modellnamen, CLI-Flags, Technik-Begriffe, die niemals ein thematisches Lern-Keyword sind. Konfigurierbar pro Instanz.",
|
||||
"items": { "type": "string", "minLength": 1 },
|
||||
"default": []
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
||||
Reference in New Issue
Block a user