This is the code for the EMNLP2021 paper, Total Recall: a Customized Continual Learning Method for Neural Semantic Parsers. This work investigates continual learning for semantic parsing.
@inproceedings{li2021total,
title={Total Recall: a Customized Continual Learning Method for Neural Semantic Parsers},
author={Li, Zhuang and Qu, Lizhen and Haffari, Gholamreza},
booktitle={Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing},
pages={3816--3831},
year={2021}
}
- Python 3.8
- cuda 11.0
- Create a new conda environment with python 3.8
conda create -n py38 python=3.8
conda activate py38
- Install pytorch 1.7.1 please select the proper pytorch version given your own environment
pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
- Install other libs
pip install spicy
pip install zss
pip install strsim
pip install quadprog
pip install scikit-learn-extra
pip install nltk
pip install transformers
./pull_dependency.sh
- Run the script to run the best setting in our continual learning experiments
python preprocess_data/nlmap/generate_nlmap_ext_actions.py
./scripts/nlmap/continual_train/city_warm_run/warm_loop_run.sh 0
python preprocess_data/nlmap/generate_nlmap_qtype_actions.py
./scripts/nlmap/continual_train/qtype_warm_run/adap_qtype_loop_run.sh 0
python preprocess_data/overnight/generate_actions.py
./scripts/overnight/continual_train/warm_loop_run.sh 0
- Supervised training on NlMapV2
python preprocess_data/nlmap/generate_nlmap_actions.py
./scripts/nlmap/question_split/train.sh
- Supervised training on NlMapV1
python preprocess_data/nlmap/generate_actions.py
./scripts/nlmap_v1/train.sh