Dorper Website of Paul Carver Harrison

Wolfram Subtitle Shenanigans

Background

Wolfram Mathematica is a very popular computer algebra system. It is the CAS I use the most along with the CAS on my TI Voyage 200. Mathematica also has a LOT of other functions that are completely unrelated to mathematics. It has functions for manipulating graphics, audio, files, devices, text, video, and the subject of this project: video subtitles. Yes, Mathematica has functions for manipulating Advanced SubStation Alpha (ASS) subtitles. I found this interesting and decided to play around with it.

Limited Dictionary Subtitles

Download Wolfram Notebook

I created a Mathematica notebook that loads a large text file (i.e. a book) and creates a dictionary from the words it contains. Then, it loads the subtitles from a video. It expands contractions in the subtitles because contractions are not usually used in formal writing. Then, it replaces every word not in the dictionary with ?. Then, it attaches the new subtitles to the video in SRT format. So, if you wanted to watch an entire episode of subtitled anime only using words found in Shakespeare, you can.

But why would I do this? I did this because I wanted to learn Mathematica and the Wolfram Language in general. There could be practical applications of subtitle modification with Mathematica. For example, it would be rather trivial to to language translation.