If you deal with scientific text, you've probably run into a classic parsing headache: general English rule sets fail on edge cases like distinguishing chemical symbols (Br., Ca.) from abbreviations, or handling flattened OCR superscript citations (word.12,13).
Core YASBD stays generalist to avoid false positives and pipeline bloat, so Bruno spun up a companion package: yasbd-hooks. It handles these messy edge cases via clean, opt-in callbacks.
What it handles right now, at least partially:
chemical_notation(): Protects element symbols and analytical terms from false sentence splits.academic_citations(): Keeps complex journal abbreviation structures intact.clause_boundaries(): Handles clause-level segmentation on specific punctuation.ocr_artifacts(): Recovers missing space boundaries and flattened superscript citation blocks.compose_hooks(): Chains multiple callbacks together cleanly without messing up character offsets.
We're looking for contributors to test more corpora, refine rules, and build out new domain hooks. Pull requests, test cases, and issues are very welcome.
Repo: https://github.com/brunnojob/yasbd-hooks