I'm trying to parse Project Gutenberg's large RDF file. Another member of my team is pretty stuck, having tried Semweb and a python library.
Being a little naive about rdf, I tried to write a plain ol' xml parsing script in Ruby. I soon realized it was too complex to really work.
I've downloaded Intellidimension's tool and am thinking of using it.
I guess I don't understand how to use SPARQL. It seems there is a parser in Java called Jena. Is there something like that in .NET?
Sorry for the obvious question....I'm just not sure where to write the SPARQL queries. Is there a library that would allow me to build a query using strings, similar to Data.SQlClient and then execute against some Sparql processor?
What do you execute Sparql against?
Another option in .Net is dotNetRDF (disclaimer - I am the lead developer on this project)
It has the advantage over SemWeb that is is currently maintained and has active ongoing development plus it includes support for many of the newer Semantic Web technologies such as RDFa and SPARQL 1.1
Versus Intellidimension it has the advantage of being totally free (pick your own license from GPL, LGPL or MIT depending on your needs)
Re: SPARQL
Both SemWeb and dotNetRDF include SPARQL parsers and engines for executing queries. SemWeb's is based on an IKVM port of an old Java based SPARQL engine which has long since by superceded by the much superior ARQ engine in the Jena framework. dotNetRDF has the Leviathan engine which has close feature parity to ARQ (though not necessarily as performant for some kinds of queries).
Both ARQ (Jena) and Leviathan (dotNetRDF) support the majority of the emerging SPARQL 1.1 specification. If you have existing knowledge of SQL then you most likely want to use an engine which supports this as this adds many of the familiar features of SQL into the SPARQL language e.g. Aggregates (COUNT, MAX etc), GROUP BY, HAVING, Project Expressions (fn:concat(?x, ?y) AS ?z)
The way to go is using the SemWeb Library to parse the RDF File into memory and then into a database. You may also import the associated ontologies.
Semweb has an embedded SPARQL library, so you can run SPARQL Queries on the database. If you are not familiar with SPARQL, you can use LINQ.
If you are new to Semantic Web Technologies, I recommend first to read the Semantic Web Primer (available as book and PowerPoint files). There is also a nice SPARQL Tutorial on the Jena Website
Yet another option is the dotSesame library. This is an IKVM port of the Java RDF framework Sesame. It includes RDF parsers, writers, a SPARQL query engine, and reasoners.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With