original_docstring:  assume there is one word per line in vocab text file 
docstring: assume there is one word per line in vocab text file
docstring_tokens: assume there is one word per line in vocab text file
code: def load_vocab(self,filename, global_check=False):
          ''' assume there is one word per line in vocab text file '''
  
          if global_check and self.vocab_list is not None and self.vocab_dict is not None:
              return self.vocab_list, self.vocab_dict
  
          dict = {}
          list = self.open_sentences(filename)
          for i in range(len(list)):
              list[i] = list[i].strip()
              word = list[i]
              #dict[word] = self.model_embedding.precict(np.array([i]))
              dict[list[i]] = i
          self.vocab_list = list
          self.vocab_dict = dict # dict
          return list, dict
code_tokens: def load_vocab ( self , filename , global_check = False ) : if global_check and self . vocab_list is not None and self . vocab_dict is not None : return self . vocab_list , self . vocab_dict dict = { } list = self . open_sentences ( filename ) for i in range ( len ( list ) ) : list [ i ] = list [ i ] . strip ( ) word = list [ i ] dict [ list [ i ] ] = i self . vocab_list = list self . vocab_dict = dict return list , dict
short_docstring: assume there is one word per line in vocab text file
short_docstring_tokens: assume there is one word per line in vocab text file
comment: ''' assume there is one word per line in vocab text file '''$SEP$#dict[word] = self.model_embedding.precict(np.array([i]))$SEP$# dict