34
#lod4h Publishing and Using Linked Open Data Richard J. Urban, Ph.D. School of Library and Information Studies Florida State University [email protected] @musebrarian

Publishing and Using Linked Open Data - Day 2

Embed Size (px)

Citation preview

Page 1: Publishing and Using Linked Open Data - Day 2

#lod4h

Publishing and Using Linked Open Data

Richard J. Urban, Ph.D.

School of Library and Information StudiesFlorida State [email protected]@musebrarian

Page 2: Publishing and Using Linked Open Data - Day 2

#lod4h

January 8, 2013Tuesday’s Schedule

• 9:00 am- 10:30 am Class Session: Information Modeling Fundamentals

• 10:30-10:45 am break

• 10:45- Noon Class Session: Linked Data Models

• Noon- 1:00 pm Lunch (on your own)

• 1:00- 2:45 pm Class Session: Searching Linked Data

• 2:45- 3:00 pm break

• 3:00-5:00 pm Class Session: Identifying Linked Data for Participant Projects

• 5:30-7:00 pm DHWI Public DH: API Workshop Registered Attendees Only

Page 3: Publishing and Using Linked Open Data - Day 2

#lod4h

Humanities Data Models

• What are the models that we currently use?– Document-based models– Database Models– Probabilistic/Statistical Models (NLP)

Page 4: Publishing and Using Linked Open Data - Day 2

#lod4h

How RDF is Different

• Based in knowledge representation languages (artificial intelligence)

• Grounded in formal predicate logic/description logics• 20th Century developments in the philosophy of

language (Leibnitz, Russell, Wittgenstein, Peirce, Frege, Kripke, Tarski, etc.)

•Intended to enable intelligent reasoning

Page 5: Publishing and Using Linked Open Data - Day 2

#lod4hhttp://en.wikipedia.org/wiki/Semantic_Web_Stack

Page 6: Publishing and Using Linked Open Data - Day 2

#lod4h

Model-Theoretic Semantics

1. use formal structures and rules to ensure that every legitimate language expression has a well-defined meaning;

2. define what is means for a statement in a language to be true under a particular interpretation;

3. allow us to formalize the intuitive notion of logical consequence, that is, of one statement 'following logically' from others; and…

4. provide a basis for implementing automated reasoning via an appropriate proof theory.

Page 7: Publishing and Using Linked Open Data - Day 2

#lod4h

Interpretations

• The basic intuition of model-theoretic semantics is that asserting a sentence makes a claim about the world: it is another way of saying that the world is, in fact, so arranged as to be an interpretation which makes the sentence true. In other words, an assertion amounts to stating a constraint on the possible ways the world might be.

– Anyone can say anything about anything.– But…you need to tell me what your interpretation is so

I can evaluate it.

Page 8: Publishing and Using Linked Open Data - Day 2

#lod4h

Entailment

• A entails B• A is true• Therefore B is

true

Page 9: Publishing and Using Linked Open Data - Day 2

#lod4h

Entailment

A. Jane is the mother of John.

B. All mothers are females.

C. No females are males.

D. Jane is not a male.

• Entailment enables us to generate valid inferences from RDF data.

Page 10: Publishing and Using Linked Open Data - Day 2

#lod4h

Identity & Constants

• Logical languages, like first-order logic, rely on binding constants to referents.

• RDF does this by using URIs as a constant.

Page 11: Publishing and Using Linked Open Data - Day 2

#lod4h

Literal/Non-Literal

• Literal: Text strings that are directly used as objects of a statement.

• Typed Literals: strings that conform to a datatype– XML Datatypes: http://goo.gl/4wQss– XMLLiteral

• Non-Literal: URIs that name a resource.

Page 12: Publishing and Using Linked Open Data - Day 2

#lod4h

Examples

foaf:name “Leonardo da Vinci”

dcterms:title “La Joconde”@fr

dcterms:title “Mona Lisa”@en

:birthday “1452-04-15”^^<http://www.w3.org/2001/XMLSchema#date> .

Plain literal

Type literal

Plain literal w/ language

Page 13: Publishing and Using Linked Open Data - Day 2

#lod4h

MODELING LINKED DATA WITH RDFS

Page 14: Publishing and Using Linked Open Data - Day 2

#lod4h

Classes/subclasses

• Class: types of resources which we wish to assign properties and relationships.

• Subclasses inherit all the properties of a class.

• RDFs allows a subclass to have multiple parents.

Page 15: Publishing and Using Linked Open Data - Day 2

