l3kn / org-fc

Spaced Repetition System for Emacs org-mode
https://www.leonrische.me/fc/index.html
GNU General Public License v3.0
259 stars 31 forks source link

Enhancement: allow multiple occurences of the same cloze deletion item #46

Open jcbagneris opened 4 years ago

jcbagneris commented 4 years ago

In e.g. the context of languages learning, it is quite common to have more than one example for the same word:

Je {{vois}@0} Lisa - I see Lisa Je {{vois}@0} le {{chat}@1} - I see the cat

It would be useful then that the two items marked 0 be reviewed together as a unique one. As far as I can see, this is currently not the case: I tried and the two items where reviewed separately, and there are two position 0 entries in the REVIEW_DATA drawer, which is not really useful (and might create problems later, I did not check the code yet).

Of course, if I mark these two items with different numbers, or don't mark one of them, the review is not meaningful as the answer is visible on the next line in the card.

As a final note, this works as (I) expected in e.g. Anki: cloze deletion items with the same number in a given card are considered as a unique item, and are reviewed together.

Any thought?

l3kn commented 4 years ago

This sounds like an useful feature!

Org-fc assumes there's only one cloze "hole" per ID (e.g. @0, @1), collects a list of all holes in a card and then uses the position of the current hole in this list to determine which parts of the card should be hidden.

Allowing multiple holes with the same ID leads to problems with the "enumeration" cloze card type, e.g. when I add a new first item later (so it has a higher id), during a reviewing of @2, holes @0 and @1 should be hidden, because they appear later in the card

- {{foo}@2}
- {{bar}@0}
- {{baz}@1}

Do you know if Anki has a similar card type? If so, how does it deal with this issue?

jcbagneris commented 4 years ago

As far as I know, Anki (core) only has one type of cloze deletion cards, the standard 'deletion one. I did not investigate, but if the 'enumeration type exists, it is probably only through a plugin.

I don't think that allowing more than one hole per ID for the enumeration type is necessary (or even useful, btw). As you explain, it leads to problems rather than helping in any way.

But as a first step, allowing more than one hole per ID for the standard cloze 'deletion (and maybe the 'single) type would be more than enough.

I think it would cover 90% of the use cases -- at least for me :)