text-summarizer
将长文本总结为关键要点
📖 中文导读:将长文本总结为关键要点 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: text_summarizer version: 1.0.0 entrypoint: scripts/main.py description: Summarizes long text into key bullet points inputs:
- type: text name: text description: Long text to summarize
- type: integer name: max_points description: Maximum number of bullet points (default 5) optional: true outputs:
- type: text name: summary description: Summary in bullet points
- type: object name: stats description: Statistics about the text tags: [nlp, summarization, text, processing] allow_network: false timeout_seconds: 30
Text Summarizer Skill
A more complex example that demonstrates text processing capabilities.
What it does
This skill takes a long piece of text and:
- Analyzes the text (word count, sentence count, etc.)
- Extracts key points
- Creates a bullet-point summary
- Generates a statistics report
Usage
Input
{
"text": "Your long text here...",
"max_points": 5
}
Output
{
"summary": "• Point 1\n• Point 2\n• Point 3",
"stats": {
"word_count": 150,
"sentence_count": 8,
"avg_sentence_length": 18.75
}
}
Artifacts
summary.md: Markdown file with the formatted summarystats.json: JSON file with detailed statistics
Algorithm
This is a simple implementation that:
- Splits text into sentences
- Scores sentences by length and position
- Selects top N sentences as summary points
Note: This is a demonstration. For production use, consider using NLP libraries like spaCy or transformers.