mirror of
https://github.com/simon987/hexlib.git
synced 2025-12-13 14:49:05 +00:00
Add remove_numbers
This commit is contained in:
@@ -233,3 +233,14 @@ class TestText(TestCase):
|
||||
expected = "x a_b c_d e f_g h"
|
||||
|
||||
self.assertEqual(cleaned, expected)
|
||||
|
||||
def test_remove_numbers(self):
|
||||
text = "Hello1 test1124test 12 1 1111111 world"
|
||||
cleaned = preprocess(
|
||||
text,
|
||||
lowercase=True,
|
||||
remove_numbers=True
|
||||
)
|
||||
expected = "hello1 test1124test world"
|
||||
|
||||
self.assertEqual(cleaned, expected)
|
||||
|
||||
Reference in New Issue
Block a user