Quote:
Originally Posted by Gary_M_Mugford
I don't use the tag browser when 'constructing' my multiple searches onto a single line. Done in notepad and then copied as a single line. For example, (tags:"=Thriller" or tags:"=Suspense" or tags:"=Romantic Suspense" or tags:"=Suspense/Thriller" or tags:"=Action & Adventure") gives me back about 5900 books while adding the negation (or which I knew how to do this far) of ((tags:"=Thriller" or tags:"=Suspense" or tags:"=Romantic Suspense" or tags:"=Suspense/Thriller" or tags:"=Action & Adventure") and not (tags:"=Mystery") returns only 4000.
Two issues arise of course, the negation doesn't catch Mystery/Thrillers, of course. Using the tag browser to ctrl click on every Mystery variant is certainly doable, if daunting. Secondly, the negation I was talking about was in the regex/program area. So, strictly speaking, I was incorrect in attributing it strictly to my python ignorance. It's as much regex as Python. I use regex at it's most basic levels because my own programming relies on a masking language that is somewhere south of Regex and not exactly a full-blow implementation.
When, or if, you find away to break apart the tags and use smart matching so that I can construct my own set of logical statements to compare fragments, so that Mystery==Mystery/Thrillers==mysteries by comparing for myster, then I think I can carry the ball the rest of the way. It'll probably be slower'n molasses, but I'll adapt it.
An AI solution won't be perfect. But neither is my eyesight OR my memory these days.
|
If you want to match all tags that
contain the word "Mystery" then remove the equal sign.
Searches don't use regex, though you can "search" using a custom column, where if certain fields match certain regexes, the value is set to "Yes" or something. I bet we could work something out.
Negation in regex is quite simple, as far as it goes. You can match "Mystery" but not "Mystery/Thrillers" with the regex "Mystery(?!/Thrillers)". By creating a capture group of form (?regex) you will match only when that string is there, but not include the string in the result; perhaps more useful is (?!regex) where the ! negates it.