mirror of
https://github.com/simon987/hexlib.git
synced 2025-12-14 07:09:05 +00:00
Update preprocess: now returns generator objects
This commit is contained in:
10
bench/text.py
Normal file
10
bench/text.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from timeit import timeit
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
res = timeit(
|
||||
setup="from hexlib.text import preprocess",
|
||||
stmt='text = "x A b c d e f g h"\ncleaned = preprocess(\n text,\n lowercase=True,\n trigrams={\n ("a", "b", "c"),\n ("e", "f", "g"),\n }\n)'
|
||||
)
|
||||
|
||||
print(res)
|
||||
Reference in New Issue
Block a user