Author Topic: Better Capitalization Tool  (Read 12550 times)

Squeak

  • Guest
Currently the capitalization tool (Tools>Tagging Tools>Capitalise) capitalizes the first letter on all of the words in the various fields but this is not actually correct capitalization with regards to titles. Articles, conjunctions, and short prepositions are not capitalized unless they are the first or last word in the title (Source: http://aitech.ac.jp/~ckelly/midi/help/caps.html).  So a song titled "tip of the hat, punch in the face" becomes "Tip Of The Hat, Punch In The Face" when it really should be "Tip of the Hat, Punch in the Face." It's slightly a trivial problem but seems like it wouldn't be all too hard to implement.

jistme

  • Guest
seems like it wouldn't be all too hard to implement.

That's easy to say if you don't have to implement it...
Yet since I also waste quite some time correcting titles in this manner;
+1


Squeak

  • Guest
That's easy to say if you don't have to implement it...

I know, I know! I actually deleted something saying "As a non-programmer it's always awful to say but..."


Zak

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2459
Forum member Boroda74 has created a plugin which includes a customisable case conversion tool:

http://getmusicbee.com/forum/index.php?topic=3833.0
Bee excellent to each other...

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9353
It's a great tool to do what you're trying to do, but I suggest you experiment on one or two files before you use it to make wholesale changes.  You want to make sure you've got the correct parameters set up.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

jistme

  • Guest
Forum member Boroda74 has created a plugin which includes a customisable case conversion tool:

http://getmusicbee.com/forum/index.php?topic=3833.0

Seems like a good suggestion.
Before I put some work and exploration in that, do you think it is possible with Boroda's plugin to accommodate about everything that is suggested here: http://aitech.ac.jp/~ckelly/midi/help/caps.html ?

For example, would it be possible to create a rule so that "a bad attempt in putting on a smile" will become "A Bad Attempt in Putting On a Smile", and not "a Bad Attempt on Putting on a Smile"?

Zak

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 2459
For example, would it be possible to create a rule so that "a bad attempt in putting on a smile" will become "A Bad Attempt in Putting On a Smile", and not "a Bad Attempt on Putting on a Smile"?
Based on the options in the screenshot, it doesn't look clever enough to handle phrases like "Putting On". :(

(nice succinct list of rules on that page, btw)
Bee excellent to each other...

redwing

  • Guest
But still doing a good job except the phrasal verbs rule that could be better handled manually.



jistme

  • Guest
Looks good.
The main missing feature then seems to be the option to 'always capitalize the first word', even when it's in the list of exceptions.

jistme

  • Guest
Based on the options in the screenshot, it doesn't look clever enough to handle phrases like "Putting On". :(

(nice succinct list of rules on that page, btw)

Squeak produced the url.
For 'our' purposes it would have to become even longer.
For e.g. "Beat Up" and "Blow Out" from that list, also "Beating Up", "Blowing Out", "Blown Out", etc. etc. would gave to be added.
And then we're just only talking English language...

redwing

  • Guest
Looks good.
The main missing feature then seems to be the option to 'always capitalize the first word', even when it's in the list of exceptions.

"first or last word" according to the rule #2?

2. These are lower-case, unless they are the first word or last word.

articles: a, an, the
conjunctions: and, but, or, nor
prepositions that are less than five letters long: at, by, for, from, in, into, of, off, on, onto, out, over, to, up, with
as (only if it is followed by a noun)

boroda

  • Sr. Member
  • ****
  • Posts: 4610
Looks good.
The main missing feature then seems to be the option to 'always capitalize the first word', even when it's in the list of exceptions.
You can make 2 or more steps (without writing changes to tags) by changing rules and clicking 'Reapply rules' button. For instance, to achieve desirable titlecasing for sentence 'a bad attempt in putting on a smile':

1. Sentencecase a, in, on, etc.
2. Titlecase all words except for a, in, on, etc.

You'll get 'A bad attempt in putting on a smile' on the 1st step and 'A Bad Attempt in Putting on a Smile' on the 2nd.

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9353
You can make 2 or more steps (without writing changes to tags) by changing rules and clicking 'Reapply rules' button. For instance, to achieve desirable titlecasing for sentence 'a bad attempt in putting on a smile':
1. Sentencecase a, in, on, etc.
2. Titlecase all words except for a, in, on, etc.

You'll get 'A bad attempt in putting on a smile' on the 1st step and 'A Bad Attempt in Putting on a Smile' on the 2nd.

In your example wouldn't the "A" at the beginning of the title wind up as lower case?
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

boroda

  • Sr. Member
  • ****
  • Posts: 4610
No, excepted words remain unchanged, not become lowercased (this is not obvious, but this is how plugin works).