13e1950050
The gazetteer has been refactored to act as a post-AI normalization filter. Previously, it was used to annotate LLM input with potential corrections from a vocabulary. This approach was ineffective because LLMs often override such hints. The new approach applies the gazetteer *after* the LLM has generated its output. This allows for deterministic correction of known terminology, including fixing LLM output drift (e.g., anglicized drug names). Key changes: - `annotate` function renamed to `replace`. - The output format changes from `Canonical [?original]` to simply the `Canonical` form. - The gazetteer now operates on the final LLM output before persistence, ensuring consistency. - Tests have been updated to reflect this new behavior, focusing on the final output rather than the LLM request payload.