631 Matching Annotations
  1. May 2023
    1. ```php

      $record) { if ($name<>"count" and $name<>"specials") { foreach ($record["site"] as $sitelink) { $site[$sitelink["dbname"]]=$sitelink["url"]; } } if ($name==="specials") { foreach ($record as $sitelink) { $site[$sitelink["dbname"]]=$sitelink["url"]; } } } /* Open files */ $fp = fopen('data/'.$entity_proc.'.ttl', 'w'); fwrite($fp, "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n"); fwrite($fp, "@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n"); fwrite($fp, "@prefix skos: <http://www.w3.org/2004/02/skos/core#> .\n"); fwrite($fp, "@prefix wd: <http://www.wikidata.org/entity/> .\n"); fwrite($fp, "@prefix wdt: <http://www.wikidata.org/prop/direct/> .\n"); fwrite($fp,"\n"); fwrite($fp,"<http://www.wikidata.org/categories> rdf:type skos:ConceptScheme ;\n"); fwrite($fp," skos:prefLabel \"Wikidata categories\"@en .\n\n"); // echo $list_entities."\n"; $url = "https://www.wikidata.org/w/api.php?action=wbgetentities&ids=".$entity_proc."&props=labels|aliases|sitelinks&format=php&utf8="; $a = unserialize(file_get_contents($url)); foreach ($a["entities"] as $entity=>$data_entity) { fwrite($fp,"wd:".$entity." rdf:type skos:Concept ;\n"); fwrite($fp," skos:inScheme <http://www.wikidata.org/categories> "); if (isset($data_entity["labels"])) { foreach ($data_entity["labels"] as $label) { fwrite($fp,";\n skos:prefLabel \"".$label["value"]."\"@".$label["language"]." "); } } if (isset($data_entity["aliases"])) { foreach ($data_entity["aliases"] as $item) { foreach ($item as $label) { fwrite($fp,";\n skos:altLabel> \"".$label["value"]."\"@".$label["language"]." "); } } } foreach ($data_entity["sitelinks"] as $item) { if (in_array($item["site"],$array_sources)) { /* GET BROADER CATEGORIES */ $repeat_query=true; $cmcontinue=""; while ($repeat_query==true) { $repeat_query = false; $url_wiki = $site[$item["site"]]."/w/api.php?action=query&generator=categories&titles=".urlencode($item["title"])."&prop=pageprops|categoryinfo&format=php&utf8=".$cmcontinue; $b = unserialize(file_get_contents($url_wiki)); if (isset($b["continue"]["cmcontinue"])) { $repeat_query = true; $cmcontinue = $b["continue"]["cmcontinue"]; } if (isset($b["query"]["pages"])) { foreach ($b["query"]["pages"] as $broadcat) { if (isset($broadcat["pageprops"]["wikibase_item"])) { if (!isset($broader[$broadcat["pageprops"]["wikibase_item"]])) {$broader[$broadcat["pageprops"]["wikibase_item"]]=$broadcat["title"];} // fwrite($fp,"<http://www.wikidata.org/entity/".$entity_proc."> <http://www.w3.org/2004/02/skos/core#broader> <http://www.wikidata.org/entity/".$broadcat["pageprops"]["wikibase_item"]."> <http://www.wikidata.org/categories/".$item["site"]."> .\n"); } } } } /* GET NARROWER CATEGORIES */ $repeat_query=true; $cmcontinue=""; while ($repeat_query==true) { $repeat_query = false; $url_wiki = $site[$item["site"]]."/w/api.php?action=query&generator=categorymembers&gcmtitle=".urlencode($item["title"])."&gcmtype=subcat&prop=pageprops|categoryinfo&format=php&utf8=".$cmcontinue; $b = unserialize(file_get_contents($url_wiki)); if (isset($b["continue"]["cmcontinue"])) { $repeat_query = true; $cmcontinue = $b["continue"]["cmcontinue"]; } if (isset($b["query"]["pages"])) { foreach ($b["query"]["pages"] as $narrowcat) { if (isset($narrowcat["pageprops"]["wikibase_item"])) { if (!isset($narrower[$narrowcat["pageprops"]["wikibase_item"]]) or $item["site"]=="enwiki") {$narrower[$narrowcat["pageprops"]["wikibase_item"]]=$narrowcat["title"];} // fwrite($fp,"<http://www.wikidata.org/entity/".$entity_proc."> <http://www.w3.org/2004/02/skos/core#narrower> <http://www.wikidata.org/entity/".$narrowcat["pageprops"]["wikibase_item"]."> <http://www.wikidata.org/categories/".$item["site"]."> .\n"); } } } } } } } $prevalue=""; foreach ($broader as $target=>$value) { fwrite($fp,";".$prevalue."\n skos:broader wd:".$target); $prevalue=" # ".$value; } if ($prevalue!=="") {fwrite($fp,$prevalue);} $prevalue=""; foreach ($narrower as $target=>$value) { fwrite($fp,";".$prevalue."\n skos:narrower wd:".$target); $prevalue=" # ".$value; } if ($prevalue!=="") {fwrite($fp,$prevalue);} fwrite($fp,".\n\n"); fclose($fp); ?>


    1. ```html

      <div vocab="https://schema.org/" typeof="VisualArtwork"> <link property="sameAs" href="http://rdf.freebase.com/rdf/m.0439_q" />

      La trahison des images

      A <span property="artform">painting</span> also known as <span>The Treason of Images</span> or <span property="alternateName">The Treachery of Images</span>.

      <div property="description">

      The painting shows a pipe. Below it, Magritte painted, <q lang="fr">Ceci n'est pas une pipe.</q>, French for "This is not a pipe."

      His statement is taken to mean that the painting itself is not a pipe. The painting is merely an image of a pipe. Hence, the description, "this is not a pipe."

      Similarly, the image shown above is neither a pipe nor even a painting, but rather a digital photograph.

      The painting is sometimes given as an example of meta message conveyed by paralanguage. Compare with Korzybski's <q>The word is not the thing</q> and <q>The map is not the territory</q>. </div>

      • Artist: <span property="creator" typeof="Person"> <span property="name">René Magritte</span> </span>
      • Dimensions: <span property="width" typeof="Distance">940 mm</span> × <span property="height" typeof="Distance">635 mm</span>
      • Materials: <span property="artMedium">oil</span> on <span property="artworkSurface">canvas</span>



      <div vocab="https://schema.org/" typeof="VisualArtwork"> <link property="sameAs" href="http://rdf.freebase.com/rdf/m.0dbwsn" />

      My Bed

      My Bed, first created in <time property="dateCreated" datetime="1998">1998</time>, is an <span property="artform">installation</span> by the British artist Tracey Emin.

      <div property="description">

      <cite>My Bed</cite> was exhibited at the Tate Gallery in <time datetime="1998">1999</time> as one of the shortlisted works for the Turner Prize. It consisted of her bed with bedroom objects in an abject state, and gained much media attention. Although it did not win the prize, its notoriety has persisted. </div>

      The artwork generated considerable media furore, particularly over the fact that the <span property="artMedium">bedsheets</span> were stained with bodily secretions and the floor had items from the artist's room (such as <span property="artMedium">condoms</span>, <span property="artMedium">a pair of knickers</span> with menstrual period stains, other detritus, and functional, everyday objects, including a <span property="artMedium">pair of slippers</span>). The <span property="artMedium">bed</span> was presented in the state that Emin claimed it had been when she said she had not got up from it for several days due to suicidal depression brought on by relationship difficulties.




      <div vocab="https://schema.org/" typeof="VisualArtwork"> <link property="sameAs" href="http://www.pada.net/members/memPicFull.php/38/367" />

      Still Life under the Lamp

      <span property="artform">Print</span> from <time property="dateCreated" datetime="1962">1962</time> by Pablo Picasso. Numbered from the edition of <span property="artEdition">50</span>, each signed by the artist in pencil, lower right: Picasso.

      <div property="description">

      <cite>Still Life under the Lamp</cite>, from 1962, made when the artist was eighty years old, are counted among Picasso’s most important works in linocut, a technique that he explored in the late 1950s and early 1960s. The progressive proofs show the step by step sequence by which Picasso created his linocut images showing the development of the image into its final form.

      • Artist: <span property="creator" typeof="Person"> <span property="name">Pablo Picasso</span> </span>
      • Dimensions: <span property="width" typeof="Distance">25 3/16 inches</span> × <span property="height" typeof="Distance">20 3/4 inches</span>
      • Materials: <span property="artMedium">linoprint</span> on <span property="artworkSurface">paper</span>
      • See also here and here.


    1. ```html

      <div vocab="https://schema.org/" typeof="Painting">

      <span property="name">The Madonna with the Long Neck</span>

      <span property="genre" content="http://vocab.getty.edu/aat/300021143">Late Renaissance</span> painting by <span property="creator">Parmigianino</span>. </div>



      <div vocab="https://schema.org/" typeof="Painting"> <meta property="sameAs" content="https://en.wikipedia.org/wiki/The_Church_at_Auvers" /> <span property="name">The Church at Auvers</span> by <div property="creator" typeof="Person"> <span property="name">Vincent van Gogh</span> </div>, depicts a church in <div property="contentLocation" typeof="AdministrativeArea"> <span property="name">Auvers-sur-Oise</span>, </div> but was created in <div property="locationCreated" typeof="AdministrativeArea"> <span property="name">Saint-Rémy-de-Provence</span>. </div> </div>


  2. Apr 2023
  3. Mar 2023
    1. ```sparql PREFIX wd: http://www.wikidata.org/entity/ PREFIX gist: https://ontologies.semanticarts.com/gist/ PREFIX dcterms: http://purl.org/dc/terms/

      SELECT DISTINCT ?commitTitle ?commitTime ?filename ?textLine WHERE {

      ?commit a wd:Q20058545 ; # it's a commit gist:hasPart ?part ; dcterms:subject ?commitSubject ; gist:atDateTime ?commitTime .

      ?commitSubject dcterms:title ?commitTitle .

      ?part gist:produces ?contiguousLines .

      ?contiguousLines gist:occursIn ?file ; http://example.com/containedTextContainer ?textContainer .

      ?file gist:name ?filename . ?textContainer ?line ?textLine .

      FILTER(contains(?textLine,"music")) } ```

  4. Feb 2023
  5. Jan 2023
    1. Annotating an in-text reference pointer with a citation function

      ```turtle @prefix : http://www.sparontologies.net/example/ . @prefix cito: http://purl.org/spar/cito/ . @prefix c4o: http://purl.org/spar/c4o/ . @prefix oa: http://www.w3.org/ns/oa# . @prefix per: http://data.semanticweb.org/person/ .

      :annotation a oa:Annotation ; oa:hasBody :citation ; oa:hasTarget :in-text-ref-pointer ; oa:annotatedBy per:silvio-peroni .

      :citation a cito:Citation; cito:hasCitingEntity :paper-a ; cito:hasCitationEvent cito:extends ; cito:hasCitedEntity :paper-b .

      :in-text-ref-pointer a c4o:InTextReferencePointer ; c4o:hasContent "[6]" . ```

    2. Annotating a citation with an additional text-defined citation function

      ```turtle @prefix : http://www.sparontologies.net/example/ . @prefix cito: http://purl.org/spar/cito . @prefix cnt: http://www.w3.org/2011/content# . @prefix oa: http://www.w3.org/ns/oa# .

      :annotation a oa:Annotation; oa:motivatedBy oa:commenting ; oa:hasBody :comment ; oa:hasTarget :citation .

      :comment a cnt:ContentAsText ; cnt:chars "I'm citing that paper because it initiated this whole new field of research." .

      :citation a cito:Citation; cito:hasCitingEntity :paper-a ; cito:hasCitationCharacterization cito:cites ; cito:hasCitedEntity :paper-b . ```

    1. json { "@context": { "@vocab": "https://schema.org/", "endDate": { "@type": "http://www.w3.org/2001/XMLSchema#dateTime" }, "startDate": { "@type": "http://www.w3.org/2001/XMLSchema#dateTime" } }, "@id": "https://example.org/id/course/2", "@type": "Course", "courseCode": "SD100", "name": "Structured Data", "description": "An introduction to authoring JSON-LD documents for OIH", "teaches": "JSON-LD", "provider": { "@type": "Organization", "name": "Example University", "@id": "https://grid.ac/institutes/grid.475727.4", "description": "UN Department of Economic and Social Affairs Sustainable Development" }, "hasCourseInstance": [{ "@type": "CourseInstance", "courseMode": ["MOOC1", "online"], "endDate": "2019-03-21", "startDate": "2019-02-15", "attendee": { "@type": "Person", "name": "Jane Doe", "jobTitle": "Professor", "telephone": "(425) 123-4567", "url": "http://www.janedoe.com", "identifier": { "@id": "ID_value_string", "@type": "PropertyValue", "propertyID": "This can be text or URL for an ID like ORCID", "url": "https://foo.org/linkToPropertyIDPage", "description": "Optional description of the ID" } } }, { "@type": "CourseInstance", "courseMode": ["MOOC2", "online"], "endDate": "2019-05-21", "startDate": "2019-04-15" }] }

    1. Example 2 HTTP/1.1 200 OK Content-Type: application/ld+json; profile="http://www.w3.org/ns/anno.jsonld" Link: <http://www.w3.org/ns/ldp#Resource>; rel="type" ETag: "_87e52ce126126" Allow: PUT,GET,OPTIONS,HEAD,DELETE,PATCH Vary: Accept Content-Length: 287 { "@context": "http://www.w3.org/ns/anno.jsonld", "id": "http://example.org/annotations/anno1", "type": "Annotation", "created": "2015-01-31T12:03:45Z", "body": { "type": "TextualBody", "value": "I like this page!" }, "target": "http://www.example.com/index.html" }