IPB

Welcome Guest ( Log In | Register )

> Notice!

Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.

Also make sure you've read the Forum Guidelines before posting in this forum.

 
Reply to this topicStart new topic
> Problems in Capitalization, with certain words
Lord13
post Feb 28 2011, 19:57
Post #1


Member


Group: Members
Posts: 4
Joined: 28-February 11
Member No.: 13920
Mp3tag Version: v2.48



Hello there, first of all congratulations to Florian and the rest of the gang for providing the greatest mp3 tag editor, I ve been using it for a while and I'm generally very satisfied from that.
Having the compulsion of having my mp3s as perfectly capitalized as possible I went and searched related threads around here and I thought THIS action script was the ultimate solution in (un)capitalizing certain words (in, into, with, to etc) when needed but for a reason problems occur with some of them. For example when the action script targets the words"with", "into" and "over", last letter of the word gets removed.

Therefore filenames and tags of the songs:

Jens Lekman - Into Eternity
Richard X (feat. Jarvis Cocker) - Into U
Spiritualized - Do It All Over Again
Starsailor (feat. Brandon Flowers) - Tell Me It's Not Over
The White Stripes - I Just Don't Know What To Do With Myself

become:

Jens Lekman - int Eternity
Richard X (feat. Jarvis Cocker) - int U
Spiritualized - Do It All ove Again
Starsailor (feat. Brandon Flowers) - Tell Me It's Not ove
The White Stripes - I Just Don't Know What to Do wit Myself

I really dont understand what I am missing here. I never got really accustomed with regular expressions and extended / more complex scripting so I m not sure if there's smth wrong in the regular expression and phrasal verb coding the user provided or I am terribly missing smth else here. I tried inputing additional actions like "replacing" "int" with "into" but apart the fact that this shouldnt be needed, other problems occur like messing up with other words those words are part of (even if i use the "whole word" feature) and canceling the proper capitalization itself which defeats the whole purpose I use the action script in the first place.
I really hope someone is able to understand and shed a light on this (why is it happening + solution) cause I am extremely confused and frustrated. Thanks alot!
Go to the top of the page
 
+Quote Post
dano
post Feb 28 2011, 21:00
Post #2


Moderator


Group: Moderators
Posts: 5673
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.59a



It seems it cuts short all the 4 character words.
To fix that open the action group in Mp3tag and edit the second action. It's the Regular Expression _ALL action.

At "Replace matches with" change

$lower( $mid($1,2,3))
to
$lower($1)


--------------------
Go to the top of the page
 
+Quote Post
Lord13
post Feb 28 2011, 21:31
Post #3


Member


Group: Members
Posts: 4
Joined: 28-February 11
Member No.: 13920
Mp3tag Version: v2.48



It seems to work, thanks alot! Anything else I might be interested concerning capitalization? Are there any more updates? Do you think using this (along your correction) and another action I've found around here which also capitalizes the last word in a title no matter what it is, make for the perfect capitalization?

This post has been edited by Lord13: Feb 28 2011, 21:42
Go to the top of the page
 
+Quote Post
Doug Mackie
post Mar 1 2011, 00:51
Post #4


Member


Group: Full Members
Posts: 35
Joined: 27-April 09
From: New Jersey, USA
Member No.: 9952
Mp3tag Version: 2.51



I'm afraid that there cannot be "perfect capitalization" from script -- in part because capitalization depends on how words are used. In titles for example, "to" as a preposition should be lower case but for song titles I follow the older standard that "to" as part of an infinitive should always be capitalized. It is not practical for scripts to detect how parts of speech are used, although word lists are sometimes helpful.

Another gray area is an expression inside parentheses or brackets. If it contains a subtitle or a band name, it should be title case, but most other content should be lower case. In my scripts, parenthesized text is in title case for file name, artist, and title, but not in other tags. Text within square brackets is forced to lower case except for abbreviations and acronyms.

As it happens, I have been working on title case actions lately. Below is a link to an MTA file to apply title case to Artist, Title, and Album tags (only), and a second one for file names. Both are "works in progress" but are working well now. They are based in part on examples found here but with additions based on my testing and adapted to the content that I see. Each file contains word lists, one for articles and prepositions that should be lower case and one for common abbreviations (like CD, NBC, BBC, etc.) that should always be upper case. The word lists are easy to edit as needed. Common Scottish and Irish surnames are also supported (Mc, Mac, and O').

9 March 2011: The latest version of both files are now posted in one zip file, and include word lists to capitalize "To" before over eighty common English verbs. Add your verbs as needed.

Title Case Action Files (Mackie)

Doug Mackie

This post has been edited by Doug Mackie: Mar 24 2011, 20:23
Go to the top of the page
 
+Quote Post

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 April 2014 - 09:27