def save_vocab(self, filename): with open(filename, "wb") as f: pickle.dump(self._fullvocab, f) return self