INTERACT FORUM

More => Old Versions => JRiver Media Center 30 for Windows => Topic started by: MarkCoutinho on February 02, 2023, 02:41:56 pm

Title: Find songs that don't have title in lyrics
Post by: MarkCoutinho on February 02, 2023, 02:41:56 pm
Is there anyone in this community that knows how to 'program' this query in MediaCenter?

all songs that don't have the title in the lyrics

For instance: if the title is 'What about us' and the lyrics don't contain this 'sentence', than it should be included in the results.

Help would be highly appreciated!
Title: Re: Find songs that don't have title in lyrics
Post by: lepa on February 02, 2023, 03:55:46 pm
Something like this as a custom rule for view. Or in pane you could make search list category using this as a filter
[=Find([Lyrics],[Name])]=-1
Title: Re: Find songs that don't have title in lyrics
Post by: marko on February 02, 2023, 10:39:54 pm
"What's Up" by Four Non Blondes should be in there.

There's not many chart hits like that. I think The Beatles had one, I'm not sure. Anyone else? Google is not allowed :)
Title: Re: Find songs that don't have title in lyrics
Post by: EnglishTiger on February 02, 2023, 11:17:11 pm
Something like this as a custom rule for view. Or in pane you could make search list category using this as a filter
[=Find([Lyrics],[Name])]=-1

Unfortunately this test can return "False Negatives"
i.e. searching for the Track Name "4 Real" in the lyrics of Avril Lavign's track of that name will not find the Track Name in the lyrics, because the lyrics contains multiple instances of "for real" not "4 real"
Title: Re: Find songs that don't have title in lyrics
Post by: MarkCoutinho on February 03, 2023, 01:50:06 am
Something like this as a custom rule for view. Or in pane you could make search list category using this as a filter
[=Find([Lyrics],[Name])]=-1

That's a good start! Thanks!
However: a comma (,) which isn't in the title but is in the lyrics (i.e. I Need You I Want You, versus 'I need you, I want you') should be excluded. Could you please include that variable in the query?
Title: Re: Find songs that don't have title in lyrics
Post by: zybex on February 03, 2023, 04:44:02 am
You need a FuzzyFind() which MC doesn't have  :P

This may work for you:
[=Find(replace([Lyrics],/,,), replace([Name],/,,))]=-1

Or to ignore all puctuation (this will be slow if you have thousands of songs):
[=Find(replace(regex([Lyrics],/(\w+/),-2),;,), replace(regex([Name],/(\w+/),-2),;,))]=-1

edit: missing parenthesis
Title: Re: Find songs that don't have title in lyrics
Post by: MarkCoutinho on February 03, 2023, 05:31:34 am
You need a FuzzyFind() which MC doesn't have  :P

This may work for you:
[=Find(replace([Lyrics],/,,), replace([Name],/,,)]=-1

Or to ignore all puctuation (this will be slow if you have thousands of songs):
[=Find(replace(regex([Lyrics],/(\w+/),-2),;,), replace(regex([Name],/(\w+/),-2),;,))]=-1

That's a pretty good one! The first one didn't work (probably a typo by you), but the second one does.

I've got some Dutch lyrics issues that aren't solved with this. And I don't want to keep on asking to add a line or variable to the query, so here's my question:

i.e.: Title is "Dit is mijn fiets" and Lyrics says "Dit is m'n fiets"

How do I add a line so that in this case "mijn" is replaced by "m'n" ?
In this case: the title and the lyrics are the same - it's just the way it's pronounced that's different.

(other examples are "zijn" versus "z'n"; "het" versus "'t" etc.)

Thanks again!
Title: Re: Find songs that don't have title in lyrics
Post by: zybex on February 03, 2023, 06:01:23 am
That's a pretty good one! The first one didn't work (probably a typo by you), but the second one does.
Missing parenthesis is now fixed.

Quote
How do I add a line so that in this case "mijn" is replaced by "m'n" ?
In this case: the title and the lyrics are the same - it's just the way it's pronounced that's different.

(other examples are "zijn" versus "z'n"; "het" versus "'t" etc.)

There are way too many variants like that, you would need that FuzzyMatch() function (which MC does not have) to compute a match percentage instead of simply searching for a string. Google "Levenshtein distance", it's not something that can be done in a simple expression.

That said... you can do an exhaustive search/replace, just keep adding nested "replace" calls to the first 2 lines below. Put it in a computed field/column for more readability:

save(replace(replace(replace(replace([Lyrics],mijn,m'n),zijn,z'n),het,t),4,for), _lyrics)/
save(replace(replace(replace(replace([Name],mijn,m'n),zijn,z'n),het,t),4,for), _name)/
if(isEqual(Find(replace(regex([_Lyrics],/(\w+/),-2),;,), replace(regex([_Name],/(\w+/),-2),;,)),-1),Lyrics mismatch!,)

Title: Re: Find songs that don't have title in lyrics
Post by: MarkCoutinho on February 03, 2023, 03:40:30 pm
Thanks a lot! I'll give it a go and see how far I get.