Skip to main content

A Python package for text analysis

Project description

Python Text Stats

A simple Python module to analyze text and provide various statistics such as word count, sentence count, average word length, estimated reading time, character count, syllable count, and readability scores.

Features

  • Count words
  • Count sentences
  • Average word length
  • Estimated reading time (default 200 WPM)
  • Character count (excluding spaces)
  • Estimate syllable count
  • Calculate Flesch Reading Ease score
  • Calculate Flesch-Kincaid Grade Level

Installation

Simply download or clone the pythontextstats.py file into your project.

Usage

import pythontextstats as pts

text = "This is a simple example sentence. It has multiple words and sentences."

print("Words:", pts.word_count(text))
print("Sentences:", pts.sentence_count(text))
print("Average Word Length:", pts.average_word_length(text))
print("Reading Time (minutes):", pts.reading_time(text))
print("Character Count:", pts.character_count(text))
print("Syllable Count:", pts.syllable_count(text))
print("Flesch Reading Ease:", pts.flesch_reading_ease(text))
print("Flesch-Kincaid Grade Level:", pts.flesch_kincaid_grade(text))

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

pythontextstats-0.1.2.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

pythontextstats-0.1.2-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file pythontextstats-0.1.2.tar.gz.

File metadata

  • Download URL: pythontextstats-0.1.2.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for pythontextstats-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d38d5b5917587a837b3cd80fdbef4125666aec432a38feeb501f07e7ca122db2
MD5 e8093f8cc53a2453f4c7039b9c5316ab
BLAKE2b-256 fe956e1a96c4f896559b7c375f16d7f7944cdcf58c3967f71c15219b3443ac93

See more details on using hashes here.

File details

Details for the file pythontextstats-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pythontextstats-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a9c4d738e18472d4a1eb62affd32dec0434828a79f6fceb1292e27325aba9d82
MD5 6a2e7970c7ac1c52abb5ec5bf501e447
BLAKE2b-256 8c342a578678d0f255831cf47a6756dd8cfd1c8b6859c1b038aca167bd6a1917

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