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

Add num_perturbations param to all langcheck.augment functions #48

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

kennysong
Copy link
Contributor

@kennysong kennysong commented Nov 13, 2023

This PR adds a num_perturbations param that allows you to generate multiple perturbations for each string.

For example,

>>> langcheck.augment.synonym('the red fox jumps over the fence', num_perturbations=5)
['the red dodger jumps over the fence', 'the ruby red fox jumps over the fence', 'the red fox jumps over the fencing', 'the red fox jumps concluded the fence', 'the red fox jumps over the fencing']

Also tweaks the docstrings to be more consistent with each other.

@kennysong kennysong marked this pull request as ready for review November 13, 2023 02:27
Copy link
Contributor Author

@kennysong kennysong left a comment

Choose a reason for hiding this comment

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

Change to keyword only params

(accidental comment)

Copy link
Contributor

@Alnusjaponica Alnusjaponica left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for correcting some expression.

@kennysong kennysong merged commit 1718667 into main Nov 15, 2023
2 checks passed
@kennysong kennysong deleted the augment branch November 15, 2023 01:36
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.

2 participants