Synesketch is a software library (Java API) for sensing and creative visualization of textual emotions. 

According to the project’s WIKI, Synesketch

is a result of a research that spreads out through several diverse fields – from natural language processing techniques based on WordNet, across Ekman’s research of emotions, to color psychology, visual design, data visualizations, and affective computing. Graphics were done by Processing, a great tool for programming visual art

uses a WordNet-based lexicon of words with emotional weights, and several NLP heuristic rules (e.g. emotional intensity of a sentence with emotional words is proportional to the number of exclamation marks at the end of the sentence). The algorithm transfers a (presumably small) chunk of text (e.g. basic unit of text in a chat conversation) into several emotional parameters … which defines emotional content of the text.

The idea is extremely interesting, and a PHP porting has been used by students in the last HackU 2010 to create Zeitgeist, a prototypal application that display USA’s emotional state based on tweets and the Emote API

The presentation of the ZeitGeist application at HackU 2010