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

部分词库转换失败 #1

Closed
Aleksanaa opened this issue Mar 23, 2020 · 2 comments
Closed

部分词库转换失败 #1

Aleksanaa opened this issue Mar 23, 2020 · 2 comments

Comments

@Aleksanaa
Copy link

“网络流行新词【官方推荐】.scel”没有转换(一共放了七个scel文件),输出如下:


数学词汇大全【官方推荐】.scel:15992 个词

中国高等院校(大学)大全【官方推荐】.scel:7192 个词

物理词汇大全【官方推荐】.scel:13107 个词

计算机词汇大全【官方推荐】.scel:10300 个词

开发大神专用词库【官方推荐】.scel:430 个词

linux少量术语.scel:136 个词

Traceback (most recent call last):
File "scel2txt.py", line 175, in
scel2txt.deal(os.path.join("./scel", scel_file))
File "scel2txt.py", line 147, in deal
self.getChinese(data[self.startChinese:])
File "scel2txt.py", line 116, in getChinese
py = self.getWordPy(data[pos: pos+py_table_len])
File "scel2txt.py", line 87, in getWordPy
ret.append(self.GPy_Table[index])
KeyError: 34945

@Aleksanaa
Copy link
Author

补充一下:自动合并功能也没有生效

@lewangdev
Copy link
Owner

网络流行新词【官方推荐】.scel于2020-03-22 17:04:27发布的第4396个版本 词库按照网上格式解析似乎有些问题,无法解析的词条忽略掉 10 条,目前共计 24923

lewangdev added a commit that referenced this issue Mar 23, 2020
#1 修复网络流行新词【官方推荐】.scel 转换失败问题
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