This is a public chat log generated from the #semsol IRC channel.
10:06:33
bengee: in my code (which always uses ARC2 for parsing), I always convert RDFXML to the same data structure as RDF/JSON
10:06:34
and use that structure for working with the data
10:06:56
which is *almost* the same as your getSimpleIndex structure
10:07:49
would you consider another function, or an optional parameter to that function that output the same structure?
10:08:01
where do they differ?
10:08:29
'val' instead of 'value' :)
10:08:34
I think that's it
10:08:59
ah, lazy me ;)
10:09:05
:D
10:09:29
are the other keys the same? the documentation example doesn't show
10:09:40
'lang' and 'datatype'
10:10:21
it's "dt", I think
10:11:57
I could write a plugin to do the conversion, but it would be neater to have it from core ARC2
10:15:26
I could tweak the getSimpleIndex function, but then the serializers will all break
10:16:38
I could give you another function
10:16:42
"found 195 occurrences of 'val'"
10:17:21
or you could add an optional parameter to the getSimpleIndex
10:17:40
to keep compatibility with everything using it
10:18:45
and if you were feeling especially generous, a getResourcesIndex() wrapper function to simplify it for me ;)
10:19:01
I can't replace 'val' with 'value' for compatibility reasons, all I could do is set both 'val' and 'value', and 'dt' and 'datatype'
10:19:28
via a config setting
10:22:14
i was thinking something like function getSimpleIndex($triples, $flatten_objects = 1, $vals = '', $rdfjson_keys = false) {
10:22:32
getSimpleIndex has too many parameters already
10:23:19
yeah, true, though no-one need actually use them all
10:24:05
and you'd prolly have the json keys also when the index comes from a DESCRIBE or CONSTRUCT
10:24:18
*like to have*
10:24:26
you could have function getResourcesIndex($triples){ return ARC2::getSimpleIndex($triples, false, '', true) }
10:24:55
yeah
10:25:04
that's true
10:26:01
anyway, no worries, I can have a plugin do it ... just a suggestion ;)
10:26:05
so, what I can offer: support for a config setting "index_use_long_keys" (or similar) which will then ad 'value' and 'datatype'
10:26:45
that would then work everytime ARC creates an index structure
10:27:41
what about in your serialisers?
10:27:54
they would still use 'val'
10:28:11
'value' would be an addition (not a replacement)
10:28:23
if I had to have a config, it'd be cleaner for me to do it via a plugin function i think
10:28:36
'k
10:29:32
i'd use your keys, it's just I already have all this code, and I like to keep it consistent
10:29:51
bengee too ;)
10:30:58
I could just make my Converters classes a plugin I suppose
10:31:17
can you have more than one class in a plugin?
10:32:37
yes, but you should not use ARC2::getComponent for the 2nd one
10:33:11
as ARC won't find the class file
10:33:29
http://n2.talis.com/svn/playground/kwijibo/converters/converters.php <--- is what I have
10:33:57
basically, I have one wrapper Convert object
10:34:14
and that instantiates the other classes
10:35:05
that should work
10:35:11
so I'm imagining something like:
10:35:42
$Convert = ARC2::getComponent('Converter');
10:35:44
you may perhaps want to add some namespace/prefix to your class names to avoid naming collisions
10:36:04
$resources_index = $Convert->RDFXML->to_resources($rdfxml_string)->value();
10:36:15
yeah, I was worrying about that too
10:36:27
I have, eg: URI and Qname classes
10:36:36
yeah
10:37:02
I can namespace them no probs though I think
10:37:46
because they are only externally accessed by properties of the Converter object
10:40:24
mornin' all
10:40:35
some usecase fodder for sparqlpress here btw
10:40:36
http://lists.foaf-project.org/pipermail/foaf-dev/2008-January/008835.html
10:40:49
If you name the main plugin class ARC2_ConverterPlugin, put everything in /plugins/ARC2_ConverterPlugin.php, it should work
10:41:55
you can then get an instance via ARC2::getComponent('ConverterPlugin', $my_config);
10:42:03
morning danbri
10:42:11
morning
10:45:49
bengee: can you pass file uris to parse() ?
10:46:09
windows file uris in particular
10:46:19
(it's not for me, it's for a friend ;) )
10:50:07
haven't tried on windows, but the reader uses standard php functionality for local file paths
10:51:24
php *may* have problems with file:// vs. file:///
10:52:31
if it doesn't work for him, I'd be happy about a file uri that doesn't work, and I'll try to test/fix things
10:52:50
kwijibo trying to chase it down
10:54:53
ah it's all cool
10:55:03
he had something wrong with his unit test is all
10:55:15
ah, cool
10:56:23
I dropped some text from the mail into http://wiki.foaf-project.org/SparqlPress#Goal but feel free to rejig it if you don't think it core to sparqlpress goals
10:56:39
i just wanted some non-rdf-oriented user story in there
12:23:25
hi. quick question about parsing a string with ARC: where the docs say "$parser->parse($base, $data);", what should $base be?
12:24:30
hi fresco
12:24:46
$base is a URI
12:25:09
i.e. in case you parse from the web, you'd do parse($url)
12:25:39
I'm parsing a string
12:25:54
but if you want to parse a string, you can do parse($base, $data) or parse('', $data)
12:26:18
specifying a base can be useful when your strig contains relative paths
12:26:48
ok, probably '' then, i see. thanks.
12:26:54
yeah
12:26:57
yw
12:27:13
i'm having to fetch the RDF first with file_get_contents, because it needs authentication
12:27:14
maybe I should add a note to the docs
12:27:50
HTTP authentication, I mean
12:29:03
ARC's HTTP reader supports custom headers, but I'm not sure if that can be passed through via the parser
12:29:25
I'm going to need that sooner or later, though
12:29:59
if you could pass a context (from stream_context_create) to it like you can with file_get_contents, that might be useful. it's not a big deal though.
12:32:19
that ARC2_Reader class is pretty twisty
12:32:26
'http_custom_headers' is the current config key
12:32:45
ah, ok
12:32:50
(it's a string, not an array)
12:35:24
the parser or store should hand it through to the reader
13:24:05
danbri, I'm just chatting with BenO about semantic markup for images in html
13:24:25
I remembered that you asked on the rdfa list re imagemaps
13:24:42
i did
13:24:53
it got blogged a bit too, including QA W3C blog
13:25:15
rdfa doesn't seem to access the path data, and i'm not persuaded that grddl is lightweight enough
13:25:33
which is the O in "Ben O"?
13:26:25
welcome, BenO
13:26:42
Hi
13:27:31
danbri was playing with structured imagemaps recently
13:27:46
hi BenO!
13:28:47
yep see http://danbri.org/words/2008/01/07/248 http://www.w3.org/QA/2008/01/rdfa_and_html_imagemap.html http://www.mail-archive.com/public-rdf-in-xhtml-tf@w3.org/msg02500.html
13:28:54
Hi, I am currently trying to sort out image annotation with bengee's help. I think I have something workable (for my uses) but was wondering about how you were doing with RDFa
13:29:11
btw, Ivan's response to "image-regions vocab on w3.org" sounded a bit "more work needed"-ish
13:29:24
I think I got the attention of the rdfa folks but didn't yet persuade them that the extra work is worthwhile
13:29:53
so if you've anything like an app that can show interesting visual re-use of image fragments, eg. for games or accessibility or image search , that might help persuade
13:30:30
Currently, I am intending on using something like this example http://pastebin.com/d4c3f5c22 to archive the information
13:30:53
(for Oxford University's institutional repository)
13:31:34
And a few of the 'whys' are here: http://pastebin.com/m50302970
13:31:51
scuse the pastebin links, but I am in the middle of writing this up :0
13:33:15
Note that the regions themselves are given a UUID to (hopefully) uniquely label them, for researchers to cite, or to encourage reuse.
13:37:56
As part of the web interface to the items in the repository, I will build in the conversion from this form into an imagemap to overlay the image in question. I would be interested in including rdfa as part of it.
13:38:40
bengee would like to have some UI thingy that dynamically created an annotated imagemap
13:38:59
that would be really handy
13:39:41
BenO would love to get his hands on one of those...
13:39:47
hm, plus suggest-as-you-type to ease linking of regions to resources I know
13:40:41
I am using Solr as the search appliance and setting up suggest as you type searching seems straightforward
13:41:07
(for indexed information anyway.)
13:41:27
bengee wonders if he could plug an image annotator in his grawiki thingy
13:43:08
extending the code in this, perhaps? http://www.speedingrhino.com/cropper.htm
13:44:40
I do actually have code for the region selection somewhere, back from w3photo
13:44:44
(it's GPL2 javascript code for 'cropping' images - UI in the browser for selecting a rectangular region of an image
13:45:00
Ah, okay.
13:45:44
it's cool what is possible with today's browsers
13:47:24
Indeed, splice in some fields to fill in and we'd have a basic annotation tool :)
13:48:28
BenO must not get distracted... must migrate repository first!
13:49:33
looking
13:50:01
" <dc:description>Location of the 1st burial site.</dc:description>" is interesting, I started playing with imagemaps for map fragments, that could be transformed into kml ie google earth
13:50:10
well i didn't get very far :)
13:51:19
danbri looks, can't find what he's after, but rediscovers http://danbri.org/words/2005/08/07/123
13:52:56
Geo data would be fantastic to add to that kind of info, but sadly, he knows the level of real information that some researchers retain...
13:53:14
I* (meant it as a /me :) )
14:01:59
yeah, i'd guess it would need adding by 3rd parties if at all
14:03:19
Some of the academics I have to 'coach' are hard pressed to remember to left-click instead of right-click
14:07:50
their minds are on higher things!
14:08:12
are you involved in http://swig.networkedplanet.com/ ?
14:08:42
Not currently, no
14:09:10
they have informal show-and-tell meetups in oxford from time to time
14:09:23
nothing seems scheduled but the one i went to was prettyi nteresting
14:09:39
bunch of lightning talks, then went for a drink
14:10:39
I am going to the Geek nights though, less focussed on semantic issues naturally
14:12:58
geeking's good too :)
14:14:13
Next one - http://upcoming.yahoo.com/event/382722/
14:56:55
bengee creates http://arc.semsol.org/sites
