Skip to main content

A simple library for text analysis

Project description

Wordlyzer

Wordlyzer is a powerful Python library for text analysis, providing comprehensive insights into text metrics and properties.

Installation

Install Wordlyzer using pip:

pip install wordlyzer3==0.3

Features

  • Word count analysis
  • Sentence count calculation
  • Paragraph count detection
  • Character count measurement
  • Most common words identification
  • Average word length computation
  • Average sentence length calculation

Quick Start

# File: main.py
from wordlyzer3 import WordLyzer

# Example text for analysis
text = """Python is an amazing programming language. It's widely used for web development, data analysis, and AI.

This is a second paragraph."""

# Create analyzer object
analyzer = WordLyzer(text)

# Display analysis results
print("Word Count:", analyzer.word_count())
print("Sentence Count:", analyzer.sentence_count())
print("Paragraph Count:", analyzer.paragraph_count())
print("Character Count:", analyzer.character_count())
print("Most Common Words:", analyzer.most_common_words())
print("Average Word Length:", analyzer.average_word_length())
print("Average Sentence Length:", analyzer.average_sentence_length())

Methods

word_count()

Returns the total number of words in the text.

sentence_count()

Returns the number of sentences in the text.

paragraph_count()

Returns the number of paragraphs in the text.

character_count()

Returns the total number of characters in the text.

most_common_words(n=5)

Returns the n most frequently occurring words in the text.

  • Default is top 5 words
  • Optional parameter to specify number of words

average_word_length()

Calculates the average length of words in the text.

average_sentence_length()

Calculates the average number of words per sentence.

Requirements

  • Python 3.7+
  • No external dependencies

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Author

[Nurico Vicyyanto]

Support

For issues or questions, please open an issue on our GitHub repository.

Project details


Release history Release notifications | RSS feed

This version

0.3

Download files

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

Source Distribution

wordlyzer3-0.3.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file wordlyzer3-0.3.tar.gz.

File metadata

  • Download URL: wordlyzer3-0.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for wordlyzer3-0.3.tar.gz
Algorithm Hash digest
SHA256 9aff1490cc7e32b27b3071933b62d70aab2bbe845675fe90d327db552a8fadb4
MD5 5fa352f8fb3c90f731d57e2ec55f7662
BLAKE2b-256 a1447a71b2eac17b7feeb4a575461e8609f70c92c7f4e6a05e8322ebe7e134fb

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