Skip to content

DhruvP2205/TextMind

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 TextMind β€” Intelligent Offline Text Analyzer

✨ Understand Your Text the Intelligent Way β€” In Just 400 Lines & 8 Variables


🎯 Challenge

Code Challenge


πŸš€ Overview

TextMind is a lightweight, privacy-first text intelligence tool that can analyze, summarize, and understand any text document β€” all offline, without sending data to the cloud.

It’s built under extreme engineering constraints:

  • 🧩 Only one file
  • 🧠 Maximum 8 variables
  • πŸ“ Under 400 lines of code

Yet it performs advanced text analysis, tone detection, keyword extraction, and debate-style polarity breakdowns β€” all while keeping your data safe on your device.


🌟 Project Tagline

"Powerful Text Intelligence. Complete Privacy."


🎯 Problem Statement

We live in a world filled with text β€” documents, research papers, emails, chats, feedback, and articles.
But most existing tools are either:

  • 🌐 Cloud-based β†’ risky for privacy
  • 🧰 Heavy libraries β†’ large dependencies, slow setup
  • πŸ’° Paid or limited

TextMind bridges this gap β€” a smart, fast, offline text processing solution that works locally and gives AI-like intelligence in seconds.


πŸ’‘ Solution

TextMind offers an AI-inspired yet offline text understanding tool that works directly in your terminal. From summaries to sentiment and contextual keyword search, it delivers human-like insights in one click. All results are generated using a rule-based, language-aware processing engine β€” completely transparent, interpretable, and private.


🧩 Key Features

🧠 1. Intelligent Summarization

Generate quick or detailed summaries of any document:

python TextMind.py Example-paper.pdf --summary

➑ Outputs a concise, meaningful paragraph that captures document essence.


πŸ’¬ 2. Sentiment & Tone Detection

Get the tone of a document or specific sections:

python TextMind.py Example-paper.txt --tone

➑ Classifies tone as Positive, Negative, or Neutral and gives percentage distribution.


βš–οΈ 3. Debate Analyzer (Pros vs Cons)

Perfect for research or discussion prep:

python TextMind.py Example-paper.txt --debate

➑ Lists advantages vs disadvantages and computes argument balance score.


πŸ” 4. Keyword Context Finder

Search any keyword and see how it’s used:

python TextMind.py Example-paper.docx --context AI

➑ Displays surrounding sentences for true context understanding.


πŸ“ˆ 5. Detailed Report Generator

Generate an all-in-one intelligence report:

python TextMind.py Example-paper.txt --report

➑ Includes:

  • Document Summary
  • Top Keywords
  • Word Count
  • Sentence Count
  • Positive/Negative Sentence Lists
  • Tone Analysis
  • Word Intelligence Index
  • Sentence Ranking
  • Debate Statistics

πŸ“Š 6. Export Options

JSON Export:
python TextMind.py Example-paper.txt --export-json
ML Export:
python TextMind.py Example-paper.txt --export-ml

➑ Exports structured data for ML, dashboard visualization, or further research.


🎨 7. Beautiful Terminal Design

Fully colored CLI interface for better readability and instant pattern recognition β€” making data fun to explore!


🧾 8. Multi-format Support

Supports:

  • .txt
  • .pdf
  • .docx
  • .md

No cloud upload β€” everything runs locally.


πŸ“Έ Screenshots & Media

Add the following visuals to your repo:

Screenshot Description
Command Help Menu Command Help Menu – shows available options
Terminal Summary Output Terminal Summary Output – highlights colored analysis
Full Report View Full Report View – detailed statistics and summary
Debate Analyzer Debate Analyzer – positive vs negative results
Export Data Export – export structure data into ML and JSON format

πŸŽ₯ Demo & Presentation

🎬 YouTube Presentation Video:
πŸ“Ί Watch Full Hackathon Presentation β†’

πŸ§‘β€πŸ’» Try it Yourself:

git clone https://github.com/DhruvP2205/TextMind
cd TextMind
python TextMind.py sample.txt --report

🧭 Real-World Use Cases

Domain Use Case
πŸŽ“ Education Summarize research papers, find tone of student essays
πŸ—žοΈ Journalism Extract key quotes, find sentiment of news articles
🏒 Business Analyze customer reviews, support tickets, or internal reports
βš–οΈ Legal Summarize long case files while preserving privacy
πŸ§‘β€πŸ’» Developers Integrate as a command-line analyzer for automation pipelines
πŸ€– AI Research Export rule-based intelligence as ML-ready JSON data

