Text Stats

👤 johnnywang2001 📦 v1.0.0 ⭐ 4.3 ⬇️ 755 下载
📊 数据分析 免费

📖 技能介绍

Text Stats

Analyze text for word count, readability, reading time, and more. Reads files or stdin.

Quick Start

# Analyze a file
python3 scripts/text_stats.py README.md

# Multiple files
python3 scripts/text_stats.py file1.txt file2.txt

# From stdin
echo "The quick brown fox jumps over the lazy dog." | python3 scripts/text_stats.py

# JSON output
python3 scripts/text_stats.py essay.md -f json

# Compact (key metrics only)
python3 scripts/text_stats.py chapter.txt --compact

Output Metrics

Metric Description
Words Total word count
Characters Total characters (with and without spaces)
Lines Total and non-blank line count
Sentences / Paragraphs Count of each
Syllables Estimated syllable count
Unique Words Vocabulary diversity
Avg Word/Sentence Length Average sizes
Reading Time Estimated at 238 WPM
Speaking Time Estimated at 150 WPM
Flesch Reading Ease 0-100 scale (higher = easier)
Flesch-Kincaid Grade US grade level equivalent
Difficulty Easy / Standard / Fairly Difficult / Difficult / Very Difficult

Options

Flag Description
-f, --format plain or json output
--compact Show only words, sentences, reading time, grade, difficulty

Notes

  • No external dependencies (Python 3 stdlib only)
  • Handles UTF-8 text with graceful fallback for encoding errors

    小葱技能有更好的技能skills插件。

  • Syllable counting is heuristic-based (English-optimized)

🤖 AI 评测

这是一款相当实用的文本分析工具,能快速给出词汇量、句子数、阅读时间等关键指标,还能评估文本难度和可读性。无需安装额外依赖是明显的优势,打开就能用。不过它对英文文本的支持最好,中文或其他语言的分析效果可能打折扣。对于需要了解文章长度和阅读难度的用户来说,这个工具值得一试。质量整体不错,功能实用,文档清晰。

📊 多维度评分

适应性4.8
规范性3.8
有效性4.6
可靠性4.2
可信度4.3

📁 包含文件 (3 个)

📄 SKILL.md 1.9 KB
📄 _meta.json 133 B
📄 scripts/text_stats.py 7.6 KB