1 of 83

Linked Data and Music Encodings

Music Encoding Conference 2019

2 of 83

Overview of today

  1. Why interrelate data?

9.00 – 10.00

  1. How to describe data?

10:00 – 11.30 (break ~10:50 –11:05)

  1. Querying linked data

11.30 – 13.00

Lunch break (13.00 – 14.00)

  1. Interlinking datasets

14.00 – 15.00

  1. Linking into MEI

15.00 – 16.00

  1. Joint session with strand: “The Quotable Musical Text in a Digital Age: Modeling Complexity in the Renaissance and Today”

change room & break

16.15–18.00

Conference opening keynote

Georg Vogeler: “Encoding and its Logics – On the relationship between XML Encoding and Others”.

Austrian Academy of Sciences, Festsaal, 19.00

3 of 83

Web resources

4 of 83

  1. Why interrelate data?

FRBR, MEI, and the Music Ontology

5 of 83

Let’s talk about a piece of music (bibliographically)!

… should be trivial, right?

6 of 83

Missa solemnis!

Kyrie...

...Gloria...

...Credo...

...Sanctus...

...Agnus Dei!

7 of 83

midi

mxl

msczl

kern

MEI

8 of 83

9 of 83

FRBR Model

Functional

Requirements for

Bibliographic

Records

Work

Expression

Manifestation

Item

MEI

realization (of)

embodiment (of)

exemplar (of)

10 of 83

FRBR in the MEI Header

11 of 83

Source: https://dev.hoftheater-detmold.de/index.html#HoftheaterDetmold:werk_H020149

“Linked Data in the Source Description – Requirements of the Detmold Court Theatre Project”

Tomorrow at 13:30am!

12 of 83

Music Ontology: FRBR for music publishing

MusicalWork

Composition

Arrangement

Movement

Sound

Signal

Score

PublishedScore

Record

A printed score

A physical CD

A Spotify stream

Arranger

Engineer

Conductor

Performer

MusicArtist

Publisher

Performance

Recording

compose

produced_work

movement

arrangement

of

product

performance_of

produced

sound

produced_signal

recorded_in

agent

recorded_as

published_as

available_as

published_as

publisher

available_as

conducted

performed

engineer

Event

MusicalWork

MusicalExpression

MusicalManifestation

MusicalItem

Agent

13 of 83

Exercise 1: Describe your favourite work using FRBR and the Music Ontology

Explore music ontology specification: http://purl.org/ontology/mo/

Identify and interrelate:

Works, expressions, manifestations, items, events, agents.

14 of 83

  • How to describe data?

RDF, URIs, Triples and Turtle

15 of 83

Terminology: Internet, Web, Linked Data

Is there a difference between

  • the Internet,
  • the Web and
  • Linked Data?

If yes, what is it?

Source: W3C20 Anniversary Symposium 2014 “The Future of the Web” https://www.w3.org/20/#photo

16 of 83

Internet: Evolution

Sources: http://www.fibel.org/linux/lfo-0.6.0/node457.html (left); https://www.theatlantic.com/technology/archive/2012/07/what-the-internet-actually-looks-like/259815/ (right)

17 of 83

Web: Evolution

Source: Nova Spivack's illustration of the evolution of the WWW. Radar Networks & Nova Spivack, 2007. http://www.radarnetworks.com

18 of 83

Semantic Web: Vision

“The Semantic Web […] is an extension of the current one, in which information is given well-defined meaning, better enabling computers and people to work in cooperation.“

[graphics]

Photo by Andy Kelly on Unsplash (above)

Photo by Franck V. on Unsplash (left)

Berners-Lee, Tim; Hendler, James; Lassila, Ora: „The Semantic Web: A New Form of Web Content that is Meaningful to Computers Will Unleash a Revolution of New Possibilities“, in: Scientific American 284/5 (Mai 2001), S. 34–43

19 of 83

Semantic Web

vs.

Linked (Open) Data

= an (abstract) object

→ web of data using the infrastructure of the internet

= a recommended method

→ how data should be made accessible, linked and shared in this web

20 of 83

Linked (Open) Data:

5⭐ check list

21 of 83

Linked (Open) Data: Cloud (2007–2019)

Source: https://lod-cloud.net/versions/2019-03-29/lod-cloud.png

Source: http://lod-cloud.net/versions/2007-05-01/lod-cloud.png

22 of 83

Semantic Web: Technology Stack

Source: https://www.w3.org/2007/Talks/

0130-sb-W3CTechSemWeb/layerCake-4.png

Source: https://smiy.wordpress.com/2011/01/10/The-common-layered-semantic-web-technology-stack/

23 of 83

How to identify things on the web?

“digital fingerprint”

globally unique addresses

IRI

(“Internationalized Resource Identifier”)

Source: https://www.pinterest.de/networkfindercc/qr-code-design

24 of 83

URIs and why they are awesome

URN (“Unified Resource Name”)

  • permanent and location-independent name for a resource
  • Example: urn:isbn:3827370191

URI (“Uniform Resource Identifier”)

  • recommended superclass that can identify resources both by name and location
  • only ASCII characters are permitted; see RFC3986
  • Example: mailto:linkingmusic@mec2019.at

URL (“Uniform Resource Locator”)

  • Location of a resource in a network
  • Examples: http://www.example.org/semantic?web#einführung file:///C:/Introduction-Semantic-Web.txt

IRI (“Internationalized Resource Identifier”)

  • URI's that allow (almost) all Unicode characters
  • Example: http://кто.рф

Source: http://wiki.selfhtml.org/wiki/Urn-url-uri-iri

25 of 83

Resource Description Framework (RDF)

W3C standard ; https://www.w3.org/TR/rdf11-concepts/

provides fundamental syntax + semantics to describe digital representations of objects (resources)

triple structure: <subject> <predicate> <object> .

can be visualized as a (directed) graph

(set of triples = RDF Graph)

completely based on (globally unique) URI’s:

<http://example.org/semweb#subject> <http://example.org/semweb#predicate> <http://example.org/semweb#object> .

26 of 83

Resource Description Framework (RDF)

namespaces:

qnames (prefixing namespaces):

ex:subject

ex:object

ex:predicate

<http://example.org/semweb#subject>

<http://example.org/semweb#predicate>

<http://example.org/semweb#object> .

@prefix ex: <http://example.org/semweb#>

ex:subject ex:predicate ex:object .

Turtle

N-Triples

27 of 83

Resource Description Framework (RDF): serializations

<?xml version="1.0" encoding="UTF-8"?>

<rdf:RDF

xmlns:foaf="http://xmlns.com/foaf/0.1/"

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

<rdf:Description rdf:about="http://example.org/semweb#Pioneer1">

<foaf:name>Pioneericus</foaf:name>

<rdf:type rdf:resource="http://example.org/semweb#Pioneer"/>

</rdf:Description>

</rdf:RDF>

@prefix foaf: <http://xmlns.com/foaf/0.1/> .

@prefix semweb: <http://example.org/semweb#> .

semweb:Pioneer1 a semweb:Pioneer ;

foaf:name "Pioneericus" .

{ "@context": {

"semweb": "http://example.org/semweb#",

"foaf": "http://xmlns.com/foaf/0.1/"

},

"@id": "semweb:Pioneer1",

"@type": "semweb:Pioneer",

"foaf:name": "Pioneericus"

}

RDF/XML

JSON-LD

Turtle

semweb:

Pioneer1

semweb:

Pioneer

rdf:type

“Pioneericus”

foaf:name

28 of 83

Resource Description Framework (RDF):

object alternatives

blank nodes:

literals:

ex:subject

ex:predicate

<subject> <predicate> [ ] .

ex:WebernOp27 dct:creator [

rdf:type foaf:Person ;

foaf:name “Anton Webern” .

] .

lexical form + datatype IRI (+ language tag) → express simple data values like:

  • strings (typed: “I am an awesome string!”^^xsd:string; plain: “Je suis une valuer de string grandiose”@fr),
  • numbers (“2019”^^xsd:integer; “3.14”^^xsd:decimal) or
  • booleans (“true”^^xsd:boolean)

!! Turtle allows untyped / unquoted shortcuts: “String”, 2019, 3.14, true

“beautiful string”^^xsd:string

@prefix ex: <http://example.org/semweb#>

@prefix xsd: <http://www.w3.org/2001/XMLSchema#>

29 of 83

Resource Description Framework (RDF):

Extending triples / syntactic sugar

entity1

predicate1

<entity1> <predicate1> <entity2> ,

<entity3> .

<entity2> <predicate2> <entity4> ;

<predicate3> <entity5> ;

<predicate4> [ <predicate5> <entity6> ] .

entity3

predicate1

entity2

predicate2

entity4

entity5

predicate3

[ <predicate5>

<entity6> ]

predicate4

30 of 83

Resource Description Framework Schema (RDFS)

RDF

RDF Schema

properties

type

value

first

rest

subject

predicate

object

subClassOf

subPropertyOf

domain

range

member

label

comment

seeAlso

isDefinedBy

classes

langString

HTML

XMLLiteral

Property

Statement

Bad

Seq

Alt

List

Resource

Literal

Class

Datatype

Container

ContainerMembershipProperty

31 of 83

Web Ontology Language (OWL)

https://www.w3.org/TR/owl2-overview/

most important vocabulary for the conception of semantically expressive/rich ontologies

extends RDF/RDFS by complex concepts that enable logical operations of varying degrees

comes in various flavours (Lite, Description Logic DL, Full)

owl:sameAs; owl:disjointWith

32 of 83

Web Ontology Language (OWL)

value and cardinality restrictions/constraints

owl:someValuesFrom ("not zero"), owl:allValuesFrom (ALL), owl:hasValue

owl:minCardinality (MIN), owl:maxCardinality (MAX)

logical operators

owl:intersectionOf (AND), owl:unionOf (OR)

:WindInstrument rdf:type owl:Class ;

owl:equivalentClass [ owl:intersectionOf (

:Instrument [

rdf:type owl:Restriction ;

owl:onProperty :soundsBy ;

owl:allValuesFrom :Air

]

) ;

rdf:type owl:Class .

] .

Translated with www.DeepL.com/Translator

33 of 83

Summary

URIs (globally unique identifiers), RDF (“grammar”), RDFS (basic concepts), OWL (complex logic)

triple structure: <subject> <predicate> <object> .

with extensions (blank nodes, literals, syntactic sugar)

(set of triples = RDF Graph)

completely based on URI’s (that can be shortened by prefixing namespaces)

<http://example.org/semweb#subject>

<http://example.org/semweb#predicate> <http://example.org/semweb#object> .

34 of 83

Exercise 2: Use the SemLab editor to convert your work metadata to RDF

35 of 83

  • Querying linked data

Ontologies, triplestores & SPARQL

36 of 83

To query data, we have to know

how and where our data is stored

37 of 83

Ontologies: definition

„An ontology is a formal, explicit specification of a shared conceptualisation.“

Studer, Rudi; Benjamins, Richard; Fensel, Dieter: „Knowledge Engineering: Principles and Methods“, in: Data & Knowledge Engineering 25/1–2 (1998), pp. 161–197, here p. 184

following:

Gruber, Thomas: „A Translation Approach to Portable Ontology Specifications“, in: Knowledge Acquisition 5/2 (1993), pp. 199–220, here p. 199

Bottom: Earliest attested version of the „Scutum Fidei“ diagram by Petrus of Poitiers, about 1210 (British Library, Cotton Faustina manuscript B. VII, folio 42v)

(Source: PetrusPictaviensis CottonFaustinaBVII-folio42v ScutumFidei early13thc.jpg)

Left: OWL model of the „Scutum fidei“ visualised as graph

(Source: generated with WebVowl 1.1.1: http://visualdataweb.de/webvowl/#file=shieldoftrinity.owl, 2018. CC-BY-SA 4.0)

38 of 83

Ontologies: ways of classification

own graphic following:

Guarino, Nicola: „Formal Ontology and Information Systems“, in: Proceedings of FOIS (1998), pp. 3–15, here p. 9

39 of 83

Ontologies: existing models

LODstats

(http://lodstats.aksw.org/)

Linked Open Vocabularies

(http://lov.okfn.org/dataset/lov/) →

Open Metadata Registry

(http://metadataregistry.org/)

Life time saver(!): prefix.cc

40 of 83

Ontologies: existing models

possibly most used, since oldest:

Friend-Of-A-Friend (FOAF)

http://xmlns.com/foaf/spec/

top-level ontologies:

Ontologies of the Dublin Core Metadata Initiative (DCMI)

http://dublincore.org/specifications/

Simple Knowledge Organisation System (SKOS)

https://www.w3.org/TR/2009/REC-skos-reference-20090818/

Person, Organization, Document

name, knows, homepage

Agent, FileFormat, LicenseDocument

creator, contributor, publisher

description, rights, title, source

Concept, Collection

note, related,

exactMatch, closeMatch, broadMatch

41 of 83

Ontologies: existing models for CHO (CIDOC CRM)

http://www.cidoc-crm.org/

broad community

high expressiveness for cultural heritage objects

standardized as ISO norm

(ISO 21127:2006

resp. 21127:2014)

event-based approach focussing on processes rather than objects

Source: http://www.cidoc-crm.org/sites/default/files/CIDOC-501.PNG

42 of 83

Ontologies: existing models for CHO (CIDOC CRM)

Source: http://www.cidoc-crm.org/collaborations

43 of 83

Ontologies: existing models for CHO (CIDOC CRMinf)

Source: Anton Webern Gesamtausgabe, 2019, following: Stephen Stead: CRMinf: the Argumentation Model, 2015. © CIDOC CRM, 2015. CC-BY 4.0

Video recording: Stephen Stead, CRMinf: the Argumentation Model. Presentation at the OeRC, Oxford, 2015. © CIDOC CRM, 2015. CC-BY 4.0

44 of 83

Ontologies: existing models for CHO (Europeana)

https://pro.europeana.eu/resources/standardization-tools/edm-documentation

<aggregation> concept

fundamental approach for integration of heterogeneous data sources and providers

aggregated over 40.000 objects from MIMO (Musical Instrument Museums Online)

Source: https://pro.europeana.eu/page/mimo-edm

45 of 83

Ontologies: existing models for music (MO)

Music ontology: http://purl.org/ontology/mo → see first session

46 of 83

Ontologies: existing models for music (MusicOWL)

Source: Own graphic, following: Jim Jones, Kleber Tertuliano, Diego de Siqueira Braga & Tomi Kauppinen. 2017. “MusicOWL. The Music Score Ontology”, in: Proceedings of the International Conference on Web Intelligence (WI '17), pp. 1222–1229, here p. 1224

47 of 83

Ontologies: existing models for music (DoReMus)

Source: https://www.doremus.org/?page_id=30

48 of 83

Ontologies: existing models for music (DoReMus)

Source: https://raw.githubusercontent.com/DOREMUS-ANR/doremus-papers/master/kcap2017/tutorial/figs/schema_2.png

DoReMus

49 of 83

Ontologies: existing models for music (DoReMus)

F14 Individual Work

F15 Complex Work

F22 Self-Contained Expression

F4 Manifestation Singleton

F28 Expression Creation

R10 has member

R9 is realised in

P148 has component of

P148 has component of

R19 created a realisation of

R17 created

R18 created

P128 is carried by

F15 Complex Work

F15 Complex Work

F14 Individual Work

F22 Self-Contained Expression

F28 Expression Creation

R10 has member

R9 is realised in

R19 created a realisation of

R17 created

F14 Individual Work

F22 Self-Contained Expression

F28 Expression Creation

R10 has member

R9 is realised in

R19 created a realisation of

R17 created

Event

MusicalWork

MusicalExpression

MusicalManifestation

Agent

P14 carried out by

P9 consists of

E7 Activity

E21 Person

50 of 83

Triplestores

set of triples = RDF Graph

is stored, managed and processed in specialized graph databases, so-called triplestores

overview of existing triplestores and the approximate amount of processable triples

51 of 83

SPARQL Protocol and RDF Query Language (SPARQL)

defines a standardized query language, transfer protocol for search queries and results as well as an XML structure for the reproduction of search results

allows complex queries and manipulations of data represented and structured in RDF

based on graph matching

SPARQL endpoints = processable access points to RDF data sets

Overview at: https://www.w3.org/wiki/SparqlEndpoints

Translated with www.DeepL.com/Translator

52 of 83

SPARQL:

Query syntax

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>

PREFIX foaf:<http://xmlns.com/foaf/0.1/>

SELECT DISTINCT * # * shortcut for all bound vars (here: ?who & ?name)

# DISTINCT removes duplicates from results

WHERE {

[] a foaf:Person ; foaf:name “Johann Seb. Bach” ;

owl:sameAs ?id .# “a” = shortcut for rdf:type

}

LIMIT 10

prefixes

query type section with variable(s)

SELECT, CONSTRUCT, ASK, DESCRIBE

query pattern clause with …

triple(s) to match

query modifier(s)

ORDER BY, GROUP BY

LIMIT

foaf:

Person

?who

?name

53 of 83

54 of 83

4. Interlinking datasets

Identifiers, authority, and alignment

55 of 83

“Josquin des Prez (French: [ʒɔskɛ̃ depʁe]; c. 1450/1455 – 27 August 1521), often referred to simply as Josquin, was a Franco-Flemish composer of the Renaissance …”

1521-8-27

“Desprez is a crater on Mercury. It has a diameter of 50 kilometers. Its name was adopted by the International Astronomical Union in 1979. Desprez is named for the French composer Josquin des Prez, who lived from 1440 to 1521.”

56 of 83

1450p-27.08.1521

Condé-sur-l'Escaut

De ce bocage l'épais feuillage

Musettes

8''CFE/q8E4D8C8.F6Gq8F8E/q8E8DC

“Josquin des Prez (French: [ʒɔskɛ̃ depʁe]; c. 1450/1455 – 27 August 1521), often referred to simply as Josquin, was a Franco-Flemish composer of the Renaissance …”

1450-1-1

1521-8-27

male

“Desprez is a crater on Mercury. It has a diameter of 50 kilometers. Its name was adopted by the International Astronomical Union in 1979. Desprez is named for the French composer Josquin des Prez, who lived from 1440 to 1521.”

57 of 83

How do we match these Josquins?

Name?

De Pres, Deprès, Josquin, Deprez, Josquin, Des Prés, Josquin, Des Près, Josse, Des Prez, Després, Josquin, Desprez, Josquin, Desprez, Josse, Du Pres, Dupré, Josquin, Gossequin des Pres, Ioschinus de Pratis, Ioschinus de Prattis, Iuschino, Jodocus [de Prato], Jodocus [Pratensis], Jodocus a Prato, Jodocus de Pratis, Jöskin, Josquin [Deprez], Josquin [des Pres], Josquin [des Prez], Josquin d'Ascanio, Josquin Dascanio, Josquin des Prés, Josse [des Prés], Josse Desprez, Jossequin des Pres, Jossequin Lebloitte dit Desprez, Judocus de Pratis, Judocus des Pres, Juschino, Praetensis, Jodici, Prés, Josquin D., Pres, Josquin de, Prés, Josquin des, Prez, ...

...what, no authority?

58 of 83

Source: Linked Open Data at BVMC https://upload.wikimedia.org/wikipedia/commons/f/f6/Linked-Open-Data-BVMC.png (Gustavo.candela [CC BY-SA 4.0]

Authority files

Regional:

e.g. Gemeinsame Normdatei (GND)

Organisational:

e.g. RISM

Crowd-sourced:

e.g. MusicBrainz

International

e.g. Virtual International Authority File (VIAF)

International Standard Name Identifier (ISNI)

Bibliothèque nationale de France

59 of 83

60 of 83

owl:sameAs, skos:exactMatch, and friends…

— good enough?

Error,

ambiguity,

scholarly dispute,

algorithmic imprecision...

61 of 83

Similarity ontology

rism:pe20000367

sim:method

… alignment method...

sim:weight

score

a sim:Similarity

sim:element

sim:element

a sim:Similarity

Oasis

The Beatles

sim:subject

sim:object

owl:sameAs

dbr:Josquin_des_Prez

62 of 83

SALT match chains

63 of 83

Exercise 4: Querying multiple datasets

https://tinyurl.com/LinkedDataMEC-exercises

64 of 83

Federated query combining 4 data endpoints (DBPEDIA, RISM, DOREMUS, SLICKMEM)

65 of 83

5. Linking into MEI

Addressability, Web Annotations, and the Music Encoding and Linked Data (MELD) framework

66 of 83

Linking out of MEI

67 of 83

Addressable score encodings

68 of 83

Web Annotations

anno1

body

target

oa:hasBody

oa:hasTarget

“This section is particularly tricky, potentially requiring alternative fingering ...”

skos:broader

...related (somehow)...

ex:cueAudio

oa:motivatedBy

oa:motivatedBy

oa:linking

oa:describing

myMEI.mei#beam-L24F2

myAudio.mp3#t=17.024

anno2

69 of 83

70 of 83

FRBR Model

Functional

Requirements for

Bibliographic

Records

Work

Expression

Manifestation

Item

MEI

realization (of)

embodiment (of)

exemplar (of)

Expression

MEI

Manifestation

embodiment (of)

71 of 83

Score

PublishedScore

published_as

MusicalWork

Composition

Arrangement

Movement

Sound

Signal

Record

A printed score

A physical CD

A Spotify stream

Arranger

Engineer

Conductor

Performer

MusicArtist

Publisher

Performance

Recording

compose

produced_work

movement

arrangement

of

product

performance_of

produced

sound

produced_signal

recorded_in

agent

recorded_as

published_as

available_as

publisher

available_as

conducted

performed

engineer

Event

MusicalWork

MusicalExpression

MusicalManifestation

MusicalItem

Agent

72 of 83

Segment Ontology

Score

PublishedScore

published_as

so:onSegmentLine

Event

MusicalWork

MusicalExpression

MusicalManifestation

MusicalItem

Agent

so:Segment

meld:segments

so:SegmentLine

so:onSegmentLine

frbr:embodiment

rdf:Bag

myMEI.mei#note3

myMEI.mei#measure2

myMEI.mei#section1

rdfs:member

frbr:partOf

frbr:embodiment

rdf:Bag

frbr:embodiment

rdf:Bag

so:segmentAfter

so:segmentBefore

so:Segment

so:Segment

so:segmentBefore

so:segmentAfter

73 of 83

Encoding Interactivity

74 of 83

...demo…?

75 of 83

“Towards Richer Online Music Public-domain Archives: Providing enriched access to classical music encodings”

Tomorrow at 10am!

David M. Weigl, London, 5. April 2019

76 of 83

Exercise 5: Create Web Annotations to highlight RISM incipits from SPARQL endpoint

https://tinyurl.com/LinkedDataMEC-exercises

77 of 83

6. Joint Session

78 of 83

Linked Data and Music Encodings

Summary of the Day

79 of 83

  • Why interrelate data?

FRBR, MEI, and the Music Ontology

80 of 83

  • How to describe data?

RDF, URIs, Triples and Turtle

entity1

predicate1

entity3

predicate1

entity2

predicate2

entity4

entity5

predicate3

[ <predicate5>

<entity6> ]

predicate4

81 of 83

  • Querying linked data

Ontologies, Triplestores & SPARQL

82 of 83

  • Interlinking datasets

Identifiers, authority, and alignment

8''CFE/q8E4D8C8.F6Gq8F8E/q8E8DC

SERVICE <http://dbpedia.org/sparql>

{

?dbpediaPerson a dbo:Person ;

owl:sameAs ?viafId.

}

83 of 83

  • Linking into MEI

Addressability, Web Annotations, and MELD

oa:hasTarget

“This section is particularly tricky, potentially requiring alternative fingering ...”

oa:describing

oa:motivatedBy

myMEI.mei#beam-L24F2

anno2