This is a public chat log generated from the #semsol IRC channel.
18:29:11
hi there!
18:29:21
just started using arc
18:29:29
first wanted to say thanks, but then had a couple of questions
18:40:22
/me wonders what mecredis's questions are/were
18:40:28
heh
18:40:33
I guess I'm fiugring it out
18:40:35
so I can ask it
18:40:43
but basically need to learn SPARQL
18:40:50
I'm looking at this sparql query demo
18:40:52
which is helpful
18:42:02
anything I can help with?
18:43:54
well I'm using semantic media wiki
18:43:55
and want to use ARC to SPARQL query it
18:43:56
first, is that feasible?
18:43:58
(SMW puts out RDF so I don't see why not)
18:43:59
yeah
18:44:16
so I'm just figuring out the SPARQL queries I want
18:44:59
but SMW seems to store every property as a URL
18:45:03
or URI, rather
18:45:09
which is fine, but it makes for ugly querying
18:45:39
not sure what you mean - every predicate, or every property value?
18:46:06
every subject, actually
18:46:08
is a URI
18:46:11
is that how it should be
18:46:30
every subject,a dn every predicate is always a URI in all RDF though
18:46:44
objects can be uri's or literals
18:46:49
that's how it works :)
18:46:55
ok
18:47:00
just wrapping my head around it
18:47:25
cool, ask all the questions you want
18:47:36
great, thanks for the help
18:47:45
ARC / RDF / SPARQL / SMW is kind of blowing my mind right now
18:47:57
I'm currently writing a SPARQL tutorial, so I'm keen to know what the stumbling blocks are :)
18:48:50
cool, well I'm coming from a pretty basic php / SQL background
18:49:07
so have some experience with the basic ideas
18:49:17
but SPARQL has some more difficult syntax
18:49:37
plus the whole idea of URIs as subject / predicates kind of threw me, but I guess thats RDF
18:50:52
yes
18:51:02
it's a pretty important part of RDF
18:51:34
re SPARQL's syntax, I think it's possibly a bit confusing because it's SQL like, but actually works pretty differently
18:51:42
yeah, all the ? and whatnot
18:51:44
heh
18:52:58
you can think of the subject URIs as like primary keys in a database, where the database is the web
18:53:03
hahah
18:53:07
or rather, the universe
18:53:10
if its a URI, right?
18:53:12
:)
18:53:37
yes, it culd be a URN or similar - so not necessarily http
18:54:07
the predicate is sort of like a column name
18:54:34
and it has to be a URI, so as to clearly disambiguate it from other column names
18:55:19
the fact that it is a identified by a URI means that it is also a resource in its own right, if that makes sense
18:55:52
so it can have properties of its own, like labels, comments relationships to other schema terms, etc
18:56:38
yeah
18:56:40
the 'object' is like the value in the column
18:56:45
right, I got that part
18:57:00
and if it's a URI, it's like a foreign key
18:57:08
ok, yeah, in another table
18:57:53
sort of - more like in the same table
18:57:56
ok
18:58:51
but that's not so important
19:00:46
mecredis: I don't know if this page might be helpful? http://n2.talis.com/wiki/SPARQL_intro
19:01:15
ah, cool
19:01:26
I think the challenge was just wrapping my head around the predicate URI stuff
19:01:34
if I use the PREFIX
19:01:42
I can take out the ugly URL part, right?
19:01:49
ah, PREFIX makes so much more sense now
19:02:26
yeah, PREFIX lets you use qnames instead of full uris
19:02:40
qname is what?
19:02:53
eg: foaf:name
19:02:57
that's a qname
19:03:20
ah and PREFIX foaf: <http://xmlns.com/foaf/0.1/>
19:03:21
then?
19:03:27
basically where you have a prefix standing in for part of auri
19:03:32
yeah
19:03:34
got it
19:04:33
how about the 4 different kinds of query - CONSTRUCT, DESCRIBE, SELECT ASK ?
19:05:52
just getting there
19:05:59
how can I turn on SPARQL error debugging within arc/
19:07:12
you can call $store->getErrors();
19:07:23
thanks
19:07:28
that should give you SPARQL parsing errors I think
19:07:44
should return a simple array of text messages
19:14:55
When you first start with SPARQL, the tendency is to stick with SELECT, but in fact DESCRIBEs and CONSTRUCTs turn out to be much more useful (IMO)
19:17:36
Hello
19:18:28
I setup ARC on localhost, and i have some problem i cant understand :F
19:18:36
kwijibo: great, noted.
19:18:37
btw, very nice thing :)
19:18:51
kwijibo: what does this "iri" I see everywhere in my output mean?
19:19:09
it's like URI
19:19:24
it means International Resource Identifier
19:19:28
Could anybody help me a bit ? :P
19:19:35
just see it and think "URI"
19:19:42
I am newbie ...
19:19:43
we can try Rabur
19:19:51
Okey :)
19:19:54
what's the problem?
19:20:13
OK thanks
19:20:17
So, i setup ARC, and have stored some RDFs in base
19:20:25
and i am quering this:
19:20:31
PREFIX dbpedia: <http://dbpedia.org/property/>
19:20:33
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
19:20:34
SELECT ?nazwa WHERE {
19:20:35
?b dbpedia:name ?nazwa .
19:20:36
?b skos:subject <http://dbpedia.org/resource/Category:Polish_musical_groups> .
19:20:38
?b dbpedia:genre <http://dbpedia.org/resource/Heavy_metal> .
19:20:39
?b dbpedia:origin ?m .
19:20:40
?u dbpedia:city ?m .
19:20:41
?u skos:subject <http://dbpedia.org/resource/Category:Universities_and_colleges_in_Poland> .
19:20:42
?u dbpedia:address ?a .
19:20:44
FILTER(regex(?a, "Mikołajczyka"))
19:20:45
}
19:20:57
ofc previously i stored rdfs from: http://dbpedia.org/resource/Category:Polish_musical_groups, http://dbpedia.org/resource/Heavy_metal and http://dbpedia.org/resource/Category:Universities_and_colleges_in_Poland
19:21:17
Error shows some problems with FILTER
19:21:37
Array ( [0] => Incomplete FILTER in ARC2_SPARQLPlusParser [1] => Incomplete or invalid Group Graph pattern. Could not handle " FILTER(regex(?a, \"Mikołajcz" in ARC2_SPARQLPlusParser )
19:21:45
That is first problem
19:22:26
The secound is when i remove FILTER, bcoz it doesnt show errors, but it returns empty arrays
19:22:47
(sorry for my english :F)
19:22:52
np
19:24:03
kwijibo trying to trouble shoot yoru query
19:24:13
This query works in DBpedia SPARQL endpoint
19:24:45
i mean here: http://dbpedia.org/sparql
19:25:02
did you get any errors when loading the data? - are you sure it all went in?
19:25:25
Uhm ... no :P
19:25:53
try loading it again and checking $store->getErrors()
19:25:57
Ok, i'll clean database and try to get data again witch checking errors
19:26:01
:)
19:26:38
the filter looks ok to me - I wonder if it could be a character encoding issue somehow
19:27:23
oh
19:27:28
just a thought
19:27:40
are you sending that query through a web form?
19:27:53
Yes
19:27:59
and do you have magic_quotes enabled?
19:28:25
try running strip_slashes on the query before passing it to arc
19:28:35
Ok
19:29:00
PS. and i get rdfs from http://dbpedia.org/data/Category:Polish_musical_groups , not from http://dbpedia.org/resource/Category:Polish_musical_groups :P
19:30:28
ok, whats the difference between instantiating a store and a parser?
19:30:50
kwijibo: the same with stripslashes
19:32:34
mecredis: i think u use store to put data into database, and parser to get data from files like RDFs :)
19:32:38
mecredis: do you mean what is each thing for, or how do you instantiate each of them?
19:32:39
ah
19:32:48
what is each thing for
19:32:53
yes
19:32:58
what Rabur said
19:33:11
the store is the database - and you need mysql to use it
19:33:16
right
19:33:21
but I can just use the parser for RDF
19:33:23
It's all here: http://arc.semsol.org/docs :)
19:33:30
however, you can use the parser separately
19:34:12
for instance, I work for Talis, and we have our own triple stores, but we use the ARC parsers
19:35:33
how do I query the parser?
19:35:50
apparently I can't do parser->query($q , ...
19:36:02
no you can't
19:36:18
you have to put data in a store if you want to query it
19:36:23
ah I see.
19:36:33
so why would you want to do the parser/
19:36:34
?
19:36:57
like I said - at Talis, we have our own stores
19:37:03
ah ok
19:37:10
but for you, just use the store probably
19:37:14
OK
19:37:18
and do LOAD
19:37:23
that will do the parsing for you
19:37:24
yeah, that seems to be taking a while
19:37:25
:(
19:40:23
any idea what could be causing the bottle neck? its taking 20-30 seconds
19:43:48
how big is the data?
19:43:55
~ 1 mb
19:44:24
hmm that's not too abnormal I don't think
19:44:32
ok
19:44:39
there are folks working on improving the load times though
19:44:47
that's dissapointing, though I can live with it
19:44:59
I mean its a great ool
19:45:00
tool
19:45:05
so I'm not going to complain
19:47:08
well, since ARC's triple store is implemented as an abstraction over SQL, there's inevtiably going to be a bit of a performance cost
19:47:49
(when compared to raw SQL)
19:47:57
yeah, understanadble
19:48:27
but it seems like $store is reading it into SQL every time
19:48:32
is that necessary?
19:49:23
reading what into SQL?
19:49:55
the data, or the query?
19:50:11
the XML
19:50:17
but that's just my uneducated guess
19:51:00
well, that'll be your script that's doing that, isn't it?
19:51:16
well yeah, my script says LOAD in it
19:51:27
so yeah, the question is, does it need to do that for every query?
19:51:34
obviously not, but if I reload the page
19:51:42
it just executes the LOAD again
19:52:00
well, comment it out :)
19:52:30
will $store still work?
19:52:45
hah
19:52:47
yes of course
19:52:52
ok sorry, pretty new to this all
19:52:55
then its much faster. thanks.
19:53:19
what I would guess, is you want to have some hook in mediawiki doing the loads on every edit
19:53:26
right, or a cron
19:53:32
that was my intuitive thought
19:53:40
and have that separate from your query script
19:53:46
yeah, have it thread off
19:53:49
ajax or something
19:54:36
mecredis is relieved.
19:54:40
now to learn SPARQL
19:55:25
good luck!
19:55:40
thank you so much
19:55:53
once this thing gets off the ground I'll show you the final product
19:56:06
cool
19:56:10
please do
19:56:23
you could send it to the arc-dev mailing list
20:27:12
Uhm, how in SPARQL make multiply FILTER query ?
20:27:17
i mean sth like this: FILTER(?nazwa = 'TSA' .
20:27:19
LANG(?com) = 'en' .)
20:27:37
Rabur &&
20:27:57
FILTER(?nazwa = 'TSA' && ... )
20:29:17
Ok, thx :)
21:13:46
Can i make sth like this: ?b rdf:label ?nazwa || ?b rdf:comment ?com .
21:13:50
i mean in query
21:32:31
ok, i see nobody's there :P
