Implementation Guide
Code Structure
How is the code organized?
pdf_to_epub/validation/text_canonicalizer.py
Implementation Notes
Key technical details to remember:
Unicode
Use python's unicodedata module.
Ligatures Mapping
Include at least:
fi->fifl->flff->ffffi->ffiffl->fflæ->aeœ->oe
Hyphenation Regex
r"-\s*\n\s*" should be replaced with "" (empty string) to join words.
Error Handling
How do we handle failures?
- Ensure it handles
Noneinput. - Log instances where aggressive mode makes "destructive" changes if possible.