Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: "Undoing" AutoCapitilise ? (Read 13186 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

"Undoing" AutoCapitilise ?

Reply #25
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: [Select]
$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
Can't wait for a HD-AAC encoder :P

"Undoing" AutoCapitilise ?

Reply #26
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?

"Undoing" AutoCapitilise ?

Reply #27
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

"Undoing" AutoCapitilise ?

Reply #28
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.

"Undoing" AutoCapitilise ?

Reply #29
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  I'll post it later maybe
Can't wait for a HD-AAC encoder :P

"Undoing" AutoCapitilise ?

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

like this:
Code: [Select]
$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)

"Undoing" AutoCapitilise ?

Reply #31
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
Can't wait for a HD-AAC encoder :P

"Undoing" AutoCapitilise ?

Reply #32
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!
I am arrogant and I can afford it because I deliver.

"Undoing" AutoCapitilise ?

Reply #33
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: [Select]
* 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 ')