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

fix: page_number for pdfs with pages not containing any text #7271

Merged
merged 7 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
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
2 changes: 1 addition & 1 deletion .github/workflows/rest_api_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
- name: Install REST API
run: |
pip install -U "./rest_api[dev]"
pip install ".[inference,dev]"
pip install ".[inference,dev,preprocessing]"
pip install .

- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.25.0-rc0
1.25.0-rc1
3 changes: 3 additions & 0 deletions haystack/nodes/preprocessor/preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,9 @@ def _concatenate_units(
else:
num_page_breaks = len(processed_units)
cur_page += num_page_breaks
else:
if self.add_page_number and split_at == "\f":
cur_page += 1

return text_splits, splits_pages, splits_start_idxs

Expand Down
Loading