GSoC Idea Proposal: Dictionary integration for translation/spell checking

Hi, I'm Khuong Duy, I'm participating GSoC 2024, my introduction, and I want to propose this idea of integrating a dictionary.

Translation/lookup

I'm highly interested in learning languages, and I learn best when trying to guess meaning of words in context. I'd be nice if we can highlight words and it pops translations like this

Spell Checking

Such implement of dictionary enables us to add spell checking & autocorrection feature into Joplin, which is a useful feature for a note editor.

My approach

We can code an interface for Dictionary, implement function to lookup words, and storing dictionary dataset locally which is more performant and can work offline. To add more languages, we can make plugins which adapt the Dictionary interface above, this makes it extensible. There should be an option to toggle this on/off to avoid annoying popups.

For spell checking, we can implement wagner-fischer algorithm, which is beautifully described in this video.

This is my personal project which has offline dictionary:

It can be optimized further by: Trie data structure, cache frequent words,