fix(lyrics): 修复三行歌词组中纯汉字日文行被错误归类为翻译行#55
Open
silver-wolf-little-wife wants to merge 2 commits into
Open
Conversation
`classify_line_role` 将不含假名的纯汉字日文(如「大丈夫」)错误归类为 Translation,导致 `build_three_line_semantic` 在回退时选择了错误的 主行。修复后的逻辑:当所有非罗马字行无法通过角色分类区分时,按组内 出现顺序决定——第一个非罗马字行为主行,第二个为翻译行。
Owner
|
三行歌词我采取一刀切的方式,这是我经过多次尝试后的最终选择,按照顺序固定为罗马音 原文 翻译进行匹配 。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
修复
build_three_line_semantic中,当三行歌词组包含不含假名的纯汉字日文行(如「大丈夫」)时,classify_line_role将其错误归类为 Translation,导致回退逻辑选择错误的主行。修复后按组内出现顺序决定主行和翻译行。变更类型
详情
classify_line_role函数,基于字符脚本特征和显式角色标记判断行角色build_two_line_semantic/build_three_line_semantic,替代原build_hard_role_semantic_line_from_cluster中硬编码的 [roman, main, translation] 三行模式resolve_two_line_script_heuristic处理两行情况下的分类回退build_three_line_semantic:当所有非罗马字行无法通过角色分类区分时,按组内顺序决定主行/翻译行测试
相关 Issue
无