Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added split by page to DocumentSplitter #6753

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update document_splitter.py
  • Loading branch information
sahusiddharth committed Jan 17, 2024
commit 6bf9c78e3c18c1cfe1f110f761d3a01cb4f233e7
2 changes: 1 addition & 1 deletion haystack/components/preprocessors/document_splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _split_into_units(self, text: str, split_by: Literal["word", "sentence", "pa
split_at = " "
else:
raise NotImplementedError(
"DocumentSplitter only supports 'word', 'sentence', 'passage' or 'page' split_by options."
"DocumentSplitter only supports 'word', 'sentence', 'page' or 'passage' split_by options."
)
units = text.split(split_at)
# Add the delimiter back to all units except the last one
Expand Down