Code for Describing a Knowledge Base
Accepted by 11th International Conference on Natural Language Generation (INLG 2018)
Put the Wikipedia Person and Animal Dataset under the Describing a Knowledge Base
folder. Unzip it.
Randomly split the data into train, dev and test by runing split.py
under utils folder.
python split.py
Run preprocess.py
under the same folder.
You can choose person (type 0) or animal (type 1)
python preprocess.py --type 0
Hyperparameter can be adjusted in the Config class of main.py and choose whether person (0) or animal (1) using type.
python main.py --cuda --mode 0 --type 0
Compute score:
python main.py --cuda --mode 3
Predict single entity:
python main.py --cuda --mode 1
@InProceedings{W18-6502,
author = "Wang, Qingyun
and Pan, Xiaoman
and Huang, Lifu
and Zhang, Boliang
and Jiang, Zhiying
and Ji, Heng
and Knight, Kevin",
title = "Describing a Knowledge Base",
booktitle = "Proceedings of the 11th International Conference on Natural Language Generation",
year = "2018",
publisher = "Association for Computational Linguistics",
pages = "10--21",
location = "Tilburg University, The Netherlands",
url = "http://aclanthology.org/W18-6502"
}