Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about the Anki learning scheme #7

Open
Szybet opened this issue Oct 8, 2022 · 5 comments
Open

Question about the Anki learning scheme #7

Szybet opened this issue Oct 8, 2022 · 5 comments

Comments

@Szybet
Copy link

Szybet commented Oct 8, 2022

Hello

How does this app support the Anki database, learning scheme? is it full? what resources did you use to reverse engineer it?

im the developer of sanki and im interested to develop this in my own app

Maybe we could write a library in rust to handle Anki backend?

Im open for discussion and collaboration

@TBS1996
Copy link
Owner

TBS1996 commented Oct 9, 2022

Hello!

I'm not sure what you mean with it being full.
For reverse engineering it i used this page: https://github.com/ankidroid/Anki-Android/wiki/Database-Structure
All the code related to parsing the database can be found at src/utils/widgets/load_cards.rs, so feel free to copy as you please, it's FOSS after all. the TLDR is that I made structs representing the various tables with the fields that are relevant, used hashmaps to connect the IDs that refer to each other, and regex to parse the various text-fields! The code isnt that clean atm, making it work was a frustrating experience enough x)

About the library part, while I'm a bit busy developing this and looking for a rust job, I suppose it wouldn't be that hard since that single file does most what you need already. Anyway, you could read through it and tell me your thoughts

@Szybet
Copy link
Author

Szybet commented Oct 11, 2022

Well as I see you don't use the Anki learning scheme ( repetition algorithm )? Point me to the code if im wrong. This is the part that im also missing in my app.

I also don't have time for the library right now. The idea I have is if one of two of us starts to work on the full support for Anki learning scheme, then to do this as a rust crate, for easier use in other programs / easier to contribute

@TBS1996
Copy link
Owner

TBS1996 commented Oct 11, 2022

ah, I thought you were only referring to the database. About the repetition algorithm, I didn't base it on anything existing, I just made my own super basic version. I'm planning to use machine learning eventually so I'm not going to spend time hand-tuning the algorithm just to scrap it away later anyway. You can find the algorithm in src/utils/interval.rs

so about the library, you mean basically an sm-2 algorithm?

@Szybet
Copy link
Author

Szybet commented Oct 11, 2022

Thats what i thought, thats what im also planning... I would like to avoid that and make full Anki support

The one that Anki uses, with integration with the anki database oob, yes

@vimist
Copy link

vimist commented Oct 16, 2022

I realise that neither Speki nor Sanki are written in Python, but I was looking to create terminal based spaced repetition software a while ago (which I never got around to) and came across a library called ebisu that at first glance looked promising. Just thought I'd leave a note here in case it's of any use to either of you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants