today is tau day: http://t.co/pGS7Ele
28
Jun 11
Fix a single space in a URI
Looking for a regex to fix a file with a space appearing in random places in the URI:
sed -e 's/\(<[^ >]*\) \([^ ]*> [<.]\)/\1_\2/' < file.nt > newfile.nt
An improvement would be to change that to include more than one space… So here is my test command where I look for a token in the output to see what is matching:
sed -e 's/\(<[^ >]*\) \{1,\}\([^ ]\{0,\}> [<.]\)/\1FOUND\2/' < file.nt | grep FOUND
28
Jun 11
Finished Cycle with @cyclemete…
Finished Cycle with @cyclemeter, on Commute – Sandwel… route, time 28:45, 5.97 miles, average 12.47.
27
Jun 11
“if Britons don’t bike for fea…
“if Britons don’t bike for fear of getting knocked off, why not tackle the fear itself?” Paraphrased: http://t.co/Hfod8rs via @sustrans
27
Jun 11
Finished Cycle with @cyclemete…
Finished Cycle with @cyclemeter, on Commute – Smethic… route, time 24:41, 4.61 miles, average 11.20.
25
Jun 11
Summer fete at Christchurch Mo…
Summer fete at Christchurch Mountsorrel @ Christchurch Mountsorrel http://instagr.am/p/GWzbZ/
24
Jun 11
Running Jena Eyeball on Mac OSX
A HowTo for running Jena Eyeball on Mac OSX.
- Download the eyeball package somewhere convenient.
- Create the following script somewhere convenient, then add it to your PATH.
#!/bin/bash # script to run eyeball on a file or files FILES=$@ FILEBASE="/YOUR/PATH/TO/eyeball-2.3" CLASSPATH="$FILEBASE/lib/antlr-2.7.5.jar:\ $FILEBASE/lib/arq-extra.jar:\ $FILEBASE/lib/arq.jar:\ $FILEBASE/lib/commons-logging-1.1.1.jar:\ $FILEBASE/lib/commons-logging.jar:\ $FILEBASE/lib/concurrent.jar:\ $FILEBASE/lib/eyeball.jar:\ $FILEBASE/lib/icu4j_3_4.jar:\ $FILEBASE/lib/iri.jar:\ $FILEBASE/lib/jazzy-core.jar:\ $FILEBASE/lib/jena.jar:\ $FILEBASE/lib/jenatest.jar:\ $FILEBASE/lib/json.jar:\ $FILEBASE/lib/junit4.jar:\ $FILEBASE/lib/log4j-1.2.12.jar:\ $FILEBASE/lib/slf4j-api-1.5.6.jar:\ $FILEBASE/lib/slf4j-log4j12-1.5.6.jar:\ $FILEBASE/lib/stax-api-1.0.jar:\ $FILEBASE/lib/wstx-asl-3.0.0.jar:\ $FILEBASE/lib/xercesImpl.jar:\ $FILEBASE/lib/xml-apis.jar:\ $FILEBASE/lib/xsdlib.jar:\ $FILEBASE/lib:\ $FILEBASE/mirror:\ $FILEBASE/etc" for file in $FILES do echo "=======================================" echo " Checking $file" echo "=======================================" java -classpath "$CLASSPATH" jena.eyeball -check $file done
- You may want to tell Jena what schemas you are using. I did this by downloading all the schema rdf or n3 files I could find to the {eyeball_install_dir}/mirror direectory, then adding the following to the end of the java command line:
-assume owl dc-all `ls $FILEBASE/mirror/*`
This means that we don’t get so many ‘predicate not declared’ messages when we will only ignore them.
Don’t you just love Java and its classpath loveliness… NOT.
24
Jun 11
The caravan designed to be tow…
The caravan designed to be towed behind a bicycle | ETA http://t.co/eS5yUTf via @ETATheTwig
23
Jun 11
Finished Cycle with @cyclemete…
Finished Cycle with @cyclemeter, on Commute – Coseley… route, time 17:58, 3.57 miles, average 11.92.
22
Jun 11
Finished Cycle with @cyclemete…
Finished Cycle with @cyclemeter, on Commute – Smethic… route, time 18:17, 4.25 miles, average 13.95.