#lod4h

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

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>

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

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

ex:vessel rdf:type rdfs:class ;

rdfs:label “Vessel” ;

ex:ship rdf:type rdfs:class;

rdfs:subClassOf ex:vessel ;

rdfs:label “Ship” .

Page 16: Publishing and Using Linked Open Data - Day 2

#lod4h

Properties/subproperties

• Properties: attributes of defined classes. Establish relationships between resources and values (literals, non-literals).

Page 17: Publishing and Using Linked Open Data - Day 2

#lod4h

ex:length rdf:type rdfs:property ;

rdfs:label “Length”

ex:loa rdf:type rdfs:property;

rdfs:subPropertyOf ex:length ;

rdfs:label “Length over all” ;

ex:lwl rdf:type rdfs:property;

rdfs:subPropertyOf ex:length ;

rdfs:label “Length at waterline” .

Page 18: Publishing and Using Linked Open Data - Day 2

#lod4h

Domain/Range

• Domain: which class may have a property (what can be the subject of a triple that uses this property)

• Range: what class of objects can be used with this property.– A class of resources– Literals/datatypes, etc.

Page 19: Publishing and Using Linked Open Data - Day 2

#lod4h

ex:loa rdfs:range xsd:float

ex:vessel_type rdf:type rdfs:property;

rdfs:domain ex:vessel ;

rdfs:range skos:concept .

Page 20: Publishing and Using Linked Open Data - Day 2

#lod4h

Limitations of RDFs

• Cardinality• Transitivity• Equivalence (of classes/instances)• Constraining range based on domain

– Domain:basketball teamMembers 5– Domain:soccer teamMembers 11

Page 21: Publishing and Using Linked Open Data - Day 2

#lod4h

An easier way!

• Protégé Ontology Editorhttp://protege.stanford.edu/

Page 22: Publishing and Using Linked Open Data - Day 2

#lod4h

Cultural Heritage

• CIDOC – Conceptual Reference Model– Lightweight Information Describing Objects

(LIDO) (XML Schema)– Europeana Data Model (EDM)

• Bibliontology• Open Annotation Collaboration

Page 23: Publishing and Using Linked Open Data - Day 2

#lod4h

LUNCH

Page 24: Publishing and Using Linked Open Data - Day 2

#lod4h

SPARQL

Page 25: Publishing and Using Linked Open Data - Day 2

#lod4h

Basic SPARQL

Prefix <…>

Prefix <…>

SELECT ?displayVariables

FROM/FROM NAMED

WHERE

{

subject object predicate .

}

ORDER BY/LIMIT/OFFSET

Declare what schemas you are using.

Query results

Specify a dataset

Query pattern

Query modifiers

Page 26: Publishing and Using Linked Open Data - Day 2

#lod4h

SELECT ?person

WHERE

{

?person :givenName "Richard" .

}

http://mith.umd.edu/dhwiwiki/index.php/SPARQL_Examples

Page 27: Publishing and Using Linked Open Data - Day 2

#lod4h

SELECT ?propertyName ?propertyValue

WHERE

{

<http://chi.cci.fsu.edu/person/rurban#>

?propertyName ?propertyValue .

}

Page 28: Publishing and Using Linked Open Data - Day 2

#lod4h

SELECT *

WHERE

{

?s ?p ?o .

}

Page 29: Publishing and Using Linked Open Data - Day 2

#lod4h

SELECT *

WHERE

{

?s ?p ?o .

}

Page 30: Publishing and Using Linked Open Data - Day 2

#lod4h

SELECT *

WHERE

{

?s ?p ?o .

FILTER (regex (?o, "edu", "i"))

}

Additional functions: http://www.w3.org/TR/rdf-sparql-query/#tests

Page 31: Publishing and Using Linked Open Data - Day 2

#lod4h

• CONSTRUCT: returns results as RDF triples (not a web page to browse)

• ASK: returns boolean (true/false)

• DESCRIBE: provide a specified set of properties for a resource

Page 32: Publishing and Using Linked Open Data - Day 2

#lod4h

dbPedia

• SPARQL endpointhttp://dbpedia.org/snorql/

• Faceted Searchhttp://dbpedia.org/fct/– View SPARQL

Page 33: Publishing and Using Linked Open Data - Day 2

#lod4h

LINKED DATA FOR PROJECTS

Page 34: Publishing and Using Linked Open Data - Day 2

#lod4h

Next up:

• 5:30-7:00 pm DHWI Public DH: API Workshop Registered Attendees Only