Pl4net.info

Bibliothekarische Stimmen. Independent, täglich.

7. Juli 2015
von Carsten Klee
Kommentare deaktiviert für W3IDs for ISIL

W3IDs for ISIL

W3IDs for ISIL

The International Standard Identifier for Libraries and Related Organisations (ISIL / ISO 15511) identifies an organization, i.e. a library, an archive, a museum or a related organization, or one of its subordinate units. The registration of ISILs takes place at the National ISIL Allocation Agencies (see list).

Todays identification is best expressed through HTTP URIs because of their uniqueness. Unfortunately the distributed maintenance of ISILs in the different national agencies makes it yery hard or impossible to reference cultural heritage organizations by ISIL through URIs.

However some agencies provide ISIL-URIs or even linked data services (see Code List for Cultural Heritage Organizations or Linked Data Service Adressdaten). But wouldn’t it be nice to access cultural heritage organizations within a single domain?

Permanent Identifiers for the Web (w3id.org) provides a secure, permanent URL re-direction service for Web applications. And this gives us the opportunity to provide a single access point to organization information identified by ISIL.

One can now reference an organization identified by an ISIL through

https://w3id.org/isil/<ISIL>

Such an URI may be not dereferenceable (no data for lookup). E.g. https://w3id.org/isil/CH-000015-0 will not return any organization data but may be used as an identifier for the “Schweizerisches Literaturarchiv, Bern”.

Current ISILs that are supported for dereferencing are:

6. August 2014
von Carsten Klee
Kommentare deaktiviert für MARCspec validator

MARCspec validator

MARCspec validator MARCspec is a recommendation for a common MARC record path language. An implementation of a MARCspec parser and validator written in PHP can be found at https://github.com/cKlee/php-marc-spec. You can now validate your MARCspec onl...

6. August 2014
von Carsten Klee
Kommentare deaktiviert für MARCspec validator

MARCspec validator

MARCspec validator MARCspec is a recommendation for a common MARC record path language. An implementation of a MARCspec parser and validator written in PHP can be found at https://github.com/cKlee/php-marc-spec. You can now validate your MARCspec onl...

30. Juli 2014
von Carsten Klee
Kommentare deaktiviert für Composer.json for File_MARC

Composer.json for File_MARC

