def load(self) -> None:
if not isinstance(self.load_path, list):<EOL><INDENT>self.load_path = [self.load_path]<EOL><DEDENT>for i, path in enumerate(self.load_path):<EOL><INDENT>if isinstance(path, str):<EOL><INDENT>self.load_path[i] = pathlib.Path(path)<EOL><DEDENT><DEDENT>labels_by_words = defaultdict(set)<EOL>for infile in self.load_path:<EOL><INDENT>with infile.open("<STR_LIT:r>", encoding="<STR_LIT:utf8>") as fin:<EOL><INDENT>for line in fin:<EOL><INDENT>line = line.strip()<EOL>if line.count("<STR_LIT:\t>") != <NUM_LIT:1>:<EOL><INDENT>continue<EOL><DEDENT>word, labels = line.split("<STR_LIT:\t>")<EOL>labels_by_words[word].update(labels.split())<EOL><DEDENT><DEDENT><DEDENT>self._initialize(labels_by_words)<EOL>
Loads the dictionary from self.load_path