Skip to content

Commit

Permalink
Update ed_ranker.py
Browse files Browse the repository at this point in the history
  • Loading branch information
YoungXiyuan authored Oct 9, 2019
1 parent f149dc1 commit a0c3c21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ed_ranker.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self, config):
self.model.cuda()

def load_ent_desc(self, max_desc_len, n_grams):
ent_desc = json.load(open('../ent2desc.json', 'r'))
ent_desc = json.load(open('../data/ent2desc.json', 'r'))
self.ent_desc = [[self.word_vocab.get_id(Vocabulary.unk_token) for j in range(max_desc_len)] for i in range(self.ent_vocab.size())]
self.desc_mask = [[0 for j in range(max_desc_len-n_grams+1)] for i in range(self.ent_vocab.size())]
for ent in ent_desc:
Expand Down

0 comments on commit a0c3c21

Please sign in to comment.