The NRC Word-Emotion Association Lexicon (aka EmoLex) associates a long list of english words with their emotional connotations. It’s stored as a large text file, which should make it easy for my programming students to use to analyse texts.
David Robinson used this database to help distinguish tweets sent by Donald Trump from those sent by his staff (all on the same twitter account).