Skip to content

if statement to elif statement #9

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

Merged
merged 1 commit into from
Feb 14, 2019
Merged

Conversation

SpellOnYou
Copy link

The second "if" statement must be replaced with an "elif" statement. Then, 10% (0.2 * 0.5 = 0.1) will be replaced with randomly extracted tokens.

If you put two "if" statements in succession it can cause duplication(, random_token at same position), and tokens will be randomly replaced to a probability of 50%. Not a 10%.

@graykode
Copy link
Owner

Thanks for Contribution, you are right I will merge it

@graykode graykode merged commit 2a7e7f7 into graykode:master Feb 14, 2019
TC-zerol pushed a commit to TC-zerol/nlp-tutorial-cn that referenced this pull request Aug 31, 2019
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