Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qrcjson解析后总是遗失歌词中的半角左括号 #10

Open
weiduhuo opened this issue Sep 18, 2023 · 2 comments
Open

qrcjson解析后总是遗失歌词中的半角左括号 #10

weiduhuo opened this issue Sep 18, 2023 · 2 comments

Comments

@weiduhuo
Copy link

举例如下:
[01:42.02]<01:42.02>掴<01:42.47><01:42.47>む<01:42.92><01:42.92>な<01:43.12><01:43.12>ら<01:43.51><01:43.51><01:43.51><01:43.51>果<01:43.70><01:43.70>て<01:43.85><01:43.85>な<01:44.07><01:44.07>き<01:44.35><01:44.35>)<01:44.41>
[01:42.02]紧紧握住(永无止境)

原文中遗失半角左括号,而半角右括号以及译文中的半角左括号未缺失。

此句正确的解析应该为:
[01:42.02]<01:42.02>掴<01:42.47><01:42.47>む<01:42.92><01:42.92>な<01:43.12><01:43.12>ら<01:43.51><01:43.51>(<01:43.51><01:43.51>果<01:43.70><01:43.70>て<01:43.85><01:43.85>な<01:44.07><01:44.07>き<01:44.35><01:44.35>)<01:44.41>
[01:42.02]紧紧握住(永无止境)

所举例子的歌名为:Ave Mujica

@Robotxm
Copy link
Owner

Robotxm commented Sep 19, 2023

这个是已知问题,krc 和 qrc 都有。由于主要的解析算法都是沿用早期 ESLyric 内置脚本的,这个问题也就继承下来了。短期内没有时间来看这个问题,有空了再看吧。

@weiduhuo
Copy link
Author

原来主要算法是内置的。
我有个不成熟的想法,我发现缺失左括号的地方会保留一个<><>的空位,假设所有括号都是严格左右匹配,那么可以用一个简单的逆序循环,将右括号与临近空位进行匹配,从而补全为<>(<>
这样通过外置算法来解决,不知道可不可行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants