thunlp/EntityDuetNeuralRanking

what is "car_emb" the meaning in EDRM/KNRM.py

Closed this issue · 3 comments

hi EdwardZH , what is "car_emb" the meaning in EDRM/KNRM.py, type embedding?

Yes. It means type embedding.

thanks for your reply!
Here are some of my understanding of variables in EDRM/DataLoader.py
1, open(inst_file).readline.split('\t'), the result like this ->
if score > 0
["q_word_id_1,q_word_id_2,...",
"d_pos_word_id_1,d_pos_word_id_2,...",
"d_neg_word_id_1,d_neg_word_id_2,...",
"score",
"q_entity_text_1,q_entity_text_2...",
"d_pos_entity_text_1,d_pos_entity_text_2,...",
"d_neg_entity_text_1,d_neg_entity_text_2,..."]

2, ent_wrd_dict = {ent_text:[type_id1, type_id2...]}
3, ent_des_dict = {ent_text:[des_word_id1, des_word_id2...]}
4, ent2idx = {ent_text: ent_id,...}
am i right? by the way, what is self._ent_des meaning?

You are right. self._ent_des is a list of entity description and you can map description and entity through ent_des_dict. ent_des_dict = {ent_text:id_in_self._ent_des}. Through this method, we can have only one copy in memory. On the other hand, you can also achieve your own data loader.