lizmrush / GenerateParagraphFromTrigram / 1.0.0

This algorithm takes an input array of a trained trigram model (as a Data URL), beginning and ending tokens, as well as the length of the paragraph you'd like to generate. 

To generate the trigram model & corresponding Data URL, please see the Trigram generator algorithm page. The result of this algorithm will be the input for the trained trigram model here. Please note that you must also use the same beginning and ending tokens as you used in the trigram generator. 

Finally, the last input is the number of sentences in the paragraph. This algorithm will generate random text as sentences until the number of sentences matches the input you have given for paragraph length. Note that this algorithm calls into another algorithm, so each sentence that you generate requires an additional call. This can incur extra cost based on the pricing of Random Text From Trigram.

When you run the sample code, the output will be a paragraph of 6 sentences generated from the same sample trigram model. This trigram model was trained on fourteen novels & autobiographies by female authors in the 19th century United States.