Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

rule "cloze answers contained in" should not work for few words #24

Closed
thiswillbeyourgithub opened this issue May 5, 2021 · 3 comments

Comments

@thiswillbeyourgithub
Copy link

Hi,

I don't think it's a good idea for this rule to be working for less than 3 words. For example I sometimes have a cloze that is a yes no question, so having {{c1::3}} causes like 130 cards to be buried just because they contain the number 3.

I think it would be more sensible to ignore this rule if there is less than 3 words in the cloze OR if it contains something else than words (numbers typically)

@AlexRiina
Copy link
Owner

AlexRiina commented Jun 25, 2021

Hm I think that should already be protected against. In the README.md, I have

This test is limited to answers with at least 4 characters and requires a word break surrounding the answer to protect against some common cases like testing the spanish article for water with {{c1::el::el / la}} agua from suppressing all cards containing el.

and I have a test that's supposed to be protecting against that case in https://github.com/AlexRiina/anki_cousins/blob/master/src/settings.py#L247 which can be read as "ensure the answer in 'Phase {{c1::2::#N}} clinical trial' is not considered contained in '2 x 2'"

I think all of the rules actually have something like this baked into them. You can sort of trick the prefix test into matching small words by setting a really low threshold but everything else seems safe.

Would you mind trying to reproduce this with just one rule active and post the notes that trigger the issue? I usually do my debugging in a test profile since this plugin doesn't have temporarily "disable rule" functionality.

@thiswillbeyourgithub
Copy link
Author

Thanks a lot for the answer. Unfortunately I won't do as many reviews during the summer so I prefer to see if the problems is really an issue or not after the summer :)

Thanks for the addon!

@AlexRiina
Copy link
Owner

Cheers! Feel free to reopen this issue if you're able to reproduce after the summer (don't let your reviews stack up though!)

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

No branches or pull requests

2 participants