fastrag.normalization.html#

HTML structural normalization with precise source policy exclusions.

Classes

HtmlNormalizer(*[, exclude_tags, exclude_hidden])

Recover HTML while retaining tabs and explicitly recording exclusions.

class fastrag.normalization.html.HtmlNormalizer(*, exclude_tags=('script', 'style'), exclude_hidden=False)[source]#

Bases: object

Recover HTML while retaining tabs and explicitly recording exclusions.

Parameters:
property identity: str#

Return output policy and parser contract version.

normalize(document)[source]#

Parse original source positions without rendering or executing HTML.

Parameters:

document (Document)

Return type:

NormalizedDocument