2. Outline
✤ Quick walk through the history of the Web
✤ The core principles of the Semantic Web
✤ Some vocabularies, schemas and ontologies you should know
✤ Publishing the Web 3.0 way
✤ Consuming semantics
✤ Semantic Web gotchas
✤ Summary: how Semantic Web technologies can help
9. RDF is not a format!
Leather made by
Wood Chair
is a made
made of is a
Carpenter
Man
sits on
is a
has
Back
Leg
count used for
4 Sitting
10. RDF is not a format!
Leather made by
Wood Chair
is a made
predicate
subject
made of object is a
Carpenter
a statement Man
sits on
is a
has
Back
Leg
count used for
4 Sitting
11. Resource, Literals and BNodes
✤ Resource - everything identified by URI/IRI
✤ Literal - a value (“four”)
✤ with an optional type (4^^xsd:int)
✤ or optional lang tag (“four”@en)
✤ BNode - point in the graph with only local _:name
✤ Statement - a triple (subject, predicate, object)
✤ Reification - a statement about the statement
12. Resource, Literals and BNodes
✤ Resource - everything identified by URI/IRI
✤ Literalns: a value (“four”)
- <http://test.test/ns> .
@prefix
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema> .
✤ with an optional type (4^^xsd:int)
ns:Chair ns:has ns:Leg.
_:sentence a rdf:Statement; tag (“four”@en)
or optional lang
✤
rdf:subject ns:Chair;
rdf:predicate ns:has;
✤ BNoderdf:object ns:Leg;the graph with only
- point in local _:name
ns:count “4”^^xsd:int.
✤ Statement - a triple (subject, predicate, object)
✤ Reification - a statement about the statement
13. Vocabularies
✤ Schemes:
✤ Taxonomy: narrower/broader
✤ Thesaurus: related
✤ Folksonomy: “machines are (using) us” Peter Mika [Yahoo]
✤ Ontology: “An ontology is a specification of a conceptualization” Tom
Gruber, 1993 [*Siri]
14. Ontology languages
✤ RDF Schema: classes, properties, domains and ranges
✤ OWL (Web Ontology Language) - Lite, DL and Full, and OWL 2: (among
others) inverse functional property, symmetry, transitiveness and
disjointness
✤ But also: UML, ERD, ...
16. Dublin Core
✤ One of the oldest, originates from digital libraries
✤ Goals:
✤ semantic and syntactic interoperability
✤ shareable descriptions, vocabularies and constrains
✤ Defines:
✤ 15 basic concepts, such as dc:title, dc:creator
✤ Additional classes and concepts in DC Qualifiers
18. Good Relations
✤ De-facto standard for semantic e-commerce
✤ Supported by Google via Rich Snippets
✤ BestBuy showed how to increase revenue with it
✤ Part of the schema.org specification
✤ Example information:
✤ the geo-location of the store
✤ the countries the store ships to
✤ the payment options the ship accepts
✤ Distribute, open “Amazon”
19. schema.org
✤ Vocabulary for Rich Snippets and Knowledge Graph
✤ Yahoo+Bing+Google
✤ Microdata vs RDFa (Lite)
22. 5-Star Data Rules
✤ URIs = names for things
✤ HTTP URIs = enable look up
✤ Provide useful information
upon lookup, using the
standards (RDF*, SPARQL)
✤ Link to other URIs = enable
discovery of more things.
http://www.w3.org/DesignIssues/LinkedData.html
23. 5-Star Data Rules
✤ URIs = names for things
✤ HTTP URIs = enable look up
✤ Provide useful information
upon lookup, using the
standards (RDF*, SPARQL)
✤ Link to other URIs = enable
discovery of more things.
http://www.w3.org/DesignIssues/LinkedData.html
25. RDFa and RDFa Lite
✤ Extension to XHTML/HTML5 for embeding RDF graph semantics in
HTML syntax:
✤ property vs rel
✤ resource vs about
✤ typeof
✤ vocab, prefix
26. RDFa and RDFa Lite
✤ Extension to XHTML/HTML5 for embeding RDF graph semantics in
HTML syntax:
<p vocab="http://schema.org/"
property vs rel
✤ prefix="ov: http://open.vocab.org/terms/"
resource="#skruk"
typeof="Person">
My name is <span property="name">Sebastian Kruk</span>
✤ resource vs about
and you can give me a ring via
<span property="telephone">+41-78-87-961-89</span>.
<img property="image" src="http://bit.ly/QAYF10" />
My favorite animal is the <span property="ov:preferredAnimal">Hamster</span>.
✤
</p>typeof
✤ vocab, prefix
30. SPARQL
✤ W3C standard for querying RDF graphs
✤ Purposely made similar to SQL (to the extent possible)
✤ SPARQL endpoint: a standard way to expose (open) data published
by the service
38. Don’t overcomplicate
✤ Gödel’s Incompleteness Theorems
✤ First-Order Logic vs OWL-Full / CYC
✤ Jim Handler: “Little semantics go a long way”
✤ Folksonomies
39. OOP vs Description Logic
✤ B rdfs:subClassOf A
C rdfs:domain A
D rdfs:domain B
✤ Infers:
✤ C rdfs:domain B [WRONG!]
✤ D rdfs:domain A [OK]
40. OOP vs Description Logic
✤ B rdfs:subClassOf A
C rdfs:domain A
D rdfs:domain B domain
A C
✤ Infers: subClassOf
domain
B D
✤ C rdfs:domain B [WRONG!]
✤ D rdfs:domain A [OK]
41. Open World Assumptions
✤ RDF is by it’s virtue a distributed being
✤ You might only have a part of it
✤ The rest is on Linked Data
✤ Unlike in the close world assumption reasoning, if there is no
statement “Sebastian isFrom Poland” it does not mean, I am not.
42. RDBMS and NoSQL vs RDF
✤ We can store RDF in RDBMS; even easier in NoSQL
✤ Certain SPARQL path queries can be translated to SQL
✤ Usually no joint queries NoSQL ➡ DIY path querying
43. How can web semantics help
✤ interoperability
✤ information retrieval
✤ recommendations and matchmaking
✤ SEO
44. Linked Data is King
Dr. Sebastian Ryszard Kruk
CTO/CRO Knowledge Hives sp. z o.o., sebastian@kruk.me