Module transform

Module transform 

Source
Expand description

Document Character (DcList / DcMstring) transformations (UnicodeToShortDc, SemanticToText, CodeToText).

Functionsยง

apply_dc_transformation
Applies a single [SupportedDcTransformation] to a DcMstr, preserving binary chunks intact and returning the transformed DcMstring and FormatLog.
apply_dc_transformations
Applies a sequence of [SupportedDcTransformation]s in order to a DcMstr.
apply_semantic_to_text_with_resolver
Lowers semantic Document Characters in doc to Unicode scalar text characters using the System-graph StageR 3 FormatId::SemanticToText (f19 "Semantic Dcs to text") routine under resolver (preserving binary chunks intact), falling back strictly on pre-migration historical snapshots that predate f19 having a StageR 3 decomposition in the pinned graph.
transform_dclist_unicode_to_short_dc
Replaces Unicode codepoints and multi-codepoint sequences in dclist that have an exact (<equiv>) mapping to an already-assigned short Dc (< 641) with that single short Dc, recording an export warning in log for each replacement.