Upper Case eRRors


#1

I am really deeply profoundly sorry if I have already asked about it*, but how do I find all instances of:

two capital letters, which are beginning of a word and that are followed by at least one small letter?

The preferable method would be via column and not Filter box, I think. But Please note that I say two, because that is the most likely to happen: when typing the beginning of a name / title I either hold SHIFT a little too long or press CAPS LOCK a little too late [and thus end up with some NAme / TItle]

[* In my notes I have written about this issue as if I have some ready to execute code- but I can not find it, neither offline in my files or online on the forum]


#2

This filter expression should do it ...
ARTIST MATCHES "(?-i)^\u\u\l"

DD.20180103.0824.CET


#3

Thank you, but this seems to be working only if the word happens to be the very first word in the tag field. So it does help only with those cases when a band or song in a single word [and I made an error somewhere further along the lines]

And so:

a] how to cover further words?

b] how to cover all of tag fields at once?

c] how to rework it into a code for column?


#4

Sorry, I read your question not carefully enough.
Try this ...
* MATCHES "(?-i)\b\u\u\l"

DD.20180104.1840.CET


#5

How should this method work within a column description?

How should such a column field tell about an error case anywhere in the tagfields within this file?
How should such a column field tell about an error case for a specific tagfield within this file?

Why should such a file related method be more suitable than the Mp3tag Filter?

DD.20180104.1900.CET


#6

Yes, that works, thank you

And so I only need to replace the * with a name of the tag field if I want to narrow the results

[It seems I had only one such real eRRor and 5 out of 10 suspected cases come on the account of the TITLE; among overall number of 17 500 files]

I do not know. That is why I am asking

Yes, now it seems obvious also to me that if this would not be limited to just one field it would be very complicated; that it would need to have some sort of list of specific tag fields

But I do not see how it should be impossible to limit this just to one field; to be able to show something like literally "eRRor" when there is one ans show nothing or "OK" when there is none

Convenience

When it is time for me to perform a search for all kinds of errors and missing info [like before making a copy on a external drive] I go into "Cutomize colums..." and just turn on a properly named columns that are inactive 99.999% of the time I use Mp3tag [to save horizontal space]. I can sort then by a number of corrections I need to make; and I can also relatively easily combine them with some filter expressions [as I do not have to combine two filter expressions and wonder if there were "melted" together properly or if the Filter Box just does not show me anything because there is nothing to be shown because there are no errors]. And most of all, I do not have to copy various filter expressions from some TXT file and go back and forth between them [but I do copy some filter expressions, as I already have some that I was not able to turn into codes for columns]


#7

If you know which fields you want to check you could try something like this for a column value

$if($eql($regexp(%comment%|%title%|%artist%|%composer%|%_filename%,.(\b\u\u\l).,eRRor),eRRor),eRRor,OK)

The %_ALL% expression doesn't seem to work here.


#8

This seems to work nicely, thank you

How about reworking it to show cases when the capital errors are within [so also at the end of] a word?

Because to be very precise your code should be like this

$if($eql($regexp(%comment%|%title%|%artist%|%composer%|%_filename%,.*(\b\u\u\l).*,ERror),ERror),ERror,OK)

as it only looks at the beginning of a word [and thus it is more appropriate to show an "ERror" mark than "eRRor"]

The current version will always for example show me songs by [correctly written] "DJs From Mars" but not by "DJ FrOM MARs" [if I should ever make such an unlikely mistake]


#9

How about replacing \b\u\u\l with just \u\u

That would show any 2 consecutive upper case letters


#10

Any means also at beginning. So "DJs From Mars” would be reported. A rare case

And it means I would get every roman numerals reported as an error. A common case




So I think the concept has to be changed / expanded: it is most likely correct to have whole word written in capitals and to start with as many capitals as you want - but it most likely not correct to have capitals after even one lowercase

And so now I can use this

$if($eql($regexp(%TITLE%|%ARTIST%,.*(\b\u\u\l).*,ERror),ERror),ERror,OK)

to check if those are not some rare correct cases [like DJs From Mars]. But then I would also had to use a second column to find potential ErRors, ErRORs and ErrorS


#11

You can use rather complicated expressions in the "value" field of a column. So you could also construct logical chains with $or() and $and().
Which might mean that you do not need additional columns.


#12

I modified the code to this form

$if($eql($regexp(%TITLE%|%ARTIST%,.*(\b\w+\u\u).*,eRROR),eRROR),eRROR,OK)

Now it takes care of possible musical abbreviations like DJs and MCs, not reporting them as errors. So to be extra precise, it does not as much as take care of them but takes the out of the equation] But at the same time it finds all double capitals further down a word; which will be most likely an error. [And it also does not falsely report roman numerals, which was something occurring when I starter tempering with the code trying out different variants]

This is the most efficient version I think which is also still a simple one. As I am not trying to think of about every very rare possibility that can happen


But how do I not use multiple Columns, one for TITLE errors, another for ARTIST errors, third for ALBUM etc., but at the same time I get the info that is also pin pointing the source of the error [the name of the tag field]?

Such modification / extension

($if($eql($regexp(%TITLE%|%_FILENAME%,.*(\b\w+\u\u).*,eRROR in TITLE or FILENAME),eRROR in TITLE or FILENAME),eRROR in TITLE or FILENAME,OK))
$or
($if($eql($regexp(%ARTIST%,.*(\b\w+\u\u).*,eRROR in ARTIST),eRROR in ARTIST),eRROR in ARTIST,OK))

is obviously not working properly [but it shows exactly what I am aiming for now]


#13

Note: This new forum software corrupts old messages!

This is the correct reading in the new forum syntax:
* MATCHES "(?-i)\b\u\u\l"

DD.20180305.1816.CET