IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

2 Pages V  < 1 2  
Reply to this topicStart new topic
"Undoing" AutoCapitilise ?
odyssey
post Nov 9 2008, 19:20
Post #26





Group: Members
Posts: 2296
Joined: 18-May 03
From: Denmark
Member No.: 6695



QUOTE (Lyx @ Nov 8 2008, 03:09) *
P.S.:

Doing such replacement operations for MC can result in false matches, because there IS an abbreviation which is capitalized as "Mc". You dont want "Mc Donalds" turned into "MC Donalds", right? For that case, better do a manual DB search and then apply a fix to handselected set of tracks.

I took that into account by replacing any Mca > McA, Mcb > McB etc. Ugly, but very good!

For anyone interested, this is what I do:

CODE
$replace($caps2(%title%),'[','(',']',')',N''',n''','''N,'''n,'''N''','''n''', ?,?, !,!,  , ,Inch,",Th ,th ,Feat.,feat.,Feat ,feat. ,Featuring ,feat. ,Ft ,feat. ,Ft. ,feat. ,Versus ,vs. ,Vs , vs.,Vs.,vs.,Pres.,pres.,Pres ,pres. ,Presents ,pres. ,Present ,pres. ,Meets ,meets ,Van ,van ,Von ,von ,Mc ,MC ,Dj,DJ,A ,a ,An ,an ,The ,the ,And ,and ,But ,but ,Or ,or ,Nor ,nor ,At ,at ,By ,by ,For ,for ,From ,from ,In ,in ,Into ,into ,Of ,of ,Off ,off ,On ,on ,Onto ,onto ,Out ,out ,Over ,over ,To ,to ,Up ,up ,With ,with ,Mca,McA,Mcb,McB,Mcc,McC,Mcd,McD,Mce,McE,Mcf,McF,Mcg,McG,Mch,McH,Mci,McI,Mcj,McJ,Mck,McK,Mcl,McL,Mcm
,McM,Mcn,McN,Mco,McO,Mcp,McP,Mcq,McQ,Mcr,McR,Mcs,McS,Mct,McT,Mcu,McU,Mcv,McV,Mcw,McW,Mcx,McX,Mcy,McY
,
Mcz,McZ)


It also does it best, lowercasing all words that shouldn't be uppercased smile.gif


--------------------
Can't wait for a HD-AAC encoder :P
Go to the top of the page
+Quote Post
Mar2zz
post Nov 9 2008, 20:20
Post #27





Group: Members
Posts: 669
Joined: 5-September 07
From: Netherlands
Member No.: 46810



What is the order of process in your string, odyssey?
Caps2 capitalizes every first letter in a word, but then you replace every To with to, With with with ^^...

Does it recognize a song titled With You, where With should stay capitalized?


--------------------
http://www.youtube.com/watch?v=whoj6BOSfE4 (foob.fm)
Go to the top of the page
+Quote Post
odyssey
post Nov 9 2008, 22:27
Post #28





Group: Members
Posts: 2296
Joined: 18-May 03
From: Denmark
Member No.: 6695



QUOTE (Mar2zz @ Nov 9 2008, 20:20) *
What is the order of process in your string, odyssey?
Caps2 capitalizes every first letter in a word, but then you replace every To with to, With with with ^^...

Does it recognize a song titled With You, where With should stay capitalized?

It capitalizes first letter on all words, and corrects words that should stay lowercase.


--------------------
Can't wait for a HD-AAC encoder :P
Go to the top of the page
+Quote Post
Purple Monkey
post Nov 10 2008, 00:13
Post #29





Group: Members
Posts: 473
Joined: 25-June 05
Member No.: 22962



I think Mar2zz meant that if you have the title "into the breach" it should become "Into the Breach" not "into the Breach." i.e the first letter should always be capitalised.
Go to the top of the page
+Quote Post
odyssey
post Nov 10 2008, 09:36
Post #30





Group: Members
Posts: 2296
Joined: 18-May 03
From: Denmark
Member No.: 6695



I see it now. It's true with the string I posted, but the one I use is a little more complicated and takes that into account smile.gif I'll post it later maybe wink.gif


--------------------
Can't wait for a HD-AAC encoder :P
Go to the top of the page
+Quote Post
Mar2zz
post Nov 10 2008, 11:17
Post #31





Group: Members
Posts: 669
Joined: 5-September 07
From: Netherlands
Member No.: 46810



