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 wordlyzer==0.2

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 wordlyzer 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.2

Download files

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

Source Distribution

wordlyzer2-0.2.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file wordlyzer2-0.2.tar.gz.

File metadata

  • Download URL: wordlyzer2-0.2.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 wordlyzer2-0.2.tar.gz
Algorithm Hash digest
SHA256 fe04d2fafcd04caa32e82708bf11e96a969f3df2fc8c621baaa168eb33f1403c
MD5 3af5f8d0ebe599eadb073c9238c7edb2
BLAKE2b-256 4772b40f107e425e9f30d2a6218343df4d9cca52d6ed232bfc210cd5216fe624

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