重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
readability-scorer by dkyazzentwatwa/chatgpt-skills
npx skills add https://github.com/dkyazzentwatwa/chatgpt-skills --skill readability-scorer使用行业标准公式分析文本可读性。获取年级水平估计、复杂度指标以及提高清晰度的建议。
from scripts.readability_scorer import ReadabilityScorer
# 为文本评分
scorer = ReadabilityScorer()
scores = scorer.analyze("Your text to analyze goes here.")
print(f"Grade Level: {scores['grade_level']}")
print(f"Flesch Reading Ease: {scores['flesch_reading_ease']}")
scorer = ReadabilityScorer()
scores = scorer.analyze(text)
# 返回:
# {
# 'flesch_reading_ease': 65.2,
# 'flesch_kincaid_grade': 8.1,
# 'gunning_fog': 10.2,
# 'smog_index': 9.5,
# 'coleman_liau': 9.8,
# 'ari': 8.4,
# 'grade_level': 8.5, # 平均值
# 'reading_time_minutes': 2.3,
# 'stats': {
# 'words': 250,
# 'sentences': 15,
# 'syllables': 380,
# 'complex_words': 25,
# 'avg_words_per_sentence': 16.7,
# 'avg_syllables_per_word': 1.52
# }
# }
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 获取特定分数
fre = scorer.flesch_reading_ease(text)
fkg = scorer.flesch_kincaid_grade(text)
fog = scorer.gunning_fog(text)
smog = scorer.smog_index(text)
texts = [text1, text2, text3]
results = scorer.analyze_batch(texts)
# 从文件分析
results = scorer.analyze_files(["doc1.txt", "doc2.txt"])
# 比较两个文本
comparison = scorer.compare(text1, text2)
print(f"Text 1 grade: {comparison['text1']['grade_level']}")
print(f"Text 2 grade: {comparison['text2']['grade_level']}")
# 分析文本
python readability_scorer.py --text "Your text here"
# 分析文件
python readability_scorer.py --input document.txt
# 比较文件
python readability_scorer.py --compare doc1.txt doc2.txt
# 批量分析目录
python readability_scorer.py --input-dir ./docs --output report.csv
# 仅使用特定公式
python readability_scorer.py --input doc.txt --formula flesch
| 参数 | 描述 | 默认值 |
|---|---|---|
--text | 要分析的文本 | - |
--input | 输入文件 | - |
--input-dir | 文件目录 | - |
--output | 输出文件 (json/csv) | - |
--compare | 比较两个文件 | - |
--formula | 特定公式 | all |
| 分数 | 难度 | 年级水平 |
|---|---|---|
| 90-100 | 非常容易 | 5年级 |
| 80-89 | 容易 | 6年级 |
| 70-79 | 相当容易 | 7年级 |
| 60-69 | 标准 | 8-9年级 |
| 50-59 | 相当困难 | 10-12年级 |
| 30-49 | 困难 | 大学 |
| 0-29 | 非常困难 | 大学毕业生 |
| 年级 | 受众 |
|---|---|
| 1-5 | 小学 |
| 6-8 | 初中 |
| 9-12 | 高中 |
| 13-16 | 大学 |
| 17+ | 研究生水平 |
scorer = ReadabilityScorer()
blog_post = """
Writing clear content is essential for engaging readers.
Short sentences help. Simple words work best.
Your audience will thank you for making things easy to understand.
"""
scores = scorer.analyze(blog_post)
print(f"Flesch Reading Ease: {scores['flesch_reading_ease']:.1f}")
print(f"Grade Level: {scores['grade_level']:.1f}")
print(f"Reading Time: {scores['reading_time_minutes']:.1f} minutes")
if scores['grade_level'] > 8:
print("Consider simplifying for a wider audience.")
scorer = ReadabilityScorer()
original = open("original.txt").read()
simplified = open("simplified.txt").read()
comparison = scorer.compare(original, simplified)
print("Original:")
print(f" Grade Level: {comparison['text1']['grade_level']:.1f}")
print(f" Flesch Ease: {comparison['text1']['flesch_reading_ease']:.1f}")
print("\nSimplified:")
print(f" Grade Level: {comparison['text2']['grade_level']:.1f}")
print(f" Flesch Ease: {comparison['text2']['flesch_reading_ease']:.1f}")
improvement = comparison['text1']['grade_level'] - comparison['text2']['grade_level']
print(f"\nImprovement: {improvement:.1f} grade levels easier")
scorer = ReadabilityScorer()
import os
results = []
for filename in os.listdir("./docs"):
if filename.endswith(".md"):
text = open(f"./docs/{filename}").read()
scores = scorer.analyze(text)
results.append({
'file': filename,
'grade': scores['grade_level'],
'ease': scores['flesch_reading_ease']
})
# 按难度排序
results.sort(key=lambda x: x['grade'], reverse=True)
print("Documents by Difficulty:")
for r in results:
print(f" {r['file']}: Grade {r['grade']:.1f}")
nltk>=3.8.0
每周安装次数
54
代码仓库
GitHub 星标数
39
首次出现
2026年1月24日
安全审计
安装于
opencode42
gemini-cli42
codex40
cursor40
claude-code36
github-copilot36
Analyze text readability using industry-standard formulas. Get grade level estimates, complexity metrics, and suggestions for improving clarity.
from scripts.readability_scorer import ReadabilityScorer
# Score text
scorer = ReadabilityScorer()
scores = scorer.analyze("Your text to analyze goes here.")
print(f"Grade Level: {scores['grade_level']}")
print(f"Flesch Reading Ease: {scores['flesch_reading_ease']}")
scorer = ReadabilityScorer()
scores = scorer.analyze(text)
# Returns:
# {
# 'flesch_reading_ease': 65.2,
# 'flesch_kincaid_grade': 8.1,
# 'gunning_fog': 10.2,
# 'smog_index': 9.5,
# 'coleman_liau': 9.8,
# 'ari': 8.4,
# 'grade_level': 8.5, # Average
# 'reading_time_minutes': 2.3,
# 'stats': {
# 'words': 250,
# 'sentences': 15,
# 'syllables': 380,
# 'complex_words': 25,
# 'avg_words_per_sentence': 16.7,
# 'avg_syllables_per_word': 1.52
# }
# }
# Get specific scores
fre = scorer.flesch_reading_ease(text)
fkg = scorer.flesch_kincaid_grade(text)
fog = scorer.gunning_fog(text)
smog = scorer.smog_index(text)
texts = [text1, text2, text3]
results = scorer.analyze_batch(texts)
# From files
results = scorer.analyze_files(["doc1.txt", "doc2.txt"])
# Compare two texts
comparison = scorer.compare(text1, text2)
print(f"Text 1 grade: {comparison['text1']['grade_level']}")
print(f"Text 2 grade: {comparison['text2']['grade_level']}")
# Analyze text
python readability_scorer.py --text "Your text here"
# Analyze file
python readability_scorer.py --input document.txt
# Compare files
python readability_scorer.py --compare doc1.txt doc2.txt
# Batch analyze directory
python readability_scorer.py --input-dir ./docs --output report.csv
# Specific formula only
python readability_scorer.py --input doc.txt --formula flesch
| Argument | Description | Default |
|---|---|---|
--text | Text to analyze | - |
--input | Input file | - |
--input-dir | Directory of files | - |
--output | Output file (json/csv) | - |
--compare | Compare two files | - |
| Score | Difficulty | Grade Level |
|---|---|---|
| 90-100 | Very Easy | 5th grade |
| 80-89 | Easy | 6th grade |
| 70-79 | Fairly Easy | 7th grade |
| 60-69 | Standard | 8th-9th grade |
| 50-59 | Fairly Hard | 10th-12th grade |
| 30-49 | Difficult | College |
| 0-29 | Very Difficult | College graduate |
| Grade | Audience |
|---|---|
| 1-5 | Elementary school |
| 6-8 | Middle school |
| 9-12 | High school |
| 13-16 | College |
| 17+ | Graduate level |
scorer = ReadabilityScorer()
blog_post = """
Writing clear content is essential for engaging readers.
Short sentences help. Simple words work best.
Your audience will thank you for making things easy to understand.
"""
scores = scorer.analyze(blog_post)
print(f"Flesch Reading Ease: {scores['flesch_reading_ease']:.1f}")
print(f"Grade Level: {scores['grade_level']:.1f}")
print(f"Reading Time: {scores['reading_time_minutes']:.1f} minutes")
if scores['grade_level'] > 8:
print("Consider simplifying for a wider audience.")
scorer = ReadabilityScorer()
original = open("original.txt").read()
simplified = open("simplified.txt").read()
comparison = scorer.compare(original, simplified)
print("Original:")
print(f" Grade Level: {comparison['text1']['grade_level']:.1f}")
print(f" Flesch Ease: {comparison['text1']['flesch_reading_ease']:.1f}")
print("\nSimplified:")
print(f" Grade Level: {comparison['text2']['grade_level']:.1f}")
print(f" Flesch Ease: {comparison['text2']['flesch_reading_ease']:.1f}")
improvement = comparison['text1']['grade_level'] - comparison['text2']['grade_level']
print(f"\nImprovement: {improvement:.1f} grade levels easier")
scorer = ReadabilityScorer()
import os
results = []
for filename in os.listdir("./docs"):
if filename.endswith(".md"):
text = open(f"./docs/{filename}").read()
scores = scorer.analyze(text)
results.append({
'file': filename,
'grade': scores['grade_level'],
'ease': scores['flesch_reading_ease']
})
# Sort by difficulty
results.sort(key=lambda x: x['grade'], reverse=True)
print("Documents by Difficulty:")
for r in results:
print(f" {r['file']}: Grade {r['grade']:.1f}")
nltk>=3.8.0
Weekly Installs
54
Repository
GitHub Stars
39
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode42
gemini-cli42
codex40
cursor40
claude-code36
github-copilot36
Caveman Compress:AI文件压缩工具,优化Claude输入令牌,提升自然语言处理效率
6,200 周安装
--formula |
| Specific formula |
| all |