Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compute the list of punctuation characters only once. #67

Merged
merged 1 commit into from
Sep 6, 2022

Commits on Sep 6, 2022

  1. compute the list of punctuation characters only once.

    The values from `unicodedata` should never change, so this will be a
    constant value. On my machine this iterates over 1,114,112 elements to
    compute the list. We don't need to recompute this every time and can
    save the results of the punctuation characters so only the first time
    a RemovePunctuation transform will take time and future calls will
    reuse the character list.
    f4hy committed Sep 6, 2022
    Configuration menu
    Copy the full SHA
    8fd6c44 View commit details
    Browse the repository at this point in the history