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: add page_number to metadata in DocumentSplitter #7599

Merged
merged 17 commits into from
Apr 29, 2024
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 haystack/components/preprocessors/document_splitter.py
Update docstring from suggestion

Co-authored-by: David S. Batista <[email protected]>
  • Loading branch information
CarlosFerLo and davidsbatista committed Apr 26, 2024
commit d9b29cc5a392d39d53c8512b4eca9dccdb30a3a0
2 changes: 1 addition & 1 deletion haystack/components/preprocessors/document_splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def _concatenate_units(
self, elements: List[str], split_length: int, split_overlap: int
) -> Tuple[List[str], List[int]]:
"""
Concatenates the elements into parts of split_length units.
Concatenates the elements into parts of split_length units keeping track of the original page number that each element belongs.
"""
text_splits = []
splits_pages = []
Expand Down