Validation and Limits - Nfreakz/office-language-doctor GitHub Wiki
Validation and limits
Word context-aware detection
Word can split one visible sentence into many internal runs because of proofing markup, formatting and other OOXML boundaries. Office Language Doctor keeps those runs as the repair unit, but can now use the normalized text of the containing Word paragraph as advisory detection context.
Paragraph context is used only when:
- the paragraph contains multiple textual runs;
- the paragraph language detection is medium or high confidence;
- the individual run is not already reliably detected;
- the run contains linguistic text;
- no reliably detected run in the same paragraph contradicts the paragraph language.
Context-derived results are labelled paragraph context in the UI and are never automatically preselected by Smart Fix.
Regression reproduces the real-world case observed during DOCM validation: Benvinguts a la sessió. Aquesta prova valida el document. split into eight runs. Seven linguistic runs recover Catalan from paragraph context while the punctuation-only run remains undetected.
Microsoft Office
Representative manual validation exists for DOCX and PPTX repairs in Microsoft Office.
DOCM and PPTM have real macro validation: the macro executed successfully before public-web repair and the same macro executed successfully again afterward. Automated regression separately checks that vbaProject.bin remains byte-for-byte identical.
OpenDocument
ODT, ODP and ODS were manually validated in LibreOffice Writer, Impress and Calc.
OTT, OTP and OTS passed a real LibreOffice 25.2.3.2 headless engine round-trip on 2026-10-02. OTS preserved =SUM(B1:B2) with result 42.
A visual/manual GUI pass for OTT/OTP/OTS remains optional.
RTF
A representative repaired RTF opened in Microsoft Word without a corruption/repair warning, preserved text and accents, and rescanned with zero likely mismatches.
Current boundary
Language detection is advisory. Paragraph context improves fragmented Word text but does not override reliable contradictory run-level evidence. Short non-linguistic values and punctuation remain unchanged.