This is the official code for the paper "Exploring Euphemism Detection in Few-Shot and Zero-Shot Settings" accepted at EMNLP FigLang Workshop 2022 under the Euphemism Detection Shared Task.
We use the dataset from the Euphemism Detection Shared Task, which is available here. For creating the few-shot and zero-shot datasets, please refer to the details in the paper. We provide sample splits in few and zero.
To train,
python train.py --availability zero --category employmentThis will create a saved model for every checkpoint at the specified output path. See train.py for specific arguments.
To evaluate,
python evaluate.py --availability zero --category employment --model_path (checkpoint-path)/pytorch_model.bin