Inspiration
Language reflects the way we think.
Whether someone is speaking about school, relationships, work, or personal struggles, their word choices often reveal underlying thought patterns. In psychology, certain patterns of thinking—such as catastrophizing, overgeneralization, and black-and-white thinking—are known as cognitive distortions and can influence decision-making, emotional well-being, and self-perception.
We were inspired by the idea that computational linguistics could be used not only to understand language, but also to help people better understand themselves. We wanted to create a tool that makes hidden cognitive patterns visible and encourages healthier, more constructive communication.
What it does
MindMirror analyzes written text and identifies linguistic indicators associated with cognitive biases and cognitive distortions.
The system examines factors such as:
Absolute language ("always", "never", "everyone") Catastrophic phrasing Overgeneralizations Certainty versus uncertainty Emotional intensity Self-focused language patterns
After analyzing the text, MindMirror highlights potential distortions, provides confidence scores, and generates alternative phrasing that promotes more balanced thinking.
Our goal is not to diagnose users or provide therapy. Instead, MindMirror acts as an educational tool that helps users recognize patterns in their language and reflect on how those patterns influence their thinking.
How we built it
We developed MindMirror using natural language processing techniques and linguistic feature extraction.
The workflow consists of:
User text input Linguistic preprocessing and tokenization Pattern detection using NLP pipelines Cognitive distortion classification Confidence scoring Visualization and feedback generation
We used NLP libraries to process sentence structure, identify key linguistic features, and detect patterns commonly associated with distorted thinking. The frontend provides an interactive interface where users can see highlighted phrases, distortion categories, and suggested reframes.
Challenges we ran into
One of the biggest challenges was balancing accuracy and simplicity.
Human language is extremely nuanced, and many phrases can have multiple interpretations depending on context. We had to design a system that could identify meaningful linguistic patterns without making overly confident assumptions about a user's intent.
Another challenge was avoiding false positives. Many words associated with cognitive distortions also appear in completely normal communication. We spent significant time refining our detection logic to improve reliability and provide confidence-based feedback instead of absolute judgments.
Finally, we had to present complex NLP results in a way that was understandable to non-technical users. Designing intuitive visualizations and explanations became just as important as building the underlying analysis system.
Accomplishments that we're proud of
One accomplishment we're especially proud of is creating a project that applies computational linguistics to a meaningful real-world problem rather than a traditional NLP task such as translation or grammar correction.
We successfully designed a system capable of identifying linguistic indicators associated with cognitive distortions, providing users with visual feedback about their language patterns and encouraging self-reflection.
We're also proud of building an end-to-end pipeline that combines natural language processing, classification, confidence scoring, and interactive visualizations into a single user-friendly platform.
Most importantly, we created a tool that demonstrates how computational linguistics can be used to help people better understand the relationship between language and cognition.
What we learned
Through this project, we learned how computational linguistics can be applied beyond traditional tasks such as translation and sentiment analysis.
We explored how language patterns relate to cognition, how NLP systems can extract meaningful information from unstructured text, and how difficult it is to model human communication accurately.
Most importantly, we learned that technology can be used not only to process language, but also to help people become more aware of how they think and communicate.
MindMirror demonstrates how computational linguistics can transform everyday language into actionable insights about human cognition.
What's next for MindMirror
We plan to expand MindMirror beyond basic cognitive distortion detection by incorporating more advanced linguistic analysis and contextual reasoning.
Future improvements include:
Support for a wider range of cognitive biases and reasoning patterns. More sophisticated context-aware language analysis using large language models. Personalized feedback that adapts to individual writing styles. Longitudinal tracking that allows users to observe changes in their language patterns over time. Educational modules that explain the psychology behind detected distortions. Research partnerships to evaluate the effectiveness of language-based cognitive reflection tools.
Our long-term vision is to develop MindMirror into an educational platform that helps students, educators, and lifelong learners use language as a window into how they think, learn, and communicate.
Built With
- chart.js
- cognitive-modeling
- css
- flask
- html
- javascript
- natural-language-processing
- nltk
- python
- scikit-learn
- sentiment-analysis
- spacy
- text-classification
- transformers
Log in or sign up for Devpost to join the conversation.