r/Supernote_dev
•
u/Decent_Tap_5574
•
Apr 29 '26
•
1
1
Dictionary Plugin Built a dictionary plugin for Supernote: lasso a word, get its definition, all on-device
Built a dictionary plugin for Supernote, Sharing it here. It runs entirely on-device: no companion app, no cloud, no network at lookup time and surfaces real WordNet definitions for handwritten or PDF words from inside the Notes / PDF reader (Documents).
What it does
Lasso a word in your notes : handwritten or already-recognised. Tap **Lookup** in the lasso toolbar. The plugin runs the firmware's stroke recogniser (`recognizeElements`), feeds the result into the on-device dictionary, and pops up the definition. Saved-and-reloaded handwriting and recognised titles work too, not just freshly-drawn strokes.
Select text in a PDF : drag-select a word in the document reader's text-selection mode, tap Lookup in the selection toolbar, same popup.
Real WordNet content : 149,535 entries from Princeton WordNet 2.x, BSD-style license. Multiple senses per word, part-of-speech labels, synonyms, example sentences. Bundled inside the `.snplg` (~17MB) — no network at lookup time.
Structured popup : every sense gets its own block: a *noun* / *verb* / *adjective* / *adverb* badge, a numbered sense, the definition, italic example sentences in curly quotes, and a `Synonyms:` line. Multi-sense entries (e.g. "AI" — Army Intelligence vs. artificial intelligence vs. three-toed sloth vs. artificial insemination) are scannable at a glance instead of buried in a wall of text.
Bilingual UI chrome : the plugin name on the plugin manager card, the Lookup toolbar label, and every popup label localise into Simplified Chinese, Traditional Chinese, Japanese, Thai, and Dutch based on your device locale. The dictionary content stays English; the surrounding chrome doesn't.
Case and whitespace-insensitive : "Anatomy", "anatomy", and " ANATOMY " all hit the same entry.
Demo
By design the plugin is pure read it never modifies the page, never deletes strokes, never inserts text. Lookup is a side-effect-free overlay; close it and your note is exactly as you left it.
A few things to know:
- First lookup after a fresh plugin-host process takes ~30–60 seconds. Hermes parses the embedded base64 dictionary, decodes it, gunzips the StarDict, and builds the index. Once parsed, every subsequent lookup is instant for the rest of the session. The beauty of it is it is completely Offline! You dont need to connected to the net!
- For PDFs, you need to be in the firmware's text-selection mode (a separate icon in the document toolbar) — selecting with the pen draws strokes instead. Once you're in the right mode, Lookup appears in the standard selection toolbar alongside Copy / Highlight.
- English content only in this v1.0.1 base. A converter is planned that will let users bring their own StarDict / MDX / CSV / JSON dictionary packs (medical, legal, bilingual, etc.) and emit a custom `.snplg` that replaces the base.
Tested on Nomad.
Source on GitHub: https://github.com/j-raghavan/sn-dictionary
Relase: https://github.com/j-raghavan/sn-dictionary/releases/tag/v1.0.1
issues / feature requests welcome, happy to take feedback.
8
u/BlueSkyla Apr 29 '26
Thank you so much. Works perfectly. It’s not mentioned here, but it works in my epub wonderfully.
6
u/frankk97 Apr 30 '26
This being offline is great. Fantastic work
3
u/Decent_Tap_5574 May 01 '26 edited May 01 '26
Version v1.0.3 released with custom dictionary support. Please try it and let me know whether your dictionary lookup is accurate. I'd appreciate the feedback.
🔗 https://github.com/j-raghavan/sn-dictionary/releases/tag/v1.0.3
Also please go through the [README](https://github.com/j-raghavan/sn-dictionary/blob/master/README.md) where I explain in detail how to add the custom dictionary and the various supported formats. Gist of which is here:
How to add your custom dictionary:
When a word is in both your dictionary and the bundled WordNet, the popup shows both as labelled sections.
A sample dictionary ships in the repo at `assets/sample-dicts/sn-tech-jargon/` as reference. For non-English content, [FreeDict](https://freedict.org) and [Wiktionary-Dictionaries](https://github.com/Vuizur/Wiktionary-Dictionaries) cover most languages.
One known gap is that MDX is deferred. The maintained parser libraries for MDX are AGPL-3.0, which doesn't compose with this repo's MIT license. MDX users can convert to StarDict via [pyglossary](https://github.com/ilius/pyglossary).
I have addressed the Hung issue reported by u/magic_notetaker in this release.
Discovery happens on-device, so there's no separate web tool you need to upload anything to.
3
u/shark7809 Apr 29 '26
The goat back for another banger 🐐
3
u/Entry_Line Apr 30 '26
Oh wow. Thank you so much!
2
u/Decent_Tap_5574 May 02 '26
version 1.0.6 released
- No more freeze on first lookup. The popup now opens within ~300 ms of your tap with a "Recognizing…" placeholder while handwriting recognition runs, instead of leaving you staring at the page for 5–10 seconds.
- Lookup button waits for the dictionary to be ready. If you tap immediately after opening a note, the button is disabled until the dictionary has loaded — no more accidental slow taps. Once it lights up, every lookup is fast.
- Multiple dictionaries fill in as they're ready. When you have French, Japanese, and other large user-supplied dictionaries installed, the popup now opens immediately with the dictionaries already loaded, and shows "Loading…" placeholders for the slower ones. Tap again a few seconds later to see those once they finish.
- Adjustable text size + clearer source labels. Three-step text-size control ((−) (A) (+)) at the top-right of the popup for readers who want bigger definitions; bigger, bolder source-of-definition badges so you can tell at a glance whether a definition came from WordNet, a user dictionary, or another source.
Release: https://github.com/j-raghavan/sn-dictionary/releases/tag/v1.0.6
2
u/wayoverindub Oct 29 '26
Hello and Thank You for this very cool plugin!
I can for the life of me not get an additional dictionary to work though, despite having read through your GitHub instructions as well. :-/ I have tried several sources, and they all contain the required three+ files.
They are not recognized in Notes and not in epubs. I have closed both file types and reopened them to re-trigger the plugin.
Just uninstalled 1.3.8 and installed 1.3.9 via InkHub to attempt again, but no go.
MyStyle folder structure
Dictionary folder contents
No results after Lookup
No additional dictionaries found
It can't be this hard. What am I missing?
Thanks very much for any pointers!
2
u/OkReward5192 Apr 30 '26
Oh wow this is way better than what I had! Fantastic work.
2
u/Lorestan00 Apr 30 '26
Fantastic. Really useful. Thank you!
Two additions:-
- copy button in the definition
- text in a note can also be looked up. greyed out at the moment
2
u/Careful-Good5887 May 22 '26
EXcellent use now. Just one more thing: I hope to adjust the order of imported dictionaries. Right now the order is lastest imported dict shown first
2
u/looselytranslated Oct 17 '26
Thanks for making this. I have it enabled and it works great, but was wondering if it will do reverse translation? I have Chinese dictionary enabled, and it can transfer Chinese to English, but I'd like to translate English to Chinese.
1
u/RainScum6677 Apr 30 '26
Fantastic. Well done!
1
u/SiewcaWiatru Apr 30 '26
I'll join on the appreciation comments :). Great work, offline mode is great, OCR feature in notes use is a genius move. Great for language studies.
Next step would be to have custom dicts and chooser, something I have in mind to lookup in the API.
1
u/Loud-Owl6337 Apr 30 '26
This is awesome work , huge congratulations.
The planned custom dictionary converter is probably the most exciting part long-term. If you can support formats like StarDict / MDX, this could turn into a really powerful ecosystem (technical dictionaries, bilingual learning, etc.).
1
u/maxilogan Apr 30 '26
Waiting for the configurable version (English isn't my native language), but great result so far and an amazing help in studying / reading english content. Amazing usage of plugins to patch something that the system should have had since the beginning (though also other competitors are struggling in this regards, I was used to the kindle paperwhite to have every definition ad a glance, but that was long time ago).
The best would be if the search could be done in two languages at least (e.g. my native one and english) so that I could search when reading novels (mainly in my language) or studying (50%/50% native language and english).
Thank you so much for this!
1
u/magic_notetaker Apr 30 '26
u/Decent_Tap_5574 : this looks great. But I noticed it gets hung up sometime rendering everything unusable. not sure when this happens, it was for me on the note page circling handwritten text. Before that it worked already well, but I had to leave the note completely to be able to use any tools at all on the page (just froze with lasso menu open).
1
u/Rana012 Apr 30 '26
Thank you thank you thank you!
1
u/SebzMonst3r Apr 30 '26
YES! 🔥 I can't wait to install this on my SN later and give it a go. I love that this works offline as well! Thank you so much for creating this & sharing!! This is exactly why I purchased my SN. This community is simply amazing & the fact that SN embraces the community coming together to create things we want/need is really amazing. Keep up the great work 👏🏻
1
u/VorpalPlayer May 01 '26
A really stupid question. How do you install the actual plugin? Just copy the folder to the Manta?
1
u/VorpalPlayer May 01 '26
The English dictionary works well, but the Japanese stardict dictionary freezes the Manta. It's this one: Japanese-English Wiktionary dictionary stardict.
1
u/Hamariel May 02 '26
Hy,
I really like this plugin. It makes my learning mandarin journey a lot easier and it is super as it is.
What I would love to have:
- small indicator which dictionary was used
- the possibility to change the font size for the whole pop-up or parts of it (I'm getting old...)
- and maybe something to add definitions on the fly... e.g. marking 李诗 and adding "name of female protagonist"
Maybe it is some of it would fit in your vision of the plugin.
Thanks for the plugin.
1
u/haevaristo May 04 '26
Will this support multi languages?
1
u/Ok_Beginning4615 May 04 '26
Thanks so cool
1
u/maxilogan Oct 12 '26
Hi u/Decent_Tap_5574 . I was reading a document today and I was quite used to the dictionary function on Inkread, to the point that I repeatedly tapped on a word on a PDF expecting the dictionary to open up, but it didn't. I then reviewed your release notes (great work on documenting everything on Github!) and found out that for PDFs you should select a word using the pen.
From Github, I read "Tap-on-existing-word (no lasso, just tap a written word) is not currently supported by the SDK — there is no spatial-query API to ask "what stroke is under this point?". A pen/touch event API is on Dunn-sn's roadmap; tap-to-define is tracked for v1.x." and I automatically associate "written" to the lookup on nothes rather than PDFs.
My question then is: does this limit also applies to PDFs or can something be made so that you can long-tap a word on a _document_ and have the definition looked up? (Kind of what happens also in inkread).
I understand this might be a niche use but I sometimes also use the tablet to read in more of a "cozy" environment (i.e. laying on the couch reading some document 😄 ) rather than for studying or taking notes (thus having most probably then pen at hand and the tablet on top of a desk).
On the other hand, how's u/Dunn-sn work going with regards to this topic, if this is also limiting the document lookup?
Thanks!
3
u/NoteOnMyWatch May 01 '26
1
u/[deleted] May 09 '26
I’m not sure I followed your instructions correctly but somehow I have a working dictionary. 😅 It’s the first version only. How would I update it to the newest version?
2
u/Juanprairan Oct 15 '26
I put all my dictionaries and work perfect. Thank you. If anyone wants dictionaries dm me. hahah
1
u/Lorestan00 May 20 '26
This might not be something you want to do.... But would you consider creating a Thesaurus essentially the same as the dictionary in terms of functionality ? It would be great for those writing in notes or in a doc
2
u/Minimum_Lie_2132 Apr 30 '26
Killing it! Great work! I've been waiting, along with many of us, for this feature. Thanks!
2
u/[deleted] Apr 29 '26
[removed] — view removed comment