Molly White
Software engineer, editor and arbitrator on Wikipedia, feminist, Twitter bot commander, unabashed cat lady.

MBTA and Twitter sentiment

For a while now I've wanted to work on a project to display information about the MBTA (Massachusetts Bay Transportation Authority) trains and buses by combining data from the MBTA themselves with tweets from the general public. This project would combine my love of Twitter, general bemusement with the adventure that is the MBTA, and interests in learning more about natural language processing and machine learning.

On my way to work this morning, I scrolled through the results from a Twitter search on "MBTA" to get a sense of what I will be working with if I undertake this project. The results are pretty widely spread in terms of usefulness, and in terms of ease in which I (think I) will be able to use them.

Some seem potentially useful, and straightforward in terms of the information they're trying to convey:

Some convey what could be relevant information, but are too vague to be of any use:

Some are relatively neutral; they share information about MBTA reform, links to news articles, or check-ins at train stations from other apps such as Swarm.

Sentiment analysis

After scrolling for a bit, I popped the "MBTA" search query into a tweet sentiment analyzer and found something surprising:

The tweets were mostly positive.

As my examples above may indicate, almost all tweets about the MBTA are negative. Some are fairly neutral, as I mentioned before in regards to links and the like, but positive tweets are few and far between. Why were they showing up as positive?

Luckily this analyzer allows me to dig deeper and find out specifically which point corresponded to which tweet(s). The annotated version:


  1. Shout out to @MBTA_CR for consistently being unreliable, delays even when it's 64 degrees out #pathetic (link)
  2. #mbta Route 42 experiencing minor delays due to disabled bus 09:24 PM (link)
  3. On the subway is not where I want to find out my deodorant is failing! #commutingwoes #mbta #greenline (link)
  4. @mbta, Any reason Ashmont line isoving so slowly tonight? No reports on the muffled speakees. (link)
  5. @MBTA That's for the awesome communication about the problem with the train. Oh. Wait. No. All we got was an announcement of "HOP OFF!"(link)
  6. Why did the #MBTA report need to be a "rapid diagnosis" when dozens of similar reports already existed? (link)
  7. @Chernickator: @mbta hammered guy on car 01742 red line towards Braintree fell on top of me. Nearly took my head off.
  8. @MBTA countdown display not working at Brookline village outbound
  9. @GlobeMetro I wouldn't give the @MBTA a dime of my money. Corrupt hacks. (link)
  10. I love when baseball season starts and the green line fills up with people who have literally never been on an mbta train in their life. (link)
  11. So why isn't the MBTA doing something smart like this???? (link)
  12. don't know why I give my money to the @MBTA (link)
  13. @EricaMouraNEWS Hello Erica. Could you pls forward us a car number, specific location, & direction of travel? We would like to investigate. (link)
  14. Love the #Converse kitted out Orange Line cars, they should always be this bright inside! #MBTA (link)

After looking through, I realized that a large number of tweets being displayed in green on the sentiment analysis graph (examples 5–12) were not actually intended to be positive. Some of them seemed to be just completely misunderstood (for example, 8, 9, and 12). But many seemed to be sarcastic.

I wound up reading a lot about attempts to identify sarcasm in tweets, and found some really interesting articles. My favorites out of the papers I read today were "Who cares about sarcastic tweets? Investigating the impact of sarcasm on sentiment analysis" by Diana Maynard and Mark A. Greenwood, and "Identifying Sarcasm in Twitter: A Closer Look" by Roberto González-Ibáñez, Smaranda Muresan, and Nina Wacholder.

I'm definitely looking forward to playing around with this, but it's daunting. The tendency towards sarcasm and the ambiguous nature of many of the tweets may make this project extremely difficult. I'm hoping that starting it will at least give me a little more insight into natural language processing, machine learning, and all of the problems that are common in those two fields.

I'm also curious to see how other semantic analyzers perform. Are there some that incorporate the possibility of sarcasm? Particularly with Twitter, hashtags could be valuable (as mentioned in both articles above). Others may just be more accurate.

comments powered by Disqus