Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
some benchmarks to test the changes made to remove_punctuation
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from timeit import timeit | ||
import utils | ||
|
||
iterations=100000 | ||
|
||
cirque_strings = [ | ||
"cirque du soleil - zarkana - las vegas", | ||
"cirque du soleil ", | ||
"cirque du soleil las vegas", | ||
"zarkana las vegas", | ||
"las vegas cirque du soleil at the bellagio", | ||
"zarakana - cirque du soleil - bellagio" | ||
] | ||
|
||
|
||
for s in cirque_strings: | ||
print 'Test for string: "%s"' % s | ||
print 'Old: %f' % round(timeit('utils.remove_punctuationold(\'%s\')' % s, "import utils",number=iterations),4) | ||
print 'New: %f' % round(timeit('utils.remove_punctuation(\'%s\')' % s, "import utils",number=iterations),4) |