Filter sentence completeness before changing case or punctuation
This commit is contained in:
parent
9a61087814
commit
4b156e1286
1 changed files with 15 additions and 3 deletions
|
|
@ -57,3 +57,13 @@ def test_empty() -> None:
|
|||
assert get_sentences("", ignore_partial=True) == []
|
||||
assert get_sentences("", true_case=True) == []
|
||||
assert get_sentences("", remove_punctuation=True) == []
|
||||
|
||||
|
||||
def test_completeness_is_checked_before_optional_transformations() -> None:
|
||||
assert get_sentences("Hello world.", ignore_partial=True, true_case=True) == [
|
||||
"hello world."
|
||||
]
|
||||
assert get_sentences(
|
||||
"Hello world.", ignore_partial=True, remove_punctuation=True
|
||||
) == ["Hello world"]
|
||||
assert get_sentences("...", ignore_partial=True, remove_punctuation=True) == []
|
||||
|
|
|
|||
Loading…
Reference in a new issue