Thanks for the fast reply Gregory,
rdfproc works, and is now busy parsing articles_label_en.nt. it's
taking quite some time though, and i'm not looking forward to when i
parse one of the larger datasets, but I definitely see the tables
slowly populating in mysql administrator.
once i get everything i want parsed i'll give your second part of the
rdfproc instructions a whirl and see how it works.
a question for those who are using the redland php api: how do i apply
the php binding so that my php code can call the rdflib functions? do
i add something in php.ini? the redland-1.0.7-bindings created a
'redland.bundle' file in my /usr/lib/php/extensions folder.
Cheers,
Andrew
On Mar 2, 2008, at 11:25 AM, Gregory Williams wrote:
On Mar 2, 2008, at 9:36 AM, Andrew (Chuan) Khoo wrote:
So, to list down my questions:
1) How do I import .nt data into mySQL?
2) If there is code provided to parse the data into the mysql
store, how do I compile and run it?
rdfproc should be able to do this for you. For example, using the
geo coordinates data:
rdfproc -n -s mysql -t
"host='localhost',database='test',user='test',password='test'"
dbpedia parse geo_en.nt ntriples
This will create a model named "dbpedia" in the "test" database. For
future data loading, you'll want to drop the "-n" argument so that
you're not creating a new store (and deleting what you've already
loaded) on each command.
2) How do I call SPARQL queries (using rasqal?) from php?
On the command line, you can again use rdfproc:
rdfproc -s mysql -t
"host='localhost',database='test',user='test',password='test'"
dbpedia query sparql - "SELECT * WHERE { ?thing a <http://dbpedia.org/class/yago/landmark
> }"
This is also possible through the PHP bindings, but someone else
will have to comment on the exact APIs to use.
hope that helps,
.greg
--
"Turns out the Z-machine (yes, the engine that does Zork) has
continuations. Who'd've thunk it? Not only are we 30 years behind
Lisp,
we're 25 years behind text adventure engines..." - Dan Sugalski
_______________________________________________
redland-dev mailing list
[email protected]
http://lists.librdf.org/mailman/listinfo/redland-dev