SlideShare une entreprise Scribd logo
1  sur  31
13 Novembre, 2015
Modellazione Semantica
con JSON-LD
Sante J. Achille
Search Marketing Consultant
@sjachille
smxmilan.it
@sjachille
#SMX #22A
• Ingegnere, Search Marketing Specialist
• Ha analizzato, ottimizzato e gestito numerosi siti in 20 anni di attività
professionale
• Ama proverbi ed usanze della tradizione popolare
• Motto: Why Be Normal?
http://achille.name/
Oggi parliamo di semantica per il web
smxmilan.it
@sjachille
#SMX #22A
Dati
Informazioni
La più grande sfida dei motori di ricerca?
Ridurre “Incertezza” e “Ambiguità”
smxmilan.it
@sjachille
#SMX #22A
“Your web pages have an underlying meaning that
people understand when they read the web
pages.
But search engines have a limited
understanding of what is being discussed on those
pages.”
Perché dati Strutturati?
smxmilan.it
@sjachille
#SMX #22A
Perché dati Strutturati?
By adding additional tags to the
HTML of your web pages … you can
help search engines and other
applications better understand
your content and display it in a
useful, relevant way.
smxmilan.it
@sjachille
#SMX #22A
Dati
Informazioni
Requisiti
Disponibilità
Consistenza
Non Ambiguità
Affidabilità
smxmilan.it
@sjachille
#SMX #22A
Dati
Informazioni
Attributi
Proprietà (persona, animale, o cosa)
Caratteristiche (dimensioni, peso, nome, … )
Location (Continent, Country, City … )
smxmilan.it
@sjachille
#SMX #22A
Dati
Informazioni
Entità
smxmilan.it
@sjachille
#SMX #22A
http://schema.org/docs/full.html
smxmilan.it
@sjachille
#SMX #22A
JSON (JavaScript Object Notation) is a
lightweight data-interchange format. … It is
easy for machines to parse and generate. It is
based on …
JSON is a text format that is completely
language independent but uses conventions
that are familiar to programmers of the C-
family of languages, including C, C++, C#,
Java, JavaScript, Perl, Python, and many
others.
These properties make JSON an ideal data-
interchange language.
smxmilan.it
@sjachille
#SMX #22A
“JSON-LD is a lightweight
Linked Data format that is easy
for humans to read and write”
http://www.w3.org/TR/2013/CR-json-ld-20130910/
http://www.w3.org/TR/2013/CR-json-ld-api-20130910/
Creating semantic sites with Web Components and JSON-LD
smxmilan.it
@sjachille
#SMX #22A
Schema.org e JSON-LD
smxmilan.it
@sjachille
#SMX #22A
Schema.org …
<div itemscope itemtype="http://schema.org/Movie">
<h1 itemprop="name">Avatar</h1>
<div itemprop="director" itemscope
itemtype="http://schema.org/Person">
Director: <span itemprop="givenName"> James</span> <span
itemprop="familyName">Cameron</span> (born August 16, 1954)
<meta itemprop="birthDate" content ="1954-08-16" />
</div>
<span itemprop="genre">Science fiction</span>
<a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a>
</div>
smxmilan.it
@sjachille
#SMX #22A
JSON-LD…
{
"@context":
{
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"foaf": "http://xmlns.com/foaf/0.1/",
"rel": "purl.org/vocab/relationship/",
"schema": "https://www.schema.org/"
},
"@id": "http://example.com/people/mario-rossi/",
"@type" : "foaf:Person",
"foaf:name": ”Mario Rossi",
"foaf:based_near": "http://www.geonames.org/3333125",
"rel:employerOf": "http://example.com/people/joe-smoe/",
"schema:worksFor" : {
"@type" : "schema:Organization",
"schema:legalName" : ”Mario Rossi Inc.",
"schema:vatID" : "XXXXXXXXX",
"schema:email" : “mario@rossi.com",
"schema:telephone" : "+39.xxx xx xx xxx"
} } } }}
smxmilan.it
@sjachille
#SMX #22A
smxmilan.it
@sjachille
#SMX #22A
The Resource Description Framework (RDF) is a framework for
expressing information about resources. Resources can be
anything, including documents, people, physical objects, and
abstract concepts.
http://www.w3.org/TR/rdf11-primer/
• Le informazioni sono rappresentate ed interconnesse utilizzando il
modello vettoriale Nodo - Arco del Grafo
smxmilan.it
@sjachille
#SMX #22A
In RDF la descrizione di una risorsa è rappresentata da una serie di triple.
Le componenti di ciascuna tripla sono il Soggetto - Predicato - Oggetto
Una tripla emula la struttura di una frase semplice come questa:
smxmilan.it
@sjachille
#SMX #22A
Il Soggetto della tripla è la URI che identifica la risorsa che si sta descrivendo
L’Oggetto può essere un valore (stringa, numero, data, …) oppure la URI di un’altra
risorsa che in qualche modo è in relazione con il soggetto
Il Predicato esplicita la relazione che intercorre tra soggetto ed oggetto ed è una URI
scelto tra quelli disponibili nei vari Vocabolari …
smxmilan.it
@sjachille
#SMX #22A
{
"@context":
{
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"foaf": "http://xmlns.com/foaf/0.1/",
"rel": "purl.org/vocab/relationship/",
"schema": "https://www.schema.org/"
},
"@id": "http://example.com/people/mario-rossi/",
"@type" : "foaf:Person",
"foaf:name": ”Mario Rossi",
"foaf:based_near": "http://www.geonames.org/3333125",
"rel:employerOf": "http://example.com/people/mario-rossi/",
"schema:worksFor" : {
"@type" : "schema:Organization",
"schema:legalName" : "Mario Rossi Srl",
"schema:vatID" : "XXXXXXXXX",
"schema:email" : “mario.rossi@dominio.com",
"schema:telephone" : "+39.123 45 67 890"
} } } }}
JSON-LD @work…
smxmilan.it
@sjachille
#SMX #22A
Specifica di JSON-LD: http://www.w3.org/TR/json-ld/#syntax-tokens-and-keywords
3.3 Syntax Tokens and Keywords
@context
Used to define the short-hand names that are used throughout a JSON-LD document…
@id
Used to uniquely identify things that are being described in the document with IRIs …
@type
Used to set the data type of a node or typed value…
@vocab
Used to expand properties and values in @type with a common prefix IRI…
JSON-LD @work…
smxmilan.it
@sjachille
#SMX #22A
Usare JSON-LD per lo sviluppo del modello
semantico dei contenuti per minimizzare
ambiguità ed indeterminazione
JSON-LD @work…
smxmilan.it
@sjachille
#SMX #22A
{
"@context": {
"schema": "https://schema.org/"
},
"@id" : "https://mywebsite.com/blogposturl/",
"@type": "schema:BlogPosting",
"schema:datePublished" : "YYYY-MM-DD",
"schema:name": "BLOGPOST NAME",
"schema:headline" : "POST TITLE",
"schema:description": "A DESCRIPTION - LIKE META DESCRIPTION
TAG",
"schema:mainEntityOfPage" : "URL",
"schema:image" : "https://mywebsite.com/wp-content/themes/DD-
MM-YYYY/images/majestic_large.png",
JSON-LD @work…
smxmilan.it
@sjachille
#SMX #22A
"schema:isPartOf" : {
"@id" : "https://mywebsite.com/",
"@type" : "schema:Blog",
"schema:name" : "My Blog",
"schema:description": "A DESCRIPTION OF MY BLOG - HOW
BEAUTIFUL AND INTERESTING MY CONTENT IS AND WHY EVERBODY
SHOULD READ IT!"
},
JSON-LD @work…
smxmilan.it
@sjachille
#SMX #22A
"schema:author" : {
"@id" : "http://blog.achille.name/",
"@type" : "schema:Person",
"schema:givenName": "FIRST NAME",
"schema:additionalName": "MIDDLE NAME OR INITIAL",
"schema:familyName": "FAMILY NAME (SURNAME)",
"schema:jobTitle" : "SEARCH MARKETING CONSULTANT",
"schema:sameAs" : "https://twitter.com/sjachille",
"schema:sameAs" : "https://plus.google.com/+SanteJAchille/",
"schema:sameAs" : "https://www.facebook.com/sjachille"
}
}
JSON-LD @work…
smxmilan.it
@sjachille
#SMX #22A
smxmilan.it
@sjachille
#SMX #22A
Usare SCHEMA.org per ulteriori informazioni di
dettaglio “in line” nelle pagine (definizione
della struttura della pagina, informazioni su
prodotti per Ecommerce… in generale tutto
quello che può essere caratterizzato per
fornire contesto e struttura alle informazioni)
SCHEMA.org @work…
smxmilan.it
@sjachille
#SMX #22A
Schema Markup Model for IMAGES
smxmilan.it
@sjachille
#SMX #22A
Schema Markup for Documents
<div itemprop="image" itemscope=""
itemtype="http://schema.org/ImageObject">
<meta itemprop="description" content="I-797, Notice of Action: I-601,
application for travel document: approval notice. " />
<div itemprop="exampleOfWork" itemscope=""
itemtype="http://schema.org/CreativeWork" >
<meta itemprop="isBasedOnUrl" content="http://www.uscis.gov/i-601" />
</div>
[caption]<a itemprop="url" href="XXX"><img itemprop="image"
src="XXX" alt="XXX" width="" height="" class="XXX" /></a> [/caption]
</div>
smxmilan.it
@sjachille
#SMX #22A
Il processo è iterativo - quasi impossibile arrivare
ad un modello definitivo subito
Nuove proprietà sono introdotte di continuo su
schema.org
I modelli vanno aggiornati periodicamente
Prova, Riprova ed Aggiorna!
smxmilan.it
@sjachille
#SMX #22A

