Fix strip_quotes

This commit is contained in:
2021-11-16 11:48:23 -05:00
parent 3677815d57
commit 55fd4a66d2
3 changed files with 12 additions and 2 deletions

View File

@@ -247,3 +247,13 @@ class TestText(TestCase):
expected = "hello1 test1124test world"
self.assertEqual(" ".join(cleaned), expected)
def test_strip_quotes(self):
text = "'hi' “test” 'hello\""
cleaned = preprocess(
text,
strip_quotes=True
)
expected = "hi test hello"
self.assertEqual(" ".join(cleaned), expected)