Latest version. Unit conversion and relations
While watching technical videos in english as a european you often encounter strange units such as inches, foot or even stones per acre. We thought what if our computer could convert these units into the metrical system and display them while we are watching the video. In the next step we thought, well this idea could be taken to the next level. So we decided to put amounts of money into relation to the various budgets of a state, such as the military budget.
What it does
While playing the video the subtitles for this video are loaded (or generated in a possible future iteration) and parsed for any numbers. Currencies are then converted into euros, whereas units such as inches are converted into an appropriate metrical unit. These converted units are then put into relation to an object of comparision e.g the military budget of the usa for an amount of money or the length of a football field for a unit of length. These converted values together with their relation are then displayed beneith the video.
How we built it
We created a python 3 application using Qt5 for a GUI frontend. The application takes a youtube video url as parameter, downloads this video together with its subtitles (or loads it from a cache). Then the subtitles are parsed. During the playback of the video the current parts of the subtitles (around 1 sentence) is passed to a number and unit extractor. This extractor, as the name already says, extracts any number including their units from a string. This string is then passed to a converter which returns appropriate conversions and relations for that number. This step is configurable according to the preferences of the user.
Challenges we ran into
First we realized that the youtube API allows only a certain amount of downloads in a certain period of times. That's why we introduced a local video cache. Furthermore there are still a lot of videos that neither have manual nor automatic subtitles. Another major issue we had to deal with are the various possibilities numbers and units can be represented in text. It took a lot of time testing various cases and we hope that we covered all of them. The biggest challenge of all was to find interesting videos of politicians actually using numbers for any of their projects. That's actually harder than one might guess.
Accomplishments that we're proud of
We are proud that we managed to write a simple video player that takes youtube video url and extracts any numbers from that video in a single day.
What we learned
We learned that unit conversion and especially putting numbers into relation is harder than it appears at first sight. Also putting values into relations that makes them better understandable is kind of hard, because based on their magnitude a different relation might make sense. (Comparing a hair to the length of a football field doesn't help you imagining its size)
What's next for UnderstandYourNumbers
Parsing the audio of the video instead of relying on the autogenerated youtube subtitles.