def testHoles(self): expected = ["one", "enough"] AnalyzerUtils.assertAnalyzesTo(self.stopAnalyzer, "one is not enough", expected) AnalyzerUtils.assertAnalyzesTo(self.stopAnalyzer, "one is enough", expected) AnalyzerUtils.assertAnalyzesTo(self.stopAnalyzer, "one enough", expected) AnalyzerUtils.assertAnalyzesTo(self.stopAnalyzer, "one but not enough", expected)
def testSpanish(self): analyzer = SnowballAnalyzer(Version.LUCENE_CURRENT, "Spanish") AnalyzerUtils.assertAnalyzesTo(analyzer, "algoritmos", ["algoritm"])
def testEnglish(self): analyzer = SnowballAnalyzer(Version.LUCENE_CURRENT, "English") AnalyzerUtils.assertAnalyzesTo(analyzer, "stemming algorithms", ["stem", "algorithm"])
def testStopAnalyzerFlawed(self): AnalyzerUtils.assertAnalyzesTo(StopAnalyzerFlawed(), "The quick brown...", ["the", "quick", "brown"])
def testStopAnalyzer2(self): AnalyzerUtils.assertAnalyzesTo(StopAnalyzer2(), "The quick brown...", ["quick", "brown"])