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

更宽松的text格式 #613

Closed
CaiMiao opened this issue Aug 24, 2021 · 2 comments
Closed

更宽松的text格式 #613

CaiMiao opened this issue Aug 24, 2021 · 2 comments

Comments

@CaiMiao
Copy link

CaiMiao commented Aug 24, 2021

目前正在使用自用的text格式字典
为了方便随时修改,需要注释以及换行(肉眼归类)

但由于text过于严格,不允许空行(无\t),给实际使用带来一定麻烦。

>opencc-1.1.2\bin\opencc -i txt/PatchString.txt -o PatchString.txt -c rules/ds2tw.json
Invalid text dictionary at line 5: Tabular not found

旧版本可以通过加入一行空的\t解决,但是新版本会提示Invalid format: The text dictionary contains duplicated keys.

这个没有tabular的合法性检测似乎有些不太合理了,应该排除空行的情况。
希望可以优化。

以下是我个人使用的字典sample:

image

@BYVoid
Copy link
Owner

BYVoid commented Oct 10, 2021

允許空行了。

@BYVoid BYVoid closed this as completed Oct 10, 2021
@CaiMiao
Copy link
Author

CaiMiao commented Dec 10, 2021

@BYVoid 不知道为什么使用新版仍报错。使用的是CI的这个版本

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