Skip to content

allenai/tailor

Repository files navigation

Tailor

This repository contains code for compositional perturbations as described in the following paper:

Tailor: Generating and Perturbing Text with Semantic Controls
Alexis Ross*, Tongshuang Wu*, Hao Peng, Matthew E. Peters, Matt Gardner Association for Computational Linguistics (ACL), 2022

Bibtex for citations:

@inproceedings{ross-etal-2022-tailor,
    title = "Tailor: Generating and Perturbing Text with Semantic Controls",
    author = "Ross, Alexis and
        Wu, Tongshuang and
        Peng, Hao and
        Peters, Matthew E and
            Gardner, Matt",
    booktitle = "Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics",
    month = aug,
    year = "2022",
    address = "Online",
    publisher = "Association for Computational Linguistics",
}

Installation

From Pypi:

pip install tailor_nlp

From source:

git clone https://github.com/allenai/tailor.git
cd tailor
pip install -e .

Recreating Tailor

See link for information on how to format Ontonotes 5.0 and train the Tailor generator.

Tailor-Generated Contrast Sets

See link for the data. (More information in Section 5 of the paper.)

Tailor-Generated Augmented Examples for NLI