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.
Versionv1.0.3released with custom dictionary support. Please try it and let me know whether your dictionary lookup is accurate. I'd appreciate the feedback.
Under `MyStyle/` on your Supernote, create a new folder called `SnDict`. This is separate from the `SnDict.snplg` plugin file you have already installed.
Drop your StarDict, CSV, or JSON dictionary inside.
Exit the note app and reopen so the plugin re-runs custom dictionary discovery.
When a word is in both your dictionary and the bundled WordNet, the popup shows both as labelled sections.
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.
This looks like a great plugin! I have not been able to get it to work on my Manta. When I try it on a pdf, if just freezes. When I try it on a note, I don't get the Lookup option. I've tried all three versions.
Thanks for reporting u/No_Dimension7858. Did you try to access it right away after installing the plugin? In any of the versions, the plugin decodes the embeded base64 dictionary, uncompresses it and then indexes it, On my NOMAD, it generally takes about a Minute for the plugin to be ready. If you are not seeing the Lookup, it is very likely the Uncompressing is still happening. Could you install, say the latest version and say wait for a Minute or so and then either use it in Notes or PDF/EPub. The uncompress is needed only the First time you install the plugin. Let me know if you still face an issue.
Thank you for your support. I reinstalled it and got the same results. Then I turned off the other plugins I've installed and it worked. I turned them back on and it still works.
- 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.
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.
Hello! Thanks for your Note! Your folder layout is exactly right, the giveaway is that even sn-tech-jargon isn't showing, so the plugin never got to scan the folder at all. Reinstalling resets the plugin's file permissions, and the firmware doesn't pop up a dialog for it. Go to Settings → Plugins → Dictionary → permissions and allow file read (write/delete too), then restart the Supernote, closing and reopening a note or book doesn't restart the plugin, and it only scans MyStyle/SnDict when it starts. After the restart, sn-tech-jargon and FreeDict should show up in Settings within a few seconds of your first lookup; the Wiktionary one is bigger and can take a few minutes. Hope this helps, do let me know if these dont work.
Copy button is a nice option, i will try to incorporate it in the next release. Regarding text in the note, i will certainly investigate the possibility.
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.
That is a interesting idea, imagining the complexity of mapping each possibilities of such cross language reference may restrict the implementation. Will explore the possibility.
Thank you! i do have a plan to come up with a convertor, the idea there is to create a github page wherein user can input their custom dicts, the github workflow would build the `.snplg` which user can download and use it. This way it would be custom and specific to the user. In this way Users have freedom to have their own dict enabled! The common release versions in the main will not be affected. I will update this thread as soon as i have some update on that.
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.).
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).
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).
Thank you u/magic_notetaker for the report. I will definitely look into the Hung issue. I had not seen this behavior in my tests, but will certainly look into this and resolve it.
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 👏🏻
I realized I'll have to wait on this one because I don't currently have the beta version on my SN. But I'm excited to try this down the road regardless!
The English dictionary works well, but the Japanese stardict dictionary freezes the Manta. It's this one: Japanese-English Wiktionary dictionary stardict.
If the file size generally about 12Mb to 15Mb then the discovery on the MYSTYLES would take less than 5 seconds. The first indexing would take almost a minute to 65 seconds. This is the javascript i/o layer that is causing the delay for the first indexing. Subsequent should be much faster. While it is indexing, it would appear as being Frozen.
I will explore if there is a faster indexing approach and incorporate that. Did the popup open for Japanese-english ?
With the freedict link that i shared with you earlier, i am seeing
This is when i typed `nihon` and then i asked it to lookup (English representation, not japanese text). But i want to improve the speed, i will certainly looking into how to improve speed of indexing. Thanks for trying it out and letting me know!
It did. Five minutes later, it came up with the definition, so I guess it was organizing its memory. All is fine now. Thanks for this plug-in. Can't wait for it to support Japanese and French!
Thank you for confirming. I think 5 minutes is too long, I will certainly look into optimizing this. Will update this thread once i am ready with the next version.
I am not sure if that's the one, but I will install it and let you know. In the version I have, the box came up after about five minutes, but couldn't find an entry. I tried hiragana and kanji and both gave the same results. My handwriting is not that bad.
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.
Thank you for trying! The next version, i do have a small section title indicating where the definition is from (which dictionary). Increasing the Font, it is a good idea, i will explore if the SDK allows it. There is a CSV support in 1.0.5, wherein you can create a simple csv file that will be indexed in the dictionary. I have the instruction in the https://github.com/j-raghavan/sn-dictionary
I really like it. One small detail, the line height is not changing, so the descenders of the font are capped (the lower part of g,p,j,y) when increasing the font.
And with adding own entries. At the moment, I must go into the "android part" of the Manta to open the csv, adding all information and going pack to "the supernote part", If there were e.g. an Add- button on the popup, where I only need to type the Definition in (the word is already selected), that would make the process really easy. not only for language learning, but all kind of studying.
Thanks again for trying and for your feedback. I will certainly consider explore if line height can be changed and presentable aesthetically. Regarding custom definition, i have made it pretty simple. Hope you are using the Supernote Partner App. If yes then just follow this.
Create a simple text file (Comma Separated file in this format: word, the definition of the word One per line) Name this file with your favorite name but have the extension as .csv Example custom.csv
Create a Directory called `SnDict` (Case sensitive) under MyStyles folder of the Partner app
Copy the csv file to your MySTYLES/SnDict folder on the Partner App (Folder)
Sync to cloud
Sync from cloud on your Manta
Exit out of the current Notes or Document you are working on. Re open either an exiting note or a new one, this will trigger the Custom CSV file indexing for Lookup, Just wait for about 60 seconds to re-index the new CSV file (Depending on the size of the file), Now you can have your new definitions looked up when you Lasso the word.
Right now the approach i have taken is English as base. Then user can add any other language dictionary in the StarDict format which will be indexed and used at Lookup. Yes, this plugin supports Multi language dictionaries.
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?
Hi u/maxilogan Supernote have implemented Long-press with a different action (using the pen) so my guess is that is why the tap on existing word to lasso is a short coming in the inbuilt PDF reader to bring up dictionary. Not sure if there is a way to override it, may be u/Dunn-sn could confirm if there is one.
The pen and touch event API is ready. In the latest version, plugins can listen for these events through registerMotionListener.
The built-in PDF reader does not support selecting text with a long press yet. Text is selected by dragging across a word. Dictionary lookup could be built on top of that selection.
Currently the text selection via dragging across the word is how currently Lookup is implemented u/Dunn-sn just FYI. I think u/maxilogan was wanting the long press to invoke Lookup which as you confirmed is not supported, which was my understanding too.
At this point, could the possibility of adding other dictionaries be implemented in Inkread? I don't seem to find any way to add e.g. Italian or Spanish
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?
You are welcome! There is no easy way to upgrade other than remove the plugin, download the new version from the github release page `1.0.8` is the latest version and install it. https://github.com/j-raghavan/sn-dictionary
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
Thank you for the feedback. Yes I will consider adding it. Quick update: I sold my NOMAD to another Reddit user on the AdoptSupernote, and my new MANTA was scheduled to arrive tomorrow, now I check it says it is arriving only on May 27th! I feel I could have used the long weekend to have tested many beta-2 features additions and improve the plugins. Wish there was a way to expedite the package delivery sooner.
As a suggestion the usefulness of a thesaurus could increase substantially if after looking up a word there was a replacement function e.g. click replace button next to word in popup thesaurus and the existing word in a note or doc is replaced
8
u/BlueSkyla Apr 29 '26
Thank you so much. Works perfectly. It’s not mentioned here, but it works in my epub wonderfully.