INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Find songs that don't have title in lyrics  (Read 782 times)

MarkCoutinho

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 676
Find songs that don't have title in lyrics
« 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!
Logged
Mark Coutinho
Dutch Top 40 collector of lyrics, sleeves and bios

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2033
Re: Find songs that don't have title in lyrics
« Reply #1 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
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: Find songs that don't have title in lyrics
« Reply #2 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 :)

EnglishTiger

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1084
Re: Find songs that don't have title in lyrics
« Reply #3 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"
Logged
Apple Mac Mini Desktop Computer with M4 Pro chip with 12 core CPU and 16 core GPU: 24GB Unified Memory, 512GB SSD Storage, Gigabit Ethernet, 3 Thunderbolt5 + 2USBC ports.

MarkCoutinho

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 676
Re: Find songs that don't have title in lyrics
« Reply #4 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?
Logged
Mark Coutinho
Dutch Top 40 collector of lyrics, sleeves and bios

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: Find songs that don't have title in lyrics
« Reply #5 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
Logged

MarkCoutinho

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 676
Re: Find songs that don't have title in lyrics
« Reply #6 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!
Logged
Mark Coutinho
Dutch Top 40 collector of lyrics, sleeves and bios

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2619
Re: Find songs that don't have title in lyrics
« Reply #7 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!,)

Logged

MarkCoutinho

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 676
Re: Find songs that don't have title in lyrics
« Reply #8 on: February 03, 2023, 03:40:30 pm »

Thanks a lot! I'll give it a go and see how far I get.
Logged
Mark Coutinho
Dutch Top 40 collector of lyrics, sleeves and bios
Pages: [1]   Go Up