<commit_before># Antonyms Substitute
This transformation aims to substitute words with their antonyms, which facilitates the diversity of the content.

Author name:
- <NAME> (<EMAIL>, University of Pittsburgh)
- <NAME> (<EMAIL>, Emory University)

## What type of a transformation is this?
This transformation could introduce semantic diversity by adding antonyms. Specifically, it will help revert the semantics to an opposite position or uses double negation to express the similar semantics. In general, we assume that an even number of transforms will remain the semantics in terms of sentiment; however, an odd number of transforms will revert the semantics. 


## What tasks does it intend to benefit?
This augmentation would benefit tasks related to sentiment analysis, contrastive learning and classification, by augmenting the dataset. The preserance of the labels would be dependent to the number of transforms that were applied in given text.

Benchmark results:

Sentiment analysis: we run sentiment analysis on a 1% sample of the IMDB dataset. The original accuracy is 96.0 and the perturbed accuracy is 61.0.


## Related Work
Special thanks to @zijwang, whose contribution has inspired this work. The code was adapted from his submission, and the tokenization and POS tagging were adapted from Stanza

```bibtex
@inproceedings{qi2020stanza,
    title={Stanza: A {Python} Natural Language Processing Toolkit for Many Human Languages},
    author={<NAME> and <NAME> and <NAME> and <NAME> Manning, <NAME>.},
    booktitle = "Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations",<commit_msg>update to double negation<commit_after># Antonyms Substitute (Double Negation)
This transformation aims to substitute even number of words with their antonyms which would increase the diversity of the given content. Its double negation mechanism does not revert original sentence semantics.

Author name:
- <NAME> (<EMAIL>, University of Pittsburgh)
- <NAME> (<EMAIL>, Emory University)

## What type of a transformation is this?
This transformation introduces semantic diversity by replacing even number of adjective/adverb antonyms in given text. We assume that an even number of transforms will remain the semantics in terms of sentiment; however, an odd number of transforms will revert the semantics. Thus, it only applies to the sentence that the number of revertable adjective or adverb in the given sentence is even. We called it double negation.


## What tasks does it intend to benefit?
This augmentation would benefit tasks related to sentiment analysis by augmenting the dataset. The labels for generated sentences would be the semantically similar to their previous one as the double negation mechanism does not change original sentence semantics.

Benchmark results:

Sentiment analysis: we run sentiment analysis on 1000 samples of the IMDB dataset. The original accuracy is 96.0 and the perturbed accuracy is 83.0.


## Related Work
Special thanks to @zijwang, whose contribution has inspired this work. The code was adapted from his submission, and the tokenization and POS tagging were adapted from Stanza

```bibtex
@inproceedings{qi2020stanza,
    title={Stanza: A {Python} Natural Language Processing Toolkit for Many Human Languages},
    author={<NAME> <NAME> <NAME> Bolton, <NAME> Manning, <NAME>.},
    booktitle = "Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations",
{'fraction_non_alphanumeric': 0.049786628733997154, 'fraction_numerical': 0.008250355618776671, 'mean_word_length': 5.125435540069686, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5442349', 'n_tokens_mistral': 897, 'n_tokens_neox': 800, 'n_words': 488}