matthayes / anki_cloze_anything

Add cloze deletions to any existing Anki notes without any modification to Anki
https://ankiweb.net/shared/info/330680661
Apache License 2.0
52 stars 10 forks source link

request : game changer ? my dreamed type of cloze #8

Open thiswillbeyourgithub opened 4 years ago

thiswillbeyourgithub commented 4 years ago

Hi,

After you implement the "reveal one by one" scheme, I'd like to share an idea.

What about "sub clozes" : cloze that work in the same way as usual BUT if your card contains {{c1.2:: it will create automatically a new sibling that clozes only the 1.2 part.

To illustrate why this would be useful : sometimes medstudents like I am have to remember tree like concepts, for example the decision tree when encountering a specific patient. For me, "reveal one by one" cards have been a game changer as I can now use them to do subquestions like {{c1::what do you do next ? }}{{c1:: check the pulse, what are the correct pulse values ?}}{{c1:: X to Y}} And if I forget only a subquestion, I can actually change c1 for c2 like so : {{c1::what do you do next ? }}{{c1:: check the pulse, what are the correct pulse values ?}}{{c2:: X to Y}} and this will automatically create a new card that will make me learn the detail I missed. I can then some other day turn back the 2 into 1 and delete the empty card.

But an issue with this is that as long as there is a 2nd card, the first 1 won't hide the detail. To fix this I use the duplicate card addon but it's very tedious.

So, are you interested in implementing a way to do subcloze ?

It could take the following form :

Another possibility would be :

I am quite often thinking about this but It's still not very clear what kind of system would work best. I got mixed up while writing this issue so I hope I'm making sense. At least I hope I can make it clear that there seems to be a very useful tool somewhere to be made and your js implementation is clearly the perfect framework to add this.

Have a nice day.

edit : btw, is it planned to be possible to use cloze that are inside one another for the reveal one by one feature ? Take the following example : Which muscle does X ? ((c1::the ((c1::in))ternal thingie)).

matthayes commented 4 years ago

Okay if I understand correctly it seems you basically want the ability to be able to do both "reveal one by one" and the traditional cloze from the same content in the same note. I think this is already achievable using my updated template linked in #6. The idea is to leverage the fact that my approach lets you add multiple cloze fields to a single note and generate notes from each of them. You generate cards from one field using the traditional cloze approach and generate another card from another field using the "reveal by one" approach.

Here's what I think you could do:

Usually you would be using the ExpressionClozeReveal field and leave the ExpressionCloze field blank. When you forget a subquestion you would copy the content into the ExpressionCloze field and add a cloze for the part you forgot. This would generate a new card for that part you forgot. Does this make sense?

I think this pretty much achieves what you wanted with the {{c1.2 scheme. That idea is interesting. I'll have to think about it some more. I'm afraid it might be a bit too use-case specific. I'm trying to keep the framework as simple and general as possible while allowing for certain use cases like this one to be easily achieved by the application of the templates and configuration.

thiswillbeyourgithub commented 4 years ago

Thanks for the answer.

I am certain this kind of workflow would be more intuitive to most. Naive anki users can't figure out clozing IMO.

I am short on time because of my exams so I try not to procrastinate my studies when focusing about this project. This means I won't change my workflow right now anyway.

But I will let this idea grow and will be sure to notify you if I get any insight.

Do you have any thought about clozes inside of clozes ? To reveal them one by one would be incredible, and I think this is quite intuitive.

edit : I feel bad for telling you you could ask me anything, sorry :/. I won't have the time to test your code for a while.

matthayes commented 4 years ago

No worries give it some thought and let me know later when you have time.

I haven't given any thought to clozes inside clozes so far. I'm not sure what it would mean to have a cloze inside another cloze.

I think there might be some sort of way to specify a grouping mechanism so that clozes can be grouped together when doing reveal one-by-one. Taking inspiration from your suggestion, a cloze can be represented either as cx of cx.y, where examples of the former are c1, c2, etc. and examples of the latter are c1.1, c1.2, etc. The .y portion of the latter can be used to dictate the reveal sequence, and the x portion serves as a grouping to dictate what card the clozes appear on.

thiswillbeyourgithub commented 4 years ago

I'm not sure what it would mean to have a cloze inside another cloze.

To me it doesn't have any interest if it's not in a revealonebyone cloze. It allows to hide subquestions inside clozes like so : Which muscle does X ? ((c1::the ((c1::in))ternal thingie))

This example is not really stellar I know but I think there is a real need for this

matthayes commented 4 years ago

What I meant really is that this syntax is not very intuitive to me. It's not clear to me what the logic is for what to reveal under what circumstances. I agree there's a need for reveal by one. I'm just unsure about the ideal way to represent it.

matthayes commented 4 years ago

If you have time it'd be helpful if you could explain the sequence of what is visible at each reveal step for this example you gave.

Which muscle does X ? ((c1::the ((c1::in))ternal thingie))
thiswillbeyourgithub commented 4 years ago

Here you go : Question : screenshot

After 1 shortcut : screenshot_1

After 2 shortcut : screenshot_2

The point of this is that when asked the question, it gives you a kind of second chance : you remembered that it was the rectangular muscle but suddenly you have to be sure that it's the internal and not the external rectangular muscle.

For med students it happens very often to be in this inbetween where you almost remembered correctly but it would have been great to think just one more second like this. And hitting again everytime is not a solution as med students have way too many cards.

If you care : I made the pictures using my template and this content :

Which muscle moves the arm sideways ?
{{c1::the }}{{c1::int}}{{c1::ernal rectangular muscle}}

So I had to click on the first and last red rectangle to show it like that, but in practice you can't do that to a cards as you don't know where rectangles begin and end.

Maybe another way to put it is that a limitation of clozolkor is that you can reveal until the next cloze but you can't show a bit of context that would be just after the important clozed section (here : clozolkor can't directly show ernal rectangular muscle)

matthayes commented 4 years ago

Okay got it, thanks for the explanation. Sorry for the late response but I've been mulling this over. My current thinking is to implement both reveal by one (#6) and this sub cloze idea of yours in one go because they're closely related. With the design I have in mind it's a pretty straightforward implementation I think which is also flexible. Hopefully it'll be useful to you. Let me know if you see any issues with it, in which case I may have to rethink things.

I'd like the reveal-one-by-one feature to be available through two methods. Assume you have a ExpressionCloze field where you have your clozed text.

With the second method, you can customize the order parts are revealed like so:

{{c1::c1::the }}{{c1::c2::int}}{{c1::c1::ernal rectangular muscle}}

I think this is pretty self explanatory. Basically it's like you have a subcloze for c1 where you specify the order and corresponds to the pictures you shared. This is like you c1.1 idea with a different syntax. The exact syntax I go with may change as I work on updating the plugin. It depends on what is most practical to implement given Anki's code.

With the ability to specify the sequence as in the above example, you can achieve the same sequencing as in ((c1::the ((c1::in))ternal thingie)). I may end up supporting this syntax too, we'll see. It would be pretty trivial to transform that into the {{c1::c1::the }}{{c1::c2::int}}{{c1::c1::ernal rectangular muscle}} form internally.

matthayes commented 4 years ago

By the way here's a current live rendering of what I implemented so far from the previous time I posted about this. I forgot you can view this without downloading the HTML file. This is the method for the first bullet point above.

https://htmlpreview.github.io/?https://github.com/matthayes/anki_cloze_anything/blob/click_to_reveal/examples/front.html