Contenu connexe

Similaire à JSON-LD e Schema.org per il Web Semantico: SMX milano 2015

Sviluppo web con Ruby on Rails
Sviluppo web con Ruby on RailsSviluppo web con Ruby on Rails
Sviluppo web con Ruby on Railsjekil
 
XML &amp; XSLT
XML &amp; XSLTXML &amp; XSLT
XML &amp; XSLTapest
 
I dati strutturati in Wordpress
I dati strutturati in WordpressI dati strutturati in Wordpress
I dati strutturati in WordpressStefano Torselli
 
RDFa 1.1 - Seminario Web Semantico 2015
 RDFa 1.1 - Seminario Web Semantico 2015 RDFa 1.1 - Seminario Web Semantico 2015
RDFa 1.1 - Seminario Web Semantico 2015Giuseppe Luciano
 
Html e Css - 2 | WebMaster & WebDesigner
 Html e Css - 2 | WebMaster & WebDesigner Html e Css - 2 | WebMaster & WebDesigner
Html e Css - 2 | WebMaster & WebDesignerMatteo Magni
 
Html e Css - 2 | WebMaster & WebDesigner
Html e Css - 2 | WebMaster & WebDesignerHtml e Css - 2 | WebMaster & WebDesigner
Html e Css - 2 | WebMaster & WebDesignerMatteo Magni
 
