コード例 #1
0
def test_nsyl():
    r = Ranalyzer("The quick brown fox jumps over the lazy dog.")
    assert_equal(r._nsyl("syllable")[0], 3)
    assert_raises(UnknownWordError, r._nsyl, "monosyllabic")
コード例 #2
0
def test_word():
    r = Ranalyzer("The gentleman will not be allergic to my medicine.")
    assert_equal(r._nsyl("medicine")[0], 3)