Skip to content

Conversation

@KlemenPl
Copy link

@KlemenPl KlemenPl commented Sep 4, 2020

It may not seem significant, however, if you have a lot of text to process it will be very slow. That regex pattern is also very lengthy and takes up a lot of space. My method enumerates over the words and checks, if it is in a stop_words set which significantly speeds it up. In the end it does the same operations as the regex, however it is much faster. Around 20x faster.

It may not seem significant, however, if you have a lot of text to process it will be very slow. That regex pattern is also very lengthy and takes up a lot of space. My method enumerates over the words and checks, if it is in a stop_words set which significantly speeds it up. It performs same operation as the regex, however it is much faster. Around 20x faster.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant