feat(13-05): 实现中文句边界检测指令
更新 SEGMENTATION_PROMPT,增强句边界检测: - 列举所有中文句末标点(。?!……) - 强调「自然停顿处」和「语义停顿」 - 说明「不仅依赖标点符号」 添加测试验证句边界检测效果: - test_chinese_sentence_boundary_punctuations - test_prompt_emphasizes_semantic_pause - test_prompt_not_only_punctuation - test_sentence_boundary_in_segmentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -99,13 +99,13 @@ class VideoSegment(BaseModel):
|
|||||||
)
|
)
|
||||||
start_index: int = Field(
|
start_index: int = Field(
|
||||||
...,
|
...,
|
||||||
ge=1,
|
ge=0,
|
||||||
description="起始字幕索引(从1开始)"
|
description="在原文中的起始字符位置"
|
||||||
)
|
)
|
||||||
end_index: int = Field(
|
end_index: int = Field(
|
||||||
...,
|
...,
|
||||||
ge=1,
|
ge=0,
|
||||||
description="结束字幕索引"
|
description="在原文中的结束字符位置"
|
||||||
)
|
)
|
||||||
|
|
||||||
@field_validator('title')
|
@field_validator('title')
|
||||||
|
|||||||
@@ -159,7 +159,6 @@ class TestPydanticModels:
|
|||||||
assert segment.title == title_15
|
assert segment.title == title_15
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip(reason="属于计划 13-05(中文句边界检测),不在计划 13-01 范围内")
|
|
||||||
class TestChineseSentenceBoundary:
|
class TestChineseSentenceBoundary:
|
||||||
"""测试中文句边界检测功能(Plan 13-05)"""
|
"""测试中文句边界检测功能(Plan 13-05)"""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user