Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AlternateGraphicRepresentation not appearing in JSON record #1879

Closed
gregorbg opened this issue Sep 4, 2023 · 4 comments
Closed

AlternateGraphicRepresentation not appearing in JSON record #1879

gregorbg opened this issue Sep 4, 2023 · 4 comments

Comments

@gregorbg
Copy link
Contributor

gregorbg commented Sep 4, 2023

Re #1854 (which works beautifully in principle ❤️) I have tried querying our entire library's inventory. There were a few inconsistencies:

Script information partially missing (with otherwise present data)

The original PR details MARC field 245 being mapped to title. The record https://lobid.org/resources/990202474680206441 details the following MARCXML details:

<datafield tag="880" ind1="1" ind2="0">
  <subfield code="6">245-01/Jpan</subfield>
  <subfield code="p">全人教育論</subfield>
  <subfield code="9">F:331</subfield>
  <subfield code="M">49HBZ_ULB</subfield>
</datafield>

but it doesn't appear in the resulting JSON. Only the first mention...

<datafield tag="880" ind1="1" ind2="0">
  <subfield code="6">245-01/Jpan</subfield>
  <subfield code="a">小原国芳選集</subfield>
  <subfield code="9">O:H</subfield>
  <subfield code="9">F:331</subfield>
</datafield>

appears, but presumably both should. Or rather, they should be merged?! The title in the main "westernized" record is:

{
  "title": "Obara Kuniyoshi senshū, 3: Zenjin kyōikuron"
}

where the above 小原国芳選集 (the one that already appears in the Lobid JSON) reads "Obara Kuniyoshi senshū" and the other missing part from the 880 section of the MARCXML called 全人教育論 reads "Zenjin kyōikuron". The 3 likely comes from some volume counting.

Relevant script information entirely missing

One of the records (https://lobid.org/resources/990202474680206441) looks as follows:

"alternateGraphicRepresentation": [
  ...the `Jpan` part from above...,
  {
    "script": {
      "id": "https://unicode.org/iso15924/iso15924.txt#Kana",
      "label": "Katakana"
    }
  }
]

The first Jpan entry makes sense, but the second entry doesn't contain any actual information. It claims that another Kana representation exists, but it contains none of the actual fields.

Note that the Kana data is there in the MARCXML via https://alma.lobid.org/marcxml/990202474680206441 (abridged!):

<datafield tag="880" ind1="1" ind2="0">
  <subfield code="6">245-01/Kana</subfield>
  <subfield code="p">ゼンジン キョウイクロン</subfield>
  <subfield code="9">F:331</subfield>
</datafield>

I'd expect the additional output to look like

"alternateGraphicRepresentation": [
  {
    "script": {
      "id": "https://unicode.org/iso15924/iso15924.txt#Kana",
      "label": "Katakana"
    },
    "record": {
      "title": "ゼンジン キョウイクロン"
    }
  }
]

Interestingly, this part reads "Zenjin kyōikuron". The other part from the title called "Obara Kuniyoshi senshū" is not present in the Kana data. So the "glue things together in the title" approach is somehow bound to fail...?!?

Bonus: Missing title data

Not strictly related to the alternateGraphicRepresentation PR above, but while going through the source data I also found...

<datafield tag="249" ind1=" " ind2=" ">
  <subfield code="6">880-02</subfield>
  <subfield code="a">shisō mondai to kyōiku</subfield>
</datafield>

<datafield tag="880" ind1=" " ind2=" ">
  <subfield code="6">249-02/Jpan</subfield>
  <subfield code="a">思想問題と教育</subfield>
  <subfield code="9">F:362</subfield>
</datafield>

<datafield tag="880" ind1=" " ind2=" ">
  <subfield code="6">249-02/Kana</subfield>
  <subfield code="a">シソウ モンダイ ト キョウイク</subfield>
  <subfield code="9">F:362</subfield>
</datafield>

which all relate to field 249. Is this field supposed to appear anywhere in the Lobid JSON? (cf. https://www.alma-dach.org/alma-marc/bibliographic/249/249.html)

@TobiasNx
Copy link
Contributor

TobiasNx commented Sep 5, 2023

Re #1854 (which works beautifully in principle ❤️) I have tried querying our entire library's inventory. There were a few inconsistencies:

Script information partially missing (with otherwise present data)

The original PR details MARC field 245 being mapped to title. The record https://lobid.org/resources/990202474680206441 details the following MARCXML details:

That should be solvable.

Relevant script information entirely missing

This is a bit more tricky and highlights two problems:

  1. Missing info in the source data. 245 $a for this element in Kana is missing.
  2. Transformation creates a script object, even when no record element is present.

Bonus: Missing title data

Should be part of the solution in: #1836
Since 249 is not mapped in lobid at the moment and NWBib whants it too.

@TobiasNx
Copy link
Contributor

TobiasNx commented Sep 6, 2023

Also the transformation of isPartOf for the corresponding entry of 830 -> 490 1. Ind 1 is broken.
Testfile: 990182814750206441

TobiasNx added a commit that referenced this issue Sep 6, 2023
TobiasNx added a commit that referenced this issue Sep 6, 2023
TobiasNx added a commit that referenced this issue Sep 6, 2023
TobiasNx added a commit that referenced this issue Sep 6, 2023
TobiasNx added a commit that referenced this issue Sep 8, 2023
dr0i added a commit that referenced this issue Sep 8, 2023
@TobiasNx
Copy link
Contributor

@gregorbg can we close this ticket?

@gregorbg
Copy link
Contributor Author

Yes, I've just checked the resources from my original post in the current production environment. Barring the information from 249 (which admittedly is a separate issue!) it works beautifully. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants