参考 #21 进行转换报错
lkyu-ly opened this issue · 4 comments
lkyu-ly commented
✘ lkyu@lkyu ~/pinyin ls -la
total 27808
drwxr-xr-x 2 lkyu lkyu 4096 Dec 19 11:20 .
drwxr-xr-x 8 lkyu lkyu 4096 Dec 19 11:27 ..
-rw-r--r-- 1 lkyu lkyu 28466954 Dec 2 13:53 CustomPinyinDictionary_Fcitx.dict
✘ lkyu@lkyu ~/pinyin libime_pinyindict -d CustomPinyinDictionary_Fcitx.dict CustomPinyinDictionary_Fcitx.txt
terminate called after throwing an instance of 'std::invalid_argument'
what(): Invalid pinyin version.
[1] 885 abort libime_pinyindict -d CustomPinyinDictionary_Fcitx.dict
词库版本:CustomPinyinDictionary_Fcitx_20231202.tar
linux版本:
lkyu@lkyu ~/pinyin uname -a
Linux lkyu 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 GNU/Linux
libime版本:
✘ lkyu@lkyu ~/pinyin apt list | grep libime
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
libime-bin/oldstable,now 1.0.4-1 amd64 [installed]
libime-data-language-model/oldstable,now 1.0.4-1 amd64 [installed,automatic]
libime-data/oldstable,now 1.0.4-1 all [installed,automatic]
libimecore-dev/oldstable 1.0.4-1 amd64
libimecore0/oldstable,now 1.0.4-1 amd64 [installed,automatic]
libimepinyin-dev/oldstable 1.0.4-1 amd64
libimepinyin0/oldstable,now 1.0.4-1 amd64 [installed]
libimetable-dev/oldstable 1.0.4-1 amd64
libimetable0/oldstable,now 1.0.4-1 amd64 [installed,automatic]
wuhgit commented
请问是使用的 WSL 吗?
我试了一下转换是正常的,至少这不是词库数据这边出的问题,请检查一下是不是因为别的原因,可能是 libime 版本的问题,1.0.4 有点旧了,我看了一下这个版本还是2021年2月发布的,现在最新的版本是 1.1.3 。
lkyu-ly commented
收到,我确实是使用了WSL,也尝试了对包进行更新,可能是我的源比较旧,我使用其他安装源试试,感谢!
wuhgit commented
不用谢,后续有问题欢迎反馈!
lkyu-ly commented
抱歉麻烦您了,经过尝试,是我是用的系统较为老旧了。(但是神奇的是ubuntu22.04这样的版本通过清华源已也只能安装libime1.0.11
)
解决方法是在sources.list
里面加入高版本系统的源然后只安装libime-bin
的最新版本1.1.3,已成功,感谢!
lkyu@lkyu ~/pinyin libime_pinyindict -d CustomPinyinDictionary_Fcitx.dict CustomPinyinDictionary_Fcitx.txt
lkyu@lkyu ~/pinyin ls -la
total 69880
drwxr-xr-x 2 lkyu lkyu 4096 Dec 21 18:20 .
drwxr-xr-x 9 lkyu lkyu 4096 Dec 21 18:20 ..
-rw-r--r-- 1 lkyu lkyu 28466954 Dec 2 13:53 CustomPinyinDictionary_Fcitx.dict
-rw-r--r-- 1 lkyu lkyu 41074582 Dec 21 18:15 CustomPinyinDictionary_Fcitx.txt