--- license: other license_name: fsrs-anki-20k license_link: LICENSE --- # Update We have released a new dataset: [anki-revlogs-10k](https://huggingface.co/datasets/open-spaced-repetition/anki-revlogs-10k). # Introduction FSRS-Anki-20k is a dataset of 20k collections from Anki for FSRS project. It is a random sample of collections with 5000+ revlog entries, so it should contain a mix of older (still active) users, and newer users. Entries are pre-sorted in (cid, id) order. There are two versions of the dataset: `./revlogs` and `./dataset`. The `./revlogs` version contains the raw revlog entries, while the `./dataset` version contains the dataset preprocessed by `./revlogs2dataset.py`. The size of the raw revlog entries is ~50GB, and the size of the preprocessed dataset is ~20GB. # Data Format ## Revlogs Please see the protocol buffer definition in [stats.proto](./stats.proto). For the fields that are not self-explanatory, please refer to the [Anki Database Structure](https://github.com/ankidroid/Anki-Android/wiki/Database-Structure). ## Dataset The columns of the dataset are as follows: - card_id: the unique identifier for each flashcard. - review_th: the ordinal number of the review among all reviews done by the user. - elapsed_days: the number of days since the last review of this flashcard. -1 if this is the first review. - elapsed_seconds: the number of seconds since the last review of this flashcard. -1 if this is the first review. - rating: the rating given by the user for this review, 1: again, 2: hard, 3: good, 4: easy. Where only 'again' indicates a failed recall, and all other scores indicate a successful recall. - state: the state of the flashcard, 0: new, 1: learning, 2: review, 3: relearning, 4: filtered. - duration: the duration of the review in milliseconds. # Preprocess 1. read the revlog entries from the .revlog file. 2. remove the revlog entries generated by reviews in filtered decks when the user disables the option "[Reschedule cards based on my answers in this deck](https://docs.ankiweb.net/filtered-decks.html?highlight=Reschedule%20cards%20based%20on%20my%20answers#rescheduling)". 3. remove the revlog entries generated by manual (re)scheduling like [Forget](https://docs.ankiweb.net/studying.html?highlight=Forget%20card#editing-and-more) and [Set Due Date](https://docs.ankiweb.net/studying.html?highlight=set%20due%20date#editing-and-more). 4. keep the revlog entries from the latest learning start sequence for each flashcard. 5. calculate the time between reviews of each flashcard (elapsed_days & elapsed_seconds), review order (review_th), and encode card_id numerically. 6. save the dataset to a .csv file. # License This dataset is released under the [FSRS-Anki-20k License](LICENSE). # Related Projects [SRS Benchmark](https://github.com/open-spaced-repetition/fsrs-benchmark)