(cls, filepath, doc_index)
| 227 | |
| 228 | @classmethod |
| 229 | def from_json_file(cls, filepath, doc_index): |
| 230 | with open(filepath) as f: |
| 231 | json_dict = json.load(f) |
| 232 | |
| 233 | return cls(doc_index=doc_index, **json_dict) |
| 234 | |
| 235 | def to_json_file(self, filepath): |
| 236 | """Converts the RefenceResolver to json and writes it to the specified file. |