How a composer.json for File_MARC could look like Seems like File_MARC is not yet available on Packagist. pear/Validate and pear/Validate_ISPN are also missing. This is how a composer.json file could look like { "repositories": [ { ...

30. Juli 2014
von Carsten Klee
Kommentare deaktiviert für Composer.json for File_MARC

Composer.json for File_MARC

How a composer.json for File_MARC could look like Seems like File_MARC is not yet available on Packagist. pear/Validate and pear/Validate_ISPN are also missing. This is how a composer.json file could look like { "repositories": [ { ...

19. Dezember 2013
von Carsten Klee
Kommentare deaktiviert für MARC spec as string

MARC spec as string

MARC spec as string

MARC spec as string is a specification for a MARC 21 field specification (short MARC spec) encoded as string. A MARC spec defines the reference to a data set derived from a MARC 21 record. A MARC spec normally consits of the field tag, a character position or range or subfield tags and indicators. Since there are a variety of mapping tools using MARC specifications in different encodings and forms, I thought it is time to standardize the form of a MARC spec encoded as string.

Therefor I’ve written a proposal for a MARC 21 spec as string specification. You can find it at http://cklee.github.io/marc-spec/marc-spec.html.

Comments are welcome at https://github.com/cKlee/marc-spec/issues

What is a MARC spec as string good for?

The specification aims for the possibility of exchanging MARC mappings. More specific it aims for exchange of MARC mappings via RDF. A MARC spec as string can be easily described by RDF through literals or URIs.

Here is an imaginary example on how a MARC mapping could be described by RDF:

$mapping ex:maps [ a ex:MappingRule ; ex:from [ ex:form <http://cklee.github.io/marc-spec/marc-spec.html> ; rdf:value "245a"^^ex:MarcSpec ] ; ex:to <http://purl.org/dc/terms/title> ] .

Or maybe more easy

$mapping ex:maps [ a ex:MappingRule ; ex:from <http://example.org/marcspec/245a> ; ex:to <http://purl.org/dc/terms/title> ] .

Usage of MARC spec as string

Besides the specification I’ve written a PHP MARC spec as string parser and validator. It’s available at Github. This parser is now included in easyM2R. With the use of MARC spec as string in the mapping configuration of easyM2R it makes configuring more easy and more powerful.

19. Dezember 2013
von Carsten Klee
Kommentare deaktiviert für MARC spec as string

MARC spec as string

MARC spec as string

MARC spec as string is a specification for a MARC 21 field specification (short MARC spec) encoded as string. A MARC spec defines the reference to a data set derived from a MARC 21 record. A MARC spec normally consits of the field tag, a character position or range or subfield tags and indicators. Since there are a variety of mapping tools using MARC specifications in different encodings and forms, I thought it is time to standardize the form of a MARC spec encoded as string.

Therefor I’ve written a proposal for a MARC 21 spec as string specification. You can find it at http://cklee.github.io/marc-spec/marc-spec.html.

Comments are welcome at https://github.com/cKlee/marc-spec/issues

What is a MARC spec as string good for?

The specification aims for the possibility of exchanging MARC mappings. More specific it aims for exchange of MARC mappings via RDF. A MARC spec as string can be easily described by RDF through literals or URIs.

Here is an imaginary example on how a MARC mapping could be described by RDF:

$mapping ex:maps [ a ex:MappingRule ; ex:from [ ex:form <http://cklee.github.io/marc-spec/marc-spec.html> ; rdf:value "245a"^^ex:MarcSpec ] ; ex:to <http://purl.org/dc/terms/title> ] .

Or maybe more easy

$mapping ex:maps [ a ex:MappingRule ; ex:from <http://example.org/marcspec/245a> ; ex:to <http://purl.org/dc/terms/title> ] .

Usage of MARC spec as string

Besides the specification I’ve written a PHP MARC spec as string parser and validator. It’s available at Github. This parser is now included in easyM2R. With the use of MARC spec as string in the mapping configuration of easyM2R it makes configuring more easy and more powerful.

12. November 2013
von Carsten Klee
Kommentare deaktiviert für easyM2R – easily convert MARC to RDF

easyM2R – easily convert MARC to RDF

easyM2R - easily convert MARC to RDF

Along with the development of the Holding Ontology, I was looking for a tool to easily convert MARC21 data to RDF. I looked into Benjamin Rokseth’ marc2rdf which is a very ambitious project, saying it is a coverter and harvester. But unfortunately it has a lot of dependencies and installation requirements. So I searched for a simpler tool but wasn’t lucky.

Then I decided to write my own converter with the pre-condition: it must be a tool very easy to use.

I hope I have fullfilled this condition with easyM2R - easily convert MARC to RDF

How it works

easyM2R is mainly based on three projects:

easyM2R uses Markus Lanthalers JSON-LD processor to read the configuration into a RDF graph, then using FILE_MARC to read the MARC data and passing it to easyRDF for output in multiple serializations.

Because JSON-LD is a lightweight Linked Data format, easy for humans to read and write, I choosed this format for the configuration part. It has the big advantage that you configure easyM2R directly in a RDF format, seeing how your data will look like.

Within the configurations JSON-LD document there is a special namespace, prefixed with marc2rdf. Under this namespace you can define MARC fields and subfields in a simple form called MARC spec. A MARC spec has the form field_subfield and points to the piece of data you like to be expressed through RDF.

MARC is (sometimes) a monster, which makes it not that easy to get the right data. For that reason easyM2R uses different callback functions to analyze the MARC records and returning the data in a desired way. Within the configurations JSON-LD document these callback functions can be intialized under the easyM2R namespace, like marc2rdf:callback_with_indicator2(). If there is a problem not solved by the default callback functions, you can also easily write your own using the FILE_MARC library, which is well documented under http://pear.php.net/package/File_MARC

Using easyM2R

easyM2R can be used via the command line or within a PHP script. Both are documented under https://github.com/cKlee/easyM2R/blob/master/README.md

easyM2R uses FILE_MARC to read MARC data. FILE_MARC allows MARC data as raw or as a string, from a file or a stream.

+--------------+ | MARC data +----+ | in a file | | +--------------+ | +--------------+ +-->| MARCFILE2RDF +-----+ +--------------+ | +--------------+ | | MARCXML data +----+ | | in a file | | +--------------+ | +-------------+ +-->| data as RDF | +--------------+ | +-------------+ | MARC data +----+ | | as a string | | | +--------------+ | +----------------+ | +-->| MARCSTRING2RDF +---+ +--------------+ | +----------------+ | MARCXML data +----+ | as a string | +--------------+

For the output these RDF serializations/formats are available (via easyRDF and JsonLD):

  • jsonld
  • json
  • php
  • ntriples
  • turtle
  • rdfxml
  • dot
  • n3
  • png
  • gif
  • svg

Todo

easyM2R is still be tested. There is no stabil version until november 2013. A problem is still the conversion of really big MARC files. Having enough system memory this might not be a problem.

12. November 2013
von Carsten Klee
Kommentare deaktiviert für easyM2R – easily convert MARC to RDF

easyM2R – easily convert MARC to RDF

easyM2R - easily convert MARC to RDF

Along with the development of the Holding Ontology, I was looking for a tool to easily convert MARC21 data to RDF. I looked into Benjamin Rokseth’ marc2rdf which is a very ambitious project, saying it is a coverter and harvester. But unfortunately it has a lot of dependencies and installation requirements. So I searched for a simpler tool but wasn’t lucky.

Then I decided to write my own converter with the pre-condition: it must be a tool very easy to use.

I hope I have fullfilled this condition with easyM2R - easily convert MARC to RDF

How it works

easyM2R is mainly based on three projects:

easyM2R uses Markus Lanthalers JSON-LD processor to read the configuration into a RDF graph, then using FILE_MARC to read the MARC data and passing it to easyRDF for output in multiple serializations.

Because JSON-LD is a lightweight Linked Data format, easy for humans to read and write, I choosed this format for the configuration part. It has the big advantage that you configure easyM2R directly in a RDF format, seeing how your data will look like.

Within the configurations JSON-LD document there is a special namespace, prefixed with marc2rdf. Under this namespace you can define MARC fields and subfields in a simple form called MARC spec. A MARC spec has the form field_subfield and points to the piece of data you like to be expressed through RDF.

MARC is (sometimes) a monster, which makes it not that easy to get the right data. For that reason easyM2R uses different callback functions to analyze the MARC records and returning the data in a desired way. Within the configurations JSON-LD document these callback functions can be intialized under the easyM2R namespace, like marc2rdf:callback_with_indicator2(). If there is a problem not solved by the default callback functions, you can also easily write your own using the FILE_MARC library, which is well documented under http://pear.php.net/package/File_MARC

Using easyM2R

easyM2R can be used via the command line or within a PHP script. Both are documented under https://github.com/cKlee/easyM2R/blob/master/README.md

easyM2R uses FILE_MARC to read MARC data. FILE_MARC allows MARC data as raw or as a string, from a file or a stream.

+--------------+ | MARC data +----+ | in a file | | +--------------+ | +--------------+ +-->| MARCFILE2RDF +-----+ +--------------+ | +--------------+ | | MARCXML data +----+ | | in a file | | +--------------+ | +-------------+ +-->| data as RDF | +--------------+ | +-------------+ | MARC data +----+ | | as a string | | | +--------------+ | +----------------+ | +-->| MARCSTRING2RDF +---+ +--------------+ | +----------------+ | MARCXML data +----+ | as a string | +--------------+

For the output these RDF serializations/formats are available (via easyRDF and JsonLD):

  • jsonld
  • json
  • php
  • ntriples
  • turtle
  • rdfxml
  • dot
  • n3
  • png
  • gif
  • svg

Todo

easyM2R is still be tested. There is no stabil version until november 2013. A problem is still the conversion of really big MARC files. Having enough system memory this might not be a problem.

1. Juli 2013
von Carsten Klee
Kommentare deaktiviert für Datatype for ISIL

Datatype for ISIL

Datatype for ISIL

Jakob wrote about Identifiers in RDF considered harmful . He shows that the common practice describing ISILs in RDF as Literals is problematic.

Since there are no standard way to encode ISILs in an URI there are only to possibilities left: Using a property like Adrian suggested http://purl.org/lobid/lv#isil or defining a datatype for ISILs.

I’m not sure, what is the best way to proceed, but here is my proposal for a ISIL-datatype:

<http://example.org/ISIL> a rdfs:Datatype ; rdfs:comment "String representing an ISIL - International Standard Identifier for Libraries and Related Organizations" ; owl:onDatatype xsd:string ; owl:withRestrictions ( [ xsd:pattern "[A-Z]{1,4}-[0-9a-zA-Z:\-/]{1,11}" ] ) .

So one could state now

$BIB dc11:identifier "DE-1a"^^<http://example.org/ISIL> .

Maybe the combination of both is a good solution too?

$BIB lobid:isil "DE-1a"^^<http://example.org/ISIL> .