<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
tt
        {mso-style-priority:99;
        font-family:"Courier New",serif;}
span.author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z
        {mso-style-name:author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-AU link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Actually, I’ll reply here instead as it allows for a broader audience.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>That’s awesome that you’re looking to learn more about the Semantic Web and SPARQL. Bon courage!<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Hopefully some libraries reply to you here and find that the work is relevant. Since I work for a software company, it’s not relevant to me per se as my work is directed by clients for the most part, but I hope someone finds it relevant. Petter Goksøyr Åsen might like to talk about it, as might Magnus Enger. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>I have done work on Linked Data in the community, but no one really seemed very interested in it, so it’s been dormant for a while now. I’m still looking for testers ;). Although to be honest my understanding of Linked Data has grown a lot since I first posted my patches, so I think my original work isn’t good enough anymore. If you want to learn more about how RDF can be used in a library system, I’d suggest you look at Fedora Commons 4.x and IIIF. Both use RDF natively for their data. (Actually, if you really want to chat about this, I would be happy to talk for ages and ages about this topic. I don’t have commercial reasons to keep working in Linked Data, but I do still find it interesting professionally.)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>I notice in your patch that you’re currently using biblio.abstract to store your external URIs but you might want to look at <a href="https://www.loc.gov/marc/mac/2017/2017-08.html">https://www.loc.gov/marc/mac/2017/2017-08.html</a> and <a href="https://www.loc.gov/aba/pcc/bibframe/TaskGroups/URI%20FAQs.pdf">https://www.loc.gov/aba/pcc/bibframe/TaskGroups/URI%20FAQs.pdf</a>. I was at a conference earlier this year talking about use of the $0 and $1 for embedding RDF URIs in MARC. This seems like it might be relevant for you. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Not sure if I have much else to add. In terms of code, I like the idea of libraries being able to define their own target endpoints and SPARQL queries. The downside of that is it would be easy to break, but the upside is that you could add any source that you want. In terms of performance, I’d say either caching locally makes sense. I’ve worked a fair bit with Apache Fuseki. It’s not the greatest piece of technology, but it could do what you want, although I’d suggest either batching all your SPARQL update queries into one HTTP request or just using the built-in REST API. (I’d also use named graphs otherwise it’ll be a nightmare trying to manage all the RDF triples “per record”). I have some tips and tricks for Fuseki if you’re interested. If you are using Fuseki for caching, I’d say don’t use a disk-based data store – use something in memory. Alternatively use some other in-memory cache. Another idea would be to create a daemon that can fork child processes to do the actual HTTP requests, so that you can do N number of SPARQL queries in parallel. Have the opac-detail.pl page load and then query that daemon asynchronously so that the Koha page loads quickly and you can show a little “Loading…” graphic on the page until the background daemon has prepared the data from the external source(s). (Or if the data is cached you don’t even need to call out to the daemon, you can just fetch the cached data from your local cache.) I think it would be a nicer user experience and you’d save time/have better performance. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>I wish you luck : ).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>David Cook<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Systems Librarian<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Prosentient Systems<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>72/330 Wattle St<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Ultimo, NSW 2007<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Australia<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Office: 02 9212 0899<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Direct: 02 8005 0595<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'> koha-devel-bounces@lists.koha-community.org [mailto:koha-devel-bounces@lists.koha-community.org] <b>On Behalf Of </b>Claire Hernandez<br><b>Sent:</b> Saturday, 14 July 2018 12:10 AM<br><b>To:</b> Koha-devel@lists.koha-community.org<br><b>Subject:</b> [Koha-devel] Sparql and koha opac (wikidata and bnf to try things)<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div id=magicdomid2><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New",serif'><br><span class=author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z>Hi,</span><br><br><span class=author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z>I wanted to try and learn about semantic web and sparql. So I give it a try in a opac-detail view. This patch is just a poc and really not for production. I wanted to know if this type of work is relevant to you. I know in community previous work was done but maybe you can share where you are now with linked data ?</span></span><o:p></o:p></p></div><div id=magicdomid3><p class=MsoNormal><o:p> </o:p></p></div><div id=magicdomid4><p class=MsoNormal><span class=author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z><span style='font-size:10.0pt;font-family:"Courier New",serif'>Just 2 words about the dev :</span></span><o:p></o:p></p></div><div id=magicdomid5><p class=MsoNormal><span class=author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z><span style='font-size:10.0pt;font-family:"Courier New",serif'>    * Simple syspref called "Explore", 3 possibilities: nothing, Bnf (national library in france) and Wikidata</span></span><o:p></o:p></p></div><div id=magicdomid6><p class=MsoNormal><span class=author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z><span style='font-size:10.0pt;font-family:"Courier New",serif'>    * Some datas are fetched, I suppose I have an ark in my biblio</span></span><o:p></o:p></p></div><div id=magicdomid7><p class=MsoNormal><span class=author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z><span style='font-size:10.0pt;font-family:"Courier New",serif'>    * I display "simple information", there is no complicated query</span></span><o:p></o:p></p></div><div id=magicdomid8><p class=MsoNormal><span class=author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z><span style='font-size:10.0pt;font-family:"Courier New",serif'>    </span></span><o:p></o:p></p></div><div id=magicdomid9><p class=MsoNormal><span class=author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z><span style='font-size:10.0pt;font-family:"Courier New",serif'>Possibles "next" :</span></span><o:p></o:p></p></div><div id=magicdomid10><p class=MsoNormal><span class=author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z><span style='font-size:10.0pt;font-family:"Courier New",serif'>  * Not one source (bnf or wikidata), but cross fetch between sources (ex: bnf + wikidata + europeana + geonames + whatever ;)</span></span><o:p></o:p></p></div><div id=magicdomid11><p class=MsoNormal><span class=author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z><span style='font-size:10.0pt;font-family:"Courier New",serif'>  * Having a "local triple store" or not doing real time to have information display quicker</span></span><o:p></o:p></p></div><div id=magicdomid12><p class=MsoNormal><span class=author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z><span style='font-size:10.0pt;font-family:"Courier New",serif'>  * More complicated queries to display timeline for date or exploring period, exploring "notable work" or "author collaborated with" etc.</span></span><o:p></o:p></p></div><div id=magicdomid13><p class=MsoNormal><span class=author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z><span style='font-size:10.0pt;font-family:"Courier New",serif'>  </span></span><o:p></o:p></p></div><div id=magicdomid232><p class=MsoNormal><span class=author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z><span style='font-size:10.0pt;font-family:"Courier New",serif'>The dev is probably not as clean as you wish, and I prefer to share something to talk about - even not perfect - than nothing. I plan to write a blog post about what I learn. Tell me if you are interested, it could encourage me to do it :p</span></span><span style='font-size:10.0pt;font-family:"Courier New",serif'><br><br><span class=author-a-z74zz88z18t0ksz66zoz71zz74zfhz85zz89z>Claire.</span></span><o:p></o:p></p></div></div></body></html>