Couchbase Meetup - "Introduzione a NoSQL e Couchbase"
Couchbase Meetup - "Introduzione a NoSQL e Couchbase"Couchbase Meetup - "Introduzione a NoSQL e Couchbase"
Couchbase Meetup - "Introduzione a NoSQL e Couchbase"Franco Caporale
 
C'è semantica in questo web
C'è semantica in questo webC'è semantica in questo web
C'è semantica in questo webNet7
 
IC2009 Anatomia di un Semantic Search Engine
IC2009 Anatomia di un Semantic Search EngineIC2009 Anatomia di un Semantic Search Engine
IC2009 Anatomia di un Semantic Search EngineEmanuele Della Valle
 
•Blog: quali tecnologie per il futuro?
•Blog: quali tecnologie per il futuro?•Blog: quali tecnologie per il futuro?
•Blog: quali tecnologie per il futuro?IWA
 
Web base-02-css
Web base-02-cssWeb base-02-css
Web base-02-cssStudiabo
 
Happy Monday #1: the Web API guidelines for happy developers
Happy Monday #1: the Web API guidelines for happy developersHappy Monday #1: the Web API guidelines for happy developers
Happy Monday #1: the Web API guidelines for happy developersBENTOSA
 
SEO: Search Engine Optimization (slide del TT Tourism 2014)
SEO: Search Engine Optimization (slide del TT Tourism 2014)SEO: Search Engine Optimization (slide del TT Tourism 2014)
SEO: Search Engine Optimization (slide del TT Tourism 2014)Alessandro Mazzù
 
I servizi semantici di analisi testuale nel progetto SenTaClAus
I servizi semantici di analisi testuale nel progetto SenTaClAusI servizi semantici di analisi testuale nel progetto SenTaClAus
I servizi semantici di analisi testuale nel progetto SenTaClAusNet7
 
IC2008 Emanuele Della Valle Semantic Web
IC2008 Emanuele Della Valle Semantic WebIC2008 Emanuele Della Valle Semantic Web
IC2008 Emanuele Della Valle Semantic WebEmanuele Della Valle
 
Corso HTML per l'editoria
Corso HTML per l'editoriaCorso HTML per l'editoria
Corso HTML per l'editoriaDiego La Monica
 
Il "Knowledge Graph" della Pubblica Amministrazione Italiana
Il "Knowledge Graph" della Pubblica Amministrazione ItalianaIl "Knowledge Graph" della Pubblica Amministrazione Italiana
Il "Knowledge Graph" della Pubblica Amministrazione ItalianaGraphRM
 

Similaire à JSON-LD e Schema.org per il Web Semantico: SMX milano 2015 (20)

Sviluppo web con Ruby on Rails
Sviluppo web con Ruby on RailsSviluppo web con Ruby on Rails
Sviluppo web con Ruby on Rails
 
XML &amp; XSLT
XML &amp; XSLTXML &amp; XSLT
XML &amp; XSLT
 
I dati strutturati in Wordpress
I dati strutturati in WordpressI dati strutturati in Wordpress
I dati strutturati in Wordpress
 
RDFa 1.1 - Seminario Web Semantico 2015
 RDFa 1.1 - Seminario Web Semantico 2015 RDFa 1.1 - Seminario Web Semantico 2015
RDFa 1.1 - Seminario Web Semantico 2015
 
HTML e CSS
HTML e CSSHTML e CSS
HTML e CSS
 
Html e Css - 2 | WebMaster & WebDesigner
 Html e Css - 2 | WebMaster & WebDesigner Html e Css - 2 | WebMaster & WebDesigner
Html e Css - 2 | WebMaster & WebDesigner
 
Html e Css - 2 | WebMaster & WebDesigner
Html e Css - 2 | WebMaster & WebDesignerHtml e Css - 2 | WebMaster & WebDesigner
Html e Css - 2 | WebMaster & WebDesigner
 
Couchbase Meetup - "Introduzione a NoSQL e Couchbase"
Couchbase Meetup - "Introduzione a NoSQL e Couchbase"Couchbase Meetup - "Introduzione a NoSQL e Couchbase"
Couchbase Meetup - "Introduzione a NoSQL e Couchbase"
 
C'è semantica in questo web
C'è semantica in questo webC'è semantica in questo web
C'è semantica in questo web
 
IC2009 Anatomia di un Semantic Search Engine
IC2009 Anatomia di un Semantic Search EngineIC2009 Anatomia di un Semantic Search Engine
IC2009 Anatomia di un Semantic Search Engine
 
•Blog: quali tecnologie per il futuro?
•Blog: quali tecnologie per il futuro?•Blog: quali tecnologie per il futuro?
•Blog: quali tecnologie per il futuro?
 
Web base-02-css
Web base-02-cssWeb base-02-css
Web base-02-css
 
Happy Monday #1: the Web API guidelines for happy developers
Happy Monday #1: the Web API guidelines for happy developersHappy Monday #1: the Web API guidelines for happy developers
Happy Monday #1: the Web API guidelines for happy developers
 
SEO: Search Engine Optimization (slide del TT Tourism 2014)
SEO: Search Engine Optimization (slide del TT Tourism 2014)SEO: Search Engine Optimization (slide del TT Tourism 2014)
SEO: Search Engine Optimization (slide del TT Tourism 2014)
 
Come fare SEO nel 2014
Come fare SEO nel 2014Come fare SEO nel 2014
Come fare SEO nel 2014
 
Riccardo Govoni - Search
Riccardo Govoni - SearchRiccardo Govoni - Search
Riccardo Govoni - Search
 
I servizi semantici di analisi testuale nel progetto SenTaClAus
I servizi semantici di analisi testuale nel progetto SenTaClAusI servizi semantici di analisi testuale nel progetto SenTaClAus
I servizi semantici di analisi testuale nel progetto SenTaClAus
 
IC2008 Emanuele Della Valle Semantic Web
IC2008 Emanuele Della Valle Semantic WebIC2008 Emanuele Della Valle Semantic Web
IC2008 Emanuele Della Valle Semantic Web
 
