fix(chunking): keep Dr./Mr./a.m./p.m. inline instead of splitting sen…#115
Open
biraj21 wants to merge 1 commit intoKittenML:mainfrom
Open
fix(chunking): keep Dr./Mr./a.m./p.m. inline instead of splitting sen…#115biraj21 wants to merge 1 commit intoKittenML:mainfrom
biraj21 wants to merge 1 commit intoKittenML:mainfrom
Conversation
…tences Before: - `chunk_text()` split on every `.` / `!` / `?` with no abbreviation handling. - `Dr. Sharma...` was treated like `Dr` + new sentence. - `9:30 a.m.` and `5:15 p.m.` were split at the periods inside the abbreviation. - That made TTS pause or slow down after `Dr`, `a`, and `m`, as if they were full sentence boundaries. After: - Protect common inline abbreviations before sentence splitting and restore them afterward. - `Dr.`, `Mr.`, `Mrs.`, `Ms.`, `Prof.`, `a.m.`, and `p.m.` now stay inside the same sentence/chunk. - TTS no longer inserts sentence-break pauses around those abbreviations. - Real sentence-ending punctuation still splits normally
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…tences
Before:
chunk_text()split on every./!/?with no abbreviation handling.Dr. Sharma...was treated likeDr+ new sentence.9:30 a.m.and5:15 p.m.were split at the periods inside the abbreviation.Dr,a, andm, as if they were full sentence boundaries.After:
Dr.,Mr.,Mrs.,Ms.,Prof.,a.m., andp.m.now stay inside the same sentence/chunk.You can try running inference w sentence
"Dr. Sharma arrived at 9:30 a.m., slightly out of breath, but the meeting had already started without him."and see the difference.