Plugin development: search in dictionary
#1  mintwurm 10-12-2019, 07:31 PM
Does the lua API expose dictionary lookups? I would like to create a plugin that automates some text translations.

#2  Frenzie 10-13-2019, 08:07 AM
It sounds like you may want something other than dictionary lookups?

As for the literal question, probably, but it shouldn't matter much either way. A local function/table/variable is likely just a quick refactor away from being made available as a module method.

#3  mintwurm 10-15-2019, 05:04 AM
Thank you for your reply. This community is awesome

Maybe I should have made my question broader in the beginning. It's about adding a vocabulary trainer to koreader.

On kindle, they have an integrated vocabulary trainer. It keeps track of all the words you have looked up during your reading and turns them into flashcards. The flashcards are quite smart, they keep the sentence where you looked up the word as an example and show you the dictionary page as translation.

But at the same time, the vocab trainer is weirdly limited. The words aren't sorted by dictionary. When you repeat words, they are all thrown into the same pot. English and French and Spanish are revised at the same time.

And the tool only has two categories "known" and "unknown" cards. No proper scheduling of repetitions, etc.

Also, you can't add flashcards on your own. You have to look up the word during reading.

This tool could be so powerful. I pick up my ereader basically every day. It would be easy to make a habit of repeating a few words every time. But the kindle training tool is so frustratingly limited.

I was amazed when I found koreader, such an awesome project
So now I would like to dabble in lua programming a bit and try to hack up a vocab trainer like on kindle (just better :P)

This issue was also me.
I have some programming experience, but none in lua.
Looks fun though.

My plan is to:
1. hook into dictionary lookups and extract the flashcard data
2. create a simple UI
3. add a tutor algorithm with spaced repetition
4. make the UI more complicated (allow users to add their own flashcards, etc)
5. cloud sync ? maybe look at flashcard formats from Anki or other open source tools and get them to play along

No idea how far I'll make it but I would really like to have this tool. So currently, I'm rather motivated.

#4  Frenzie 10-15-2019, 06:58 AM
Anki is definitely an interesting program. I've been experimenting with it myself over the past few months (i.e., instead of or in addition to writing unknown French vocab on paper, put it in Anki so the algorithm takes care of spacing it out).

Btw, I already added a (very) basic dictionary history one or two years ago.

Today's Posts | Search this Thread | Login | Register