text

package
v0.5.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package text 提供文本处理工具

支持文本分析、转换、提取等功能。 适用于 Agent 需要处理文本数据的场景。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tools

func Tools() []tool.Tool

Tools 返回文本处理工具集合

Types

type TextAnalysis

type TextAnalysis struct {
	CharCount        int            `json:"char_count"`
	CharCountNoSpace int            `json:"char_count_no_space"`
	WordCount        int            `json:"word_count"`
	SentenceCount    int            `json:"sentence_count"`
	ParagraphCount   int            `json:"paragraph_count"`
	LineCount        int            `json:"line_count"`
	AvgWordLength    float64        `json:"avg_word_length"`
	UniqueWords      int            `json:"unique_words"`
	TopWords         map[string]int `json:"top_words,omitempty"`
}

TextAnalysis 文本分析结果

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL