When the U.S. Supreme Court upheld same-sex weddings in the same week that South Carolina debated keeping a controversial Civil War battle flag, Twitter user @xTomatoez posted "Gay marriage and the Confederate flag going down everywhere. Tough week for your redneck uncle on Facebook."

The poster had no idea his tweet was one of many scrutinized by an analytics firm, whose algorithm took his mocking message seriously and decided it was negative toward gay marriage.

In the race for the White House in 2016, election campaigns rely on such research to help them tailor advertising and other outreach to particular groups of voters. A candidate's ability to micro-target likely voters with ads on issues they care about is crucial in a modern American political campaign.