AWS Public Sector Blog

Listen to Citizen and Student Sentiment with Machine Learning

Note: the below leverages Amazon Translate, currently in preview form.

Twitter has hundreds of millions of active users each month and supports multiple languages on their platform. These users engage with nonprofits, need citizen services, and learn at schools, universities, and other educational institutions. As a consequence, public sector organizations look to social media not only to communicate with the public, but also to gain insights about the citizens, volunteers, and students they serve.

Wouldn’t it be great to know if people had positive or negative opinions about your city, school, nonprofit, or organization? What are they talking about and how many other people share that view?

For example, using machine learning, a city could understand how changes are affecting their population and the status of public services. They could learn what is being said about the parks, trails, public transportation, and other services it may provide.

Standing this up for your organization

Leveraging powerful building blocks, you can easily stand up an environment that captures the tweets you care about. This can be done for a single language, such as English, or for multiple languages to capture various demographics. All of these can be translated with a simple API-driven artificial intelligence (AI)/ machine learning (ML) call.

Not only can you translate tweets, but you can also understand what is being said, the sentiment, and the key people, places, organizations, and things being discussed. You can do all this without needing deep data science skills or hiring a team with those skills. Below is one sample architecture:

The architecture above can be launched through the following CloudFormation script:

In the AWS Management Console, launch the CloudFormation Template.

Showing an example – What’s being said about an Airport (MCO)

As an example, we stood up this environment by launching the CloudFormation template above and filling in the topic terms (MCO and OIA), since we happen to be traveling through Orlando (and MCO/OIA are common abbreviations for the airport). Within a few minutes, we were seeing results.

Through this dashboard, we can see positive and negative tweets over time and what people are saying about the airport. We can quickly filter for only tweets that mention the @MCO entity, which is automatically extracted using natural language processing (NLP), and see the trend of sentiment (also coming from NLP) and tweets themselves.

Now our entire dashboard shows only @MCO tweets:

We can now see the stats and trends of entities, types, and sentiment from people discussing @MCO as an entity.

We can also drill into the actual tweets themselves:

Social media is a powerful platform for a public sector organization to take the temperature of the customers they serve and make any changes based on this feedback.

With these AWS services, it’s become easier to quickly build an ingestion pipe that collects this information, translates the content across 12 different language pairs, performs natural language processing, and builds dashboards.

You can find more details on the AWS Machine Learning blog post that walks through the step-by-step process.