Skip to main content

Module utils

Module utils 

Source
Expand description

Text normalization and hashing utilities for ISCC code generation.

Provides text cleaning, trimming, collapsing, and BLAKE3 multihash functions ported from iscc-core code_meta.py and utils.py.

Functionsยง

text_clean
Clean and normalize text for display.
text_collapse
Normalize and simplify text for similarity hashing.
text_remove_newlines
Remove newlines and collapse whitespace to single spaces.
text_trim
Trim text so its UTF-8 encoded size does not exceed nbytes.