def test_get_scores(self): result = ZScores(self.corpus).set_categories('hamlet').get_scores() self.assertEquals(type(result), pd.Series) pd.np.testing.assert_array_equal(pd.np.array(result.index), self.corpus.get_terms())
def test_get_name(self): self.assertEquals( ZScores(self.corpus).set_categories('hamlet').get_name(), "Z-Score from Welch's T-Test")
def test_get_ranks_meta(self): corpus = build_hamlet_jz_corpus_with_meta() self.assertEquals( ZScores(corpus).set_term_ranker( OncePerDocFrequencyRanker).set_categories('hamlet').get_name(), "Z-Score from Welch's T-Test")