The repository contains code examples for DLG4NLP tutorials at NAACL 2021.
Slides can be downloaded from NAACL 2021 version.
You will need to install our graph4nlp library in order to run the demo code. Please follow the following environment setup instructions. Please also refer to the graph4nlp repository page for more details on how to use the library.
- Create virtual environment
conda create --name graph4nlp python=3.7
conda activate graph4nlp
- Install graph4nlp library
- Clone the github repo
git clone -b stable https://github.com/graph4ai/graph4nlp.git
cd graph4nlp
- Then run
./configure
(or./configure.bat
if you are using Windows 10) to config your installation. The configuration program will ask you to specify your CUDA version. If you do not have a GPU, please choose 'cpu'.
./configure
- Finally, install the package
python setup.py install
- Set up StanfordCoreNLP (for static graph construction only, unnecessary for this demo because preprocessed data is provided)
- Download StanfordCoreNLP
- Go to the root folder and start the server
java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9000 -timeout 15000
After complete the above steps, you can start the jupyter notebook server to run the demo:
cd graph4nlp_demo/NAACL2021_demo
jupyter notebook