Skip to content
This repository has been archived by the owner. It is now read-only.

Add schema.org markup #25

Closed
acka47 opened this issue Jan 20, 2017 · 7 comments
Closed

Add schema.org markup #25

acka47 opened this issue Jan 20, 2017 · 7 comments
Assignees
Labels
Projects

Comments

@acka47
Copy link
Contributor

@acka47 acka47 commented Jan 20, 2017

We have a milestone for this in the AEP for some years now. We already did a first implementation of this in NWBib based on API 1.0, see hbz/nwbib#99. By now, we should be able to significantly improve the schema.org markup. The question is how to we will proceed doing the mapping. I suggest trying out the approach from last time. If it doesn't work well (i.e. if we can't map all the data we want to schema.org) we might think about using SPARQL for representing a resouce description with schema.org.

@acka47
Copy link
Contributor Author

@acka47 acka47 commented Jan 20, 2017

Let's start with an example, like http://lobid.org/resources/HT015436412. You currently get the following JSON-LD:

{
   "@context":"http://lobid.org/download/context.json",
   "alternativeTitle":[
      "Colourful Eifel"
   ],
   "collectedBy":[
      {
         "id":"http://lobid.org/resources/NWBib",
         "label":"Nordrhein-Westfälische Bibliographie"
      }
   ],
   "contribution":[
      {
         "agent":{
            "altLabel":"Citen, Chorst",
            "id":"http://d-nb.info/gnd/111495156",
            "label":"Ziethen, Horst",
            "type":[
               "Person"
            ]
         },
         "role":[
            {
               "id":"http://id.loc.gov/vocabulary/relators/edt",
               "label":"Herausgeber/in"
            }
         ],
         "type":[
            "Contribution"
         ]
      },
      {
         "agent":{
            "id":"http://d-nb.info/gnd/123024609",
            "label":"Ziethen, Anette",
            "type":[
               "Person"
            ]
         },
         "role":[
            {
               "id":"http://id.loc.gov/vocabulary/relators/ctb",
               "label":"Mitwirkende"
            }
         ],
         "type":[
            "Contribution"
         ]
      }
   ],
   "contributorOrder":[
      "http://d-nb.info/gnd/111495156 | http://d-nb.info/gnd/123024609"
   ],
   "describedby":{
      "dateCreated":"20080215",
      "dateModified":"20150828",
      "id":"http://lobid.org/resources/HT015436412",
      "label":"lobid Ressource"
   },
   "exemplar":[
      {
         "id":"http://lobid.org/items/HT015436412:DE-121:08%20Aq%2023#!",
         "label":"lobid Bestandsressource"
      }
   ],
   "extent":"108 S.",
   "hbzId":"HT015436412",
   "id":"http://lobid.org/resources/HT015436412#!",
   "isPrimaryTopicOf":{
      "id":"http://193.30.112.134/F/?func=find-c&ccl_term=IDN%3DHT015436412",
      "label":"hbz Verbundkatalog"
   },
   "isbn":[
      "9783929932744",
      "9783934328181"
   ],
   "language":[
      {
         "id":"http://id.loc.gov/vocabulary/iso639-2/deu",
         "label":"Deutsch"
      },
      {
         "id":"http://id.loc.gov/vocabulary/iso639-2/eng",
         "label":"Englisch"
      },
      {
         "id":"http://id.loc.gov/vocabulary/iso639-2/fra",
         "label":"Französisch"
      }
   ],
   "medium":[
      {
         "id":"http://rdvocab.info/termList/RDAproductionMethod/#1010",
         "label":"Print"
      }
   ],
   "note":[
      "Text dt., engl., franz."
   ],
   "nwbibspatial":[
      {
         "id":"http://purl.org/lobid/nwbib-spatial#n28",
         "label":"Eifel"
      }
   ],
   "nwbibsubject":[
      {
         "id":"http://purl.org/lobid/nwbib#s102000",
         "label":"Landesbeschreibungen"
      }
   ],
   "otherTitleInformation":[
      "in 9 Kapiteln der Eifel-Regionen"
   ],
   "publication":[
      {
         "location":"Köln",
         "publishedBy":"Ziethen-Panorama-Verl.",
         "startDate":"2007",
         "type":[
            "Publication"
         ]
      }
   ],
   "sameAs":[
      {
         "id":"http://hub.culturegraph.org/resource/HBZ-HT015436412",
         "label":"Culturegraph Ressource"
      }
   ],
   "statementOfResponsibility":"[Red. und Gestaltung: Horst Ziethen. Bildtexte: Anette Ziethen mit Textbeitr. von Peter Kremer. Engl.-Übers.: Gwendolen Webster ; John Stevens. Franz.-Übers.: France Varry. Niederländ.-Übers.: Transmit Deutschland]",
   "subject":[
      {
         "id":"http://d-nb.info/gnd/4013749-1",
         "label":"Eifel",
         "type":[
            "PlaceOrGeographicName"
         ]
      },
      {
         "label":"Bildband",
         "type":[
            "SubjectHeading"
         ]
      },
      {
         "id":"http://dewey.info/class/914/",
         "label":"Geografie Europas und Reisen in Europa"
      }
   ],
   "subjectChain":[
      "Eifel | Bildband"
   ],
   "subjectOrder":[
      "http://d-nb.info/gnd/4013749-1, Bildband"
   ],
   "title":"Die Eifel im Farbbild",
   "type":[
      "BibliographicResource",
      "Book"
   ]
}

The schema.org markup I would like to get looks like this:

