mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-09-21 22:23:23 +00:00
Fix equality check in preprocessor (#969)
This commit is contained in:
parent
0633dae4d0
commit
5bb66940a9
@ -151,7 +151,7 @@ class PreProcessor(BasePreProcessor):
|
||||
if not split_length:
|
||||
raise Exception("split_length needs be set when using split_by.")
|
||||
|
||||
if split_respect_sentence_boundary and split_by is not "word":
|
||||
if split_respect_sentence_boundary and split_by != "word":
|
||||
raise NotImplementedError("'split_respect_sentence_boundary=True' is only compatible with split_by='word'.")
|
||||
|
||||
text = document["text"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user