Corso HTML per l'editoria
Corso HTML per l'editoriaCorso HTML per l'editoria
Corso HTML per l'editoria
 
Il "Knowledge Graph" della Pubblica Amministrazione Italiana
Il "Knowledge Graph" della Pubblica Amministrazione ItalianaIl "Knowledge Graph" della Pubblica Amministrazione Italiana
Il "Knowledge Graph" della Pubblica Amministrazione Italiana
 

Plus de Sante J. Achille

2023.064.Tbexcon.com.GA4_and_Beyond_2.pptx
2023.064.Tbexcon.com.GA4_and_Beyond_2.pptx2023.064.Tbexcon.com.GA4_and_Beyond_2.pptx
2023.064.Tbexcon.com.GA4_and_Beyond_2.pptxSante J. Achille
 
A Simple method to Create Content using NLP
A Simple method to Create Content using NLP A Simple method to Create Content using NLP
A Simple method to Create Content using NLP Sante J. Achille
 
Majestic Workshop on Backlinks and Link Building
Majestic Workshop on Backlinks and Link BuildingMajestic Workshop on Backlinks and Link Building
Majestic Workshop on Backlinks and Link BuildingSante J. Achille
 
The Semantic Web for Travel and Tourism
The Semantic Web for Travel and TourismThe Semantic Web for Travel and Tourism
The Semantic Web for Travel and TourismSante J. Achille
 
Advanced Structured Data Principles and Applications
Advanced Structured Data Principles and ApplicationsAdvanced Structured Data Principles and Applications
Advanced Structured Data Principles and ApplicationsSante J. Achille
 
From a Web of Documents to a Web of Things and Places
From a Web of Documents to a Web of Things and PlacesFrom a Web of Documents to a Web of Things and Places
From a Web of Documents to a Web of Things and PlacesSante J. Achille
 
Principles of Structured Data Implementation for Multilingual Websites
Principles of Structured Data Implementation for Multilingual WebsitesPrinciples of Structured Data Implementation for Multilingual Websites
Principles of Structured Data Implementation for Multilingual WebsitesSante J. Achille
 
Strategie di Digital Marketing
Strategie di Digital Marketing Strategie di Digital Marketing
Strategie di Digital Marketing Sante J. Achille
 
Come fare una Offerta SEO Efficace che vende
Come fare una Offerta SEO Efficace che vendeCome fare una Offerta SEO Efficace che vende
Come fare una Offerta SEO Efficace che vendeSante J. Achille
 
JSON-LD, Schema.org, and Structured data
JSON-LD, Schema.org, and Structured dataJSON-LD, Schema.org, and Structured data
JSON-LD, Schema.org, and Structured dataSante J. Achille
 
How to implement Schemas using schema.org on your website >> SMX London 2015
How to implement Schemas using schema.org on your website >> SMX London 2015How to implement Schemas using schema.org on your website >> SMX London 2015
How to implement Schemas using schema.org on your website >> SMX London 2015Sante J. Achille
 
Schemas >> Schema.org >> Take Your Website to a New Level with Schema Markup
Schemas >> Schema.org >> Take Your Website to a New Level with Schema Markup Schemas >> Schema.org >> Take Your Website to a New Level with Schema Markup
Schemas >> Schema.org >> Take Your Website to a New Level with Schema Markup Sante J. Achille
 
Smx Milano 2014 Semantic SEO with Schema.org
Smx Milano 2014 Semantic SEO with Schema.orgSmx Milano 2014 Semantic SEO with Schema.org
Smx Milano 2014 Semantic SEO with Schema.orgSante J. Achille
 
Smw rome2014-sante j-achille
Smw rome2014-sante j-achilleSmw rome2014-sante j-achille
Smw rome2014-sante j-achilleSante J. Achille
 
La velocità delle evoluzioni nella cultura della progettazione
La velocità delle evoluzioni nella cultura della progettazioneLa velocità delle evoluzioni nella cultura della progettazione
La velocità delle evoluzioni nella cultura della progettazioneSante J. Achille
 
Creare il Blog Ideale integrato con i Social Media
Creare il Blog Ideale integrato con i Social MediaCreare il Blog Ideale integrato con i Social Media
Creare il Blog Ideale integrato con i Social MediaSante J. Achille
 

Plus de Sante J. Achille (18)

