NormGuard: Text Normalisation Research by Lakshmi AnneNormGuard: Text Normalisation Research by Lakshmi Anne

NormGuard: Text Normalisation Research

Lakshmi Anne

Lakshmi Anne

Anne07-Ai/normguard — A domain-aware text-normalisation quality platform for Search, NLP and RAG systems. · Apache-2.0 · 1 stars · 0 forks · 0 watching
An evidence-first quality and safety research toolkit for text normalisation in search, NLP and RAG pipelines.

Important NormGuard completed a focused proof of concept. Its protected-terminology safety controls passed, but the evaluated general-lemmatisation approach did not achieve the pre-registered retrieval-utility gates. It is not approved as a production retrieval recommendation.

Research outcome

NormGuard tested whether policy-first English lemmatisation could improve lexical BM25 retrieval while preserving terminology whose exact form matters.
Two governed experiments were completed on the frozen Amazon ESCI calibration partition:
Measure v0.1.0 v0.2.0 conservative refinementC0 nDCG@10 0.812533 0.812533 C4 nDCG@10 0.814379 0.813144 Mean paired delta +0.001846 +0.000611 CI95 lower bound -0.000913 -0.000811 Exact identifier retention 1.000000 1.000000 Protected-term violation rate 0.000000 0.000000 S0 events 0 0 Decision REVIEW REVIEW
The required utility gain was at least +0.005 with a CI95 lower bound above zero. Neither configuration passed. The single permitted refinement reduced the estimated gain, so further tuning on the frozen calibration partition was stopped.
Development and official-test partitions remained sealed and were not read or transformed. See ADR 0002 for the accepted decision, limitations and rejected alternatives.

What the repository demonstrates

The negative utility result does not invalidate the independently tested engineering and governance controls:
deterministic P0–P3 protected-term policies;
policy-first normalisation with offset-preserving span traces;
pinned C0 and spaCy-backed C4 adapters;
deterministic ESCI split and artifact verification;
paired BM25 retrieval evaluation and statistical evidence;
terminology-safety auditing and explicit failure taxonomy;
two-reviewer policy review, merge and resolution workflow;
tamper-evident JSON, Markdown and SVG reports;
calibration diagnostics that fail closed;
CI checks using locked dependencies and reproducible tests.

Decision flow


Safety passing was necessary but not sufficient for promotion. NormGuard deliberately records a defensible negative result instead of converting descriptive improvements into an unsupported recommendation.

Core commands

Install the locked development environment and run the contract suite:

The repository contains guarded calibration/development tooling, but ADR 0002 prohibits additional tuning against the completed calibration partition and does not authorize development or official-test access.

Repository map


Future product boundary

A future NormGuard Safety Core may productize the reusable policy, trace, review, safety-audit and evidence components for search, RAG and LLM preprocessing systems. That would be a separate product phase with its own users, API contract, threat model, success measures and release criteria.
Any new retrieval experiment requires a new protocol and a new data boundary. It must not reuse the completed calibration partition for exploratory tuning or imply that the rejected general-lemmatisation hypothesis has been revived.

Licence

Apache-2.0. Third-party software, models and datasets retain their own licences.
Like this project

Posted Oct 21, 2026

Built a Python toolkit for text normalisation, retrieval evaluation and evidence quality, helping improve the reliability of RAG pipelines.