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

Naming Gopher's "max_non_alpha_words_ratio" #289

Open
BramVanroy opened this issue Sep 21, 2024 · 0 comments
Open

Naming Gopher's "max_non_alpha_words_ratio" #289

BramVanroy opened this issue Sep 21, 2024 · 0 comments

Comments

@BramVanroy
Copy link
Contributor

In the Gopher filter, there's this filter

# that 80 % of words in a document contain at least one alphabetic character
if (
    self.max_non_alpha_words_ratio
    and sum([any((c.isalpha() for c in w)) for w in words]) / n_words < self.max_non_alpha_words_ratio
):
    return False, "gopher_below_alpha_threshold"

Given that all documents that have a LOWER ratio are removed, I would expect the variable name to be min_non_alpha_words_ratio, similar to all other variable names.

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

No branches or pull requests

1 participant