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

Font change #262

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
24 changes: 24 additions & 0 deletions transformations/font_change/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Font Change

The Font Change transformation modifies words in the input to have a stylized appearance using suitable Unicode characters, as often in encountered in social media posts.

Authors: [Shahab Raji](mailto:shahab.raji@rutgers.edu) (Rutgers University) and [Gerard de Melo](http://gerard.demelo.org/)
(Hasso Plattner Institute / University of Potsdam)


## How does the transformation work?

Font Change adapts the appearance of randomly selected words in the input sentence. For each selected word, one of several possible appearance changes is chosen randomly. Such changes are achieved using Unicode characters based on mapping tables from the [𝓾𝓷𝓲𝓬𝓸𝓭𝓮 𝙛𝙤𝙧𝙢𝙖𝙩𝙩𝙚𝙧](https://github.com/DenverCoder1/unicode-formatter) (MIT license) tool.

Examples:

> The quick brown fox jumps over the lazy dog.

to

> The quick brown 🅵🅾🆇 ɾnɯds over the lazy ᴅᴏɢ.

## Target Tasks

This transformation can be used for data augmentation in text classification tasks.

Copy link
Collaborator

Choose a reason for hiding this comment

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

You should add a Data And Code Provenance section to point out the correct source of all the files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kaustubhdhole Hi, I had this information in the README file but I added a separate section. However, now I cannot commit due to an error (No module named 'torchtext'). I did not have this error previously when submitting the code. Can I submit with git commit --no-verify?

1 change: 1 addition & 0 deletions transformations/font_change/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .transformation import *
Loading