def statistics(self, text): self.asl = textstat.avg_sentence_length(text) self.avg_sentence_per_word = textstat.avg_sentence_per_word(text) self.avg_syllables_per_word = textstat.avg_syllables_per_word(text) self.difficult_words = textstat.difficult_words(text) self.lexicon_count = textstat.lexicon_count(text) self.polysyllable_count = textstat.polysyllabcount(text) self.sentence_count = textstat.sentence_count(text)
def test_polysyllabcount(self): count = textstat.polysyllabcount(self.long_test) self.assertEqual(32, count)
def test_polysyllabcount(): textstat.set_lang("en_US") count = textstat.polysyllabcount(long_test) assert count == 32
def test_polysyllabcount(): count = textstat.polysyllabcount(long_test) assert count == 32