We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fb5765 commit f453eccCopy full SHA for f453ecc
guardrails/validator_base.py
@@ -69,7 +69,7 @@ def split_sentence_word_tokenizers_jl(chunk: str):
69
is_minimum_length = True
70
71
# check for potential line endings, which is what split_sentences does
72
- chunk_with_potential_line_endings, count = re.subn(r"([?!.])\s", r"\1\n", chunk)
+ chunk_with_potential_line_endings, count = re.subn(r"([?!.])(\s)?", r"\1\n", chunk)
73
any_potential_line_endings = count > 0
74
if not is_minimum_length or not any_potential_line_endings:
75
return []
0 commit comments