Skip to content

Commit

Permalink
remove more unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
undertherain committed Apr 27, 2018
1 parent e79e91d commit c97ec15
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions vecto/vocabulary/vocabulary.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@ def save_to_dir(self, path):
f.close()
save_json(self.metadata, os.path.join(path, "metadata.json"))

def load_list_from_sorted_file(self, filename):
self.lst_words = []
f = open(filename, encoding='utf-8', errors='replace')
lines = f.readlines()
for line in lines:
token = line.strip()
self.lst_words.append(token)
f.close()

def create_dic_from_list(self):
self.dic_words_ids = {}
for i in range(len(self.lst_words)):
self.dic_words_ids[self.lst_words[i]] = i
# def load_list_from_sorted_file(self, filename):
# self.lst_words = []
# f = open(filename, encoding='utf-8', errors='replace')
# lines = f.readlines()
# for line in lines:
# token = line.strip()
# self.lst_words.append(token)
# f.close()

# def create_dic_from_list(self):
# self.dic_words_ids = {}
# for i in range(len(self.lst_words)):
# self.dic_words_ids[self.lst_words[i]] = i

# def load_from_list(self, path):
# self.load_list_from_sorted_file(path)
Expand Down

0 comments on commit c97ec15

Please sign in to comment.