{
   "@context":"http://schema.org",
   "alternativeHeadline":[
      "Colourful Eifel"
   ],
   "isPartOf":[
      {
         "id":"http://lobid.org/resources/NWBib",
         "name":"Nordrhein-Westfälische Bibliographie"
      }
   ],
   "contributor":[
      {
         "contributor":{
            "alternateName":"Citen, Chorst",
            "id":"http://d-nb.info/gnd/111495156",
            "name":"Ziethen, Horst",
            "type":[
               "Person"
            ]
         },
         "type":[
            "http://id.loc.gov/vocabulary/relators/edt",
            "Role"
         ],
         "roleName":"Herausgeber/in"
      },
      {
         "contributor":{
            "id":"http://d-nb.info/gnd/123024609",
            "name":"Ziethen, Anette",
            "type":[
               "Person"
            ]
         },
         "type":[
            "http://id.loc.gov/vocabulary/relators/ctb",
            "Role"
         ],
         "roleName":"Mitwirkende"
      }
   ],
   "description":{
      "dateCreated":"20080215",
      "dateModified":"20150828",
      "id":"http://lobid.org/resources/HT015436412",
      "name":"lobid Ressource"
   },
   "offers":[
      {
         "id":"http://lobid.org/items/HT015436412:DE-121:08%20Aq%2023#!",
         "name":"lobid Bestandsressource"
      }
   ],
   "numberOfPages":"108 S.",
   "id":"http://lobid.org/resources/HT015436412#!",
   "url":"http://193.30.112.134/F/?func=find-c&ccl_term=IDN%3DHT015436412",
   "isbn":[
      "9783929932744",
      "9783934328181"
   ],
   "inLanguage":[
      {
         "id":"http://id.loc.gov/vocabulary/iso639-2/deu",
         "type":"Language",
         "name":"Deutsch"
      },
      {
         "id":"http://id.loc.gov/vocabulary/iso639-2/eng",
         "type":"Language",
         "name":"Englisch"
      },
      {
         "id":"http://id.loc.gov/vocabulary/iso639-2/fra",
         "type":"Language",
         "name":"Französisch"
      }
   ],
   "about":[
      {
         "id":"http://purl.org/lobid/nwbib-spatial#n28",
         "name":"Eifel"
      },
      {
         "id":"http://purl.org/lobid/nwbib#s102000",
         "name":"Landesbeschreibungen"
      },
      {
         "id":"http://d-nb.info/gnd/4013749-1",
         "name":"Eifel",
         "type":[
            "PlaceOrGeographicName"
         ]
      },
      {
         "name":"Bildband",
         "type":[
            "SubjectHeading"
         ]
      },
      {
         "id":"http://dewey.info/class/914/",
         "name":"Geografie Europas und Reisen in Europa"
      }
   ],
   "publication":[
      {
         "location":"Köln",
         "publishedBy":"Ziethen-Panorama-Verl.",
         "startDate":"2007",
         "type":[
            "Publication"
         ]
      }
   ],
   "sameAs":"http://hub.culturegraph.org/resource/HBZ-HT015436412",
   "name":"Die Eifel im Farbbild",
   "type":[
      "Book"
   ]
}
@acka47
Copy link
Contributor Author

@acka47 acka47 commented Jan 20, 2017

For the start, we could leave out – the probably not so trivial – adition of nwbibsubject and nwbibspatial to the about array.

@ChristophEwertowski
Copy link

@ChristophEwertowski ChristophEwertowski commented Jan 20, 2017

Looks quite fine to me. But why not go full schema.org and use schema.org/editor /contributor? I suppose not all roles of the LoC have an expression in schema.org but for those who have...

Also it would be more beautiful to use startDate only in combination with a endDate and otherwise use datePublished.

@fsteeg fsteeg self-assigned this Jan 20, 2017
@fsteeg fsteeg added the ready label Jan 20, 2017
@acka47
Copy link
Contributor Author

@acka47 acka47 commented Jan 20, 2017

Looks quite fine to me. But why not go full schema.org and use schema.org/editor /contributor? I suppose not all roles of the LoC have an expression in schema.org but for those who have...

I think we should use a common approach for indicating contributors and roles in schema.org. When using the schema:Role approach we shouldn't also use the direct linking via a specific property like schema:editor etc.

Also it would be more beautiful to use startDate only in combination with a endDate and otherwise use datePublished.

The thing is that we put the publication information into a PublicationEvent object (at least it should be PublicationEvent instead of Publicationas the second doesn't exist in schema.org, see also #185). And datePublished isn't supposed to be used on an event but on a CreativeWork...

@acka47
Copy link
Contributor Author

@acka47 acka47 commented Mar 8, 2017

What's the status of this? As far as I can see already is some schema.org JSON-LD embedded but it is still based on the mapping from API 1.0, see https://github.com/hbz/lobid-resources/blob/master/web/app/views/tags/schema_org.scala.html. I suggest to either fix this before the launch or – which is more realistic – to remove schema.org for now.

@acka47
Copy link
Contributor Author

@acka47 acka47 commented Mar 27, 2019

As we were asked by NWBib customers, why nwbib titles are not indexed so much by google anymore, I am prioritizing this issue. We provide roken schema.org markup for some years now in NWBib and should do better. Regarding the approach, I think going with SPARQL is the way to go. I will provide a SPARQL CONSTRUCT query to create schema.org markup from lobid-resources RDF and afterwards @fsteeg can see how to use it to add the markup.

@acka47 acka47 added this to Ready in lobid board Apr 8, 2019
@acka47
Copy link
Contributor Author

@acka47 acka47 commented Dec 3, 2020

Closing. From an SEO perspective, schema.org for library catalogues doesn't help.

@acka47 acka47 closed this Dec 3, 2020
lobid board automation moved this from Ready to Done Dec 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants