obsidian-spaced-repetition
obsidian-spaced-repetition copied to clipboard
[BUG] Obsidian SRS ignores more than one tag
Describe the bug Obsidian SRS ignores more than one tag. It seems as if the algorithm stops assigning a card/note to decks after it matched the first tag it knows.
To Reproduce
- Create this flashcard:
---
tags:
- flashcard
- flashcard/test
- flashcard/test2
- otherFlashcardTag
---
**Spaced repetition** is an **evidence-based** learning technique that is usually performed with **flashcards**.
Newly introduced and more difficult flashcards are shown **more frequently**.
- Add #
otherFlashcardTagto the list of flashcard tags. - Open the review modal.
- The card will be filed under
flashcardonly.
Expected behavior The card should be IMHO filed under
flashcardflashcard/testflashcard/test2andotherFlashcardTag
I would at least expect the card to filed under flashcard and otherFlashcardTag. It would be best if it belonged to all three decks.
Use case: A flashcard for marketing that is about market research and customer behaviour.
I'd file the card under #marketing/marketResearch and #marketing/customerBehaviour and maybe cognitiveBias. So, I'd like to study the card if I study the marketing/marketResearch or the marketing/customerBehaviour deck or the whole marketing deck if got a lot of time. Furthermore I'd like to see the card if I study cognitiveBiases.
Screenshots
Shows the file and that it only belongs to the flashcard deck.
List of tags
Versions (please complete the following information):
- OS:
Manjaro Linux - Obsidian version:
v0.15.9 - Plugin version:
v1.8.0 - If on desktop, Installer version:
5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) obsidian/0.15.9 Chrome/100.0.4896.160 Electron/18.3.5 Safari/537.36
Hi @putzwasser @pikatwinky @MostlyArmless
I might be able to look at the merge conflict https://github.com/st3v3nmw/obsidian-spaced-repetition/pull/506, but first have a note regarding functionality.
#flashcards/tag1
#flashcards/tag2
#flashcards/tag3
question1::answer1
#flashcards/tag4
#flashcards/tag5
question2::answer2
From a look at the PR, all questions will be included in the complete set of decks #flashcards/tag1... #flashcards/tag5.
There would be an argument for the following deck assignment:
question1 - #flashcards/tag1, #flashcards/tag2, #flashcards/tag3
question2 - #flashcards/tag4, #flashcards/tag5
However, this would be different to what is in the PR, (and harder to implement).
Also, not sure if the PR handles multiple inline tags within a question, such as:
#flashcards/tag6 #flashcards/tag7 #flashcards/tag8 question3::answer3
Cheers Ronny
Hi Ronny! Yes, i think the design you described here would be the ideal case, and i understand it could be more complex to implement this:
There would be an argument for the following deck assignment: question1 - #flashcards/tag1, #flashcards/tag2, #flashcards/tag3 question2 - #flashcards/tag4, #flashcards/tag5
In my humble opinion, I see the usefulness of this PR, for the time being, as long as (following your example) once you review question1 in any of the decks #flashcards/tag1... #flashcards/tag5 it dissapears from the rest of them as well. I don't know if this is the actual behaviour of this PR?
Hi @putzwasser, I agree about...
In my humble opinion, I see the usefulness of this PR, for the time being, as long as (following your example) once you review
question1in any of the decks#flashcards/tag1... #flashcards/tag5it dissapears from the rest of them as well. I don't know if this is the actual behaviour of this PR?
Regarding counting, I suggest that the card is included in each deck in which it is tagged.
However it should only be counted once for any decks that are common ancestors. For example:
#flashcards/subject1/topic1
#flashcards/subject1/topic2
#flashcards/subject2/topic3
question1::answer1
I.e. question1 would be counted once in each of the following decks:
#flashcards/subject1/topic1
#flashcards/subject1/topic2
#flashcards/subject2/topic3
#flashcards/subject1
#flashcards/subject2
#flashcards
Specifically, not counted twice for #flashcards/subject1, even though it appears in two subdecks.
@MostlyArmless how is pull request https://github.com/st3v3nmw/obsidian-spaced-repetition/pull/506 going? I might be able to work on this if you are too busy
Regards Ronny
Hi @MostlyArmless. Are you ok with @ronzulu solving the #506 merge conflicts?
Thanks for your kindly help Ronny, i think this overlapping functionality is gonna be an amazing addition to this fantastic plugin
@pikatwinky @ronzulu yes, if you have time to resolve the merge conflicts please go ahead I haven't had time to fix them myself due to the holidays.
Actually, it's a little more involved than we thought, because questions can have their own question specific tags.
So for example:
#flashcards/tag1
#flashcards/tag2
#flashcards/tag3
question1::answer1
question2::answer2
#flashcards/tag4 question3::answer3
question4::answer4
The existing functionality would have:
question1,question2,question4within deck#flashcards/tag1(ignoring tag2 and tag3)question3, within deck#flashcards/tag4
But if we simply look for all tags in the note then question1, question2, question4 will be assigned to:
- decks
#flashcards/tag1,#flashcards/tag2,#flashcards/tag3 - and unintentionally
#flashcards/tag4
This means that we can't use the obsidian function getAllTags that is currently used as it doesn't give any info about where in the note the tag is located:
export function getAllTags(cache: CachedMetadata): string[] | null;
Fortunately there appears to be richer tag info available from:
CachedMetadata
tags?: TagCache[];
The location info within TagCache will need to be compared with info from the parser to determine if a tag is question specific or not.
This will take more time to implement...
Cheers Ronny
Hi all, I have completed the update but would appreciate beta testing and feedback before I finalise the PR.
The draft PR together with the updated code is available at: https://github.com/st3v3nmw/obsidian-spaced-repetition/pull/834
Cheers Ronny
Released into 1.12.0
Now, unrelated tags are shown as well, which makes the whole appearance a bit messy. E.g. my tag for marking flashcards is "#flashcard", but sometimes there are a couple other unrelated tags added to the note, like date tags and so on. Now the UI is clustered with all unrelated tags as well, not only the #flashcard tag and its sub-tags (#flashcard/sub1).
Thanks for reporting this, but I can't reproduce the problem.
Please open a new issue and post your markdown file (attachment, not copy/paste), as well as a screenshot of the card selection modal. I assume when you say "Now the UI is clustered..." the card selection modal is what you mean.
Also please post your settings file, e.g.:
D:\Obsidian\Obsidian\.obsidian\plugins\obsidian-spaced-repetition\data.json
Cheers Ronny