wenhuchen / LogicNLG

The data and code for ACL2020 paper "Logical Natural Language Generation from Open-Domain Tables"
MIT License
167 stars 22 forks source link

What is the working of entity linker ? #9

Closed shankyemcee closed 4 years ago

shankyemcee commented 4 years ago

In the original paper you stated that the entity linker is used to replace the entities in the original sentence with [ENT]. What is the working of entity linker? How are the entity templates generated?

During prediction you predict the template. How is this template converted to the final surface form?

wenhuchen commented 4 years ago

To answer your first question, the entity linking process is better described in the README page: https://github.com/wenhuchen/LogicNLG/blob/master/LINKING.md. To answer your second question, the two-phase process is described in https://github.com/wenhuchen/LogicNLG/blob/ffa8e2637e741855b46c9d9663018fb1d1a57585/DataLoader.py#L348. This dataloader will generate training data for both phase-1 (generate template) and phase-2 (generate surface form), the GPT-2 model trained by these two phases learn to do these two steps in the decoding time.

shankyemcee commented 4 years ago

Thanks for your reply. So how are templates converted to surface form in phase 2?

wenhuchen commented 4 years ago

It's parametrized by a GPT-2 model, please refer to the coarse to fine python file for details.