syncalong.textnorm¶
Shared text normalization used by both the lyrics parser and the transcriber, so the two sides of the aligner normalize identically.
textnorm ¶
Shared text normalization for lyric and transcript words.
Both sides of the aligner must normalize identically so fuzzy matching compares like with like — keep this the single source of truth.
normalize ¶
Lowercase, strip punctuation and accents, and collapse whitespace.
Apostrophes are deleted so contractions stay one token ("don't" → "dont"); every other punctuation mark becomes a word boundary so hyphenated compounds split the way Whisper transcribes them ("déjà-vu" → "deja vu"). Both sides of the aligner must call this so fuzzy matching compares like with like.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Arbitrary input text. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The normalised text. |