Beispiel #1
0
    def _analyze(self):
        """Performs clue analysis.
        """
        if len(self.task.clues) == 0:
            return

        self.task.analyzed = analysis.analyze(self.task.clues)
        self.task.analyzed = analysis.reanalyze(self.task.clues,
                                self.task.analyzed, self.task.ratio_threshold)
Beispiel #2
0
    def _analyze(self):
        """Performs clue analysis.
        """
        if len(self.task.clues) == 0:
            return

        self.task.analyzed = analysis.analyze(self.task.clues)
        self.task.analyzed = analysis.reanalyze(self.task.clues,
                                                self.task.analyzed,
                                                self.task.ratio_threshold)
Beispiel #3
0
    def analyze(self, filename, expected_raw, expected_analyzed):
        clues = self._getClues(filename)
        self.assertTrue(len(clues) >= expected_raw)

        analyzed = analysis.analyze(clues)
        analyzed = analysis.reanalyze(clues, analyzed, self.threshold)
        self.assertEqual(len(analyzed), expected_analyzed)

        total_before = self._hits(clues)
        total_after = self._hits(analyzed)

        self.assertEqual(total_before, total_after)
    def analyze(self, filename, expected_raw, expected_analyzed):
        clues = self._get_clues(filename)
        self.failUnless(len(clues) >= expected_raw)

        analyzed = analysis.analyze(clues)
        analyzed = analysis.reanalyze(clues, analyzed, self.threshold)
        self.failUnlessEqual(len(analyzed), expected_analyzed)

        total_before = self._hits(clues)
        total_after = self._hits(analyzed)

        self.failUnlessEqual(total_before, total_after)