Offline dictionary support
Opened this issue · 3 comments
The dict.cc dictionary can be downloaded, which is handy when there is no internet.
Hi @xeruf,
I wasn't aware that it's actually possible to download the dictionary as a file. Thanks for pointing that out. I just tried this out and I believe there two things to keep in mind here
- The dictionary must not be shipped with the plugin itself as clause 2.2 of the Terms of Use mandates:
The data itself must not be published with the program. The user must be asked to download the data directly from dict.cc. This will ensure that every user has seen and agreed to these Terms of Use.
- The dictionary actually comes in two files, i.e. one for each "direction" EN -> DE and DE -> EN
So besides the essential implementation of lookups in those files, we would need to provide some kind of mechanism to supply these files, e.g. via manually specifying the paths in the plugin options. As the download process involves email verification per user, I don't think an automated approach is easily feasible.
No, the plugin should not download the dictionary by itself, but if I have already downloaded a file there could be a global variable to set its path. The direction does not matter much either, the content is the same just ordered the other way around.
One could consider to use one of the existing scripts in this case, such as https://git.sr.ht/~tsdh/rdictcc which uses an offline database compiled from the downloaded file.
However, one nice feature for the meantime would be for the command to not hang forever when offline ^^