Skip to main content

A simple text statistics analyzer for Python

Project description

TextStats

A lightweight Python package for text statistics and analysis.

installation

pip install textstats

Quick Start

from textstats import TextStats

text = "Your text here. This is a sample sentence."

Create analyzer stats = TextStats(text)

Get statistics print(f"Words: {stats.word_count()}") print(f"Sentences: {stats.sentence_count()}") print(f"Lexical Diversity: {stats.lexical_diversity()}")

Print full report stats.print_report()

Features

  • Word, character, sentence, and paragraph counts
  • Vocabulary analysis and lexical diversity
  • Word frequency distribution
  • Reading time estimation
  • No external dependencies

License

MIT License

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

textstatscomp-0.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

textstatscomp-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file textstatscomp-0.1.0.tar.gz.

File metadata

  • Download URL: textstatscomp-0.1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for textstatscomp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 04d9abec3e76d4060a95157dcb9520685d4356785135abf25311394d50c1a09c
MD5 a5b59938cd77f1065e04434a689a19d1
BLAKE2b-256 ebd650061304684557d3f5251a14e2d00edf39eeb1bac7368d83caf2e704c122

See more details on using hashes here.

File details

Details for the file textstatscomp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: textstatscomp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for textstatscomp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d180f2b8037c2ade822436eafe010b6a9e56bc31d814c4b01a9d42be3348e1d
MD5 e2251d12c4f0d4f86d5ee0f97dbea108
BLAKE2b-256 d32f26b13ee17f1749b8877a59650505381538d603c906bdb38d56ca52419947

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