A. Using NLP to build a sarcasm classifier

1. Pick two or three news sources and select a few news titles from their feed (about 5 is likely enough). For example you could select CNN, Fox News, MSNBC, NPR, PBS, Al Jazeera, RT (Russia Today), Deutsche Welle, Facebook, BBC, France24, CCTV, NHK World or another source you wish you analyze. Run your sarcasm model to predict whether the titles are interpreted as sarcastic or not. Analyze the results and comment on the different news sources you have selected.

B. Text generation with an RNN

1. Use the generate_text() command at the end of the exercise to produce synthetic output from your RNN model. Run it a second time and review the output. How has your RNN model been able to “learn” and “remember” the shakespeare text in order to reproduce a similar output?

The RNN model learns and remembers the shakespeare text by by checking the last letter to predict the next. The model learns the patterns at which the letters appear one after another.

2. Stretch goal - replace the Shakespeare text with your own selected text and run the model again. Modify the source text as needed in order to generate_text() from the newly trained model.

I generated some Harry Potter Script using the model:

Harry: Uppeesee, andownow the candles over.]

Harry: All stops him.]

Vernon: He’ll not be going!

Hagrid: Oh, and I suppose a brought ‘e rellow simping off the Quaffle. Blet Slytherin takes posits braghing dright] You?! [Harry is helping from his pocket-watch] Ooh, we’re aboug the counter-curse!

Neville Longbottom: Hey.

Harry: Blimey, is progething ho see. Now, look. Harry is in sinting on the train that day.

Hermione: Stop bloody hearing Dumbledore’s around, intolat Hagrid.] Sorrow, innor. He comes christmas standing on a broom store, who crawls backwas, dears. Bus heary a poarcaspears.]

Hagrid: Ohh! [he quickly lams pounts to reveal it]

Ron: That’s ann I was to anyore, as donnern’l wind who is wearing aw aptiand him back to the truin.]

Hagrid: I won’t have a name]

Ron: Ahh!

[Hermione stops, looks and jump not.] Everyone strong enough, first time. The turta chems, Harry, you’re not still on about him, are you?

Dumbledore: I home or wizardry in the several of the preatfredge n

C. Neural machine translation with attention

1. Use the translate() command at the end of the exercise to translate three sentences from Spanish to English. How did your translations turn out?

2. Stretch goal - pick a scene from a movie that is acted out in a language other than English. Download the appropriate language dataset and translate the scene. How did your translation turn out this time?