🌍 Real-World Impact

  • Brings NLP intelligence offline β€” no data exposure
  • Bridges rule-based + AI concepts for interpretable models
  • Empowers privacy-first data analysis
  • Reduces cost & complexity of text understanding tasks

TextMind redefines what’s possible within constraints β€” proving that minimalism and intelligence can coexist.


🌟 What Makes It Unique

βœ… Runs fully offline
βœ… Uses no external API
βœ… Tiny footprint β€” just one Python file
βœ… Constraint-engineered: 400 lines, 8 variables
βœ… Works across text, PDF, and DOCX
βœ… Generates explainable intelligence
βœ… Produces AI-ready structured data

No bloat. No dependencies. 100% transparency.


🧠 Tech Stack

Component Technology
πŸ’» Language Python 3.x
βš™οΈ Core Logic Native Python
πŸ—ƒοΈ Input/Output File handling for .txt, .pdf, .docx, .md
🎨 Terminal UI ANSI color codes for colored output
πŸ“Š Export Format JSON
🧩 Architecture Single-file, modular functions, functional paradigm

πŸ§ͺ Example Output

python TextMind.py Example-paper.txt --report

Output:

-------------------------------------------------
πŸ“„ Document Summary:
This feedback set reflects overall customer satisfaction with minor concerns about response time.

πŸ’¬ Tone Analysis:
Positive: 78% | Negative: 14% | Neutral: 8%

πŸ”‘ Top Keywords:
support, response, product, delay, amazing

🧭 Word Intelligence Index: 7.4/10
🏁 Sentence Ranking: 9/10
βš–οΈ Debate Balance: 3:1 (Pros vs Cons)
-------------------------------------------------

🧰 Installation & Setup

  1. Clone the repository:
    git clone https://github.com/DhruvP2205/TextMind
    cd TextMind
  2. Run the script:
    python TextMind.py yourfile.txt --report
  3. Explore all commands:
    python TextMind.py --help

🧩 Future Enhancements

🚧 Planned upgrades:

  • 🌐 Lightweight web UI (Flask/FastAPI)
  • 🧾 PDF & DOCX export support for reports
  • πŸ€– Integration with local LLMs for hybrid offline AI
  • πŸ“Š Visual dashboard (HTML report)
  • 🧠 Adaptive learning from tone history

❀️ Contribution & Support

We welcome open-source contributions!

  1. Fork the repo 🍴
  2. Create your feature branch (git checkout -b feature/your-feature)
  3. Commit changes (git commit -m 'Add new feature')
  4. Push (git push origin feature/your-feature)
  5. Create a Pull Request πŸŽ‰

⭐ If you found TextMind useful, give it a Star on GitHub!
πŸ’¬ Fork it, modify it, and make it yours!


πŸ† Hackathon Context

Challenge Limitation
Few-Variable Hero Max 8 variables
Feature-Rich Dev Max 400 lines
Domain Text Processing

Despite these constraints, TextMind delivers multi-layered intelligence usually seen only in AI tools β€” a perfect blend of creativity, optimization, and functionality.


🧠 Learnings & AI Relevance

This project demonstrates how:

  • Minimal rule-based models can mimic early-stage AI understanding.
  • Data can be structured for ML training offline.
  • Constraints can enhance creativity and efficiency.

It’s a proof of concept for building explainable, resource-efficient AI utilities without relying on large-scale frameworks.


πŸ”– License

This project is licensed under the MIT License β€” free for personal and commercial use.

πŸ“œ Read Full License β†’


🧩 Connect With Me

πŸ‘€ Developer: Dhruv Prajapati
πŸ’Ό LinkedIn: Dhruv Prajapati Linkedin
πŸ“Ί YouTube Demo: Watch Here
πŸ™ GitHub: github.com/DhruvP2205


πŸ’¬ Final Note

β€œTextMind isn’t just a tool β€” it’s a proof that less can do more.
It redefines what’s possible in 400 lines of Python.”

If you enjoyed this project β€”
🌟 Star it, 🍴 Fork it, and 🧠 Explore your own text insights!


Made with ❀️ by BeTheNoob

About

πŸš€ Welcome to TextMind – The Offline AI Text Analyzer! Built under extreme constraints β€” just 400 lines and 8 variables, TextMind is a powerful, privacy-first tool for intelligent text analysis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages