View Single Post
Old 09-14-2023, 07:12 AM   #10
nezih
Enthusiast
nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.nezih is less competitive than you.
 
nezih's Avatar
 
Posts: 43
Karma: 14828
Join Date: Feb 2023
Device: Boox Page, Kobo Aura SE
Quote:
Originally Posted by kandwo View Post
Tried running the script on a stardict dictionary: http://libredict.org/dictionaries/ru...2023-09-07.tgz.

I unzipped the dictionary and ran the script on the directory. However, I got an error message:

"[Errno 2] No such file or directory: '(long path)/Wiktionary Russian-Russian.ifo'"

The file clearly exists and I've double checked that the path to it is correct. Is it the spaces that are messing something up or something else that I'm not understanding?
Code:
python .\add_inflections.py --dict-file '.\dicts\Wiktionary Russian-Russian\Wiktionary Russian-Russian.ifo' -j .\inflection_data\Russian.json.gz
I was able to add inflections to the dictionary with the code above. Notice also that I put the files closer to the script, you can try that.

With the unmunched data in inflection_data folder, 1,940,291 synword has been added to dictionary. Here is the ifo file of the output:
Spoiler:
StarDict's dict ifo file
version=3.0.0
bookname=Wiktionary Russian-Russian
wordcount=430770
idxfilesize=12875217
synwordcount=1940291
description=
nezih is offline   Reply With Quote