Skip to content

luthfibalaka/NLP-APE

Repository files navigation

Argument Pair Extraction

This repository hosts the code for the paper: Have my arguments been replied to? Argument Pair Extraction as Machine Reading Comprehension.

The original code is available in this repo, but I simplified it for the NLP students at the University of Indonesia to do their final project.

Steps to Run Locally

First, create a Conda environment---resource to install Miniconda---with the following command:

conda create -n ape python=3.10
conda activate ape

Second, install the requirements with the following command:

pip install -r requirements.txt

Third, run the scripts in downloader.ipynb in data/ and longformer-base/ to download data and longformer model.

Fourth, create a folder in data/ named processed/

Last, run the following command:

python prepare.py  
python to_bioes.py  
python run.py

Notice that there will be a new folder named saved_models, which consists of the trained model and a log file detailing the F1 score(s) for each epoch.

Alternative

You may compile everything into a Jupyter Notebook file and run it through platforms such as Kaggle or Colab. By doing this, you can leverage free GPUs to accelerate the process.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published