October 26, 2012

Open Source Reconstitution

We said we would, so here it is. Reconstitution 2012, the source. In the name of letting go, we’ve decided to release first and house keep later. Eventually we’ll get around to cleaning up and organizing the code into a more generalized and unobtuse package.

What exactly does it do? Reconstitution 2012 is a web platform that uploads, processes, and distributes closed captioning data in real time. Like most things in the spacetime continuum, it has a back end and a front end.

Reconstitution 2012 FrontEnd
Reconstitution 2012 BackEnd

The backend server is written in Javascript, with Node.js. It takes a stream of characters, through a TCP-IP socket, and parses the incoming stream into words and sentences. In the original use-case, this stream was closed captioning text extracted from a live television broadcast, but it can be anything.

The server parses the incoming character stream into words and sentences. It performs a lookup on each word into the Linguistic Inquiry Word Count (LIWC) database. The parsed language is also run through two Java apps—the Standford Named Entity Recognizer, to determine proper capitalization, and Sentistrength, to determine the emotional strength of each sentence. The words and sentences are tagged and stored in a MongoDB database. The server then sends each word, tagged with a collection of meta-data, to all connected clients.

The front-end is written in Javascript with a Backbone.js architecture. It is held together with Tim Branyen’s sweet Backbone Boilerplate aka BBB. There are three main views: landing, transcript, and comparisons. The landing view lets you choose between the three debates. The transcript processes and assembles the word messages into a three column layout, with a colorful collection of linguistic markup, overlays, and animations. Finally, the comparison view shows a collection of graphs charting various psychological traits for the speakers.

The front end uses several libraries and frameworks including BBB, Skrollr, and engine.io, and takes advantage of CSS3, HTML5, and Websockets. It is best viewed on Chrome or Safari, and works pretty well on Firefox.

Reconstitution was coded by Sosolimited, with Tim Branyen and Bocoup.