Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions guardrails/validator_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def split_sentence_str(chunk: str):
"""A naive sentence splitter that splits on periods."""
if "." not in chunk:
return []
fragments = chunk.split(".")
return [fragments[0] + ".", ".".join(fragments[1:])]
pos = chunk.find(".")
return [chunk[: pos + 1], chunk[pos + 1 :]]


def split_sentence_word_tokenizers_jl_separator(
Expand Down