mirror of
https://github.com/gsi-upm/sitc
synced 2026-02-08 23:58:17 +00:00
Update RDF.ipynb
This commit is contained in:
committed by
GitHub
parent
7b13aa5247
commit
27f4fc4b9d
@@ -63,7 +63,7 @@
|
||||
"\n",
|
||||
"# Tools\n",
|
||||
"\n",
|
||||
"This notebook is self-contained, but it requires some python libraries.\n",
|
||||
"This notebook is self-contained, but it requires some Python libraries\n",
|
||||
"To install them, simply run the following line:"
|
||||
]
|
||||
},
|
||||
@@ -137,13 +137,13 @@
|
||||
"This concept may be described as taking care of a dog, for example, whereas a different property `<http://yourwebsite.com/hasDog>` could be described as being the legal owner of the dog.\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"RDF can be used to embed annotation in many places, including HTML document, using any compatible format.\n",
|
||||
"The options include including RDFa, XML, JSON-LD and [Turtle](https://www.w3.org/TR/turtle/).\n",
|
||||
"RDF can be used to embed annotation in many places, including HTML documents, using any compatible format.\n",
|
||||
"The options include including RDFa, XML, JSON-LD, and [Turtle](https://www.w3.org/TR/turtle/).\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"In the exercises, we will be using turtle notation, because it is very readable.\n",
|
||||
"\n",
|
||||
"For instance, turtle allows us to re-use parts of a previous triple to avoid repetition.\n",
|
||||
"For instance, turtle allows us to reuse parts of a previous triple to avoid repetition.\n",
|
||||
"Our previous example would look like this:\n",
|
||||
"\n",
|
||||
"```turtle\n",
|
||||
@@ -151,7 +151,7 @@
|
||||
" <http://example.org/age> 7\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"Here's another example of document in Turtle, taken from the Turtle specification:\n",
|
||||
"Here's another example of a document in Turtle, taken from the Turtle specification:\n",
|
||||
"\n",
|
||||
"```turtle\n",
|
||||
"@base <http://example.org/> .\n",
|
||||
@@ -172,7 +172,7 @@
|
||||
"\n",
|
||||
"The second exercise will show you how to extract this information from any website.\n",
|
||||
"\n",
|
||||
"As you can observe in these examples, Turtle defines several ways to specify IRIs in a result. Please, consult the specification for further details. As an overview, IRIs can be:\n",
|
||||
"As you can observe in these examples, Turtle defines several ways to specify IRIs in a result. Please consult the specification for further details. As an overview, IRIs can be:\n",
|
||||
" * *relative IRIs*: IRIs resolved relative to the current base IRI. Thus, you should define a base IRI (@base <http://example.org>) and then relative IRIs (i.e. <#spiderman>). The resulting IRI is <http://example.org/spiderman>.\n",
|
||||
" * *prefixed names*: a prefixed name (i.e. foaf:Person) is transformed into an IRI by concatenating the IRI of the prefix (@prefix foaf: <http://xmlns.com/foaf/0.1) and the local part of the prefixed name (i.e. Person). So, the resulting IRI is <http://xmlns.com/foaf/0.1/Person\n",
|
||||
" * *absolute IRIs*: an already resolved IRI, p.ej. <http://example.com/Auto>."
|
||||
@@ -200,17 +200,17 @@
|
||||
"These vocabularies can be reused in several applications.\n",
|
||||
"In the example above, we used the concept of person from an external vocabulary (`foaf:Person`, i.e. http://xmlns.com/foaf/0.1/Person).\n",
|
||||
"That way, we do not need to redefine the concept of Person in every application.\n",
|
||||
"There are several well known vocabularies, such as:\n",
|
||||
"There are several well-known vocabularies, such as:\n",
|
||||
"\n",
|
||||
"* Dublin core, for metadata: http://dublincore.org/\n",
|
||||
"* FOAF (Friend-of-a-friend) for social networks: http://www.foaf-project.org/\n",
|
||||
"* SIOC for online communities: https://www.w3.org/Submission/sioc-spec/\n",
|
||||
"\n",
|
||||
"Using the same vocabularies also makes it easier to automatically process and classify information.\n",
|
||||
"Using the same vocabulary also makes it easier to automatically process and classify information.\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"That was the motivation behind Schema.org, a collaboration between Google, Microsoft, Yahoo and Yandex.\n",
|
||||
"They aim to provide schemas for structured data annotation of Web sites, e-mails, etc., which can be leveraged by search engines and other automated processes.\n",
|
||||
"That was the motivation behind Schema.org, a collaboration between Google, Microsoft, Yahoo, and Yandex.\n",
|
||||
"They aim to provide schemas for structured data annotation of websites, e-mails, etc., which can be leveraged by search engines and other automated processes.\n",
|
||||
"\n",
|
||||
"They rely on RDF for representation, and provide a set of common vocabularies that can be shared by every web developer.\n",
|
||||
"\n",
|
||||
@@ -223,7 +223,7 @@
|
||||
"* Documentation for hotels: https://schema.org/docs/hotels.html\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"You can use the documentation to find properties (e.g. `checkinTime`), as well as the type of that property (e.g. `Datetime`)."
|
||||
"You can use the documentation to find properties (e.g., `checkinTime`), as well as the type of that property (e.g. `Datetime`)."
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -326,7 +326,7 @@
|
||||
"# YOUR ANSWER HERE\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"Depending on the exercise, you might need to fill that part with a Turtle definition (first exercise), some python code (second exercise), or plain text."
|
||||
"Depending on the exercise, you might need to fill that part with a Turtle definition (first exercise), some Python code (second exercise), or plain text."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user