示例#1
0
 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)
示例#2
0
    def test_polysyllabcount(self):
        count = textstat.polysyllabcount(self.long_test)

        self.assertEqual(32, count)
示例#3
0
def test_polysyllabcount():
    textstat.set_lang("en_US")
    count = textstat.polysyllabcount(long_test)

    assert count == 32
示例#4
0
def test_polysyllabcount():
    count = textstat.polysyllabcount(long_test)

    assert count == 32
示例#5
0
def test_polysyllabcount():
    count = textstat.polysyllabcount(long_test)

    assert count == 32