def clear(self):
<EOL>cand_subclasses = set()<EOL>for mentions, tablename in [<EOL>(_[<NUM_LIT:1>][<NUM_LIT:0>], _[<NUM_LIT:1>][<NUM_LIT:1>]) for _ in candidate_subclasses.values()<EOL>]:<EOL><INDENT>for mention in mentions:<EOL><INDENT>if mention in self.mention_classes:<EOL><INDENT>cand_subclasses.add(tablename)<EOL><DEDENT><DEDENT><DEDENT>for mention_class in self.mention_classes:<EOL><INDENT>logger.info(f"<STR_LIT>")<EOL>self.session.query(Mention).filter_by(<EOL>type=mention_class.__tablename__<EOL>).delete(synchronize_session="<STR_LIT>")<EOL><DEDENT>for cand_subclass in cand_subclasses:<EOL><INDENT>logger.info(f"<STR_LIT>")<EOL>self.session.query(Candidate).filter_by(type=cand_subclass).delete(<EOL>synchronize_session="<STR_LIT>"<EOL>)<EOL><DEDENT>
Delete Mentions of each class in the extractor from the given split.