def METHOD_NAME(self, filename):
    if filename is None or not os.path.exists(filename):
        return
    self._t2i, self._i2t = {}, {}
    for i, line in enumerate(open(file=filename, mode="r", encoding="utf-8").readlines()):
        word = line.strip()
        self._t2i[word] = i
        self._i2t[i] = word