(self, out_path)
| 79 | return Vocab(json.load(open(in_path)), special_elems=()) |
| 80 | |
| 81 | def save(self, out_path): |
| 82 | with open(out_path, 'w') as f: |
| 83 | json.dump([self.id_to_elem[i] for i in range(len(self.id_to_elem))], f) |
| 84 | |
| 85 | |
| 86 | class VocabBuilder: |
nothing calls this directly
no outgoing calls
no test coverage detected