Input: "انا طالب في الجامعة" (hamza error)
↓ Spelling: No change ❌ (missed hamza)
↓ Grammar: No change
↓ Punct: Adds "الجامعة."
→ Output: "انا طالب في الجامعة." ← UNDERCORRECTION + OVERCORRECTION
How structured content flows:
Input: "أرسل لي على info@company.com" (email)
↓ Spelling: No change ✅
↓ Grammar: "info @ company ، com" ❌ (destroyed)
↓ Punct: May add period
→ Output: Email corrupted ← DESTRUCTION
5. Key Finding: Pipeline Architecture Is NOT the Problem
Component
Failures
%
Models (spelling + grammar + punct)
199
99.0%
Pipeline integration
2
1.0%
Span mapping
0
0%
The pipeline, span mapping, and stage interaction code are working correctly. The failures are overwhelmingly at the model/rules level. No architectural refactoring is needed — the fixes should target model behavior and input/output filtering.
6. Regression Risk Assessment
Change
Risk of Regression
Adding HAMZA_WHITELIST entries
🟢 Very Low — additive, no side effects
Suppressing punct terminal injection
🟡 Medium — may suppress valid period additions
Adding structured content protection
🟢 Low — pre-processing filter before grammar model
Fixing grammar SV agreement
🟡 Medium — POS tagger changes may affect other rules