Skip to content

LC class that includes first cutter not recognized as an LcClass #32

Description

@mbelvadi2

I'm trying to work with the entire LC class table, defining labels for every LC class range defined in the official class tables (https://www.loc.gov/catdir/cpso/lcco/) as having an official description.
For instance, Z116-659 is described as Book industries and trade
I first break the string into start and end, and each piece, converted into your data class types, eg:
range_start = pycn.callnumber(lc_range_part1)
range_end = pycn.callnumber(lc_range_part2)
and check the results before I proceed with my program:
Range start Z116 type: <class 'pycallnumber.units.callnumbers.lc.LcClass'>
Range end Z659 type: <class 'pycallnumber.units.callnumbers.lc.LcClass'>
But when I get to the official LC defined ranges that include a first cutter (which as I'm sure you know is not an item-level cutter but still defines the subject) such as:
Z116.A2 Treatises on the modern printed book
the conversion is to the wrong class:
Range start Z116.A2 type: <class 'pycallnumber.units.callnumbers.lc.LC'>
I'm not sure how you can programmatically tell the difference between this kind of cutter and the item-level cutter. You might have to hardcode these special cases, which are after all enumerated in all those LCCO pdfs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions