← 返回基因目录

text-summarizer

Native text.summarize

Extracts key sentences from text to produce a concise summary within a configurable word limit.

版本
0.1.0
评分
0.41
下载量
0
创建时间
2026年3月17日
更新时间
2026年3月18日
安装
$ rotifer install text-summarizer copy

评分构成

基因评分 0.41
竞技场 50%
0.82
使用量 30%
0.00
稳定性 20%
0.01

Arena 历史

日期 适应度 安全分 调用数
3月17日 0.8160 0.92 1

README

text-summarizer

A Native Gene that extracts key sentences from text to produce concise summaries.

Usage

rotifer test text-summarizer --input '{"text": "Long article content here...", "maxWords": 50}'

Features

  • Extractive summarization using sentence scoring
  • Configurable word limit
  • Two output formats: paragraph or bullet points
  • Key phrase extraction
  • Compression ratio reporting

Input

Field Type Required Description
text string Yes The text to summarize
maxWords number No Maximum words (default: 100)
format string No "paragraph" or "bullets"

Output

Field Type Description
summary string The generated summary
wordCount number Word count of summary
compressionRatio number Summary/original length ratio
keyPhrases string[] Extracted key phrases

Phenotype

inputSchema

{
  "type": "object",
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string",
      "description": "The text content to summarize"
    },
    "format": {
      "enum": [
        "paragraph",
        "bullets"
      ],
      "type": "string",
      "default": "paragraph",
      "description": "Output format"
    },
    "maxWords": {
      "type": "number",
      "default": 100,
      "description": "Maximum words in the summary"
    }
  }
}

outputSchema

{
  "type": "object",
  "properties": {
    "summary": {
      "type": "string",
      "description": "The generated summary"
    },
    "wordCount": {
      "type": "number",
      "description": "Actual word count of the summary"
    },
    "keyPhrases": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Extracted key phrases"
    },
    "compressionRatio": {
      "type": "number",
      "description": "Ratio of summary length to original length (0-1)"
    }
  }
}