Wednesday, February 8th, 2006

LCCN Numbers now parsed

Before the crash I did complete one new feature, the accurate parsing of Library of Congress Catalog numbers.

LCCNs are slippery things, without a fixed number of digits or a single internal structure—”89-456,” “89-7890,” “2001-1114” and “gm 71-2450” are all perfectly okay. For this reason, LibraryThing was sometimes mistaking them for ISSNs and ISBNs, helpfully adding hypens and checksums digits to reinforce its misundersanding. Worse, the Library of Congress’ online catalog doesn’t allow searches by printed LCCNs. Instead, you have to turn them into a special machine-readable LCCN format, adding leading zeroes and removing hypens and spaces as they dictate (see here.)

Anyway, I worked through the tangle, and LibraryThing now handles LCCNs well, identifying them as such and converting them to the format the LC’s requires*. I can tell you from entering 180 of my own books this week, that LCCNs come in very handy with older books, many of which have their codes printed on one of the first pages or even the back cover. Of course, I lost all those books. But I gave myself a free membership, so we’re even.

*The one exception are LCCNs with “alpha prefixes.” I never found one of these in the books I cataloged, but the LCs catalog page says they exist. To parse them, I need to know the range of possible prefix. Would, say, 1-4 alphabetic letters plus a space cover it?

Labels: 1


Leave a Reply