Skip to content

Conversation

@Hanyu-Liu-123
Copy link
Collaborator

What does this PR do?

Summary

When the CLAREAugmenter substitutes a word, there's an extra character that is added to the front (Ġ). The CLARE transformation method should remove that extra character before the transformed text is returned by the transformation.

Additions

  • Before a sentence is transformed, strip the substituting words of Ġ so that it doesn't appear in transformation.

Checklist

  • The title of your pull request should be a summary of its contribution.
  • Please write detailed description of what parts have been newly added and what parts have been modified. Please also explain why certain changes were made.
  • If your pull request addresses an issue, please mention the issue number in the pull request description to make sure they are linked (and people consulting the issue know you are working on it)
  • To indicate a work in progress please mark it as a draft on Github.
  • Make sure existing tests pass.
  • Add relevant tests. No quality testing = no merge.
  • All public methods must have informative docstrings that work nicely with sphinx. For new modules/files, please add/modify the appropriate .rst file in TextAttack/docs/apidoc.'

@Hanyu-Liu-123 Hanyu-Liu-123 added the bug Something isn't working label Oct 22, 2021
@Hanyu-Liu-123 Hanyu-Liu-123 self-assigned this Oct 22, 2021
@Hanyu-Liu-123 Hanyu-Liu-123 linked an issue Oct 22, 2021 that may be closed by this pull request
@Hanyu-Liu-123 Hanyu-Liu-123 marked this pull request as ready for review October 29, 2021 04:43
@qiyanjun qiyanjun merged commit 74ba1ff into master Nov 1, 2021
@qiyanjun qiyanjun deleted the fix-clare-bug branch November 9, 2021 16:27
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

Successfully merging this pull request may close these issues.

Extra character to substituted words when running CLAREAugmenter

3 participants