Problem
Haleon, a consumer health company, collects free-text queries from people who use its products. The Consumer Relations team records them from the company's social media channels. The queries come in five languages, mostly English and then Mandarin. Stakeholders want to see which topics rise or fall from quarter to quarter, because this feeds new product ideas, claims and safety checks.
Example from the article: stakeholders asked whether gluten inquiries for Panadol grew across the quarters of a year, and whether people use Panadol together with paracetamol.
Solution in brief
Translate all queries to English, clean them and score unigrams and bigrams with TF-IDF. Keep the 250 top-scoring terms, then assign each query to one of the stakeholders' pre-set search keywords by fuzzy matching. Count the keywords by quarter, product and country in a Power BI dashboard.
Questions this case answers
- How to track which topics grow or fade in a stream of free-text customer messages in several languages when no labelled categories exist
- How to find which topics are growing in customer queries from one quarter to the next?
- How to analyse free-text customer queries written in several languages?
- How to count how often stakeholders' chosen keywords appear in customer queries?
Tools and methods
- GoogleTrans API — translating non-English queries to English.
- NLTK — removing stop words and punctuation, lemmatisation and stemming.
- TF-IDF — ranking unigrams and bigrams by relevance.
- Fuzzy matching — linking queries to pre-set search keywords.
- Power BI — dashboard of keyword counts by quarter, product and country.
Google or a one-time email code. No password.