{"id":277,"date":"2010-10-31T18:56:05","date_gmt":"2010-10-31T17:56:05","guid":{"rendered":"http:\/\/joernhees.de\/blog\/?p=277"},"modified":"2016-09-28T23:56:08","modified_gmt":"2016-09-28T21:56:08","slug":"setting-up-a-local-dbpedia-mirror-with-virtuoso","status":"publish","type":"post","link":"https:\/\/joernhees.de\/blog\/2010\/10\/31\/setting-up-a-local-dbpedia-mirror-with-virtuoso\/","title":{"rendered":"Setting up a local DBpedia mirror with Virtuoso"},"content":{"rendered":"<p>Newer version available: <a href=\"https:\/\/joernhees.de\/blog\/2015\/11\/23\/setting-up-a-linked-data-mirror-from-rdf-dumps-dbpedia-2015-04-freebase-wikidata-linkedgeodata-with-virtuso-7-2-1-and-docker-optional\/\" target=\"_blank\">Setting up a Linked Data mirror from RDF dumps (DBpedia 2015-04, Freebase, Wikidata, LinkedGeoData, &#8230;) with Virtuso 7.2.1 and Docker (optional)<\/a><\/p>\n<p>So you&#8217;re the guy who is allowed to setup a local DBpedia mirror for your work group? OK, today is your lucky day and you&#8217;re in the right place. I hope you&#8217;ll be able to benefit from my hours of trials and errors \ud83d\ude09<!--more--> If anything goes wrong, feel free to leave me a comment below.<\/p>\n<h2>Versions<\/h2>\n<p>There is an updated version of this post for DBpedia 3.7: <a href=\"http:\/\/joernhees.de\/blog\/2012\/05\/25\/setting-up-a-local-dbpedia-3-7-mirror-with-virtuoso-6-1-5\/\">Setting up a local DBpedia 3.7 mirror with Virtuoso 6.1.5+<\/a>.<br \/>\nOriginally this guide was written for DBpedia 3.5.1 and Virtuoso 6.1.2. Later it was updated to DBpedia 3.6 and Virtuoso 6.1.3. The overall process and the main pitfalls are the same, so if you for any reason want to use DBpedia 3.5.1 just make sure to use the correct dumps.<\/p>\n<h2>Prerequisite<\/h2>\n<p>Before starting you basically need one thing: a <strong>powerful server<\/strong> \/ vm with a lot of ram (we used <strong>8 or 4 cores<\/strong> with a total of <strong>32 GB<\/strong> ram, but as you can imagine this strongly depends on what you want to do with your mirror). I&#8217;d suggest setting it up with <strong>Ubuntu 10.04 LTS<\/strong> but that&#8217;s a matter of choice. Anyhow, you&#8217;ll need root access.<\/p>\n<p>A few more words:<br \/>\nThe following will largely be <strong>bash syntax<\/strong>, sometimes we switch to <strong>sql<\/strong>, so comments start with <code>#<\/code> or <code>--<\/code>.<br \/>\nShould a command take longer than <strong>5 minutes<\/strong> the approx. times are given.<br \/>\nOverall time for this setup (en and de DBpedia 3.5.1) was <strong>7 hours<\/strong>, (en DBpedia 3.6 only took 5 hours) once I had figured out what to do and what not to do. This was tested on Ubuntu 9.10 and 10.04 (both 64-bit) with Virtuoso 06.01.3127.<\/p>\n<h2>Let&#8217;s go<\/h2>\n<h3>Download and install virtuoso<\/h3>\n<p>Go and download virtuoso opensource: <a href=\"http:\/\/sourceforge.net\/projects\/virtuoso\/\">http:\/\/sourceforge.net\/projects\/virtuoso\/<\/a><br \/>\nPut the file in your home dir on the server, then do the following.<\/p>\n<pre><code class=\"bash\">sudo aptitude install libxml2-dev libssl-dev autoconf libgraphviz-dev libmagickcore-dev libmagickwand-dev dnsutils\ncd ~\ntar -xvzf virtuoso-*\ncd virtuoso-opensource-6.1.2\nCFLAGS=\"-O2 -m64\"\nexport CFLAGS\n.\/configure --with-layout=debian # NOTICE: this will _not_ install into \/usr\/local but into \/usr (so might clash with packages by your distribution if you install \"the\" virtuoso package)\n# You'll find the db in \/var\/lib\/virtuoso\/db !\n# check output for errors and FIX THEM! (e.g., install missing packages)\nmake -j5\n<\/code><\/pre>\n<p>This will take about <strong>1 hour<\/strong>. In parallel, you might want to start with downloading the DBpedia files (next section) and come back.<\/p>\n<pre><code class=\"bash\">sudo make install\nsudo mkdir -p \/usr\/local\/data\/dbpedia\/3.6\/en\n<\/code><\/pre>\n<p>Now change the following values in <code>\/var\/lib\/virtuoso\/db\/virtuoso.ini<\/code>, the performance tuning stuff is according to <a href=\"http:\/\/virtuoso.openlinksw.com\/dataspace\/dav\/wiki\/Main\/VirtRDFPerformanceTuning\">http:\/\/virtuoso.openlinksw.com\/dataspace\/dav\/wiki\/Main\/VirtRDFPerformanceTuning<\/a>:<\/p>\n<pre><code class=\"bash\">[Parameters]\nDirsAllowed              = ., \/usr\/share\/virtuoso\/vad, \/usr\/local\/data\/dbpedia\n# IMPORTANT: for performance also do this\n[Parameters]\nNumberOfBuffers          = 2400000\n# each buffer caches a 8K page of data and occupies approx. 8700 bytes of memory\n# it's suggested to set this value to 65 % of ram for a db only server\n# so if you have 32 GB of ram: 32*1000^3*0.65\/8700 = 2390804\n# default is 2000 which will use 16 MB ram ;)\n[Database]\nMaxCheckpointRemap = 625000\n# set this to 1\/4th of NumberOfBuffers\n<\/code><\/pre>\n<p>The next step installs an init-script (autostarts) and starts the virtuoso server. (If you&#8217;ve changed directories to edit <code>\/var\/lib\/virtuoso\/db\/virtuoso.ini<\/code>, go back to the virtuoso source dir!):<\/p>\n<pre><code class=\"bash\">sudo cp debian\/init.d \/etc\/init.d\/virtuoso-opensource &amp;&amp;\nsudo chmod a+x \/etc\/init.d\/virtuoso-opensource &amp;&amp;\nsudo bash debian\/virtuoso-opensource.postinst.debhelper\n<\/code><\/pre>\n<h3>Downloading the DBpedia dump files<\/h3>\n<p>We have decided that we <strong>only<\/strong> needed the <strong>German<\/strong> and <strong>English<\/strong> files (this was for DBpedia 3.5.1, with DBpedia 3.6 we only needed and installed English) in NT format, if you need something different do so. For example if you decide to download the all-languages tar then make sure to exclude the NQ files from the later importing steps. One simple way to do this is to move everything you don&#8217;t want to import out of the directory. Also don&#8217;t forget to import the dbpedia_3.*.owl file (last step in the script below)!<br \/>\nAnother hint: Virtuoso can only import plain (uncompressed) or gzipped files, the DBpedia dumps are bzipped, so you either repack them into gzip format or extract them. On our server the importing procedure was reasonably slower from extracted files than from gzipped ones (ignoring the vast amount of wasted disk space for the extracted files). <strong>File access becomes a bottleneck<\/strong> if you have 8 cores idling. This is why I decided on <strong>repacking<\/strong> all the files from bz2 to gz. As you can see I do the en and de repacking in parallel, if that&#8217;s not suitable for you, feel free to change it. You might also want to change this if you want to do it in parallel to downloading. The repackaging process below took about <strong>1 hour<\/strong> but was worth it in the end. The more CPUs you have, the more you can parallelize this process.<\/p>\n<pre><code class=\"bash\">sudo -i # get root\n# see comment above, you could also get the all_language.tar or another DBpedia version...\nmkdir -p \/usr\/local\/data\/dbpedia\/3.6\/en\ncd \/usr\/local\/data\/dbpedia\/3.6\/en\nwget -r -np -nd -nc -A'*.nt.bz2' http:\/\/downloads.dbpedia.org\/3.6\/en\/\n\n# if you want to save space do this:\nfor i in *.bz2 ; do bzcat $i | gzip --fast &gt; ${i%.bz2}.gz &amp;&amp; rm $i ; done &amp;\n# else do:\n#bunzip2 *&amp;\n\nmkdir ..\/de &amp;&amp; cd ..\/de\nwget -r -np -nd -nc -A'*.nt.bz2' http:\/\/downloads.dbpedia.org\/3.6\/de\/\n# if you want to save space do this:\nfor i in *.bz2 ; do bzcat $i | gzip --fast &gt; ${i%.bz2}.gz &amp;&amp; rm $i ; done &amp;\n# else do:\n#bunzip2 *\n\ncd ..\nwget http:\/\/downloads.dbpedia.org\/3.6\/dbpedia_3.6.owl\n\n# notice that the extraction (and repacking) of *.bz2 takes quite a while (about 1 hour)\n# gzipped data is reasonably packed, but still very fast to access (in contrast to bz2), so maybe this is the best choice.\n<\/code><\/pre>\n<p><strong>In the mean time<\/strong> let&#8217;s start with the DBpedia bulk loading tutorial. We need to setup a few things before we can start, so go on while still downloading &amp; repacking, if virtuoso is running (else go back to the previous section):<\/p>\n<h3>Installing the bulk loader scripts<\/h3>\n<p>As a reference only: <a href=\"http:\/\/virtuoso.openlinksw.com\/dataspace\/dav\/wiki\/Main\/VirtBulkRDFLoaderExampleDbpedia\">VirtBulkRDFLoaderExampleDbpedia<\/a><br \/>\nA few words about that tutorial: I found it to lack much information, so for this tutorial: USE WHAT&#8217;S WRITTEN HERE!<br \/>\nWe&#8217;ve already set the <code>DirsAllowed param<\/code> in the .ini file and downloaded the files (or go back and continue with the installation of Virtuoso now). Now let&#8217;s execute the bulk loading script taken from: <a href=\"http:\/\/virtuoso.openlinksw.com\/dataspace\/dav\/wiki\/Main\/VirtBulkRDFLoaderScript\"><br \/>\nhttp:\/\/virtuoso.openlinksw.com\/dataspace\/dav\/wiki\/Main\/VirtBulkRDFLoaderScript<\/a>.<br \/>\nCopy the contents into a plain text file called <code>VirtBulkRDFLoaderScript.vsql<\/code> in your home dir.<\/p>\n<p><em>Note: in the following i will assume that your virtuoso isql command is called <code>isql<\/code>. If you&#8217;re in lack of such a command it might be called <code>isql-vt<\/code>.<\/em><\/p>\n<pre><code class=\"bash\">cd\n# this will only install all the needed db procedures doing the work later on.\nisql localhost dba dba VirtBulkRDFLoaderScript.vsql\n<\/code><\/pre>\n<h3>Cleaning problematic parts out of the DBpedia dump<\/h3>\n<p>OK, now a word about the DBpedia dumps:<br \/>\nI had problems importing a couple of files in the later steps, in all DBpedia versions i tried, due to URI-lengths of much larger than 1024:<\/p>\n<p>For DBpedia 3.5.1:<\/p>\n<ul>\n<li>`external_links_en.nt.gz` contained 104 such URIs<\/li>\n<li>`page_links_en.nt.gz` contained >5 such URIs (stopped the long counting process after these).<\/li>\n<\/ul>\n<p>For DBpedia 3.6:<\/p>\n<ul>\n<li>`external_links_en.nt.gz`<\/li>\n<li>`infobox_properties_en.nt.gz`<\/li>\n<li>`page_links_en.nt.gz`<\/li>\n<\/ul>\n<p>To see these problems yourself do the following:<\/p>\n<pre><code class=\"bash\">cd \/usr\/local\/data\/dbpedia\/3.6\/en\n# zcat external_links_en.nt.gz | cat -n | grep -E '^[[:space:]]*[0-9]+[[:space:]]*&lt;.+&gt; &lt;.+&gt; &lt;.{1025,}&gt; .$'\n<\/code><\/pre>\n<p>To fix this (by excluding these lines) do (takes about <strong>30 minutes<\/strong> for page_links_en):<\/p>\n<pre><code class=\"bash\">cd \/usr\/local\/data\/dbpedia\/3.6\/en\nfor i in external_links_en.nt.gz page_links_en.nt.gz ; do\n  echo -n \"cleaning $i...\"\n  zcat $i | grep -v -E '^&lt;.+&gt; &lt;.+&gt; &lt;.{1025,}&gt; .$' | gzip --fast &gt; ${i%.nt.gz}_cleaned.nt.gz &amp;&amp;\n  mv ${i%.nt.gz}_cleaned.nt.gz $i\n  echo \"done.\"\ndone\n<\/code><\/pre>\n<h3>Importing DBpedia dumps into virtuoso<\/h3>\n<p>Now AFTER the re-\/unpacking and cleaning of the files we will register all files in the dbpedia dir (recursively <code>ld_dir_all<\/code>) to be added to the dbpedia graph. As mentioned above: If you use this method make sure that only files reside in the given subtree that you really want to import.<br \/>\nIf you only want one directory&#8217;s files to be added (non recursive) use <code>ld_dir<\/code>.<br \/>\nIf you manually want to add some files, use <code>ld_add<\/code>.<br \/>\nSee the <code>VirtBulkRDFLoaderScript.vsql<\/code> file for args to pass.<\/p>\n<pre><code class=\"bash\">isql # enter virtuoso sql mode\n<\/code><\/pre>\n<pre><code class=\"sql\">-- we are in sql mode now\nld_dir_all('\/usr\/local\/data\/dbpedia\/3.6', '*.*', 'http:\/\/dbpedia.org');\n-- do the following to see which files were registered to be added:\nselect * from DB.DBA.LOAD_LIST;\n-- if unsatisfied use:\n-- delete from DB.DBA.LOAD_LIST;\nEXIT;\n<\/code><\/pre>\n<p>OK, now comes the fun (and long part: about <strong>5 hours<\/strong>)&#8230; We registered the files to be added, now let&#8217;s finally <strong>start the process<\/strong>. Fire up <code>screen<\/code> (see <a href=\"\/blog\/2010\/10\/31\/setting-up-a-local-dbpedia-mirror-with-virtuoso\/comment-page-1\/#comment-560\">comment<\/a>) if you didn&#8217;t already.<\/p>\n<pre><code class=\"bash\">isql\n<\/code><\/pre>\n<pre><code class=\"sql\">rdf_loader_run();\n-- will take approx. 4 hours with 32 GB RAM and 4 CPUs if set as above!\n-- DO NOT USE THE DB BESIDES THESE COMMANDS:\n-- (I had some warnings about a possibly corrupt db in the log,\n--  when I visited the virtuoso conducter during the first run...)\n-- you can watch the progress from another isql session with select * from DB.DBA.LOAD_LIST;\n-- if you need to stop the loading for any reason: rdf_load_stop ();\n-- if you want to force stopping: rdf_load_stop(1);\ncheckpoint;\ncommit work;\ncheckpoint;\nEXIT;\n<\/code><\/pre>\n<h3>Testing your local mirror<\/h3>\n<p>After this:<br \/>\nTake a look into <code>var\/lib\/virtuoso\/db\/virtuoso.log<\/code> file. Should you find any <strong>errors<\/strong> in there&#8230; FIX THEM! You might use the dump, but it&#8217;s incomplete then. Any error quits out of the loading of the corresponding file and continues with the next one, so you&#8217;re only using the part of that file up to the place where the error occurred. (Should you find errors you can&#8217;t fix in the way I did above, please leave a comment.)<\/p>\n<p>Go to the sparql-endpoint of your server <code>http:\/\/your-server:8890\/sparql<\/code> (or in isql prefix with: SPARQL)<\/p>\n<pre><code class=\"sql\">SELECT count(*) WHERE { ?s ?p ?o } ;\n<\/code><\/pre>\n<p>This might take about <strong>10 minutes<\/strong> and then returns 258867871 (257134114 for en DBpedia 3.6). Subsequent queries are a lot faster (if you find another way (preferably automatic) to warm up the caches, please leave us a note).<br \/>\nI also like this query showing all the graphs and how many triples are in them:<\/p>\n<pre><code class=\"sql\">SELECT ?g count(*) { GRAPH ?g {?s ?p ?o.} } GROUP BY ?g ORDER BY DESC 2;\n-- g                                                    callret-1\n-- VARCHAR                                              VARCHAR\n-- ______________________________________________________________\n-- \n-- http:\/\/dbpedia.org                                   257130074\n-- http:\/\/localhost:8890\/DAV                                 2067\n-- http:\/\/www.openlinksw.com\/schemas\/virtrdf#                1813\n-- http:\/\/www.w3.org\/2002\/07\/owl#                             160\n-- \n-- 4 Rows. -- 214173 msec.\n<\/code><\/pre>\n<p>Congratulations, you just imported over 250 million triples.<\/p>\n<h3>Final polishing<\/h3>\n<p>Isn&#8217;t this a good moment to backup the db? If you think so as well, see the next section. I did this backing up twice, just after all the triples were imported and after the following:<br \/>\nYou can &amp; should now install the <strong>DBpedia<\/strong> and <strong>RDF Mappers packages<\/strong> from the Virtuoso Conductor.<br \/>\n<code>http:\/\/your-server:8890<\/code><\/p>\n<pre><code>login: dba\npw: dba\n<\/code><\/pre>\n<p>Go to System Admin \/ Packages. Install the rdf_mappers packages (takes about 5 minutes).<br \/>\nDownload the dbpedia vad package from <a href=\"http:\/\/download.openlinksw.com\/packages\/6.1\/virtuoso\/\">http:\/\/download.openlinksw.com\/packages\/6.1\/virtuoso\/<\/a>, then upload &amp; install it to Virtuoso (below the package list).<br \/>\nI used rdf_mappers: 1.24.35\/ 2011-06-13 and  dbpedia: 1.3.01\/ 2010-07-10.<\/p>\n<p>After this, there should be a couple more graphs in your DB:<\/p>\n<pre><code class=\"sql\">SQL&gt; sparql SELECT ?g count(*) { GRAPH ?g {?s ?p ?o.} } GROUP BY ?g ORDER BY DESC 2;\n-- g                                                           callret-1\n-- VARCHAR                                                     VARCHAR\n-- ______________________________________________________________________\n-- \n-- http:\/\/dbpedia.org                                          257130074\n-- http:\/\/www.openlinksw.com\/schemas\/RDF_Mapper_Ontology\/1.0\/  256057\n-- http:\/\/localhost:8890\/DAV                                   3675\n-- http:\/\/www.openlinksw.com\/schemas\/virtrdf#                  1813\n-- http:\/\/open.vocab.org\/terms                                 1480\n-- http:\/\/purl.org\/ontology\/bibo\/                              1226\n-- http:\/\/purl.org\/goodrelations\/v1                            937\n-- http:\/\/purl.org\/dc\/terms\/                                   857\n-- http:\/\/www.openlinksw.com\/schemas\/google-base               691\n-- http:\/\/xmlns.com\/foaf\/0.1\/                                  557\n-- http:\/\/rdfs.org\/sioc\/ns#                                    553\n-- http:\/\/www.openlinksw.com\/schemas\/evri                      482\n-- http:\/\/bblfish.net\/work\/atom-owl\/2006-06-06\/                386\n-- http:\/\/scot-project.org\/scot\/ns#                            332\n-- http:\/\/www.openlinksw.com\/schemas\/zillow                    311\n-- http:\/\/www.w3.org\/2004\/02\/skos\/core                         252\n-- http:\/\/www.openlinksw.com\/schemas\/cnet                      225\n-- http:\/\/www.openlinksw.com\/schemas\/tesco                     183\n-- http:\/\/www.openlinksw.com\/schemas\/bestbuy                   172\n-- http:\/\/www.w3.org\/2002\/07\/owl#                              160\n-- http:\/\/www.w3.org\/2002\/07\/owl                               160\n-- http:\/\/www.openlinksw.com\/schemas\/amazon                    143\n-- http:\/\/purl.org\/dc\/elements\/1.1\/                            139\n-- http:\/\/www.w3.org\/2007\/05\/powder-s#                         117\n-- http:\/\/www.w3.org\/2000\/01\/rdf-schema#                       87\n-- http:\/\/www.w3.org\/1999\/02\/22-rdf-syntax-ns#                 85\n-- http:\/\/www.openlinksw.com\/schemas\/ebay                      79\n-- virtrdf-label                                               56\n-- http:\/\/www.openlinksw.com\/schema\/attribution#               51\n-- dbprdf-label                                                6\n-- \n-- 30 Rows. -- 215219 msec.\n<\/code><\/pre>\n<p>Depending on what you want to do with your db, you might want to increase the timeouts for SPARQL a lot.<\/p>\n<h3>Backing up this initial state<\/h3>\n<p>Now is a good moment to backup the whole db (takes about <strong>half an hour<\/strong>):<\/p>\n<pre><code class=\"bash\">sudo -i\ncd \/\n\/etc\/init.d\/virtuoso-opensource stop &amp;&amp;\ntar -cvf - \/var\/lib\/virtuoso | gzip --fast &gt; virtuoso-6.1.3-DBDUMP-dbpedia-3.6-en-$(date '+%F').tar.gz &amp;&amp;\n\/etc\/init.d\/virtuoso-opensource start\n<\/code><\/pre>\n<p>Yay, done \ud83d\ude09<\/p>\n<p>Edit (Nov. 6th 2010): fixed escaping of html special chars (&lt;,&gt;,&amp;) in code snippets.<br \/>\nEdit (Jun. 14th 2011): updated after importing DBpedia 3.6<br \/>\nEdit (Dec. 29th 2011): added a note that <code>isql<\/code> might be named <code>isql-vt<\/code><br \/>\nEdit (May 25th 2012): link to version for DBpedia 3.7<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So you&#8217;re the guy who is allowed to setup a local DBpedia mirror for your work group? OK, today is your lucky day and you&#8217;re in the right place. I hope you&#8217;ll be able to benefit from my hours of trials and errors \ud83d\ude09<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[2],"tags":[33,34,69,89,106,134,171,187],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pYA5n-4t","jetpack-related-posts":[{"id":442,"url":"https:\/\/joernhees.de\/blog\/2012\/05\/25\/setting-up-a-local-dbpedia-3-7-mirror-with-virtuoso-6-1-5\/","url_meta":{"origin":277,"position":0},"title":"Setting up a local DBpedia 3.7 mirror with Virtuoso 6.1.5+","date":"2012-05-25","format":false,"excerpt":"Newer version available: Setting up a Linked Data mirror from RDF dumps (DBpedia 2015-04, Freebase, Wikidata, LinkedGeoData, ...) with Virtuso 7.2.1 and Docker (optional) Nearly 1.5 years after i initially published a post about how to setup a local DBpedia mirror i recently revisited the problem myself to setup a\u2026","rel":"","context":"In &quot;Coding&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":610,"url":"https:\/\/joernhees.de\/blog\/2014\/11\/10\/setting-up-a-local-dbpedia-2014-mirror-with-virtuoso-7-1-0\/","url_meta":{"origin":277,"position":1},"title":"Setting up a local DBpedia 2014 mirror with Virtuoso 7.1.0","date":"2014-11-10","format":false,"excerpt":"Newer version available: Setting up a Linked Data mirror from RDF dumps (DBpedia 2015-04, Freebase, Wikidata, LinkedGeoData, ...) with Virtuso 7.2.1 and Docker (optional) So you're the guy who is allowed to setup a local DBpedia mirror or more generally a local Linked Data mirror for your work group? OK,\u2026","rel":"","context":"In &quot;Coding&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":584,"url":"https:\/\/joernhees.de\/blog\/2014\/04\/23\/setting-up-a-local-dbpedia-3-9-mirror-with-virtuoso-7\/","url_meta":{"origin":277,"position":2},"title":"Setting up a local DBpedia 3.9 mirror with Virtuoso 7","date":"2014-04-23","format":false,"excerpt":"Newer version available: Setting up a Linked Data mirror from RDF dumps (DBpedia 2015-04, Freebase, Wikidata, LinkedGeoData, ...) with Virtuso 7.2.1 and Docker (optional) I just found this aged post in my drafts folder, maybe someone will still like it... So you're the guy who is allowed to setup a\u2026","rel":"","context":"In &quot;Coding&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":731,"url":"https:\/\/joernhees.de\/blog\/2015\/11\/23\/setting-up-a-linked-data-mirror-from-rdf-dumps-dbpedia-2015-04-freebase-wikidata-linkedgeodata-with-virtuoso-7-2-1-and-docker-optional\/","url_meta":{"origin":277,"position":3},"title":"Setting up a Linked Data mirror from RDF dumps (DBpedia 2015-04, Freebase, Wikidata, LinkedGeoData, ...) with Virtuoso 7.2.1 and Docker (optional)","date":"2015-11-23","format":false,"excerpt":"So you're the guy who is allowed to setup a local DBpedia mirror or more generally a local Linked Data mirror for your work group? OK, today is your lucky day and you're in the right place. I hope you'll be able to benefit from my many hours of trials\u2026","rel":"","context":"In &quot;Coding&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":643,"url":"https:\/\/joernhees.de\/blog\/2015\/01\/28\/dbpedia-2014-stats-top-subjects-predicates-and-objects\/","url_meta":{"origin":277,"position":4},"title":"DBpedia 2014 Stats - Top Subjects, Predicates and Objects","date":"2015-01-28","format":false,"excerpt":"Ever wondered what the top subjects \/ predicates \/ objects are in DBpedia? I recently came across this problem while trying to draw a random sample of nodes from DBpedia which follow a given degree distribution for my PhD. Turns out this is actually more difficult than i expected. Mostly\u2026","rel":"","context":"In &quot;Coding&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":216,"url":"https:\/\/joernhees.de\/blog\/2010\/08\/20\/bash-prompt-return-value\/","url_meta":{"origin":277,"position":5},"title":"Bash prompt indicating return value","date":"2010-08-20","format":false,"excerpt":"Lately I've fiddled a lot with installing virtuoso on some virtual machines and found myself repeatedly asking bash for the return value of the last command echo $?. I remembered this blog post by Gecko quite a while ago and tuned it a bit to my needs. My user prompt\u2026","rel":"","context":"In &quot;Coding&quot;","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/joernhees.de\/blog\/wp-content\/uploads\/2010\/08\/bashPromptRetValColor.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/joernhees.de\/blog\/wp-json\/wp\/v2\/posts\/277"}],"collection":[{"href":"https:\/\/joernhees.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joernhees.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joernhees.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/joernhees.de\/blog\/wp-json\/wp\/v2\/comments?post=277"}],"version-history":[{"count":4,"href":"https:\/\/joernhees.de\/blog\/wp-json\/wp\/v2\/posts\/277\/revisions"}],"predecessor-version":[{"id":808,"href":"https:\/\/joernhees.de\/blog\/wp-json\/wp\/v2\/posts\/277\/revisions\/808"}],"wp:attachment":[{"href":"https:\/\/joernhees.de\/blog\/wp-json\/wp\/v2\/media?parent=277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joernhees.de\/blog\/wp-json\/wp\/v2\/categories?post=277"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joernhees.de\/blog\/wp-json\/wp\/v2\/tags?post=277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}