Wiktionary Add-on

I’m working currently on adding support for the ZIM format (Not uploaded to AnkiWeb yet): Add ZIM importer by abdnh · Pull Request #2 · abdnh/anki-wiktionary · GitHub

Currently supported languages are Greek and Spanish (Thanks to @giannis1234 for funding the work!)

It’s unfortunately way more work to support more languages than with the case with Kaikki files, as different code needs to be written to handle each version of Wiktionary, and it’s harder to parse the relevant information consistently because the ZIM format is optimized for readers like Kiwix and not so much for parsing by programs. I may actually split ZIM importing into a different add-on if I add more fields in the future (e.g. pronunciation) to keep the add-on’s interface simple.

If you want to see your language supported, let me know and I’ll add it to the todo list to look into in the future. Here is a huge list of ZIM files for many languages: Content in all languages - Kiwix

2 Likes

ZIM support was implemented in a separate add-on: ZIM Reader for Anki

Hello, I have been trying to use this addon but it does not work for me. For example when I download English dictionary json file it weights 254 MB (while on the page it is written that it should have 1,5 GB). After I try to add dictionary I encounter error:

unterminated string starting at line 1 column (yada yada yada).

It happens the same for German, Russian, Japanese, Korean, Polish and Translingual dictionaries
I have no knowledge about Python or programming so please explain to me why does it happen

I tried with the latest English and German files and had no issues. I suspect the files are getting corrupted while being downloaded. Are you downloading them normally via your browser or using some other method? Can you paste the first line of the English file for example here?

The file is actually 1.5 GB, but it shows as 254 MB when downloading (on Firefox, in my case) for some reason.

Hi Having trouble installing a dictionary file on Windows 11. I’ve tried several times but keep getting the following errors.

The following errors happened during the process:
failed to write file of word “р/д”: [Errno 2] No such file or directory: ‘C:\Users\JohnL\AppData\Roaming\Anki2\addons21\2087444887\user_files\SerboCroatian\р\д.json’
failed to write file of word “i/ili”: [Errno 2] No such file or directory: ‘C:\Users\JohnL\AppData\Roaming\Anki2\addons21\2087444887\user_files\SerboCroatian\i\ili.json’
failed to write file of word “и/или”: [Errno 2] No such file or directory: ‘C:\Users\JohnL\AppData\Roaming\Anki2\addons21\2087444887\user_files\SerboCroatian\и\или.json’

The errors only cause a few words not to be imported because they have special characters in their names. I plan to fix this in the next version.

The latest update fixes the errors with some words. All words should now be importable.

Hi abdo, thank you so much for this add-on - it’s been so very helpful! I’m not sure if it’s still updated/maintained, but I had two questions:

  1. There’re some additional fields in wiktionary (at least for the language I’m searching) like Usage notes and Alternative forms. Idk if that info is included in the kaikki data. If it is, can those fields be added?
  2. Is there a way not to show the dialogue box every time I add from wiktionary (ie. press the shortcut keys)?

Updates are infrequent as I don’t personally use the add-on, but will take note of your requests for the next release.