2023.064.Tbexcon.com.GA4_and_Beyond_2.pptx
2023.064.Tbexcon.com.GA4_and_Beyond_2.pptx2023.064.Tbexcon.com.GA4_and_Beyond_2.pptx
2023.064.Tbexcon.com.GA4_and_Beyond_2.pptx
 
A Simple method to Create Content using NLP
A Simple method to Create Content using NLP A Simple method to Create Content using NLP
A Simple method to Create Content using NLP
 
Majestic Workshop on Backlinks and Link Building
Majestic Workshop on Backlinks and Link BuildingMajestic Workshop on Backlinks and Link Building
Majestic Workshop on Backlinks and Link Building
 
The Semantic Web for Travel and Tourism
The Semantic Web for Travel and TourismThe Semantic Web for Travel and Tourism
The Semantic Web for Travel and Tourism
 
Advanced Structured Data Principles and Applications
Advanced Structured Data Principles and ApplicationsAdvanced Structured Data Principles and Applications
Advanced Structured Data Principles and Applications
 
From a Web of Documents to a Web of Things and Places
From a Web of Documents to a Web of Things and PlacesFrom a Web of Documents to a Web of Things and Places
From a Web of Documents to a Web of Things and Places
 
Principles of Structured Data Implementation for Multilingual Websites
Principles of Structured Data Implementation for Multilingual WebsitesPrinciples of Structured Data Implementation for Multilingual Websites
Principles of Structured Data Implementation for Multilingual Websites
 
Strategie di Digital Marketing
Strategie di Digital Marketing Strategie di Digital Marketing
Strategie di Digital Marketing
 
Come fare una Offerta SEO Efficace che vende
Come fare una Offerta SEO Efficace che vendeCome fare una Offerta SEO Efficace che vende
Come fare una Offerta SEO Efficace che vende
 
JSON-LD, Schema.org, and Structured data
JSON-LD, Schema.org, and Structured dataJSON-LD, Schema.org, and Structured data
JSON-LD, Schema.org, and Structured data
 
How to implement Schemas using schema.org on your website >> SMX London 2015
How to implement Schemas using schema.org on your website >> SMX London 2015How to implement Schemas using schema.org on your website >> SMX London 2015
How to implement Schemas using schema.org on your website >> SMX London 2015
 
Schemas >> Schema.org >> Take Your Website to a New Level with Schema Markup
Schemas >> Schema.org >> Take Your Website to a New Level with Schema Markup Schemas >> Schema.org >> Take Your Website to a New Level with Schema Markup
Schemas >> Schema.org >> Take Your Website to a New Level with Schema Markup
 
Smx Milano 2014 Semantic SEO with Schema.org
Smx Milano 2014 Semantic SEO with Schema.orgSmx Milano 2014 Semantic SEO with Schema.org
Smx Milano 2014 Semantic SEO with Schema.org
 
Smw rome2014-sante j-achille
Smw rome2014-sante j-achilleSmw rome2014-sante j-achille
Smw rome2014-sante j-achille
 
La velocità delle evoluzioni nella cultura della progettazione
La velocità delle evoluzioni nella cultura della progettazioneLa velocità delle evoluzioni nella cultura della progettazione
La velocità delle evoluzioni nella cultura della progettazione
 
BIT 2014, SEO per Hotels
BIT 2014, SEO per Hotels BIT 2014, SEO per Hotels
BIT 2014, SEO per Hotels
 
Creare il Blog Ideale integrato con i Social Media
Creare il Blog Ideale integrato con i Social MediaCreare il Blog Ideale integrato con i Social Media
Creare il Blog Ideale integrato con i Social Media
 
Presentazione.Gt.2.2007
Presentazione.Gt.2.2007Presentazione.Gt.2.2007
Presentazione.Gt.2.2007
 

