RichardHGL / WSDM2021_NSM

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

indicate datasets #3

Closed dinani65 closed 3 years ago

dinani65 commented 3 years ago

could u please describe more how to config dataset?

dinani65 commented 3 years ago

In webqsp folder, there is no kb_03 folder.

RichardHGL commented 3 years ago

The config about dataset is in format --data_folder <position relative/absolute path>. For example, --data_folder /home/username/data/KBQA/MetaQA-3hop/. You may refer to my command in run_webqsp.sh, run_metaqa.sh for reference.

dinani65 commented 3 years ago

Many thanks for your reply. I do apologize it if my questions are simple. 1) --load_teacher is one of parameters when main_student.py should be run, but there is no any .ckpt file to use that. 2) entities.txt includes the ids of the entities, could u please share the id2entity file as well? I want to have the file which contains entities and related ids? 3) each line of *_simple.json file describes a question and related question-specific graph. each sub graph contains some tuples, what are the numbers which have been used to show the sub graphs and how can access to their corresponded entities? I guess each entity has a text, an index and and an Id. If so, is it possible to have them in a file?

RichardHGL commented 3 years ago

I think you'd better have a look at my example command, and try to run it.

  1. For example, run_webqsp.sh train teacher and then save ckpt, so that you can run main_student.py
  2. You can read the entity mapping function in NSM/data/basic_dataset.py, the load_dict function indicate what's id2entity.
  3. After reading the related code about loading dataset. You can try to translate them back to entity with the entity2id. The entities only have freebase id.