style-fingerprint
# Style Fingerprint | 写作风格指纹
**English**: Analyze Chinese writing style and save fingerprints for AI writing agents.
**中文**: 分析中文写作风格并保存指纹,供 AI 写作助手使用。
---
## Quick Start | 快速开始
```bash
# Analyze text | 分析文本
python3 style_fingerprint.py analyze --text "你的文本内容" --name "我的风格"
# Analyze file | 分析文件
python3 style_fingerprint.py analyze --file ./article.txt --name "作者A"
# List saved fingerprints | 列出保存的指纹
python3 style_fingerprint.py list
# Show fingerprint details | 显示指纹详情
python3 style_fingerprint.py show --name "我的风格"
# Export style guide for writing agent | 导出写作助手指南
python3 style_fingerprint.py export --name "我的风格" --output ./guide.txt
```
---
## What It Analyzes | 分析维度
**English**:
- **Basic Stats**: Sentence length, rhythm, comma density
- **Syntax Patterns**: Rhetorical questions, passive voice, ellipsis
- **Lexical Fingerprint**: Top words, word diversity
- **Logic Flow**: Transition word preferences
- **Rhetoric**: Metaphors, sensory description types
**中文**:
- **基础统计**: 句子长度、节奏感、逗号密度
- **句法模式**: 修辞问句、被动语态、省略号使用
- **词汇指纹**: 高频词汇、词汇多样性
- **逻辑流**: 过渡词偏好
- **修辞手法**: 隐喻、感官描述类型
---
## Storage | 存储
**English**: Fingerprints are saved in `./fingerprints/` as JSON files.
**中文**: 指纹以 JSON 格式保存在 `./fingerprints/` 目录中。
---
## For Writing Agents | 供写作助手使用
**English**: Use `export` command to get a compact style guide that can be included in prompts.
**中文**: 使用 `export` 命令获取紧凑的风格指南,可嵌入到提示词中使用。
---
## Features | 特性
**English**:
- ✅ **No external dependencies** - Pure Python implementation
- ✅ **Chinese optimized** - Designed for Chinese text analysis
- ✅ **Persistent storage** - Saves fingerprints to `./fingerprints/`
- ✅ **Writing agent ready** - Export compact style guides
**中文**:
- ✅ **无外部依赖** - 纯 Python 实现
- ✅ **中文优化** - 专为中文文本分析设计
- ✅ **持久化存储** - 将指纹保存到 `./fingerprints/`
- ✅ **写作助手就绪** - 导出紧凑的风格指南
标签
skill
ai