Fix equality check in preprocessor (#969)

This commit is contained in:
oryx1729 2021-04-14 16:03:48 +02:00 committed by GitHub
parent 0633dae4d0
commit 5bb66940a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"]