Skip to content

Commit 599bc78

Browse files
committed
fix word2vec reader
1 parent 2966f1d commit 599bc78

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

models/recall/word2vec/word2vec_reader.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ def __init__(self, file_list, config):
130130

131131
def init(self):
132132
dict_path = self.config.get("runner.word_id_dict_path")
133-
pwd = str(os.getcwd())
134-
if pwd[-8:] != 'word2vec':
135-
dict_path = os.path.join(pwd, 'models/recall/word2vec', dict_path)
133+
dict_path = os.path.join(self.config_abs_dir, dict_path)
136134
self.word_to_id = dict()
137135
self.id_to_word = dict()
138136
with io.open(dict_path, 'r', encoding='utf-8') as f:

0 commit comments

Comments
 (0)