Analyzes sentiment of twitter posts based on query