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

Prevent Preprocessor from changing existing documents #2297

Merged
merged 1 commit into from
Mar 10, 2022

Conversation

tstadel
Copy link
Member

@tstadel tstadel commented Mar 10, 2022

I actually just wanted to fix the bug in test test_remove_substrings as it uses a Document and not a dict. But I found it counterintuitive that preprocessor changes the input inplace if it's not splitting texts. This PR fixes this too.

Proposed changes:

  • fix bug in test_remove_substrings
  • deepcopy document if text is changed during cleaning

Status (please check what you already did):

  • First draft (up for discussions & feedback)
  • Final code
  • Added tests

@tstadel tstadel requested a review from ZanSara March 10, 2022 11:22
@tstadel tstadel added topic:tests type:bug Something isn't working labels Mar 10, 2022
@ZanSara ZanSara merged commit 65295bc into master Mar 10, 2022
@ZanSara ZanSara deleted the preprocessor_non_inplace branch March 10, 2022 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:tests type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants