In an earlier post, I discussed how I was using the open data from the Library of Congress’ Authorities and Vocabularies service to enhance subject browsing on The Online Books Page. More recently, I’ve used the same data to make my subjects more consistent and up to date. In this post, I’ll describe why I need to do this, and why doing it isn’t as hard as I feared that it might be.
The Library of Congress Subject Headings (LCSH) is a standard set of subject names, descriptions, and relationships, begun in 1898, and periodically updated ever since. The names of its subjects have shifted over time, particularly in recent years. For instance, recently subject terms mentioning “Cookery”, a word more common in the 1800s than now, were changed to use the word “Cooking“, a term that today’s library patrons are much more likely to use.
It’s good for local library catalogs that use LCSH to keep in sync with the most up to date version, not only to better match modern usage, but also to keep catalog records consistent with each other. Especially as libraries share their online books and associated catalog records, it’s particularly important that books on the same subject use the same, up-to-date terms. No one wants to have to search under lots of different headings, especially obsolete ones, when they’re looking for books on a particular topic.
Libraries with large, long-standing catalogs often have a hard time staying current, however. The catalog of the university library where I work, for instance, still has some books on airplanes filed under “Aeroplanes”, a term that recalls the long-gone days when open-cockpit daredevils dominated the air. With new items arriving every day to be cataloged, though, keeping millions of legacy records up to date can be seen as more trouble than it’s worth.
But your catalog doesn’t have to be big or old to fall out of sync. It happens faster than you might think. The Online Books Page currently has just over 40,000 records in its catalog, about 1% of the size of my university’s. I only started adding LC subject headings in 2006. I tried to make sure I was adding valid subject headings, and made changes when I heard about major term renamings (such as “Cookery” to “Cooking”). Still, I was startled to find out that only 4 years after I’d started, hundreds of subject headings I’d assigned were already out of date, or otherwise replaced by other standardized headings. Fortunately, I was able to find this out, and bring the records up to date, in a matter of hours, thanks to automated analysis of the open data from the Library of Congress. Furthermore, as I updated my records manually, I became confident I could automate most of the updates, making the job faster still.
Here’s how I did it. After downloading a fresh set of LC subject headings records in RDF, I ran a script over the data that compiled an index of authorized headings (the proper ones to use), alternate headings (the obsolete or otherwise discouraged headings), and lists of which authorized headings were used for which alternate headings. The RDF file currently contains about 390,000 authorized subject headings, and about 330,000 alternate headings.
Then I extracted all the subjects from my catalog. (I currently have about 38,000 unique subjects.) Then I had a script check each subject see if it was listed as an authorized heading in the RDF file. If not, I checked to see if it was an alternate heading. If neither was the case, and the subject had subdivisions (e.g. “Airplanes — History”) I removed a subdivision from the end and repeated the checks until a term was found in either the authorized or alternate category, or I ran out of subdivisions.
This turned up 286 unique subjects that needed replacement– over 3/4 of 1% of my headings, in less than 4 years. (My script originally identified even more, until I realized I had to ignore the simple geographic or personal names. Those aren’t yet in LC’s RDF file, but a few of them show up as alternate headings for other subjects.) These 286 headings (some of them the same except for subdivisions) represented 225 distinct substitutions. The bad headings were used in hundreds of bibliographic records, the most popular full heading being used 27 times. The vast majority of the full headings, though, were used in only one record.
What was I to replace these headings with? Some of the headings had multiple possibilities. “Royalty” was an alternate heading for 5 different authorized headings: “Royal houses”, “Kings and rulers”, “Queens”, “Princes” and “Princesses”. But that was the exception rather than the rule. All but 10 of my bad headings were alternates for only one authorized heading. After “Royalty”, the remaining 9 alternate headings presented a choice between two authorized forms.
When there’s only 1 authorized heading to go to, it’s pretty simple to have a script do the substitution automatically. As I verified while doing the substitutions manually, nearly all the time the automatable substitution made sense. (There were a few that didn’t: for instance. when “Mind and body — Early works to 1850″ is replaced by “Mind and body — Early works to 1800“, works first published between 1800 and 1850 get misfiled. But few substitutions were problematic like this– and those involving dates, like this one, can be flagged by a clever script.)
If I were doing the update over again, I’ll feel more comfortable letting a script automatically reassign, and not just identify, most of my obsolete headings. I’d still want to manually inspect changes that affect more than one or two records, to make sure I wasn’t messing up lots of records in the same way; and I’d also want to manually handle cases where more than one term could be substituted. The rest– the vast majority of the edits– could be done fully automatically. The occasional erroneous reassignment of a single record would be more than made up by the repair of many more obsolete and erroneous old records. (And if my script logs changes properly, I can roll back problematic ones later on if need be.)
Mind you, now that I’ve brought my headings up to date once, I expect that further updates will be quicker anyway. The Library of Congress releases new LCSH RDF files about every 1-2 months. There should be many fewer changes in most such incremental updates than there would be when doing years’ worth of updates all at once.
Looking at the evolution of the Library of Congress catalog over time, I suspect that they do a lot of this sort of automatic updating already. But many other libraries don’t, or don’t do it thoroughly or systematically. With frequent downloads of updated LCSH data, and good automated procedures, I suspect that many more could. I have plans to analyze some significantly larger, older, and more diverse collections of records to find out whether my suspicions are justified, and hope to report on my results in a future post. For now, I’d like to thank the Library of Congress once again for publishing the open data that makes these sorts of catalog investigations and improvements feasible.