Wednesday, October 8, 2014

RDF Graph Normalization

During the conference call at the web payments community group, I was curious what Dave Longley meant by normalization.

http://json-ld.org/spec/latest/rdf-graph-normalization/

Saturday, September 13, 2014

Explorations with Simple-Part Whole Relations


Following the link at http://www.w3.org/2001/sw/BestPractices/OEP/
SimplePartWhole/
simple-part-whole-relations-v1.3.html
we see that in section 3 we have a structure that represents 
faults in a car.
 
 
The structure is represented in the document in Turtle (*.ttl) as:

@prefix : <http: example.org="" stuff=""> .
@prefix rdf: <http: rdf-syntax-ns="" www.w3.org="">.
@prefix owl: <http: owl="" www.w3.org="">.

:Fault_in_car
  a  owl:Class ;
  owl:equivalentClass
    [ a  owl:Class ;
      owl:intersectionOf (:Fault [ a  owl:Restriction ;
         owl:onProperty :hasLocus ;
         owl:someValuesFrom
           [ a  owl:Class ;
             owl:unionOf (:Car [ a  owl:Restriction ;
               owl:onProperty :partOf ;
               owl:someValuesFrom :Car
            ])
         ]
       ])
    ] . 
Using the logic presented by tobyink in the IRC chat on #swig 
(http://chatlogs.planetrdf.com/swig/2014-09-06.html
we can parse the individual parts. We can look at the Turtle 
recommendation to understand the Turtle syntax  at  
http://www.w3.org/TR/turtle/
aand expand our understanding of the data structure using 
http://www.w3.org/TR/rdf-schema/ . We can convert .ttl to .owl 
using 
the comparisons given in the owl 2 primer
 http://www.w3.org/TR/2012/PER-owl2-primer-20121018/ .


An automated way that we can  convert the turtle (.ttl) file 
to owl (.owl) is by using the software
http://www.l3s.de/~minack/rdf2rdf/
We obtain: 

XML/RDF Node-Arc Graph in OWL (*.owl):

<rdf:rdf xmlns:owl="http://www.w3.org/2002/07/owl" xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns=
"http://example.org/stuff/1.0/">

<rdf:description rdf:about="http://example.org/stuff/1.0/
Fault_in_car">
 <rdf:type rdf:resource="http://www.w3.org/2002/07/owlClass">
</rdf:type></rdf:description>

<rdf:description rdf:nodeid="node191bjrqejx1">
 <rdf:type rdf:resource="http://www.w3.org/2002/07/owlClass">
</rdf:type></rdf:description>

<rdf:description rdf:nodeid="node191bjrqejx2">
 <rdf:first rdf:resource="http://example.org/stuff/1.0/
Fault">
 <rdf:rest rdf:nodeid="node191bjrqejx3">
</rdf:rest></rdf:first></rdf:description>

<rdf:description rdf:nodeid="node191bjrqejx4">
 <rdf:type rdf:resource="http://www.w3.org/2002/07/
owlRestriction">
 <owlonproperty rdf:resource="http://example.org/stuff/1.0/
hasLocus" xmlns="http://www.w3.org/2002/07/">
</owlonproperty></rdf:type></rdf:description>

<rdf:description rdf:nodeid="node191bjrqejx5">
 <rdf:type rdf:resource="http://www.w3.org/2002/07/
owlClass">
</rdf:type></rdf:description>

<rdf:description rdf:nodeid="node191bjrqejx6">
 <rdf:first rdf:resource="http://example.org/stuff/1.0/
Car">
 <rdf:rest rdf:nodeid="node191bjrqejx7">
</rdf:rest></rdf:first></rdf:description>

<rdf:description rdf:nodeid="node191bjrqejx8">
 <rdf:type rdf:resource="http://www.w3.org/2002/07/
owlRestriction">
 <owlonproperty rdf:resource="http://example.org/stuff/
1.0/partOf" 
xmlns="http://www.w3.org/2002/07/">
 <owlsomevaluesfrom rdf:resource="http://example.org/stuff/
1.0/Car" 
xmlns="http://www.w3.org/2002/07/">
</owlsomevaluesfrom></owlonproperty></rdf:type>
</rdf:description>

<rdf:description rdf:nodeid="node191bjrqejx7">
 <rdf:first rdf:nodeid="node191bjrqejx8">
 <rdf:rest rdf:resource="http://www.w3.org/1999/02/
22-rdf-syntax-ns#nil">
</rdf:rest></rdf:first></rdf:description>

<rdf:description rdf:nodeid="node191bjrqejx5">
 <owlunionof rdf:nodeid="node191bjrqejx6" 
xmlns="http://www.w3.org/2002/07/">
</owlunionof></rdf:description>

<rdf:description rdf:nodeid="node191bjrqejx4">
 <owlsomevaluesfrom rdf:nodeid="node191bjrqejx5" 
xmlns="http://www.w3.org/2002/07/">
</owlsomevaluesfrom></rdf:description>

<rdf:description rdf:nodeid="node191bjrqejx3">
 <rdf:first rdf:nodeid="node191bjrqejx4">
 <rdf:rest rdf:resource="http://www.w3.org/1999/02/
22-rdf-syntax-ns#nil">
</rdf:rest></rdf:first></rdf:description>

<rdf:description rdf:nodeid="node191bjrqejx1">
 <owlintersectionof rdf:nodeid="node191bjrqejx2" 
xmlns="http://www.w3.org/2002/07/">
</owlintersectionof></rdf:description>

<rdf:description rdf:about="http://example.org/stuff/
1.0/Fault_in_car">
 <owlequivalentclass rdf:nodeid="node191bjrqejx1" 
xmlns="http://www.w3.org/2002/07/">
</owlequivalentclass></rdf:description>

</rdf:rdf> 

When we import this XML/RDF into the RDF validator we 
obtain for a node-arc graph the following 
diagram.  
 
 
 



 
 



 
 



 



 
 



 
 
 



 
 



 



 



 
 



 



 


 





 



 
 



 
 



 



 
 



 
 
 



 
 



 



 



 
 



 



 


 

Sunday, August 24, 2014

A dirty hack of a Evolus Pencil Template

A dirty hack of a Pencil Template: (1) Find something that works. Download glyphish icons. https://code.google.com/p/evoluspencil/downloads/detail?name=glyphish_icons.zip&can=2&q=label%3AStencil (2) Unzip glyphish icons from the bash shell with the command: unzip glyphish_icons.zip -d glyphish_icons (3) Delete every shape except for the one for tshirt.png. (4) Edit tshirt.png in the /glyphish_icons/Icons folder with Gimp. (5) run base64 on the edited tshirt.png file base64 --wrap=0 tshirt.png (6) Paste the output in place of the string in the Definition.xml file after "base64,". (7) zip the glyphish_icons folder with the command: zip glyphish_icons * Note: I discovered the solution for step 6 by looking at: http://pencil.evolus.vn/wiki/devguide/Tutorial/Drawing_image.html (8) You can use any image in place of the tshirt.png. Be sure to replace 24,17 with any width, height value (e.g. 100, 51).

Thursday, May 15, 2014

DIYBio in the Oklahoma City Metro?

After dropping by the front door of BioCurious in Sunnyvale, CA and missing out on the opportunity to see anyone I wondered if I could get involved in someway remotely. I e-mailed Eri Gentry and asked if there was some way to be involved while outside of the Bay Area. She said that they lacked the infrastructure, but I could get involved with events that had zoom.us. Fast forward a few days in the future. I had broken down, and remembered that Amanda Harlin with okc.js had challenged me to bring tech to Oklahoma. She said that those that complain are not those that do something about it. The memory ofthe citizen scientist biotech lab, BioCurious, and the challenge that Amanda threw down made me wonder if there could be a bio-hacker space in Oklahoma. Then came the thought that around here you have to build things, just like everything else that sprouted out of the prairie. See the list of current DIYBio places: http://diybio.org/local/.

Wednesday, May 14, 2014

Introducing bshambaugh.github.io

Sometimes problems fix themselves if you walk away for awhile and reboot your computer twice.

AHEM...

I followed this glossy website (https://pages.github.com/) and then the more nerdy OTHER github website (https://help.github.com/categories/20/articles). See specifically, https://help.github.com/articles/creating-project-pages-manually.

There were a number of problems with "git commit -a -m "First pages commit" but eventually they went away. Like after about an hour or more. Sorry, I should be polite. Now, no more 404s.