bred

Generation

generate functionTue, 17 Jan 2023

This function will take in a sentence and generate new lines after it with rhymes.

import markovify def markov_model(sentence, corpus): model = markovify.Text(sentence) for i in range(4): print(model.make_sentence()) markov_model(sentence, corpus)

Questions about programming?Chat with your personal AI assistant