Authors: Svetlana Schmidt, Maren Pielka
This repository contains the code that was used for the experiments in the paper "Generating Prototypes for Contradiction Detection Using Large Language Models and Linguistic Rules" (submitted to the IEEE Big Data Conference).
- Install Python on your system and create a new virtual environment (recommended: Python >= 3.8.0):
$ conda create -n informed_nlu python==3.8
- Navigate to the repository folder:
$ cd informed_nlu
- Install the package:
$ pip install -e .
Navigate to the /scripts directory.
Method 1:
- prepare the data by running create_datalists.py
;
- in order to generate samples from SNLI premises with rule-based approach run gen_contr.py
;
Method 2:
- run gpt_data_generation_snli.py
for generating samples with GPT model from SNLI premises;
Method 3:
- run gpt_data_generation_method_3.py
in order to generate new types of contradictions with GPT model only