def _check_consistency(self, threads, show=False, verbose=False): results = [] for tid in sorted(threads): assumptions = [reading for (rid, reading) in self.expand_threads(tid, threads=threads)] assumptions = self._reading_command.process_thread(assumptions) if assumptions: assumptions += self._background # if Mace4 finds a model, it always seems to find it quickly mb = MaceCommand(None, assumptions, max_models=20) modelfound = mb.build_model() else: modelfound = False results.append((tid, modelfound)) if show: spacer(80) print "Model for Discourse Thread %s" % tid spacer(80) if verbose: for a in assumptions: print a spacer(80) if modelfound: print mb.model(format='cooked') else: print "No model found!\n" return results
def _check_consistency(self, threads, show=False, verbose=False): results = [] for tid in sorted(threads): assumptions = [reading for (rid, reading) in self.expand_threads(tid, threads=threads)] assumptions = map(self._reading_command.to_fol, self._reading_command.process_thread(assumptions)) if assumptions: assumptions += self._background # if Mace4 finds a model, it always seems to find it quickly mb = MaceCommand(None, assumptions, max_models=20) modelfound = mb.build_model() else: modelfound = False results.append((tid, modelfound)) if show: spacer(80) print "Model for Discourse Thread %s" % tid spacer(80) if verbose: for a in assumptions: print a spacer(80) if modelfound: print mb.model(format='cooked') else: print "No model found!\n" return results