Survey Theme Analysis
Turn hundreds of open-ended responses into themes you can check against what people actually said.

One survey response
“Good flavour. Hard to open.”
Two clauses, two tags.
Flavour is positive. Packaging is negative.
Tools and Skills
Technologies
- Streamlit
- spaCy
- Python
- Transformers
- scikit-learn
Skills Applied
- Aspect-based sentiment
- Agglomerative clustering
- Local model inference
- Analyst review workflows
The problem
A survey response can praise the flavour and criticize the packaging in the same sentence. A single sentiment label loses that distinction. Manually tagging every response gives analysts more control, but the work grows with each new survey.
What I built
I built a Python pipeline and Streamlit app that take a CSV or Excel file and return a theme catalogue, sentiment by theme, and the clauses behind each tag. Reviewers can adjust the catalogue or correct individual tags, then compare their edited result with the automatic output.
The pipeline first scores overall sentiment. It then uses spaCy to extract candidate phrases, embeds them with local models, and groups similar phrases with cosine-based agglomerative clustering. The last stage checks which themes apply to each response, then scores sentiment on the relevant clauses.
Why I built it this way
Start from the phrases respondents used.
Clustering candidate phrases lets themes emerge from the survey. I included threshold-based discovery and a fixed-count option for cases where an analyst needs a particular level of detail.
Score sentiment at the clause level.
Linking each tag to a specific clause lets reviewers see why one response received different sentiments for flavour and packaging.
Keep review changes reproducible.
Theme changes reuse saved embeddings and rerun the scoring step. A one-off tag correction saves a review revision without running the models again. The pipeline runs with local models.
What I measured
On an internal evaluation set of 500 open-ended responses, the pipeline reached 80% theme matching and 94% sentiment accuracy. In a separate reproducibility check, the modular version matched the saved notebook run’s theme catalogue, binary tags, and aspect scores.
Have feedback your team still tags by hand?
Bring a sample survey or a set of comments. We can talk through which decisions to automate and which should stay with your reviewers.
Book a Discovery Call