Skip to content

A repository for our research on linguistically informed methods in natural language understanding

Notifications You must be signed in to change notification settings

fraunhofer-iais/informed_nlu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Informed NLU

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 the repository

  1. Install Python on your system and create a new virtual environment (recommended: Python >= 3.8.0):
$ conda create -n informed_nlu python==3.8
  1. Navigate to the repository folder:
$ cd informed_nlu
  1. Install the package:
$ pip install -e .

Reproduce the experiments

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

Important: You need to add your personal OpenAI API key under ./informed_nlu/utils/api_key.py, in order to make requests to the OpenAI API.

About

A repository for our research on linguistically informed methods in natural language understanding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages