Jump to content

Better alphabetizing of numbers


Fred Slota

Recommended Posts

Several years ago, I made a suggestion for a change in the alphabetizing rules that was eventually incorporated into ComicBase, merging the sorting of related titles with both Volume and Series numbering. (For example, look at the multiple Titles for the Avengers...)

I would like to propose a similar adjustment to clean up a similar situation; The alphabetizing of titles with numeric words in the title. This suggestion has two parts, both of which are exemplified in the various Doctor Who titles.

As a start, look at these titles:

Doctor Who: The Eleventh Doctor
Doctor Who: The Eleventh Doctor Year Three
Doctor Who: The Eleventh Doctor Year Two

Notice how the second and third titles, while they are in alphabetical order, are not in useful order. They are sorted on the AlphabetizedTitle field, which for these three titles is:

DoctorWhoTheEleventhDoctor
DoctorWhoTheEleventhDoctorYearThree
DoctorWhoTheEleventhDoctorYearTwo

I propose that when the AlphabetizedTitle field is being generated, it search for numerical words and substitute an appropriate zero-padded numeral. In this case, it would produce:

DoctorWhoTheEleventhDoctor
DoctorWhoTheEleventhDoctorYear00002
DoctorWhoTheEleventhDoctorYear00003

And thus sort the titles as:

Doctor Who: The Eleventh Doctor
Doctor Who: The Eleventh Doctor Year Two
Doctor Who: The Eleventh Doctor Year Three



That's the easy part. Here's the hard part.


Look at these titles (I'm picking and choosing to better show my point):

Doctor Who: The Eighth Doctor
Doctor Who: The Eleventh Doctor
Doctor Who: The Fourth Doctor
Doctor Who: The Ninth Doctor
Doctor Who: The Tenth Doctor
Doctor Who: The Third Doctor
Doctor Who: The Twelfth Doctor

Notice how all the titles, while they are in alphabetical order, are not in useful order. They are sorted on the AlphabetizedTitle field, which for these seven titles is:

DoctorWhoTheEighthDoctor
DoctorWhoTheEleventhDoctor
DoctorWhoTheFourthDoctor
DoctorWhoTheNinthDoctor
DoctorWhoTheTenthDoctor
DoctorWhoTheThirdDoctor
DoctorWhoTheTwelfthDoctor

I propose that when the AlphabetizedTitle field is being generated, it search for ordinal words and substitute an appropriate zero-padded numeral that will sort separately from regular numbers, such as 0th0xxxx. In this case, it would produce:

DoctorWhoThe0th0003Doctor
DoctorWhoThe0th0004Doctor
DoctorWhoThe0th0008Doctor
DoctorWhoThe0th0009Doctor
DoctorWhoThe0th0010Doctor
DoctorWhoThe0th0011Doctor
DoctorWhoThe0th0012Doctor

And thus sort the titles as:

Doctor Who: The Third Doctor
Doctor Who: The Fourth Doctor
Doctor Who: The Eighth Doctor
Doctor Who: The Ninth Doctor
Doctor Who: The Tenth Doctor
Doctor Who: The Eleventh Doctor
Doctor Who: The Twelfth Doctor


(Note: Text searching should probably look for space-padded words, i.e. " four ", and not "four")


There will be some shifts of titles in addition to resorting - For example, all of the above will move to being ahead of the title "Doctor Who: The Betrothal of Sontar". This will probably need a little more research for possible unusual cases; fractions, multi-word numbers.



Thoughts?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...