Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

AcceptabilityChecker min words adjustable #3846

Merged
merged 3 commits into from
Jul 23, 2021

Conversation

mojtaba-komeili
Copy link
Contributor

Patch description
The minimum number of words for AcceptabilityChecker is a hard-coded value (3). Needless to say this value may not work in all scenarios. This is a quick patch allowing user to adjust the minimum acceptable number of words in the AcceptabilityChecker.

Copy link
Contributor

@EricMichaelSmith EricMichaelSmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, very useful to have! Small nit though: I think it'd be better as a class attribute (i.e. like ALL_VIOLATION_TYPES), because it's only used in the context of AcceptabilityChecker. You could do something like self.min_words_violation_threshold = min_words or self.DEFAULT_MIN_WORDS_THRESHOLD

Copy link
Contributor

@EricMichaelSmith EricMichaelSmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@mojtaba-komeili mojtaba-komeili merged commit 53cfdc6 into master Jul 23, 2021
@mojtaba-komeili mojtaba-komeili deleted the acceptability-min-words branch July 23, 2021 21:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants