code: def load(self, vocab_file):
      self.__term2id = {}
      self.__id2term = {}
      with open(vocab_file, "r", encoding="utf-8") as fin:
          for line in fin.readlines():
              fields = line.strip().split("\t")
              assert (
                  len(fields) == 5
              ), "Vocabulary file [%s] format error!" % (vocab_file)
              term = fields[1]
              id_ = int(fields[2])
              if term in self.__term2id:
                  logger.error(
                      "Duplicate word [%s] in vocab file!" % (term)
                  )
                  continue
              self.__term2id[term] = id_
              self.__id2term[id_] = term
  
file_path: PaddleHub/modules/text/language_model/slda_novel/vocab.py
imports: from paddlehub.common.logger import logger
label_desc: Use image node_id 3 for calling the Vocab obj's underlying member method code with example usage: obj.load(vocab_file) without return types