aeat.domain.calculations.registry._text module¶
Text normalisation helpers for local legal and source corpora.
- normalise_corpus_text(text)[source]¶
Normalise corpus text for citation-presence checks.
The HTML-tag stripper only matches well-formed tags whose < immediately precedes a tag-name character (letter, slash, or !/?) and whose body is short and contains no spaces — so that bare comparison operators (e.g.
< 500 eurosand< 3 añosthat AEAT’s manuals use as math notation) and other unbalanced angle brackets do not inadvertently swallow long spans of prose.