You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve text splitter for non-English documents (#1326)
* Add tests to verify that tokens in each section can never be above 500 tokens
* Improve the test so we parametrize it for each PDF instead of failing on the first one.
* Add arabic book
* Formatting fixes
* Verbose assertion messages with the file name
* Implement a recursive splitter when sections are too large.
* 5 percent overlap with recursive splitter
* Resolve some of the PR feedback
* Make the tests set to the max tokens per section of the text splitter instead of hardcoded values
* Find a better split position in the central third of the text
* Correct the boundary check and fix the position to come after the full stops
* Remove some silly line breaks
* Update import
* reformatting
* Make the overlap percent and section size defaults module level constants
* Reformatted PDFs using the online PDF parser for better accessibility
* Add an RTL test
* Add a korean test file about a mouse that goes to the big city. Add a test for table overlapping.
* Add a snapshot of the content sections from the test data PDFs
* Fix my formatting
* Sort the keys first
---------
Co-authored-by: Pamela Fox <[email protected]>
0 commit comments