JSON-LD e Schema.org per il Web Semantico: SMX milano 2015

  • 1. 13 Novembre, 2015 Modellazione Semantica con JSON-LD Sante J. Achille Search Marketing Consultant @sjachille
  • 2. smxmilan.it @sjachille #SMX #22A • Ingegnere, Search Marketing Specialist • Ha analizzato, ottimizzato e gestito numerosi siti in 20 anni di attività professionale • Ama proverbi ed usanze della tradizione popolare • Motto: Why Be Normal? http://achille.name/ Oggi parliamo di semantica per il web
  • 3. smxmilan.it @sjachille #SMX #22A Dati Informazioni La più grande sfida dei motori di ricerca? Ridurre “Incertezza” e “Ambiguità”
  • 4. smxmilan.it @sjachille #SMX #22A “Your web pages have an underlying meaning that people understand when they read the web pages. But search engines have a limited understanding of what is being discussed on those pages.” Perché dati Strutturati?
  • 5.
  • 6. smxmilan.it @sjachille #SMX #22A Perché dati Strutturati? By adding additional tags to the HTML of your web pages … you can help search engines and other applications better understand your content and display it in a useful, relevant way.
  • 8. smxmilan.it @sjachille #SMX #22A Dati Informazioni Attributi Proprietà (persona, animale, o cosa) Caratteristiche (dimensioni, peso, nome, … ) Location (Continent, Country, City … )
  • 11. smxmilan.it @sjachille #SMX #22A JSON (JavaScript Object Notation) is a lightweight data-interchange format. … It is easy for machines to parse and generate. It is based on … JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C- family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others. These properties make JSON an ideal data- interchange language.
  • 12. smxmilan.it @sjachille #SMX #22A “JSON-LD is a lightweight Linked Data format that is easy for humans to read and write” http://www.w3.org/TR/2013/CR-json-ld-20130910/ http://www.w3.org/TR/2013/CR-json-ld-api-20130910/ Creating semantic sites with Web Components and JSON-LD
  • 14. smxmilan.it @sjachille #SMX #22A Schema.org … <div itemscope itemtype="http://schema.org/Movie"> <h1 itemprop="name">Avatar</h1> <div itemprop="director" itemscope itemtype="http://schema.org/Person"> Director: <span itemprop="givenName"> James</span> <span itemprop="familyName">Cameron</span> (born August 16, 1954) <meta itemprop="birthDate" content ="1954-08-16" /> </div> <span itemprop="genre">Science fiction</span> <a href="../movies/avatar-theatrical-trailer.html" itemprop="trailer">Trailer</a> </div>
  • 15. smxmilan.it @sjachille #SMX #22A JSON-LD… { "@context": { "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "foaf": "http://xmlns.com/foaf/0.1/", "rel": "purl.org/vocab/relationship/", "schema": "https://www.schema.org/" }, "@id": "http://example.com/people/mario-rossi/", "@type" : "foaf:Person", "foaf:name": ”Mario Rossi", "foaf:based_near": "http://www.geonames.org/3333125", "rel:employerOf": "http://example.com/people/joe-smoe/", "schema:worksFor" : { "@type" : "schema:Organization", "schema:legalName" : ”Mario Rossi Inc.", "schema:vatID" : "XXXXXXXXX", "schema:email" : “mario@rossi.com", "schema:telephone" : "+39.xxx xx xx xxx" } } } }}
  • 17. smxmilan.it @sjachille #SMX #22A The Resource Description Framework (RDF) is a framework for expressing information about resources. Resources can be anything, including documents, people, physical objects, and abstract concepts. http://www.w3.org/TR/rdf11-primer/ • Le informazioni sono rappresentate ed interconnesse utilizzando il modello vettoriale Nodo - Arco del Grafo
  • 18. smxmilan.it @sjachille #SMX #22A In RDF la descrizione di una risorsa è rappresentata da una serie di triple. Le componenti di ciascuna tripla sono il Soggetto - Predicato - Oggetto Una tripla emula la struttura di una frase semplice come questa:
  • 19. smxmilan.it @sjachille #SMX #22A Il Soggetto della tripla è la URI che identifica la risorsa che si sta descrivendo L’Oggetto può essere un valore (stringa, numero, data, …) oppure la URI di un’altra risorsa che in qualche modo è in relazione con il soggetto Il Predicato esplicita la relazione che intercorre tra soggetto ed oggetto ed è una URI scelto tra quelli disponibili nei vari Vocabolari …
  • 20. smxmilan.it @sjachille #SMX #22A { "@context": { "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "foaf": "http://xmlns.com/foaf/0.1/", "rel": "purl.org/vocab/relationship/", "schema": "https://www.schema.org/" }, "@id": "http://example.com/people/mario-rossi/", "@type" : "foaf:Person", "foaf:name": ”Mario Rossi", "foaf:based_near": "http://www.geonames.org/3333125", "rel:employerOf": "http://example.com/people/mario-rossi/", "schema:worksFor" : { "@type" : "schema:Organization", "schema:legalName" : "Mario Rossi Srl", "schema:vatID" : "XXXXXXXXX", "schema:email" : “mario.rossi@dominio.com", "schema:telephone" : "+39.123 45 67 890" } } } }} JSON-LD @work…
  • 21. smxmilan.it @sjachille #SMX #22A Specifica di JSON-LD: http://www.w3.org/TR/json-ld/#syntax-tokens-and-keywords 3.3 Syntax Tokens and Keywords @context Used to define the short-hand names that are used throughout a JSON-LD document… @id Used to uniquely identify things that are being described in the document with IRIs … @type Used to set the data type of a node or typed value… @vocab Used to expand properties and values in @type with a common prefix IRI… JSON-LD @work…
  • 22. smxmilan.it @sjachille #SMX #22A Usare JSON-LD per lo sviluppo del modello semantico dei contenuti per minimizzare ambiguità ed indeterminazione JSON-LD @work…
  • 23. smxmilan.it @sjachille #SMX #22A { "@context": { "schema": "https://schema.org/" }, "@id" : "https://mywebsite.com/blogposturl/", "@type": "schema:BlogPosting", "schema:datePublished" : "YYYY-MM-DD", "schema:name": "BLOGPOST NAME", "schema:headline" : "POST TITLE", "schema:description": "A DESCRIPTION - LIKE META DESCRIPTION TAG", "schema:mainEntityOfPage" : "URL", "schema:image" : "https://mywebsite.com/wp-content/themes/DD- MM-YYYY/images/majestic_large.png", JSON-LD @work…
  • 24. smxmilan.it @sjachille #SMX #22A "schema:isPartOf" : { "@id" : "https://mywebsite.com/", "@type" : "schema:Blog", "schema:name" : "My Blog", "schema:description": "A DESCRIPTION OF MY BLOG - HOW BEAUTIFUL AND INTERESTING MY CONTENT IS AND WHY EVERBODY SHOULD READ IT!" }, JSON-LD @work…
  • 25. smxmilan.it @sjachille #SMX #22A "schema:author" : { "@id" : "http://blog.achille.name/", "@type" : "schema:Person", "schema:givenName": "FIRST NAME", "schema:additionalName": "MIDDLE NAME OR INITIAL", "schema:familyName": "FAMILY NAME (SURNAME)", "schema:jobTitle" : "SEARCH MARKETING CONSULTANT", "schema:sameAs" : "https://twitter.com/sjachille", "schema:sameAs" : "https://plus.google.com/+SanteJAchille/", "schema:sameAs" : "https://www.facebook.com/sjachille" } } JSON-LD @work…
  • 27. smxmilan.it @sjachille #SMX #22A Usare SCHEMA.org per ulteriori informazioni di dettaglio “in line” nelle pagine (definizione della struttura della pagina, informazioni su prodotti per Ecommerce… in generale tutto quello che può essere caratterizzato per fornire contesto e struttura alle informazioni) SCHEMA.org @work…
  • 29. smxmilan.it @sjachille #SMX #22A Schema Markup for Documents <div itemprop="image" itemscope="" itemtype="http://schema.org/ImageObject"> <meta itemprop="description" content="I-797, Notice of Action: I-601, application for travel document: approval notice. " /> <div itemprop="exampleOfWork" itemscope="" itemtype="http://schema.org/CreativeWork" > <meta itemprop="isBasedOnUrl" content="http://www.uscis.gov/i-601" /> </div> [caption]<a itemprop="url" href="XXX"><img itemprop="image" src="XXX" alt="XXX" width="" height="" class="XXX" /></a> [/caption] </div>
  • 30. smxmilan.it @sjachille #SMX #22A Il processo è iterativo - quasi impossibile arrivare ad un modello definitivo subito Nuove proprietà sono introdotte di continuo su schema.org I modelli vanno aggiornati periodicamente Prova, Riprova ed Aggiorna!

Notes de l'éditeur

  1. DATA: Values of qualitative or quantitative variables in raw or unorganized form such as alphabets, numbers, or symbols that refer to, or represent, conditions, ideas, or objects.
  2. Vi racconto una storia a proposito di incertezze, ambiguità ed indeterminazione che risale alla mia infanzia