Importing Sogou Personal Word Library into Xiaoheimei#
Backup Sogou Personal Word Library#
Sogou Input Method Settings -> Property Settings -> Word Library -> Chinese Word Library -> Export/Backup
Backup the personal word library to your computer, as shown below, and export the file as Sogou Word Library Backup_2023_8_10.bin
Note: The latest Sogou input method exported word library cannot be converted. Here provides an older version 12.2.0.6275, which has been tested and can be used.
Convert Sogou Personal Word Library#
Then download Deep Blue Dictionary Conversion Download, unzip and open the software, and select the backed up Sogou personal word library file as shown below.
Set the conversion options as follows
Save the word library file as a txt file
Importing Word Library into Xiaoheimei Input Method#
Right-click on the Xiaoheimei input method icon in the lower right corner, select User Dictionary Management
Select the current dictionary, click Import Text Code Table at the bottom right, and select the txt text file that was just converted.
Converting Sogou Cell Word Library to Xiaoheimei Word Library#
There are two methods to convert Sogou Cell Word Library to Xiaoheimei Word Library
1. Using Deep Blue Dictionary Conversion#
Use Deep Blue Dictionary Conversion as mentioned above to convert the cell word library to a txt file, and then import it using Xiaoheimei dictionary management.
2. Using Python to Batch Convert scel to Xiaoheimei Dictionary Files#
Download the scel2txt.py file Download
Sogou word library download address https://pinyin.sogou.com/dict/
Create a new scel folder and place all downloaded cell word libraries (.scel) in this directory
The final directory structure is as follows:
alair@a1b2c3d4 MINGW64 /f/dls/ckzh
$ ls -Rl
.:
total 40
drwxr-xr-x 1 alair 197121 0 Aug 10 16:33 scel/
-rw-r--r-- 1 alair 197121 5539 Apr 7 17:21 scel2txt.py
./scel:
total 2320
-rw-r--r-- 1 alair 197121 165460 Aug 10 15:24 中国中医医院名录.scel
-rw-r--r-- 1 alair 197121 792262 Aug 10 15:23 中国医院大全【官方推荐】.scel
-rw-r--r-- 1 alair 197121 130068 Aug 10 15:28 '中国南北大菜-- 菜名大全.scel'
-rw-r--r-- 1 alair 197121 74596 Aug 10 15:23 中国地铁【官方推荐】.scel
-rw-r--r-- 1 alair 197121 91234 Aug 10 15:24 中国疗养院名录.scel
-rw-r--r-- 1 alair 197121 53140 Aug 10 15:23 中国风景名胜.scel
-rw-r--r-- 1 alair 197121 688104 Aug 10 15:23 中国高等教育名录数据库.scel
-rw-r--r-- 1 alair 197121 365740 Aug 10 15:23 中国高等院校(大学)大全【官方推荐】.scel
Then execute scel2txt.py to convert all word library files
alair@a1b2c3d4 MINGW64 /f/dls/ckzh
$ python scel2txt.py
中国中医医院名录.scel: 2909 words
--------------------------------------------------------------------------------
中国医院大全【官方推荐】.scel: 17684 words
--------------------------------------------------------------------------------
中国南北大菜-- 菜名大全.scel: 3349 words
--------------------------------------------------------------------------------
中国地铁【官方推荐】.scel: 1942 words
--------------------------------------------------------------------------------
中国疗养院名录.scel: 1270 words
--------------------------------------------------------------------------------
中国风景名胜.scel: 1279 words
--------------------------------------------------------------------------------
中国高等教育名录数据库.scel: 10758 words
--------------------------------------------------------------------------------
中国高等院校(大学)大全【官方推荐】.scel: 7192 words
--------------------------------------------------------------------------------
Merged luna_pinyin.sogou.dict.yaml: 46383 words
The output result is in the out folder in the same directory
alair@a1b2c3d4 MINGW64 /f/dls/ckzh
$ ls -l out/
total 4636
-rw-r--r-- 1 alair 197121 2366506 Aug 10 16:36 luna_pinyin.sogou.dict.yaml
-rw-r--r-- 1 alair 197121 170743 Aug 10 16:36 中国中医医院名录.txt
-rw-r--r-- 1 alair 197121 763584 Aug 10 16:36 中国医院大全【官方推荐】.txt
-rw-r--r-- 1 alair 197121 98285 Aug 10 16:36 '中国南北大菜-- 菜名大全.txt'
-rw-r--r-- 1 alair 197121 51200 Aug 10 16:36 中国地铁【官方推荐】.txt
-rw-r--r-- 1 alair 197121 96201 Aug 10 16:36 中国疗养院名录.txt
-rw-r--r-- 1 alair 197121 33944 Aug 10 16:36 中国风景名胜.txt
-rw-r--r-- 1 alair 197121 780516 Aug 10 16:36 中国高等教育名录数据库.txt
-rw-r--r-- 1 alair 197121 371561 Aug 10 16:36 中国高等院校(大学)大全【官方推荐】.txt
Save the output luna_pinyin.sogou.dict.yaml to the Xiaoheimei user folder
Modify weasel.custom.yaml to include the following content, save and redeploy.
patch:
"translator/dictionary": luna_pinyin.sogou