feat(kon): add ai-formatting crate — filler removal, British English, text pipeline

- Filler word removal using word-boundary regex (fixed regex-lite lookbehind limitation)
- British English conversion: 26 -ize/-ise patterns, -or/-our, -er/-re, -ense/-ence
- Text formatting: sentence capitalisation, spacing cleanup
- Hallucination filter: blank_audio, music, silence, auto-thanks detection
- Post-processing pipeline: composed from pure functions, supports Raw/Clean/Smart modes
- Smart mode inserts paragraph breaks on >2s pauses between segments
- 12 tests passing, clippy clean

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
jake
2026-03-16 20:29:46 +00:00
parent 6588130e36
commit 0738fca22c
5 changed files with 421 additions and 2 deletions

View File

@@ -1,2 +1,8 @@
// kon-ai-formatting: Filler removal, British English conversion,
// text formatting, hallucination filtering, and paragraph breaks.
mod llm_client;
pub mod pipeline;
pub mod rule_based;
pub use pipeline::{post_process_segments, FormatMode, PostProcessOptions};
pub use rule_based::{
format_text, is_hallucination, remove_fillers, to_british_english,
};