Channel #semsol: Logs

This is a public chat log generated from the #semsol IRC channel.

23:24:51 mortenf: bengee: seems the turtle parser doesn't like unicode in the backslash-u-digits form (or something), none of the 3 graphN.nt files in http://www.wasab.dk/morten/2008/01/example3.zip can be parsed (fully)
00:02:03 mortenf: bengee: seems there are uses of mysql_real_escape_string in (at least) ARC2_StoreSelectQueryHandler.php without an active db connection (returning empty strings). for me it makes the default endpoint query fail with missing offset value...
00:16:09 mortenf: methinks the present irc logger and/or display code needs a bit of fixing: http://arc.semsol.org/community/irc/logs/2008/01/06#T22:29:22Z <- not displayed in correct order
00:16:21 mortenf: mortenf calls it a day :)
02:28:51 naibed: bye
09:41:42 bengee: bengee creates http://arc.semsol.org/dev to track bug reports and feature requests
09:43:01 keithA: bengee: I see you've got RDFJSN serialiser, nice one ;)
09:43:41 keithA: is it possible to get at an rdfjson structure unserialised? ie: native PHP ?
09:44:58 bengee: no, no parser in there, unfortunately
09:45:01 keithA: (I already have code that does it, but if arc already does it, the component could be a little smaller)
09:46:01 keithA: do you serialise it by constructing a string then? (rather than serialising JSON generically)
09:46:15 bengee: yeah, constructing a string
09:46:57 keithA: cool
09:47:40 keithA: I'm thinking of trying ARC with my eRDFt code y'see, so that it would work with RDFa too
09:47:50 keithA: and presumably also microformats
09:48:09 bengee: ARC is getting a way to add plugins, in case you'd like to contribute code that re-uses parts of ARC ;)
09:48:13 keithA: though that would be a little opaque
09:48:42 keithA: keithA remembers he was going to read about that in the scrollback, and does so now :p
10:05:07 keithA: bengee - you mean the eRDFt code as a plugin? would that fit d'y'think?
10:06:03 keithA: I suppose it's six and half-a-dozen
10:06:35 bengee: possibly, or the rdf/json parser
10:06:59 keithA: it's not really a parser - I just use someone else's JSON parser/serialiser
10:07:15 keithA: and munge triples from arc into the right structure
10:07:53 bengee: ARC's include mechanism is based on single-file includes (e.g. a parser class, or serializer class, or something like that)
10:08:14 bengee: erdft might be more like a whole app
10:09:52 keithA: needs a different name if it's not just erdf
10:09:56 keithA: what do you think?
10:11:31 keithA: bengee: probably doesn't matter whether it sits in a plugin directory of arc, or arc sits in a lib directory of 'erdft'
10:13:07 keithA: but since anyone interested would be likely to have arc already anyway, the first is probably the best
10:14:42 bengee: I'm in a similar situation with an rdfwiki script I'm trying to make work with tabulator, it's not really a plugin as it includes ARC
10:15:08 keithA: sounds interesting
10:15:28 keithA: bengee: is it possible to manually add namespaces to the parser, for parsing html fragments?
10:16:21 bengee: lemme check
10:17:52 bengee: did you try to simply prepend your fragment with a ns def (<a rel="schema.foo" ...)?
10:18:10 keithA: i could do that too
10:18:44 keithA: what's your rdfwiki script?
10:19:30 bengee: it creates and updates files in the local file system based on sparqly inserts and deletes
10:19:59 keithA: sparqly?
10:20:25 bengee: tabulator can POST a SPARQL INSERT/DELETE to a file URL
10:20:28 keithA: the filesystem is the store?
10:21:52 bengee: you open http://example.com/myfoaf.rdf in tabulator, change something, tab'r sends back a sparql update, and the file is updated
10:22:39 keithA: cool
10:23:21 bengee: and now that timbl told me how it works, I can make my rdf editor use the same mechanism, so that they are compatible
10:23:31 keithA: so is myfoaf.rdf a real file? or dynamic from the arc store?
10:24:20 bengee: it can be real, or it can be a virtual one. in the latter case, you just send the update to the local rdf store
10:24:57 keithA: bengee: how does it work? the tabulator part I mean - what does tabulator send to your server?
10:25:33 bengee: POST /myfoaf.rdf INSERT INTO ...
10:26:05 bengee: or rather INSERT { triples here }, the target graph is the file location
10:26:38 bengee: I have a .htaccess that catches the POST and sends it to the wiki script
10:27:05 bengee: a GET is just processed as usual
10:28:15 bengee: I think timbl wants to make the editing capability based on file extension, i.e. when you change a file's extension to .rdfe, it can be edited
10:28:47 keithA: hmmm
10:29:05 bengee: my test script enables writes in a whole directory
10:29:16 keithA: yeah
10:29:51 bengee: tab'r needs a "MS-Author-Via: SPARQL" header to enable editing via its UI
10:31:05 bengee: so, the .htaccess sends the header and catches posts, the sparql stuff is handled by arc, and the file writer is a simple plugin
10:31:23 keithA: I was thinking about a script that would make editing of stuff in talis platform stores possible with tabulator
10:32:03 keithA: should be pretty possible using your technique I'd think
10:33:14 bengee: yeah, I think the setup is rather straightforward
10:35:25 keithA: does tabulator follow http://jena.hpl.hp.com/~afs/SPARQL-Update.html ?
10:38:07 bengee: t uses ericp's approach, but they are similar
10:41:58 keithA: does arc parse that then?
10:42:08 keithA: is SPARQL+ a superset?
10:42:23 bengee: arc needs an INTO which I have to inject
10:43:18 bengee: but I've changed the sparql+ spec yesterday to bring ARC closer to SPARUL and SPARQL/Update
10:44:36 keithA: is your code for the file based wiki update online anywhere?
10:45:31 bengee: no, not yet, gotta finish danbri's wp plugin first
10:45:44 bengee: and fix some other bugs...
11:49:02 ivyn: Hi
11:49:43 ivyn: I'm naibed, I entered yesterday
11:50:08 ivyn: I managed ARC2 to load a very small ontology and It seems to work
11:50:35 ivyn: But now my question is, how can I "save" the result of the new ontology, once I modify It?
11:51:04 ivyn: Something like $store->toRDFXML($triples);
11:51:19 ivyn: $triples=$store->toNTriples(...?¿
11:53:41 danbri: not sure what other otions there are, but try:
11:53:45 danbri: CONSTRUCT { ?s ?p ?o } WHERE { ?s ?p ?o . }
11:53:53 bengee: $triples=$parser->getTriples(); $rdfxml=$parser->toRDFXML($triples);
11:53:55 danbri: but that works in my sparql endpoint webform
11:54:08 danbri: danbri bows to the master :)
11:54:15 bengee: ;)
11:54:53 ivyn: Call to a member function getTriples() on a non-object
11:55:05 ivyn: $triples=$parser->getTriples();
11:55:23 ivyn: Oh OK, but I have no $parser...
11:55:29 ivyn: Just a $store
11:55:52 bengee: then you have to pull out the triples first
11:56:00 ivyn: $store = ARC2::getStore($config);$store->query('LOAD <ontology.owl>');
11:56:08 ivyn: Yeah but how?
11:56:18 ivyn: $store->toNTriples(whatgoeshere?)
11:56:43 bengee: $rows = $store->query("SELECT * WHERE {?s ?p ?o }", "rows");
11:57:15 bengee: $rdfxml = $store->toRDFXML($rows);
11:57:20 ivyn: I just do not understand that
11:57:31 ivyn: I want to do a "INSERT"
11:57:46 ivyn: And then modify or retrieve the whole ontology
11:57:53 ivyn: In RDF
11:58:04 bengee: 1) LOAD
11:58:15 bengee: 2) sparql insert/delete/whatever
11:58:19 ivyn: yes
11:58:21 bengee: 3) select the triples
11:58:31 bengee: 4) serialize
11:58:41 ivyn: So I have to do a "select all" like query
11:58:48 ivyn: to select all the triples and then get the result in rdf?
11:58:49 bengee: you may want to read "internal structures" in the documentation
11:59:04 ivyn: ( steps 3 and 4)
11:59:19 bengee: ARC supports resource indexes and a certain triples aray format
11:59:25 ivyn: bengee: I've been doing that but I'm not smart enough XD
11:59:28 bengee: and it can serialize those
12:00:14 bengee: and when you do a SELECT which returns s,p, and o keys, it can even treat that tabular result as a triples array, i.e. you can serialize it right away
12:00:39 ivyn: Ok
12:00:45 bengee: otherwise you can follow danbri's exampe and do a DESCRIBE or CONSTRUCT
12:00:52 ivyn: It seems it works but some information is lost
12:01:00 bengee: or just build an ARC-compliant array structure manually
12:01:01 ivyn: From the original file of course
12:01:44 ivyn: :-?
12:07:43 ivyn: Wow, the RDFXML result is not like the original one...
12:08:00 ivyn: p1:Restriction Process... what's that? lol :(
12:10:35 bengee: you may want to wait til the parser is fixed
12:11:32 ivyn: Ok, thanks
12:11:34 bengee: the rdfxml will of course look different from the input doc, though
12:12:00 ivyn: If it's a bit different it doesn't matter
12:12:11 ivyn: but at least the same classes and properties...
12:12:13 bengee: it's always flat
12:25:55 ivyn: see you later
12:25:58 ivyn: thank you!
12:26:08 bengee: 'k, cya
12:55:12 danbri: bengee, did you see http://deliciouslymeta.com/projects/xfn/test_data.html ?
12:55:44 danbri: wonder if those validaty tests could be expressed in sparql over the output of your parser?
12:55:50 danbri: related: http://isegserv.itd.rl.ac.uk/schemarama/
12:56:22 bengee: interesting, didn't know it
12:57:13 danbri: meanwhile in twitter: _masaka: aahhh, 'ARC does not support direct in-memory SPARQLing' ...
12:57:31 danbri: would be cool if kanzaki gets into ARC... he churns out great demos
12:57:47 bengee: oh, who wrote that component ?
12:57:51 bengee: ;)
12:58:04 danbri: component?
12:58:34 bengee: but looks like I should add in-memory sparqling some day, there seems to be demand for it
12:58:56 bengee: so far, ARC needs a mysql db for sparql
13:00:33 danbri: is it a huge job? basically a second engine? or you can re-use code from the sql-backed one somehow?
13:01:07 bengee: not much re-use, unfortunately
13:02:09 danbri: figures
13:02:32 danbri: i had 2 separate engines in rubyrdf ... one sql-backed, the other i somehow managed to write, despite not really knowing how :)
13:02:42 danbri: but that was for a simpler QL, Squish
13:02:51 danbri: happy to leave it to others now
13:03:02 danbri: you might be able to transliterate one from another scripting lang
13:03:07 danbri: eg. python?
13:03:22 bengee: yeah, perhaps
13:03:55 bengee: or just start with something simple like basic group graph patterns, limit and offset, etc
13:04:15 danbri: yep
13:27:48 bengee: ah, /me misread the kanzaki quote: not/now
13:36:50 danbri: ah :)
14:19:22 danbri: bengee ... feature req for htmltab output: can it display some "no matches" text if you get 0 hits?
14:19:30 danbri: a blank page can be confusing
14:20:23 danbri: trying ./dataloader http://redmonk.net/about-this-site/
14:20:45 bengee: yeah, just replied
14:20:46 danbri: i see co-worker in a redmonk.net namespace not xfn, is that intended?
14:21:18 danbri: do you use co-worker and xfn properties as links to documents, or to people/agnts?
14:21:43 bengee: to people
14:22:13 danbri: he says "Wow, that's lot of data!" but i only see about 10 triples
14:22:15 bengee: I have co-worker as xfn:co-worker only here, hmm
14:22:35 danbri: try http://sandbox.foaf-project.org/2008/foaf/ggg.php?query=SELECT+%3Fs+%3Fp+%3Fo+WHERE+%7B%0D%0AGRAPH+%3Chttp%3A%2F%2Fredmonk.net%2Fabout-this-site%2F%3E%0D%0A%7B++%3Fs+%3Fp+%3Fo+.+%7D%0D%0A%7D%0D%0ALIMIT+10%0D%0A++++++++++++&output=htmltab&jsonp=
14:22:40 bengee: 292 triples here
14:22:44 danbri: DOH
14:22:46 danbri: "LIMIT 10"
14:22:52 bengee: heh
14:22:58 danbri: that's the stupidest mistake I've made today!
14:23:32 danbri: but i see http://redmonk.net/about-this-site/co-worker in predictate field
14:23:37 danbri: http://sandbox.foaf-project.org/2008/foaf/ggg.php?query=SELECT+%3Fs+%3Fp+%3Fo+WHERE+%7B%0D%0AGRAPH+%3Chttp%3A%2F%2Fredmonk.net%2Fabout-this-site%2F%3E%0D%0A%7B++%3Fs+%3Fp+%3Fo+.+%7D%0D%0A%7D%0D%0A%0D%0A++++++++++++&output=htmltab&jsonp=
14:25:13 bengee: and lots of dupes, too
14:27:02 danbri: hmm _:b1672287707__steve_ivy http://xmlns.com/foaf/0.1/homepage aim:goim?screenname=monkinetic
14:28:22 bengee: that's prolly coming from an xfn:me
14:29:08 danbri: if we crawl some xfn, we can ask Qs like "who says that x is friend, but x just has them as a contact?"
14:30:07 bengee: yeah, but you need to cosoidate the bnodes first
14:30:29 bengee: unless you formulate the query using foaf:homepage
14:31:59 bengee: I wonder why your triples are so borken
14:32:10 bengee: bengee tries it via LOAD, too
14:32:18 bengee: 325 triples
14:32:20 danbri: bnodes, yeah
14:32:58 danbri: in my loader script, can i get more feedback on how many triples it added?
14:33:38 bengee: the query() method returns an array with information about duration and triple-count
14:36:11 bengee: yeah, I get those broken triples, too
14:37:06 bengee: but also the correct ones
14:37:26 bengee: I guess the broken stuff comes from one of the other default extractors
14:38:34 bengee: aha, it's the RDFa extractor
14:42:05 bengee: danbri, you can disable the RDFa extractor via the config array
14:42:59 bengee: ... "sem_html_formats" => "erdf dc openid hcard-foaf xfn" ...
14:43:14 bengee: or some other subset
14:43:48 bengee: or wait for the next rev ;)
14:46:40 bengee: bengee receives ARC2_RemoteEndpointPlugin class file from mortenf :)
14:47:55 bengee: bengee is starting to drown a bit
14:48:14 bengee: cool to see all that activity, though
14:49:41 terraces: hi
14:49:45 bengee: bengee puts reply to Steve on hold for the minute
14:49:53 bengee: hi terraces
14:50:05 terraces: bengee: is there a way to return query results in json with the query() method ?
14:52:25 bengee: no, not directly
14:52:32 bengee: (I think)
14:56:17 terraces: ok, I see I have to call something like getSPARQLJSONSelectResultDoc to translate it
14:57:47 danbri: i'll wait for next rev
14:57:53 danbri: where you fix it? or just disable rdfa?
14:58:01 danbri: i have some rdfa in my homepage btw, not a lot yet
14:59:48 bengee: terraces, the endpoint extends the store, it should be possible to instantiate the endpoint instead of the store, then do query() as usual, and then get the json via $this->...
15:01:16 terraces: but it will create a public endpoint ?
15:01:19 bengee: danbri, not sure. there is a new rdfa syntax ED, but I'm not sure if I can squeeze that in on top of all the other pending requests..
15:01:26 bengee: terraces, no
15:02:10 terraces: bengee: ok, so that should be ok for what I need
15:02:38 bengee: no public endpoint w/o a dedicated somescript.php that instantiates the endpoint and explicitly calls $endpoint->handleRequest()
15:03:55 bengee: bengee .nextAction: finally fix that damn rdf collection bug
15:09:39 bengee: bengee adds "no results found" message to endpoint table generator
15:22:31 danbri: bengee, do you have an arc filter on twitter?
15:22:35 danbri: "_masaka: cannot understand why ARC complains like "Table 'arc.arc_o2val' doesn't exist:" while tables arc_triples etc were created"
15:25:26 bengee: hmm
16:36:34 terraces: terraces really likes the 6-lines-of-php way of creating an endpoint
16:43:42 bengee: :)
16:58:42 terraces: I'm trying to set up a service_uri / api_key system to allow some services to add new files in the store
16:59:27 terraces: is there already something similar in the endpoint class ?
17:02:58 bengee: no, the endpoint is pretty basic
17:04:29 bengee: you could use the getSetting/setSetting methods of the store to save your preferences, though
17:05:07 bengee: (they are stored in a separate table and can't be accessed from sparql)
17:06:53 bengee: bengee looks at correctly parsed collections
17:06:59 bengee: at last :)
17:55:50 bengee: bengee runs rdf core tests
20:27:38 bengee: bengee finishes rdf syntax test parsing
20:27:58 bengee: much better now
21:27:21 bengee: bengee uploads a new rev
21:27:36 bengee: .. and collapses. g'night everyone