RichardHGL / WSDM2021_NSM

Improving Multi-hop Knowledge Base Question Answering by Learning Intermediate Supervision Signals. WSDM 2021.
130 stars 22 forks source link

How can I use my own data to train the model? #19

Closed sitaocheng closed 2 years ago

sitaocheng commented 2 years ago

Hi, I have a question for training and evaluating the model.

I have run the code on CWQ successfully. Now I want to use my own data to train but don't know how.

My data is just a modified CWQ with a little change of the question. So I tried to find where you load the question but failed.

I found that you have query_texts commented on NSM/data/basic_dataset.py.

Can you tell me how to change the question or how I can use my own data to train?

RichardHGL commented 2 years ago

Check NSM/data/basic_dataset.py, you can comment out self._prepare_dep() (query_texts are generated with this function) and any operations related with dependence tree reading. It's easy to write the code for self.query.texts. You can use tokenize_sent function in this file to tokenize sentence