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

[MASK] appears in augmented sentences #191

Closed
shaunlim0105 opened this issue Dec 20, 2020 · 1 comment
Closed

[MASK] appears in augmented sentences #191

shaunlim0105 opened this issue Dec 20, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@shaunlim0105
Copy link

shaunlim0105 commented Dec 20, 2020

This issue is related to #175 , but occurs when action= insert instead 'substitute'

To reproduce error,

text = 'It can be the first word of sentence which does not come with space.'
aug = naw.ContextualWordEmbsAug(
    model_path='bert-base-multilingual-cased', action="insert", top_p=0.9, aug_p=0.1)
augmented_text = aug.augment(text, n=4)

print("Word insert using LM:")
print(augmented_text)

giving out results as follows:

Word insert using LM:
['It can be the first word of sentence which does not come in with space.', 'It can be the whole first word of sentence which does not come with space.', 'It can [MASK] be the first word of sentence which does not come with space.', 'It can be the first word of sentence [MASK] which does not come with space.']

I'm using nlpaug version 1.1.1

@makcedward makcedward added the bug Something isn't working label Dec 22, 2020
@makcedward
Copy link
Owner

will fix it soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants