Word Counter Pack
★Trustedv1.0.0MIT★Gold Verified95by AgentNode · published 20 days ago · toolpack
Count words, characters, and sentences in any text.
A simple text analysis tool. Zero dependencies.
Quick Start
agentnode install word-counter-packUsage
From packagefrom word_counter_pack.tool import run
result = run(
text="Artificial intelligence is transforming how developers build software. "
"Modern AI agents can search the web, write code, manage files, and "
"interact with APIs — all autonomously. The key challenge is making "
"these agents reliable enough for production use. That means robust "
"error handling, clear capability boundaries, and predictable behavior "
"under edge cases."
)
print(f"Words: {result['word_count']}")
print(f"Characters: {result['character_count']}")
print(f"Characters (no spaces): {result['character_count_no_spaces']}")
print(f"Sentences: {result['sentence_count']}")
print(f"Paragraphs: {result['paragraph_count']}")
print(f"Average words per sentence: {result['avg_words_per_sentence']:.1f}")
print(f"Estimated reading time: {result['reading_time_minutes']:.1f} min")Verification
Package installs and imports correctly. runtime checks passed. publisher tests passed.
This package was executed and validated by AgentNode before listing. Install, import, and runtime checks passed.
Last verified 16d ago· Runner v2.0.0
Use this when you need to...
- ›Count words in a blog draft to meet a target word count
- ›Analyze sentence length distribution for readability optimization
- ›Calculate reading time estimates for articles and documentation
- ›Verify character limits for social media posts or meta descriptions
- ›Compare word counts across multiple document versions
README
Word Counter Pack
Count words, characters, and sentences in any text. A simple, zero-dependency text analysis tool that provides word counts, character counts, sentence counts, reading time estimates, and readability metrics.
Quick Start
agentnode install word-counter-pack
from word_counter_pack.tool import run
result = run(text="Hello world, this is a test.")
print(f"{result['word_count']} words, {result['character_count']} characters")
Usage
Basic Word Count
result = run(text="Your text goes here.")
print(f"Words: {result['word_count']}")
print(f"Characters: {result['character_count']}")
print(f"Sentences: {result['sentence_count']}")
Reading Time Estimate
with open("article.txt") as f:
text = f.read()
result = run(text=text)
print(f"Reading time: {result['reading_time_minutes']:.1f} minutes")
print(f"Avg words per sentence: {result['avg_words_per_sentence']:.1f}")
Character Limit Validation
tweet = "Excited to announce our new AI agent toolkit!"
result = run(text=tweet)
if result["character_count"] <= 280:
print("Tweet is within character limit")
API Reference
| Parameter | Type | Description |
|---|---|---|
text | str | The text to analyze |
| Return Field | Type | Description |
|---|---|---|
word_count | int | Total number of words |
character_count | int | Total characters including spaces |
character_count_no_spaces | int | Characters excluding spaces |
sentence_count | int | Number of sentences |
paragraph_count | int | Number of paragraphs |
avg_words_per_sentence | float | Average sentence length |
reading_time_minutes | float | Estimated reading time (238 wpm) |
Zero dependencies. Works entirely offline.
License
MIT
Version History
Capabilities
Count words, characters, and sentences in text
Permissions
This package declares the following access levels. Review before installing.
agentnode install word-counter-packFiles (5)
License
MITStats
Compatibility
Frameworks
Runtime
pythonTrust & Security
Publisher
AgentNode
@agentnode