Here is the code for my final project for COSI 137b Information Extraction. I chose to do a methods focused project, which has an emphasis on implementation over experimentation. The model architecture is heavily based on this paper from EMNLP 2018.
Requires Python 3.9+
The easiest way to run the code is using the provided notebook run.ipynb
. This can either be as a Jupyter notebook or
from Google Colab. Using Colab involves uploading the project folder to your Google Drive, in order to be able to run
the provided scripts. Follow the instructions in the notebook for installing the requirements and running experiments.
Create a virtual environment, then install the requirements:
pip install -r requirements.txt
See the PyTorch website for more information on installing torch with cuda for GPU training.
Then, run the main script with the following command:
python src/main.py
There are a number of command line arguments for training the model. Add the --help
flag to see the different
options.