Skip to content

Commit

Permalink
chore: remove DocumentSplitter warning related to split_by='sentence'
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsbatista authored Feb 3, 2025
1 parent 1a91365 commit 503d275
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions haystack/components/preprocessors/document_splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#
# SPDX-License-Identifier: Apache-2.0

import warnings
from copy import deepcopy
from typing import Any, Callable, Dict, List, Literal, Optional, Tuple

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

if split_by == "sentence":
# ToDo: remove this warning in the next major release
msg = (
"The `split_by='sentence'` no longer splits by '.' and now relies on custom sentence tokenizer "
"based on NLTK. To achieve the previous behaviour use `split_by='period'."
)
warnings.warn(msg)

def _init_checks(
self,
*,
Expand Down

0 comments on commit 503d275

Please sign in to comment.