Skip to main content

DIVE-ready text statistics helpers for Python, notebooks, and the terminal

Project description

hermes-textstats

hermes-textstats is a DIVE-ready Python package that turns short text, files, and notebook drafts into clear writing statistics.

The name connects the package to the Hermes Agent workflow used in the course. The package itself is intentionally small: it gives students a concrete package that can be built, tested, documented, and published from DIVE/JupyterHub.

Motivation

When I write short text for assignments, quiz explanations, README files, or project reflections, I sometimes want quick feedback about length without opening another tool. This package gives a simple example: a student can paste a paragraph into Python, a notebook, or the terminal and immediately see word count, sentence count, paragraph count, lexical diversity, longest sentence length, character count, and estimated reading time.

Example use cases:

  • checking the length of a reflection paragraph before submitting it;
  • measuring a short quiz explanation inside DIVE/JupyterHub;
  • using a small package project to practice the Hermes Agent + git + PyPI workflow.

Installation

python -m pip install hermes-textstats

Published package: https://pypi.org/project/hermes-textstats/

Quick Start

from hermes_textstats import analyze_text, count_words

text = "Hermes helps me build, test, and publish Python packages."
print(count_words(text))
summary = analyze_text(text)
print(summary)
hermes-textstats "Hermes helps me build, test, and publish Python packages."
hermes-textstats --json "Hermes helps me build, test, and publish Python packages."
hermes-textstats --report "Hermes helps me build, test, and publish Python packages."
hermes-textstats --file reflection.txt

API

  • count_words(text)
  • count_sentences(text)
  • count_paragraphs(text)
  • count_characters(text, include_spaces=True)
  • average_word_length(text)
  • estimate_reading_time(text, words_per_minute=200)
  • longest_sentence_length(text)
  • lexical_diversity(text)
  • analyze_text(text)
  • format_markdown_report(text)

Development

python -m pip install -e ".[test]"
python -m pytest tests/ -v
python -m build
python -m twine check dist/*

Project Notes

  • Paper package summary contains the one-line summary, short motivation paragraph, and visual evidence for TALE 2026 notes.
  • Paper notes records what I built, what Hermes helped with, and what is already verified.
  • DIVE verification lists the commands to run in DIVE before saying the package is verified there.
  • Notebook demo demonstrates the Python API in a notebook-style workflow.
  • Demo transcript shows the package running from the command line.
  • Showcase screencap is the compact visual for grant/paper updates.
  • Demo screencap is a screencap-style image made from the real CLI output.
  • Workflow diagram shows how DIVE, Hermes Agent, git, tests, docs, and TestPyPI/PyPI connect.

See docs/ACCOUNT_SETUP.md for the account/token steps used for TestPyPI, PyPI, and Telegram setup.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hermes_textstats-0.1.1.tar.gz (232.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hermes_textstats-0.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file hermes_textstats-0.1.1.tar.gz.

File metadata

  • Download URL: hermes_textstats-0.1.1.tar.gz
  • Upload date:
  • Size: 232.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for hermes_textstats-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2beb5a343ff1f593a805b2b2ea579a1c28460e10a68fa3f3ebb63b7639683a90
MD5 bfc523e1e3187e7e736658e9a9dc4358
BLAKE2b-256 80776929a97a500fbca19920e2ea8622c226591132b4d9e1a22d344e38c2c9cc

See more details on using hashes here.

File details

Details for the file hermes_textstats-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hermes_textstats-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6c17ead626b20e81de2ae83a4c71e2ece3e6c18ac875c1e7a3303a00db79c245
MD5 fdfee82c14fc1cb35c312ea60d74c01f
BLAKE2b-256 d64b17d7f255e1ade2d2df3168b619b132722830e5037196b3152fbe161b006c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page