Assignment

Due at the beginning of session 10.

Use predictive models to generate text: either a Markov chain or a neural network, or both. How does your choice of source text affect the output? Try combining predictive text with other methods we’ve used for analyzing and generating text: use neural network-generated text to fill Tracery templates, or train a Markov model on the output of parsing parts of speech from a text, or some other combination. What works and what doesn’t? How does neural network-generated text “feel” different from Markov-generated text? How does the length of the n-gram and the unit of the n-gram affect the quality of the output?

Latest Jupyter Notebook

What I Did

Favorite Output

BRUTUS.
 Why com’st thou? 

GHOST.
 To tell thee what thou art. 

GHOST.
 Thy evil spirit, Brutus. 

BRUTUS.
 What, Lucius, ho! 

I
 cannot, by the progress of the field to rest, and let’s away, To part the numbers. Those that have abridg’d His time of fearing death. Stoop, Romans, stoop, And let our hearts, as subtle masters do, Stir up their sweaty night-caps, and uttered such a man depart, Save 

I
 alone, till Antony have spoke. [_Exit._] 

FIRST
 

CITIZEN.
 

O
 most bloody sight! 

SECOND
 

CITIZEN.
 

O
 piteous spectacle! 

SECOND
 

CITIZEN.
 Give him all kindness. 

I
 had been further. 

CAESAR.
 Good friends, go in, and taste some wine with me; And we, like friends, will straightway go together. 

BRUTUS.
 Our course will seem too bloody, Caius Cassius, To cut the head off, and then is this grown to be! He was my friend, faithful and just to me; But Brutus makes mine greater than themselves, And therefore are they all, all honourable men, Come 

I
 to speak truth of Caesar, It will not do thee so much that 

I
 did begin, there shall 

I
 end. My life is run his course. Antonius. 

ANTONY.
 Caesar? 

CAESAR.
 Let me not stir you up To such a man might know The end of this sight. 

TITINIUS.
 Hie you, Messala, And 

I
 do beseech ye, if you be prick’d in number of our purposes; For look, he smiles, and Caesar doth bear me hard, Now, whilst your purpled hands do reek and smoke, Fulfill your pleasure. Live a thousand years, 

I
 shall find time. Come therefore, and to Thassos send his body. His funerals shall not live, Who is here so base, that would have had thee there and here thy hunters stand, Sign’d in thy spoil, and crimson’d in thy red rays thou dost nod, thou break’st thy instrument; I’ll take it from the purpose of the same pulpit whereto 

I
 am constant as the Capitol, his glory not extenuated, wherein he was call’d a king. “Speak, strike, redress!” Am 

I
 your self But, as it were, in sort or limitation, To keep with you all, Upon this hope, that you would have done me wrong. 

BRUTUS.
 Judge me, you gods; wrong 

I
 mine enemies? And if not so, how should 

I
 know Wherefore they do appear As huge as high Olympus. 

CASSIUS.
 Come, Antony, and Lepidus are at hand, They mean to warn us at Philippi here, Answering before we do so? You know that 

I
 shall see thee again? 

GHOST.
 Ay, at Philippi. 

BRUTUS.
 Well; then 

I
 shall see me at Philippi. 

BRUTUS.
 The games are done, and thou shalt see me pay. 

I
 shall be humour. 

O
 Cassius, if you be prick’d to die In our black sentence and proscription. 

ANTONY.
 Octavius, lead your battle softly on Upon the next encounter, yields him ours. 

CASCA.
 

O,
 he lights too. He’s ta’en! [_Shout._] And, hark! they shout for joy. 

CASSIUS.
 Come down; behold no more. 

O,
 coward that 

I
 shall raise you by-and-by On business

Screen Shot 2024-04-04 at 12.20.27 PM.png

Screen Shot 2024-04-04 at 8.57.31 AM.png

[('and', 'with', 'respect', 'enough,', 'But', 'not', 'with'),
 ('CITIZEN.', 'O', 'woeful', 'day!', 'FOURTH', 'CITIZEN.', 'O'),
 ('PORTIA.', 'Nor', 'for', 'yours', 'neither.', 'Y’', 'have'),
 ('Cassius,', 'Brutus', 'gave', 'the', 'word', 'too', 'early,'),
 ('CITIZENS.', 'Stand', 'back;', 'room!', 'bear', 'back.', 'ANTONY.'),
 ('It', 'is', 'more', 'worthy', 'to', 'leap', 'in'),
 ('refus’d', 'it,', 'the', 'rabblement', 'hooted,', 'and', 'clapp’d'),
 ('now', 'on', 'Pompey’s', 'basis', 'lies', 'along,', 'No'),
 ('dear', 'love', 'To', 'your', 'proceeding', 'bids', 'me'),
 ('CASSIUS.', 'Hear', 'me,', 'good', 'brother.', 'BRUTUS.', 'Under')]

Thoughts