Hackup is an 8 hour hackathon in Uppsala, Sweden that I participated in. I walked in with no team but soon decided to join up with an existing team that was debating using natural language processing. The main concept that we decided to build was a simple one page that would take a twitter handle and show the percentage of tweets that were positive or negative. The language of choice was Node.js.
Our first attempt at this was using manual training where we took the tweet corpus of Sentiment140 and build a training set for the IBM Watson natural language module. This turned out to have some downsides. One downside is the long training time. A test batch with 500 examples took over 20 minutes to train, in an 8 hour hackathon this was a significant amount of time. There is a limit of 10,000 examples for the training set as well. The final problem was that the accuracy was poor and tweets seemed randomly classified between positive or negative. We decided to use the IBM Alchemy API for sentiment analysis which had no training time and was fairly accurate.
One of the other difficulties was getting environmental variables to be set properly in IBM Watson. The main problem what that every time we deployed using git, the environmental variables would be reset to blank. As this was the method we were storing API keys for Twitter and Watson, this caused several problems. We didn’t find a solution for this, just fixed the environmental variables every time we deployed.
We did manage to finish building it and deployed it with almost two hours to spare. The code is up on github. A picture of the website is below.