That could be solved with nesting your string inside $caps($left(%title%,1) if I am correct.

like this:
CODE
$caps($left($replace($caps2(%title%),'[','(',']',')',N''',n''','''N,'''n,'''N''','''n''', ?,?, !,!,  , ,Inch,",Th ,th ,Feat.,feat.,Feat ,feat. ,Featuring ,feat. ,Ft ,feat. ,Ft. ,feat. ,Versus ,vs. ,Vs , vs.,Vs.,vs.,Pres.,pres.,Pres ,pres. ,Presents ,pres. ,Present ,pres. ,Meets ,meets ,Van ,van ,Von ,von ,Mc ,MC ,Dj,DJ,A ,a ,An ,an ,The ,the ,And ,and ,But ,but ,Or ,or ,Nor ,nor ,At ,at ,By ,by ,For ,for ,From ,from ,In ,in ,Into ,into ,Of ,of ,Off ,off ,On ,on ,Onto ,onto ,Out ,out ,Over ,over ,To ,to ,Up ,up ,With ,with ,Mca,McA,Mcb,McB,Mcc,McC,Mcd,McD,Mce,McE,Mcf,McF,Mcg,McG,Mch,McH,Mci,McI,Mcj,McJ,Mck,McK,Mcl,McL,Mcm
,McM,Mcn,McN,Mco,McO,Mcp,McP,Mcq,McQ,Mcr,McR,Mcs,McS,Mct,McT,Mcu,McU,Mcv,McV,Mcw,McW,Mcx,McX,Mcy,McY
,Mcz,McZ),1)


This post has been edited by Mar2zz: Nov 10 2008, 11:22


--------------------
http://www.youtube.com/watch?v=whoj6BOSfE4 (foob.fm)
Go to the top of the page
+Quote Post
odyssey
post Nov 10 2008, 13:21
Post #32





Group: Members
Posts: 2296
Joined: 18-May 03
From: Denmark
Member No.: 6695



AFAIR, that's exactly what I'm doing. The reason it's not included in my previous post, is that I put this in a variable before further processing smile.gif


--------------------
Can't wait for a HD-AAC encoder :P
Go to the top of the page
+Quote Post
Lyx
post Nov 10 2008, 18:39
Post #33





Group: Members
Posts: 3353
Joined: 6-July 03
From: Sachsen (DE)
Member No.: 7609



Coming soon to a screen near you:



From the people who brought you panels mayhem...

FOO_TITLEFORMATTING-DICTIONARY.DLL

Now with $div(100,$div(11,4))% more insanity!
Go to the top of the page
+Quote Post
foorious
post Nov 16 2008, 03:34
Post #34


troll / ban evasion


Group: Banned
Posts: 244
Joined: 22-April 08
Member No.: 52991



Hi everyone,

Just a few words to say that unless I'm mistaken, some of the above-mentioned words should in fact be capitalized, and some others shoudl'nt. Here are a few examples according to Wikipedia :

[should] Off : http://en.wikipedia.org/wiki/Call_off_the_search
[shouldn't] On : http://en.wikipedia.org/wiki/Come_on_over
[should] Up : http://en.wikipedia.org/wiki/Wake_Up_Little_Susie
[should] Meets : http://en.wikipedia.org/wiki/More_than_mee...on_1_.281984.29


Here's my own Masstagger script for the whole job on the %title% tag field (feel free to change %title% to whatever you like). It may not be optimized, but I've been using it for some months and it performs beautifully. Here it is:

CODE
* Action to perform      : "Format value from other fields"
* Destination field name : TITLE
* Formatting pattern     : $caps2(%title%)

* Action to perform      : "Format value from other fields"
* Destination field name : TITLE
* Formatting pattern     : [$if($strchr(%title%, ),$replace(%title%,'  ',' ',' By A ',' by a ',' For A ',' for a ',' In A ',' in a ',' Of A ',' of a ',' On A ',' on a ',' A ',' a ',' To An ',' to an ',' An ',' an ',' And The ',' and the ',' And ',' and ',' As ',' as ',' At The ',' at the ',' At ',' at ',' By The ',' by the ',' By ',' by ',' But ',' but ',' For The ',' for the ',' For ',' for ',' From A ',' from a ',' From The ',' from the ',' From ',' from ',' In A ',' in a ',' In An ',' in an ',' In The ',' in the ',' In ',' in ',' Into ',' into ',' Nor ',' nor ',' Out Of A ',' out of a ',' Out Of The ',' out of the ',' Out Of ',' out of ',' Of A ',' of a ',' Of The ',' of the ',' Of ',' of ',' On The ',' on the ',' On ',' on ',' Onto ',' onto ',' Or The ',' or the ',' Or ',' or ',' To The ',' to the ',' With The ',' with the ',' The ',' the ',' To ',' to ',' With ',' with '),%title%)]

* Action to perform      : "Format value from other fields"
* Destination field name : TITLE
* Formatting pattern     : [$if($strchr(%title%, ),$left(%title%,$sub($len(%title%),3))$replace($right(%title%,3),' by',' By',' in',' In',' of',' Of',' on',' On',' or',' Or',' to',' To'),%title%)]

* Action to perform      : "Format value from other fields"
* Destination field name : TITLE
* Formatting pattern     : [$if($strchr(%title%, ),$left(%title%,$sub($len(%title%),4))$replace($right(%title%,4),' for',' For',' out',' Out'),%title%)]

* Action to perform      : "Format value from other fields"
* Destination field name : TITLE
* Formatting pattern     : [$if($strchr(%title%, ),$left(%title%,$sub($len(%title%),5))$replace($right(%title%,5),' into',' Into',' from',' From',' with',' With'),%title%)]

* Action to perform      : "Format value from other fields"
* Destination field name : TITLE
* Formatting pattern     : [$if($strchr(%title%, ),$replace(%title%,'Best of','Best Of','- the ','- The ',': the ',': The ','& the ','& The '),%title%)]


Like I said, it may not be optimized... but it works. Feel free to remove all relevant ' if you wish. I like them.


EDIT - small improvement (' As ')

This post has been edited by foorious: Jan 12 2009, 15:52
Go to the top of the page
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th July 2014 - 11:38