Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 10-12-2019, 08:31 PM   #1
mintwurm
Junior Member
mintwurm began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2019
Device: Libra h2o
Plugin development: search in dictionary

Does the lua API expose dictionary lookups? I would like to create a plugin that automates some text translations.
mintwurm is offline   Reply With Quote
Old 10-13-2019, 09:07 AM   #2
Frenzie
Guru
Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.
 
Posts: 822
Karma: 135782
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
It sounds like you may want something other than dictionary lookups?

http://koreader.rocks/doc/modules/ui...ator:translate

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.
Frenzie is offline   Reply With Quote
Old 10-15-2019, 06:04 AM   #3
mintwurm
Junior Member
mintwurm began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2019
Device: Libra h2o
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 https://github.com/koreader/koreader/issues/5490 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.
mintwurm is offline   Reply With Quote
Old 10-15-2019, 07:58 AM   #4
Frenzie
Guru
Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.Frenzie has rectified all his or her action issues with transformational deconfliction.
 
Posts: 822
Karma: 135782
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
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.
Frenzie is offline   Reply With Quote
Reply

Tags
api, development, lua, plugin, translation

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plugin Development KevinH Plugins 454 11-17-2019 11:29 AM
Dictionary plugin in Sigil? For example Oxford-English Dictionary. Rindr Plugins 2 03-04-2018 12:11 PM
Loading Plugin in development Sladd Development 6 06-17-2014 07:57 PM
DR800 Plugin development for DR800/DR1000 yuri_b iRex Developer's Corner 0 09-18-2010 10:46 AM
Device plugin development reader42 Plugins 10 03-29-2010 01:39 PM


All times are GMT -4. The time now is 09:55 AM.


MobileRead.com is a privately owned, operated and funded community.