An interactive intelligence dashboard and automated reporting tool built to analyse linguistic patterns and global etymology. This project transforms raw text input into actionable forensic insights using a modern Python stack.
- Why This Project Was Built
- Project Walkthrough
- Screenshots
- Project Architecture
- File Structure
- Tech Stack
- Installation & Local Usage
- Stress Testing & Database Seeding
- Quality Assurance & Testing
- Acknowledgments
- Roadmap Features
This project was built to explore text analysis beyond simple word counts. It combines linguistic analysis, readability scoring, word origins, geospatial visualisation, and automated reporting into a single application, while serving as a practical showcase of modern Python and Django development.
Click here
Note: Click the badge above to view the full feature walkthrough and linguistic analysis demo on LinkedIn.
See the full gallery here:
Click to expand screenshots
- Readability Score Guide
- Flesch Reading Ease (0β100 scale): High score: Easy to read (plain English, blogs, general audiences). Low score: Very difficult (dense academic or legal texts).
- Gunning Fog Index (Years of education required):
High score: Advanced professional/college level (requires 16+ years of education).
Low score: Mass-market, accessible level (high school or below).

- Custom Stopword Management UI: Dedicated interface for adding and managing personal stopword lists to tailor text analysis and filtering.

Word-Counter-Vault/
β
βββ manage.py # Django entry point
βββ pyproject.toml # Project dependencies and configuration
βββ .env.example # Example environment variables
βββ README.md
βββ CONTRIBUTING.md
βββ LICENSE
β
βββ wordcounterapp/ # Django project configuration
β βββ __init__.py
β βββ settings.py # Global settings
β βββ urls.py # Root URL routing
β βββ asgi.py
β βββ wsgi.py
β
βββ counter/ # Main application
β β
β βββ models.py # Database models
β βββ views.py # Request handlers
β βββ urls.py # App URL routes
β βββ admin.py
β βββ apps.py
β βββ tests.py
| |
β βββ management/
| | βββ commands/
β | βββ seed_stress_data.py
| |
| |
β βββ migrations/ # Django database migrations
β β βββ 0001_initial.py
β β βββ 0002_analysisrecord_bullets_and_more.py
β β
β βββ services/ # Business logic layer
β β βββ analysis.py
β β βββ exporters.py
β β βββ quality_insights.py
β β βββ summariser.py
β β βββ text_extractors.py
β β βββ word_selectors.py
β β βββ seed_origins.py
β β βββ word_data.json
β β
β βββ templates/ # HTML templates
β β β
β β βββ counter/
β β β βββ analysis.html
β β β βββ base.html
β β β βββ compare.html
β β β βββ counter.html
β β β βββ history.html
β β β βββ stopwords.html
β β β
β β βββ registration/
β β β βββ login.html
β β β βββ register.html
β β β
β β βββ export/
β β βββ pdf_template.html
β β
β βββ static/
β βββ counter/
β βββ css/ # Dashboard styling
β βββ img/ # UI assets
β
βββ tests/ # Pytest test suite
β βββ conftest.py
β βββ test_analysis.py
β βββ test_exporters.py
| βββ test_extractors.py
| βββ test_quality_insights.py
| βββ test_seed_origins.py
| βββ test_summariser.py
| βββ test_text_extractors.py
| βββ test_vault.py
| βββ test_views.py
β βββ test_word_selectors.py
β
βββ screenshots/ # README screenshots
β βββ user_UI.png
β βββ user_UI2.png
β βββ chart.png
β βββ map.png
β βββ pdf_report.png
β βββ ...
β
βββ analysis/ # Generated analysis artifacts
βββ metadata.json
βββ hashes.json
βββ remaining/
word_counter/settings.py: Core configuration for the Django environment.counter/views.py: Logic for text processing, regex normalisation, and dashboard rendering.counter/services/seed_origins.py: Data pipeline script for ingesting the global word library.counter/services/word_data.json: The "Source of Truth" containing 500+ global etymology records.word_vault_analytics.duckdb: High-performance database for geospatial word lookups.
- Python 3.12 (Development Environment)
- Django 5.2: For the web framework and user authentication.
- DuckDB: For high-performance, local analytical etymology queries.
- SQLite: For persistent user history and session management.
- Folium/Leaflet: For interactive geospatial mapping.
- WeasyPrint / python-docx: For automated forensic report creation.
- Regex: For high-speed text normalisation and cleaning.
To run this project locally:
- Clone the repo:
git clone https://github.com/reory/Word-Counter-Vault.git - Install dependencies:
uv sync - Seed the Global Vault:
python -m counter.services.seed_origins - Launch the app:
python manage.py runserver
This project includes a custom Django management command powered by Faker to generate synthetic AnalysisRecord entries for performance and load testing.
To populate your local vault with synthetic records, run:
python manage.py seed_stress_data --count 500This project implements a comprehensive automated testing suite using Pytest to ensure data integrity and security across the analytical pipeline.
- Linguistic Logic: Validates regex normalisation, word frequency calculations, and lexical diversity metrics.
- Security & Permissions: Ensures strict object-level access control (e.g., users cannot view or delete others' analysis history).
- Service Layer & Mocking: Utilises
pytest-mockto simulate DuckDB OLAP connections, allowing for high-speed testing without disk I/O dependency. - File Extraction: Verifies robust handling of
.txt,.pdf, and.docxuploads using Django'sSimpleUploadedFile.
uv run pytest- Etymology Sources: Online Etymology Dictionary for root-word tracking.
- Community: Thanks to the Django and DuckDB communities for the robust library support.
- Core Architecture: Dual-Engine (Django + DuckDB) setup.
- Forensic Reporting: PDF/WORD export functionality for text analysis.
- User Accounts: Private storage for linguistic history.
- Data Seeding: Integration with
Fakerfor large-scale stress testing. - Readability Metrics: Add Flesch Reading Ease, and Gunning Fog Index calculations for deeper writing quality assessment.
- Comparative Analysis: Compare two text submissions side-by-side to identify differences in vocabulary, lexical diversity, readability, and writing style.
- Custom Stopword Management: Allow users to create personal stopword lists to exclude common or domain-specific words from analysis results.
- Analysis Tags & Collections: Enable users to organiae saved analyses into categories, folders, or tagged collections for improved vault management.
- Interactive Word Trends: Track frequently used words across a user's analysis history to visualise vocabulary evolution over time.
- Enhanced Geospatial Mapping: Interactive etymology origins via
Plotly/Mapbox.













