mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-30 10:09:13 -04:00
The mirror of extend_to_next_word. A name model often tags the surname with high confidence and scores the first name in front of it below min_score, so "Gast Greta Waldmeister" became "Gast Greta [REDACTED:ner:LASTNAME]". extend_to_previous_word lists entity groups whose accepted detections also cover the word directly before them on the same line. The preceding word must consist of letters (plus '-' and the apostrophe): a word with digits - an amount, a date, a room number - is never taken, nor is a protected term, and the search never crosses a line break. Docs: operations/middleware.md and advanced/model-configuration.md. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de>