Skip to content

Commit 503d275

Browse files
chore: remove DocumentSplitter warning related to split_by='sentence'
1 parent 1a91365 commit 503d275

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

Diff for: haystack/components/preprocessors/document_splitter.py

-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5-
import warnings
65
from copy import deepcopy
76
from typing import Any, Callable, Dict, List, Literal, Optional, Tuple
87

@@ -112,14 +111,6 @@ def __init__( # pylint: disable=too-many-positional-arguments
112111
nltk_imports.check()
113112
self.sentence_splitter = None
114113

115-
if split_by == "sentence":
116-
# ToDo: remove this warning in the next major release
117-
msg = (
118-
"The `split_by='sentence'` no longer splits by '.' and now relies on custom sentence tokenizer "
119-
"based on NLTK. To achieve the previous behaviour use `split_by='period'."
120-
)
121-
warnings.warn(msg)
122-
123114
def _init_checks(
124115
self,
125116
*,

0 commit comments

Comments
 (0)