scriptotek / mc2skos

Command line script for converting Marc21 Classification and Authority records to SKOS/RDF
The Unlicense
21 stars 4 forks source link

Use URIs from 7XX subfield $1 #70

Closed CaptSolo closed 3 years ago

CaptSolo commented 4 years ago

Would it be possible to export relations based on 7XX subfield $1 ?

We are using it to link our authority records to LCSH and subfield $1 looked like a good choice where to record LCSH URI. Unfortunately, mc2skos currently does not handle URIs in this subfield.

Example data:

  <datafield tag="750" ind1=" " ind2="0">
    <subfield code="a">Gods, Greek, in art</subfield>
    <subfield code="1">http://id.loc.gov/authorities/subjects/sh85055623</subfield>
    <subfield code="u">http://id.loc.gov/authorities/subjects/sh85055623</subfield>
    <subfield code="2">LCSH</subfield>
    <subfield code="4">N</subfield>
  </datafield>
CaptSolo commented 4 years ago

Example data file attached: lnc10-greek_gods.txt

CaptSolo commented 4 years ago

A "quick fix" that worked for me was to change https://github.com/scriptotek/mc2skos/blob/master/mc2skos/record.py#L212 to:

                elif sf.get('code') == '0' or sf.get('code') == '1':
danmichaelo commented 4 years ago

Indeed! mc2skos was created before $1 was introduced, but I agree it should be supported as well.

Out of curiosity though, would you mind sharing your reasoning for using $1 instead of $0 with LCSH? I haven't followed the $0 / $1 discussions very closely, but my understanding is that $0 should be used with traditional authority record URIs like LCSH, while $1 is to be used with URIs that focus on the RWO the record is about.

CaptSolo commented 4 years ago

Out of curiosity though, would you mind sharing your reasoning for using $1 instead of $0 with LCSH? I haven't followed the $0 / $1 discussions very closely, but my understanding is that $0 should be used with traditional authority record URIs like LCSH, while $1 is to be used with URIs that focus on the RWO the record is about.

Thanks for the link to $0 / $1 discussions. It appears that in this case we should be using $0.

A reason why our data uses $1 instead of $0 could be because MARC21 documentation for 7XX fields mentions URIs for subfield $1 but does not mention them for $0 ("Authority record control number or standard number").

danmichaelo commented 3 years ago

That discussion aside, mc2skos should support $1, so I cherry-picked ae400400d29ae1f2a55b73e2334e17b8347a14d8 from #69 :)

CaptSolo commented 3 years ago

Thank you!