From 5aabc5891fb7932464cb0df67f5f1ceeed2271b8 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Tue, 13 Oct 2026 08:10:39 +0000 Subject: [PATCH] docs(pii): describe what extend_to_previous_word also takes Titles and prepositions in front of a name are taken as well, and using both directions on one name group swallows a following number. Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Ettore Di Giacinto --- docs/content/operations/middleware.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/content/operations/middleware.md b/docs/content/operations/middleware.md index 406ae467c..7f8bb769e 100644 --- a/docs/content/operations/middleware.md +++ b/docs/content/operations/middleware.md @@ -142,6 +142,13 @@ Here the preceding word must consist of letters (plus `-` and `'`): a word with digits - an amount, a date, a room number - is never taken, nor a protected term. The search skips spaces and tabs but never a line break. +The word before a hit is not always a first name: a title (`Herr`), a +preposition or any other plain word in front of the surname is taken too +(`Gast Greta Waldmeister` loses `Greta`, `Herrn Waldmeister` loses `Herrn`). +Like the next-word option it trades over-masking for fewer leaks. Do not +combine both directions on the same name group: each hit then also takes the +word after it, so a name followed by a number swallows that number. + #### Protected terms The opposite failure is a value the model tags although it must reach the