Skip to content
Browse files

Update presentation examples, and added Rake tasks to build them.

  • Loading branch information...
1 parent 4ad38c4 commit fca69639d7861381895d818633c80e9474ff185a @gkellogg committed
View
48 Rakefile
@@ -31,6 +31,54 @@ RSpec::Core::RakeTask.new("doc:spec") do |spec|
spec.rspec_opts = ["--format", "html", "-o", "doc/spec.html"]
end
+# Presentation building
+namespace :presentation do
+ desc "Clean presentation files"
+ task :clean do
+ FileUtils.rm %w(compacted expanded framed).map {|f| "presentation/dbpedia/#{f}.jsonld"}
+ end
+
+ desc "Build presentation files"
+ task :build => %w(
+ presentation/dbpedia/expanded.jsonld
+ presentation/dbpedia/compacted.jsonld
+ presentation/dbpedia/framed.jsonld
+ )
+
+ desc "Build expanded example"
+ file "presentation/dbpedia/expanded.jsonld" => %w(
+ presentation/dbpedia/orig.jsonld
+ presentation/dbpedia/expanded-context.jsonld) do
+ system(%w(
+ script/parse
+ --expand presentation/dbpedia/orig.jsonld
+ --context presentation/dbpedia/expanded-context.jsonld
+ -o presentation/dbpedia/expanded.jsonld).join(" "))
+ end
+
+ desc "Build compacted example"
+ file "presentation/dbpedia/compacted.jsonld" => %w(
+ presentation/dbpedia/expanded.jsonld
+ presentation/dbpedia/compact-context.jsonld) do
+ system(%w(
+ script/parse
+ --compact presentation/dbpedia/expanded.jsonld
+ --context presentation/dbpedia/compact-context.jsonld
+ -o presentation/dbpedia/compacted.jsonld).join(" "))
+ end
+
+ desc "Build framed example"
+ file "presentation/dbpedia/framed.jsonld" => %w(
+ presentation/dbpedia/expanded.jsonld
+ presentation/dbpedia/frame.jsonld) do
+ system(%w(
+ script/parse
+ --frame presentation/dbpedia/frame.jsonld
+ presentation/dbpedia/expanded.jsonld
+ -o presentation/dbpedia/framed.jsonld).join(" "))
+ end
+end
+
require 'yard'
namespace :doc do
YARD::Rake::YardocTask.new
View
6 lib/json/ld/evaluation_context.rb
@@ -591,10 +591,10 @@ def compact_iri(iri, options = {})
# Prefer terms that don't have @container @set over other terms, unless as set is true
terms = terms.sort do |a, b|
debug("term sort") {"c(a): #{container(a).inspect}, c(b): #{container(b)}"}
- if a.length == b.length
- a <=> b
+ if a.to_s.length == b.to_s.length
+ a.to_s <=> b.to_s
else
- a.length <=> b.length
+ a.to_s.length <=> b.to_s.length
end
end
debug("sorted terms") {terms.inspect}
View
72 presentation/dbpedia/compacted.jsonld
@@ -13,12 +13,84 @@
{
"@id": "dbpedia:Linked_Data",
"@type": "http://dbpedia.org/class/yago/Buzzwords",
+ "abstract_de": "Linked Open Data (LOD) bezeichnet im World Wide Web frei verfügbare Daten, die per Uniform Resource Identifier (URI) identifiziert sind und darüber direkt per HTTP abgerufen werden können und ebenfalls per URI auf andere Daten verweisen. Idealerweise werden zur Kodierung und Verlinkung der Daten das Resource Description Framework (RDF) und darauf aufbauende Standards wie SPARQL und die Web Ontology Language (OWL) verwendet, so dass Linked Open Data gleichzeitig Teil des Semantic Web ist. Die miteinander verknüpften Daten ergeben ein weltweites Netz, das auch als „Linked [Open Open] Data Cloud“ oder „Giant Global Graph“ bezeichnet wird. Dort wo der Schwerpunkt weniger auf der freien Nutzbarkeit der Daten wie bei freien Inhalten liegt, ist auch die Bezeichnung Linked Data üblich.",
"abstract_en": "In computing, linked Data describes a method of publishing structured data so that it can be interlinked and become more useful. It builds upon standard Web technologies such as HTTP and URIs, but rather than using them to serve web pages for human readers, it extends them to share information in a way that can be read automatically by computers. This enables data from different sources to be connected and queried. Tim Berners-Lee, director of the World Wide Web Consortium, coined the term in a design note discussing issues around the Semantic Web project.. However, the idea is very old and is closely related to concepts such as the network model (database), citations between scholarly articles, and authority control in libraries.",
"abstract_es": "La propuesta de datos vinculados (linked data) surge dentro de marco general de la Web semántica. El término \"datos vinculados\" hace referencia al método con el que se pueden mostrar, intercambiar y conectar datos a través de URIs desreferenciables en la Web.",
+ "abstract_fr": "Le Web des données (Linked Data, en Anglais) est une initiative du W3C(Consortium World Wide Web) visant à favoriser la publication de données structurées sur le Web, non pas sous la forme de silos de données isolés les uns des autres, mais en les reliant entre elles pour constituer un réseau global d'informations. Il s'appuie sur les standards du Web, tels que HTTP et URI - mais plutôt qu'utiliser ces standards uniquement pour faciliter la navigation par les être humains, le Web des données les étend pour partager l'information également entre machines. Cela permet d'interroger automatiquement les données, quels que soient leurs lieux de stockage, et sans avoir à les dupliquer. Tim Berners-Lee, directeur du W3C, a inventé et défini le terme Linked Data et son synonyme Web of Data au sein d'un ouvrage portant sur l'avenir du Web Sémantique. En France, le terme Web des données est de plus en plus utilisé par la communauté des professionnels du domaine.",
+ "abstract_it": "I dati collegati (linked data in inglese) sono un aspetto del web semantico. Il termine dati collegati è usato per descrivere un metodo di esporre, condividere e connettere dati attraverso URI deferenziabili.",
+ "abstract_zh": "鍵連資料是正在快速發展的語義網的一系列的活動,它描述了一套在全球資訊網上發佈、分享、及連結資料的方法。主要以可參照的URI作為最基本的要素、以RDF作為描述連結的語言。",
"comment_de": "Linked Open Data (LOD) bezeichnet im World Wide Web frei verfügbare Daten, die per Uniform Resource Identifier (URI) identifiziert sind und darüber direkt per HTTP abgerufen werden können und ebenfalls per URI auf andere Daten verweisen. Idealerweise werden zur Kodierung und Verlinkung der Daten das Resource Description Framework (RDF) und darauf aufbauende Standards wie SPARQL und die Web Ontology Language (OWL) verwendet, so dass Linked Open Data gleichzeitig Teil des Semantic Web ist.",
"comment_en": "In computing, linked Data describes a method of publishing structured data so that it can be interlinked and become more useful. It builds upon standard Web technologies such as HTTP and URIs, but rather than using them to serve web pages for human readers, it extends them to share information in a way that can be read automatically by computers. This enables data from different sources to be connected and queried.",
+ "comment_es": "La propuesta de datos vinculados (linked data) surge dentro de marco general de la Web semántica. El término \"datos vinculados\" hace referencia al método con el que se pueden mostrar, intercambiar y conectar datos a través de URIs desreferenciables en la Web.",
+ "comment_fr": "Le Web des données (Linked Data, en Anglais) est une initiative du W3C(Consortium World Wide Web) visant à favoriser la publication de données structurées sur le Web, non pas sous la forme de silos de données isolés les uns des autres, mais en les reliant entre elles pour constituer un réseau global d'informations.",
+ "comment_it": "I dati collegati (linked data in inglese) sono un aspetto del web semantico. Il termine dati collegati è usato per descrivere un metodo di esporre, condividere e connettere dati attraverso URI deferenziabili.",
+ "comment_zh": "鍵連資料是正在快速發展的語義網的一系列的活動,它描述了一套在全球資訊網上發佈、分享、及連結資料的方法。主要以可參照的URI作為最基本的要素、以RDF作為描述連結的語言。",
+ "externalLink": [
+ "http://revyu.com/",
+ "http://www.ted.com/talks/tim_berners_lee_on_the_next_web.html",
+ "http://dataviewer.zitgist.com/",
+ "http://tomheath.com/papers/bizer-heath-berners-lee-ijswis-linked-data.pdf",
+ "http://www.tecweb.inf.puc-rio.br/explorator/demo",
+ "http://knoesis.wright.edu/library/publications/linkedai2010_submission_13.pdf",
+ "http://relfinder.visualdataweb.org/",
+ "http://linkeddata.uriburner.com/ode",
+ "http://www.linkeddataplanet.com/",
+ "http://code.google.com/p/ontology-browser/",
+ "http://tomheath.com/slides/2008-02-amsterdam-linking-open-data-project.pdf",
+ "http://knoesis.wright.edu/library/publications/iswc10_paper218.pdf",
+ "http://esw.w3.org/topic/SweoIG/TaskForces/CommunityProjects/LinkingOpenData#dbpedia-lod-cloud",
+ "http://virtuoso.openlinksw.com/presentations/Creating_Deploying_Exploiting_Linked_Data2/Creating_Deploying_Exploiting_Linked_Data2_TimBL_v3.html",
+ "http://esw.w3.org/topic/SweoIG/TaskForces/CommunityProjects/LinkingOpenData",
+ "http://events.linkeddata.org/ldow2011/",
+ "http://www.sensorpedia.com",
+ "http://ws.nju.edu.cn/explorer/myview/",
+ "http://ws.nju.edu.cn/explorer/",
+ "http://www.openpsi.org/",
+ "http://sites.wiwiss.fu-berlin.de/suhl/bizer/pub/LinkingOpenData.pdf",
+ "http://events.linkeddata.org/ldow2008/",
+ "http://nomisma.org/",
+ "http://events.linkeddata.org/ldow2009/",
+ "http://www.viaf.org",
+ "http://linkeddatabook.com/book",
+ "http://events.linkeddata.org/ldow2010/",
+ "http://demo.openlinksw.com/Demo/customers/CustomerID/ALFKI%23this",
+ "http://www.plasticbag.org/archives/2006/02/my_future_of_web_apps_slides/",
+ "http://www.w3.org/2008/Talks/0617-lod-tbl/#(1)",
+ "http://www.scientificamerican.com/article.cfm?id=berners-lee-linked-data",
+ "http://www.linkeddataplanet.com",
+ "http://linkeddata.org",
+ "http://sig.ma",
+ "http://www4.wiwiss.fu-berlin.de/bizer/pub/lod-datasets_2009-07-14.html",
+ "http://virtuoso.openlinksw.com/white-papers/",
+ "http://isweb.uni-koblenz.de/Research/lena/",
+ "http://people.aifb.kit.edu/aha/2010/cold/",
+ "http://www.w3.org/2008/Talks/WWW2008-W3CTrack-LOD.pdf",
+ "http://www.w3.org/wiki/LinkedData",
+ "http://virtuoso.openlinksw.com/presentations/Virtuoso_Deploying_Linked_Data/Virtuoso_Deploying_Linked_Data.html",
+ "http://umbel.org/sites/umbel.org/lod/lod_constellation.html",
+ "http://latc-project.eu/",
+ "http://riese.joanneum.at",
+ "http://visinav.deri.org/",
+ "http://www.w3.org/2005/ajar/tab",
+ "http://www.sheaflight.com/browser/",
+ "http://www4.wiwiss.fu-berlin.de/dblp/",
+ "http://www.razorbase.com",
+ "http://www.w3.org/DesignIssues/LinkedData.html",
+ "http://www.w3.org/DesignIssues/LinkedData",
+ "http://www.wandora.org",
+ "http://www4.wiwiss.fu-berlin.de/bizer/ng4j/disco/",
+ "http://planet-data.eu/about",
+ "http://www.webknox.com/blog/2010/05/linked-open-data-on-the-web-visualization/",
+ "http://www.slideshare.net/knoesis/how-to-make-linked-data-more-than-data",
+ "http://www.slideshare.net/mediasemanticweb/linked-data-michael-hausenblas-2009-03-05",
+ "http://www2008.org/papers/pdf/p1265-bizer.pdf"
+ ],
"label_de": "Linked Open Data",
"label_en": "Linked Data",
+ "label_es": "Datos vinculados",
+ "label_fr": "Web des données",
+ "label_it": "Dati collegati",
+ "label_zh": "鍵連資料",
"page": "enwp:Linked_Data",
"sameAs": "http://rdf.freebase.com/ns/m/02r2kb1",
"subject": [
View
9 presentation/dbpedia/frame.jsonld
@@ -19,10 +19,13 @@
"sameAs": {"@id": "owl:sameAs", "@type": "@id"},
"abstract": {"@id": "dbpedia-owl:abstract", "@language": "en"},
+ "http://dbpedia.org/ontology/abstract": null,
"comment": {"@id": "rdfs:comment", "@language": "en"},
+ "http://www.w3.org/2000/01/rdf-schema#comment": null,
- "label": {"@id": "rdfs:label", "@language": "en"}
+ "label": {"@id": "rdfs:label", "@language": "en"},
+ "http://www.w3.org/2000/01/rdf-schema#label": null
},
"primaryTopic": {
"@type": "http://dbpedia.org/class/yago/Buzzwords",
@@ -37,8 +40,6 @@
"redirectedFrom": {
"redirects": {}
},
- "sameAs": {
- "sameAs": {}
- }
+ "sameAs": {}
}
}
View
80 presentation/dbpedia/framed.jsonld
@@ -44,14 +44,17 @@
"@id": "dbpedia-owl:abstract",
"@language": "en"
},
+ "http://dbpedia.org/ontology/abstract": null,
"comment": {
"@id": "rdfs:comment",
"@language": "en"
},
+ "http://www.w3.org/2000/01/rdf-schema#comment": null,
"label": {
"@id": "rdfs:label",
"@language": "en"
- }
+ },
+ "http://www.w3.org/2000/01/rdf-schema#label": null
},
"@graph": [
{
@@ -61,23 +64,70 @@
"@type": "http://dbpedia.org/class/yago/Buzzwords",
"abstract": "In computing, linked Data describes a method of publishing structured data so that it can be interlinked and become more useful. It builds upon standard Web technologies such as HTTP and URIs, but rather than using them to serve web pages for human readers, it extends them to share information in a way that can be read automatically by computers. This enables data from different sources to be connected and queried. Tim Berners-Lee, director of the World Wide Web Consortium, coined the term in a design note discussing issues around the Semantic Web project.. However, the idea is very old and is closely related to concepts such as the network model (database), citations between scholarly articles, and authority control in libraries.",
"comment": "In computing, linked Data describes a method of publishing structured data so that it can be interlinked and become more useful. It builds upon standard Web technologies such as HTTP and URIs, but rather than using them to serve web pages for human readers, it extends them to share information in a way that can be read automatically by computers. This enables data from different sources to be connected and queried.",
- "dbpedia-owl:abstract": {
- "@value": "La propuesta de datos vinculados (linked data) surge dentro de marco general de la Web semántica. El término \"datos vinculados\" hace referencia al método con el que se pueden mostrar, intercambiar y conectar datos a través de URIs desreferenciables en la Web.",
- "@language": "es"
- },
- "externalLink": null,
+ "externalLink": [
+ "http://revyu.com/",
+ "http://www.ted.com/talks/tim_berners_lee_on_the_next_web.html",
+ "http://dataviewer.zitgist.com/",
+ "http://tomheath.com/papers/bizer-heath-berners-lee-ijswis-linked-data.pdf",
+ "http://www.tecweb.inf.puc-rio.br/explorator/demo",
+ "http://knoesis.wright.edu/library/publications/linkedai2010_submission_13.pdf",
+ "http://relfinder.visualdataweb.org/",
+ "http://linkeddata.uriburner.com/ode",
+ "http://www.linkeddataplanet.com/",
+ "http://code.google.com/p/ontology-browser/",
+ "http://tomheath.com/slides/2008-02-amsterdam-linking-open-data-project.pdf",
+ "http://knoesis.wright.edu/library/publications/iswc10_paper218.pdf",
+ "http://esw.w3.org/topic/SweoIG/TaskForces/CommunityProjects/LinkingOpenData#dbpedia-lod-cloud",
+ "http://virtuoso.openlinksw.com/presentations/Creating_Deploying_Exploiting_Linked_Data2/Creating_Deploying_Exploiting_Linked_Data2_TimBL_v3.html",
+ "http://esw.w3.org/topic/SweoIG/TaskForces/CommunityProjects/LinkingOpenData",
+ "http://events.linkeddata.org/ldow2011/",
+ "http://www.sensorpedia.com",
+ "http://ws.nju.edu.cn/explorer/myview/",
+ "http://ws.nju.edu.cn/explorer/",
+ "http://www.openpsi.org/",
+ "http://sites.wiwiss.fu-berlin.de/suhl/bizer/pub/LinkingOpenData.pdf",
+ "http://events.linkeddata.org/ldow2008/",
+ "http://nomisma.org/",
+ "http://events.linkeddata.org/ldow2009/",
+ "http://www.viaf.org",
+ "http://linkeddatabook.com/book",
+ "http://events.linkeddata.org/ldow2010/",
+ "http://demo.openlinksw.com/Demo/customers/CustomerID/ALFKI%23this",
+ "http://www.plasticbag.org/archives/2006/02/my_future_of_web_apps_slides/",
+ "http://www.w3.org/2008/Talks/0617-lod-tbl/#(1)",
+ "http://www.scientificamerican.com/article.cfm?id=berners-lee-linked-data",
+ "http://www.linkeddataplanet.com",
+ "http://linkeddata.org",
+ "http://sig.ma",
+ "http://www4.wiwiss.fu-berlin.de/bizer/pub/lod-datasets_2009-07-14.html",
+ "http://virtuoso.openlinksw.com/white-papers/",
+ "http://isweb.uni-koblenz.de/Research/lena/",
+ "http://people.aifb.kit.edu/aha/2010/cold/",
+ "http://www.w3.org/2008/Talks/WWW2008-W3CTrack-LOD.pdf",
+ "http://www.w3.org/wiki/LinkedData",
+ "http://virtuoso.openlinksw.com/presentations/Virtuoso_Deploying_Linked_Data/Virtuoso_Deploying_Linked_Data.html",
+ "http://umbel.org/sites/umbel.org/lod/lod_constellation.html",
+ "http://latc-project.eu/",
+ "http://riese.joanneum.at",
+ "http://visinav.deri.org/",
+ "http://www.w3.org/2005/ajar/tab",
+ "http://www.sheaflight.com/browser/",
+ "http://www4.wiwiss.fu-berlin.de/dblp/",
+ "http://www.razorbase.com",
+ "http://www.w3.org/DesignIssues/LinkedData.html",
+ "http://www.w3.org/DesignIssues/LinkedData",
+ "http://www.wandora.org",
+ "http://www4.wiwiss.fu-berlin.de/bizer/ng4j/disco/",
+ "http://planet-data.eu/about",
+ "http://www.webknox.com/blog/2010/05/linked-open-data-on-the-web-visualization/",
+ "http://www.slideshare.net/knoesis/how-to-make-linked-data-more-than-data",
+ "http://www.slideshare.net/mediasemanticweb/linked-data-michael-hausenblas-2009-03-05",
+ "http://www2008.org/papers/pdf/p1265-bizer.pdf"
+ ],
"genre": null,
"label": "Linked Data",
"page": "enwp:Linked_Data",
- "rdfs:comment": {
- "@value": "Linked Open Data (LOD) bezeichnet im World Wide Web frei verfügbare Daten, die per Uniform Resource Identifier (URI) identifiziert sind und darüber direkt per HTTP abgerufen werden können und ebenfalls per URI auf andere Daten verweisen. Idealerweise werden zur Kodierung und Verlinkung der Daten das Resource Description Framework (RDF) und darauf aufbauende Standards wie SPARQL und die Web Ontology Language (OWL) verwendet, so dass Linked Open Data gleichzeitig Teil des Semantic Web ist.",
- "@language": "de"
- },
- "rdfs:label": {
- "@value": "Linked Open Data",
- "@language": "de"
- },
- "sameAs": null,
+ "sameAs": "http://rdf.freebase.com/ns/m/02r2kb1",
"subject": [
"dbpedia:Category:World_Wide_Web",
"dbpedia:Category:Buzzwords",
View
53 spec/frame_spec.rb
@@ -336,6 +336,59 @@
}]
}
},
+ "presentation example" => {
+ :frame => {
+ "@context" => {
+ "primaryTopic" => {"@id" => "http://xmlns.com/foaf/0.1/primaryTopic","@type" => "@id"},
+ "sameAs" => {"@id" => "http://www.w3.org/2002/07/owl#sameAs","@type" => "@id"},
+ },
+ "primaryTopic" => {
+ "@type" => "http://dbpedia.org/class/yago/Buzzwords",
+ "sameAs" => {}
+ }
+ },
+ :input => [
+ {
+ "@id" => "http://en.wikipedia.org/wiki/Linked_Data",
+ "http://xmlns.com/foaf/0.1/primaryTopic" => [{"@id" => "http://dbpedia.org/resource/Linked_Data"}]
+ },
+ {
+ "@id" => "http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Linked_Data",
+ "http://www.w3.org/2002/07/owl#sameAs" => [{"@id" => "http://dbpedia.org/resource/Linked_Data"}]
+ },
+ {
+ "@id" => "http://dbpedia.org/resource/Linked_Data",
+ "@type" => ["http://dbpedia.org/class/yago/Buzzwords"],
+ "http://www.w3.org/2002/07/owl#sameAs" => [{"@id" => "http://rdf.freebase.com/ns/m/02r2kb1"}]
+ },
+ {
+ "@id" => "http://mpii.de/yago/resource/Linked_Data",
+ "http://www.w3.org/2002/07/owl#sameAs" => [{"@id" => "http://dbpedia.org/resource/Linked_Data"}]
+ }
+ ],
+ :output => {
+ "@context" => {
+ "primaryTopic" => {
+ "@id" => "http://xmlns.com/foaf/0.1/primaryTopic",
+ "@type" => "@id"
+ },
+ "sameAs" => {
+ "@id" => "http://www.w3.org/2002/07/owl#sameAs",
+ "@type" => "@id"
+ }
+ },
+ "@graph" => [
+ {
+ "@id" => "http://en.wikipedia.org/wiki/Linked_Data",
+ "primaryTopic" => {
+ "@id" => "http://dbpedia.org/resource/Linked_Data",
+ "@type" => "http://dbpedia.org/class/yago/Buzzwords",
+ "sameAs" => "http://rdf.freebase.com/ns/m/02r2kb1"
+ }
+ }
+ ]
+ }
+ }
}.each do |title, params|
it title do
@debug = []

0 comments on commit fca6963

Please sign in to comment.
Something went wrong with that request. Please try again.