Ejemplo n.º 1
0
def test_length_of_story():
    words = trigrams.words_from_file(storyF)
    dictionary = trigrams.trigrams_from_words(words)
    story = trigrams.story_from_trigrams(dictionary, 400)
    splitted_story = story.split(" ")
    assert(len(splitted_story) >= 300)
Ejemplo n.º 2
0
def test_is_trigrams_dictionary():
    words = trigrams.words_from_file(storyF)
    dictionary = trigrams.trigrams_from_words(words)
    assert(type(dictionary) == dict)