An AI-based writing style learning tool that can analyze a user's historical articles, extract writing style features, and generate new content based on the style.
Core Features
- Style Analysis - 5-dimension analysis (title, opening, content structure, language style, ending)
- Style Description Generation - Structured description, Prompt template, style tags
- Style-based Generation - Title generation, content polishing, article creation
- Style Library Management - Style saving, style comparison, style fusion
Workflow
Process 1: Analyze writing style
输入:10-50篇历史文章(纯文本)
Steps:
- Tokenization and part-of-speech tagging
- Extract features across 5 dimensions
- Calculate statistical metrics (average sentence length, vocabulary diversity)
- Identify commonly used patterns and sentence structures
- Generate style score
Output: Style analysis JSON + style description + style tags
### 流程2:生成风格Prompt
Input: Style analysis JSON
Steps:
- Read style features
- Organize descriptions by dimension
- Generate reusable Prompt templates
- Add examples and notes
Output: Style Prompt MD file
### 流程3:基于风格生成标题
Input: Topic + style Prompt
Steps:
- Analyze title style patterns
- Extract keywords and sentence structures
- Generate multiple candidate titles
- Sort by style match score
Output: Candidate title list + match scores
### 流程4:基于风格润色内容
Input: Original text + style Prompt
Steps:
- Analyze the structure and content of the original text
- Adjust vocabulary and sentence structures according to the style
- Preserve the core information of the original text
- Generate polished text
Output: Polished text + change notes
## 5个分析维度
### 1. 标题风格
- **模式识别**:数字+亮点、悬念+结果、对比+反差
- **长度分析**:平均字数、最短/最长
- **关键词提取**:高频词、行业术语
### 2. 开头风格
- **模式识别**:热点引入、痛点提问、数据震撼
- **长度分析**:平均字数
- **基调分析**:专业/轻松/幽默
### 3. 内容结构
- **整体结构**:总分总、逐步深入、并列式
- **段落组织**:段落数量、段落长度
- **内容要素**:案例数量、数据支撑、技巧数量
### 4. 语言风格
- **词汇选择**:专业术语、通俗程度、形象比喻
- **句式特点**:平均句长、句式类型
- **基调风格**:理性/感性、正式/口语
### 5. 结尾风格
- **模式识别**:总结提升、行动号召、福利引导
- **长度分析**:平均字数
- **行动号召**:关注/点赞/分享/评论
详见:references/analysis-dimensions.md
## API 使用
### handler(args) 主函数
```python
from style_learner import handler
# 分析写作风格
args = {
"action": "analyze_style",
"articles": "文章1内容\n\n文章2内容...",
"output_file": "style_analysis.json"
}
result = handler(args)
# 生成风格Prompt
args = {
"action": "generate_style_prompt",
"style_file": "style_analysis.json",
"output_file": "style_prompt.md"
}
result = handler(args)
# 基于风格生成标题
args = {
"action": "generate_title_from_style",
"topic": "AI写作工具",
"style_prompt_file": "style_prompt.md",
"count": 5
}
result = handler(args)
# 基于风格润色内容
args = {
"action": "polish_with_style",
"text": "待润色的文本",
"style_prompt_file": "style_prompt.md"
}
result = handler(args)
See: references/api-reference.md
Design Trade-off Explanation
Why is a minimum of 10 articles recommended?
Answer: To ensure analysis accuracy
Data Support:
- <5 articles: Feature extraction is unstable, accuracy 50-60%
- 5-9 articles: Basically usable, accuracy 65-75%
- 10-20 articles: Recommended range, accuracy 80-90%
- 20-50 articles: Optimal range, accuracy 90-95%
-
50 articles: Diminishing marginal returns
Trade-off Analysis:
- Too few(<10 articles): Insufficient samples, unstable features
- Too many(>50 articles): High computational cost, low marginal returns
- Moderate(10-50 articles): Balances accuracy and efficiency
Flexible Application:
- Quick learning: 10-20 articles
- Precise analysis: 20-50 articles
- New accounts: 5-10 articles can be used, but results are for reference only
Why analyze 5 dimensions?
Answer: To comprehensively cover the key elements of writing style
Dimension Selection:
- Title: Determines click-through rate
- Opening: Affects reading completion rate
- Structure: Affects readability
- Language: Affects reading experience
- Ending: Affects engagement rate
Data support:
- 3 dimensions: insufficient coverage, accuracy 70%
- 5 dimensions: covers key elements, accuracy 85-90%
- 7 dimensions: marginal returns are small, accuracy 90-92%
- Gap: 5 dimensions vs 3 dimensions, accuracy differs by 15-20%
Flexible application:
- Quick analysis: analyze only the title + language + ending (3 dimensions)
- Standard analysis: analyze all 5 dimensions
- In-depth analysis: add emotional tendency, rhetorical devices, etc. (7+ dimensions)
Why generate a style Prompt?
Answer: Achieve reusability and transferability of style
Traditional problems:
- AI needs to relearn the style every time
- Style features are difficult to express quantitatively
- Style consistency cannot be maintained across sessions
Prompt advantages:
- Reusable: learn once, use many times
- Transferable: different AI instances use the same style
- Adjustable: fine-tune the style based on the Prompt
Data support:
- Using Prompt: style consistency 80-90%
- Not using Prompt: style consistency 50-60%
- Gap: 1.5-1.8 times
Flexible application:
- Style stability: continue using after generating the Prompt
- Style evolution: regularly update the Prompt (monthly/quarterly)
- Multiple styles: save multiple Prompt versions
Data volume recommendations
Minimum data volume
- 10 articles: minimum requirement, features are basically stable
- Suitable for: quick learning, style exploration
- Accuracy: 80-85%
Recommended data volume
- 20-30 articles: recommended range, features are stable
- Suitable for: most scenarios
- Accuracy: 90-95%
Optimal data volume
- 50+ articles: optimal range, features are very stable
- Suitable for: precise analysis, style library construction
- Accuracy: 95%+
Notes
- Article quality: choose representative articles, avoid drafts
- Time span: choose articles from the last 3-6 months
- Content consistency: avoid mixing across domains (such as technology + emotions)
See: references/data-requirements.md
Style feature examples
Example: professional review style
Title style:
- Pattern: numbers + highlights, suspense + results
- Length: 15-35 characters
- Keywords: reveal, techniques, breakthrough, must-have tool
Opening style:
- Pattern: trending topic introduction, pain point question
- Length: 100-200 characters
- Tone: professional but not boring
Content structure:
- Structure: general-specific-general
- Paragraphs: 5-12 paragraphs, each 80-180 characters
- Elements: 1-3 cases, 2-5 data points, 3-6 techniques
Language style:
- Vocabulary: professional terminology + plain explanation
- Sentence length: average 25 characters (range 10-50 characters)
- Tone: pragmatic
Ending style:
- Mode: summary enhancement, call to action
- Length: 50-150 characters
- Call to action: follow to receive
See: references/style-examples.md
Application scenarios
- Quickly learn a WeChat Official Account style: Collect 10-20 articles to quickly learn the writing style
- Unify team writing style: Analyze multiple authors and extract common features
- Style transfer: Transfer the style of high-quality articles to your own articles
- Style optimization: Analyze your own shortcomings and learn from the style of high-quality articles
- Batch content generation: Generate content in batches based on a style Prompt
Notes
Data quality
- Article representativeness: Choose representative articles and avoid drafts
- Time span: Choose articles from the most recent 3-6 months
- Content consistency: Avoid mixing across domains
- Data cleaning: Remove non-body content such as ads and promotions
Analysis limitations
- Style changes: An author's style evolves over time
- Topic influence: Different topics may affect style analysis
- Subjective factors: Style evaluation has a certain degree of subjectivity
- Data volume dependence: Results are unstable when the data volume is small
Usage recommendations
- Regular updates: Update the style analysis once every 3-6 months
- Human-machine combination: AI analysis + manual adjustment
- Flexible application: Adjust the style intensity according to the scenario
- Multi-version management: Save style versions from different periods
Reference materials
Core documents
- Detailed explanation of analysis dimensions:references/analysis-dimensions.md
- Data requirements:references/data-requirements.md
- Style examples:references/style-examples.md
- API reference:references/api-reference.md
Get started
Just say "learn style" or "analyze style", and the system will automatically guide you through it!
Detailed usage instructions: references/getting-started.md