Sunday, April 25, 2010

Counting words while watching a video

So, a friend of mine asked for some help on a statistics assignment in which he counted the amount of times any given word was said during a movie. He asked if I could write up an app that would help him do this fairly easily, so I said sure.

It took me about an hour and a half to get it written and the bugs worked out and then he decided it was taking too long and just started doing it by hand, and didn't tell me about it while I still worked on it.

Whatever. Maybe someone else can find it useful.

The video won't show up in the picture, but it plays anything windows media player can play.

While watching the video, pressing 'r' will record a time for the word being recorded, rather than having to sit with the mouse or keep the focus on the record button. In the end, it spits out a result as such (per friends specifications):




The compiled executable is
here.

The source code is here.


Have fun counting words now! If anyone actually wants this for linux, I could look into porting it to GTK and gstreamer.