These scripts are intended to find exact matches to determine if LC terms can be added to new 6xx fields programmatically. The codes use adapted methods from pulibrary/authority_control. The methods strip subject headings in LC authority MARC records and 653 fields from bibliographic MARC records down to simple strings. It also compares the strings for exact matches.
The methods get_heading_from_authority_field
and normalize_heading_for_local_search
borrowed from pulibrary/authority_control.
Hash authority_hash
is created with the normalized forms of the headings from the authority records.
Array unwanted_terms
is created with a txt list of terms in the 653 fields that should be ignored during matching
While iterating over the 653s in each record, the original field value is stored to be written out