11 Commits

Author SHA1 Message Date
starmen1265 8d5beadcc7 Merge pull request 'fix(srt): add disable_reasoning parameter for ASR correction and include title in archive filename' (#39) from fix/crawler-proxy-config into main
Deploy kb-skills / deploy (push) Successful in 1s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/39
2026-03-21 22:23:16 +08:00
starmen1265 36e48f90f7 Merge pull request 'fix/crawler-proxy-config' (#38) from fix/crawler-proxy-config into main
Deploy kb-skills / deploy (push) Successful in 1s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/38
2026-03-21 21:44:56 +08:00
starmen1265 4fb9635d15 Merge pull request 'fix: correct Zhipu API thinking parameter and add non-interactive archive mode' (#37) from fix/crawler-proxy-config into main
Deploy kb-skills / deploy (push) Successful in 1s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/37
2026-03-20 00:51:27 +08:00
starmen1265 e1db39e36f Merge pull request 'fix(deep-analyzer): add disable_reasoning parameter to GLM API calls' (#36) from fix/crawler-proxy-config into main
Deploy kb-skills / deploy (push) Successful in 1s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/36
2026-03-20 00:29:34 +08:00
starmen1265 996c25af3f Merge pull request 'fix(12-02): add SRTProcessor to processors/__init__.py exports' (#35) from fix/crawler-proxy-config into main
Deploy kb-skills / deploy (push) Successful in 1s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/35
2026-03-20 00:17:26 +08:00
starmen1265 d17b55f6c5 Merge pull request 'fix/crawler-proxy-config' (#34) from fix/crawler-proxy-config into main
Deploy kb-skills / deploy (push) Successful in 1s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/34
2026-03-20 00:12:03 +08:00
starmen1265 e61a299d84 Merge pull request 'fix(cli): use json mode for model_dump serialization' (#33) from fix/crawler-proxy-config into main
Deploy kb-skills / deploy (push) Successful in 2s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/33
2026-03-19 23:00:23 +08:00
starmen1265 0ac50d17ec Merge pull request 'fix/crawler-proxy-config' (#32) from fix/crawler-proxy-config into main
Deploy kb-skills / deploy (push) Successful in 2s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/32
2026-03-19 00:07:32 +08:00
starmen1265 22fd634498 Merge pull request 'fix/crawler-proxy-config' (#31) from fix/crawler-proxy-config into main
Deploy kb-skills / deploy (push) Successful in 1s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/31
2026-03-18 20:48:32 +08:00
starmen1265 cb540eb113 Merge pull request 'fix(kb_workflow): resolve module/package naming conflict' (#30) from fix/crawler-proxy-config into main
Deploy kb-skills / deploy (push) Successful in 1s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/30
2026-03-18 10:42:16 +08:00
starmen1265 94a51abed8 Merge pull request 'fix/crawler-proxy-config' (#29) from fix/crawler-proxy-config into main
Deploy kb-skills / deploy (push) Successful in 1s
Reviewed-on: http://192.168.1.22:8418/starmen1265/kb-skills/pulls/29
2026-03-18 00:05:47 +08:00
3 changed files with 1 additions and 73 deletions
@@ -1,60 +0,0 @@
# Semantic Segmentation for SRT Processing
**Status:** Backlog
**Priority:** Medium
**Source:** User feedback during v1.5 testing
## Problem
Current `SemanticSegmenter` uses simple heuristic rules:
- Time gap > 3 seconds
- Paragraph length > 500 characters
This approach cannot identify **semantic topic transitions**.
### Example Case
Video: BV1MiPSz2ErY (科学透镜 - 5 topics in one video)
1. 银河系中心的超大黑洞人马座A*其实不是黑洞
2. 银河系和仙女座星系等构成的本星系群陷入巨大物质薄片
3. 科学家为世界上97%的建筑生成3D模型
4. 雷暴的形成
5. 闪电的形成
Current segmentation mixes these topics together.
## Potential Solutions
### Option 1: Transition Keyword Detection (Simple)
- Detect common transition phrases: "接下来", "另外", "第二个", etc.
- **Pros:** Fast, no API calls
- **Cons:** Low accuracy, many videos lack explicit transitions
### Option 2: LLM-Based Segmentation (Accurate)
- Ask LLM to analyze entire subtitle and identify topic boundaries
- **Pros:** Highest accuracy, understands semantics
- **Cons:** Extra API cost, token limits for long videos
### Option 3: Two-Stage Approach (Balanced)
- Stage 1: Simple rule-based segmentation (current)
- Stage 2: LLM checks paragraph beginnings for new topics
- **Pros:** Most cases use simple rules, LLM only for key decisions
- **Cons:** More complex implementation
### Option 4: Embedding-Based Similarity
- Calculate semantic similarity between adjacent paragraphs
- Low similarity = topic boundary
- **Pros:** No LLM API calls, runs locally
- **Cons:** Requires embedding model, implementation complexity
## Recommendation
**Phase 1 (Quick Win):** Transition keyword detection + improve prompt
**Phase 2 (Full Solution):** Two-stage approach with optional LLM semantic segmentation
## Success Criteria
1. Topics are separated correctly
2. Each paragraph covers a single coherent topic
3. No false splits within a topic
-8
View File
@@ -116,14 +116,6 @@ class SimpleAIClient:
data = response.json()
message = data.get('choices', [{}])[0].get('message', {})
# 调试:打印完整的 API 响应结构
print(f"[DEBUG] disable_reasoning={disable_reasoning}", file=sys.stderr)
print(f"[DEBUG] message keys: {list(message.keys())}", file=sys.stderr)
if 'content' in message:
print(f"[DEBUG] content 长度: {len(message['content'])}, 前200字符: {message['content'][:200]}", file=sys.stderr)
if 'reasoning_content' in message:
print(f"[DEBUG] reasoning_content 长度: {len(message['reasoning_content'])}, 前200字符: {message['reasoning_content'][:200]}", file=sys.stderr)
# 返回 content 字段
# 当禁用思考模式时,content 包含直接答案
# 当启用思考模式时,content 可能包含思考过程和分析
+1 -5
View File
@@ -26,11 +26,7 @@ class AIClientProtocol(Protocol):
# 纠错 Prompt 模板
CORRECTION_PROMPT = """你是一个文本校对专家。以下是语音识别生成的字幕,可能包含识别错误。
请执行以下任务:
1. 纠正明显的错误(如同音字、漏字、错字)
2. 添加适当的标点符号(逗号、句号、顿号等)
3. 不要改变原意和风格
请只纠正明显的错误(如同音字、漏字、错字),不要改变原意和风格。
原文:
{text}