CharacterTextSplitter
with keep_separator=True
sets the separator to the beginning of each chunk instead of an end
#20908
Labels
🤖:bug
Related to a bug, vulnerability, unexpected error with an existing feature
Ɑ: text splitters
Related to text splitters package
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Description
I'm trying to split text by sentence, while keeping end-of-sentence punctuation. Instead of putting the punctuation back at the end of the corresponding chunk, the library adds it to the front of the following chunk.
This problem is quite critical if the output is used for text-to-speech input.
System Info
MacOS, Python 3.10.13
The text was updated successfully, but these errors were encountered: