14
May 11

Yet again, I miss having a tel…

Yet again, I miss having a television. #sarcasm #eurovision


13
May 11

View from temple row http://in…

View from temple row http://instagr.am/p/EMDRc/


13
May 11

Sister has reminded me that I …

Sister has reminded me that I have tried to blow myself up on several occasions… #muststop


13
May 11

Finished Cycle with @cyclemete…

Finished Cycle with @cyclemeter, on a new route, time 28:49, 6.60 miles, see http://j.mp/iRG7nG, 13.74 average.


12
May 11

“Join Our Mailing List For Ema…

“Join Our Mailing List For Email Marketing you can trust”


10
May 11

Last night, the spaceships chu…

Last night, the spaceships churned the atmosphere with their wake : photo http://t.co/baa5Mi8


09
May 11

Installing 4Store on MacOSX

Having got on fairly well with installing swiftOWLIM, I thought it would be a good idea to have a go with 4Store.

  1. Download the disk image.
  2. Open the disk image and copy the app to your Applications.
  3. Run the app.
  4. A terminal window will open which has the 4Store command-line tools in it’s path.
  5. Create a database (instructions): I went with the basic command.
    4s-backend-setup mystorename
  6. Load some data (instructions): here I wanted to load multiples so used the command:
    4s-import mystorename `ls /path/to/ntriples/*.nt`

    Some few minutes later (really not very long at all), my 18 million triples were loaded at a rate of something like 55,000 triples per second!

  7. Set up a SPARQL endpoint (instructions). 4Store has an internal soft limit on SPARQL queries to protect you from expensive ?s ?p ?o queries and other expensive query types. This defaults to 1000, but I wanted to alter that so I could run some queries which I knew were going to be inefficient due to the structure of the data I am working with. As this is my dev machine, I decided to just turn the soft limit off for all SPARQL endpoints that I create. Therefore I created a config file in /etc/4store.conf
    sudo vi /etc/4store.conf
    [default]
        soft-limit = 0 #disable soft limit.

    Then started the SPARQL http server endpoint on my chosen port.

    4s-httpd -p 8000 mystorename
  8. All done. and running expensive queries that return pretty fast.

This has to be the easiest setup of a triple store yet.


09
May 11

/me wonders if my stomach rumb…

/me wonders if my stomach rumbling is really that loud? @mmmmmrob


07
May 11

Words that twist

Words twist in my palm.
Words thrown, cutting fresh scars
As they leave my hand.
Un-healing, arcing back to sting.

Twist my palms. In words
Of remorse I claw back;
Words said rather than unsaid,
Uttered rather than left thought.

My palms twist words in
Order to manipulate.
Yet half of the message
Is broken by its reception.


06
May 11

Installing SwiftOWLIM on MacOSX

I’m sure there are other guides out there, but his is how I did it, and works for me.

Install tomcat

Use macports to install tomcat6

sudo port install tomcat6

This puts tomcat in /opt/local/share/java/tomcat6/

The tomcatctl script can be used to start and stop tomcat.

sudo tomcatctl start
sudo tomcatctl stop
sudo tomcatctl restart

We’ll also be editing tomcatctl to add some specifics for our sesame install.

Install Sesame

  1. Download the sesame tar and unwrap it somewhere convenient.
  2. Drop the .war files from the war/ directory into the tomcat6/webapps/ directory.
  3. Restart tomcat
  4. go to http://localhost:8080/openrdf-sesame
  5. You’ll likely get an error beacuse sesame is tryin to write some directories and log files to a protected area of the system. Therefore you can do this:
    cd ~
    mkdir Aduna
    chmod 777 Aduna
  6. Then add this Java opt to your tomcatctl script. You may also want to change the maximum memory tomcat can use.
    JAVA_OPTS='-Dinfo.aduna.platform.appdata.basedir=/Users/myid/Aduna/'
    JAVA_OPTS="$JAVA_OPTS -Xmx1024m"

Install SwiftOWLIM

  1. Download the SwiftOWLIM distribution.
  2. Follow the instructions in the SwiftOWLIM documentation for a step by step vanilla install.
    (I also copyed {swiftowlim_dir}/lubm/ontology/owl.rdfs to /Users/myid/Aduna/ontology/ but not sure I needed to.)

All Done: hopefully…. now to load some data…

Load Data

Now, I’m sure there are better ways… but…

This script (run using sudo) finds all the files in a given directory that are .nt (ntriples) files.

#!/bin/bash
# script to load data to a local swiftowlim instance.

LOG=load_mydata_swiftowlim.log

for file in `find $1 -name "*.nt"`
do
    ( time  ./loadFileSwiftOwlim.sc $file ) 2>&1 | tee -a $LOG
done

Which calls this expect script to use the sesame console to load the files into the repository.

#!/usr/bin/expect
# script to load data to a local swiftowlim instance.

puts "\n#### Sending $argv"
spawn /opt/local/share/openrdf-sesame-2.3.3/bin/console.sh 

expect "> "
send "connect http://localhost:8080/openrdf-sesame.\r"

expect "> "
send "open mystore.\r"

expect "mystore> "
send "load $argv.\r"

expect "mystore> "
puts "\nLoaded $argv"