You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
|
Feb
|
Mar
(1) |
Apr
(3) |
May
(2) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(1) |
Oct
|
Nov
(9) |
Dec
(4) |
2011 |
Jan
(1) |
Feb
(6) |
Mar
(9) |
Apr
(9) |
May
(20) |
Jun
(1) |
Jul
(2) |
Aug
(1) |
Sep
(6) |
Oct
(3) |
Nov
(13) |
Dec
(1) |
2012 |
Jan
(1) |
Feb
(12) |
Mar
(5) |
Apr
(8) |
May
|
Jun
(25) |
Jul
(7) |
Aug
(4) |
Sep
(14) |
Oct
(5) |
Nov
(22) |
Dec
(6) |
2013 |
Jan
(18) |
Feb
(28) |
Mar
(11) |
Apr
(18) |
May
(4) |
Jun
|
Jul
(9) |
Aug
(6) |
Sep
(4) |
Oct
(4) |
Nov
(6) |
Dec
(7) |
2014 |
Jan
(9) |
Feb
(15) |
Mar
(14) |
Apr
(7) |
May
(5) |
Jun
(15) |
Jul
(2) |
Aug
(6) |
Sep
(5) |
Oct
(7) |
Nov
(9) |
Dec
(16) |
2015 |
Jan
(4) |
Feb
(5) |
Mar
(1) |
Apr
(2) |
May
(2) |
Jun
(15) |
Jul
(8) |
Aug
|
Sep
(4) |
Oct
|
Nov
(4) |
Dec
(4) |
2016 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
(5) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <mar...@ko...> - 2013-02-13 15:08:29
|
Hi Rob, Thanks the advice and good ideas. I tried using a custom parser to load the Graph (see below) that exploits the regular, relatively flat structure of my RDF document. That reduces the load time down to around 7.6 seconds (from around 11 seconds); setting Options.FullTripleIndexing to false shaved another second plus off the time. If there's something I can do to make the simple parser run faster, please let me know. The time to execute the LINQ queries remains very fast with the dotNetRDF library, even without the full indexing, but I think I would need to further halve the load time to get to a break-even point with respect to just using XElement.Load(). Of course, if we were doing lots of queries, then the load time would become inconsequential. Thanks again, -Mark // code makes no pretense of being robust against RDF not conforming to its expectations!!! // Prefixes.rdf defined elsewhere: public static readonly XNamespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; foreach (XElement elem in xElem.Descendants(Prefixes.rdf + "Description")) { String subjName = elem.Attribute(Prefixes.rdf + "about" ).Value; foreach (XElement child in elem.Elements()) { INode obj; IUriNode subj = g.CreateUriNode(UriFactory .Create(subjName)); IUriNode pred = g.CreateUriNode(UriFactory .Create(child.Name.NamespaceName + child.Name.LocalName)); if (child.HasAttributes) { obj = g.CreateUriNode(UriFactory .Create(child.Attribute(Prefixes.rdf + "resource").Value)); } else { obj = g.CreateLiteralNode(child.Value); } Triple t = new Triple(subj, pred, obj); g.Assert(t); } } From: Rob Vesse <rv...@do...> To: dotNetRDF User Help and Support <dot...@li...> Date: 02/12/2013 05:44 PM Subject: Re: [dotNetRDF-Support] Load performance Hey Mark I am not sure that we can really provide you with that much help on this but I will try anyway. I think with the existing parser architecture it will be quite hard to get within a small multiplier of the XElement.Load() time. RDF/XML parsing is a two stage process based upon the RDF/XML specification, we first convert the XML into parser events (either via XmlReader or XmlDocument depending on configuration) and then we process those events to generate triples. There is also an awful lot of verification and parsing steps that go on in the RDF/XML parser. Is the XElement.Load based code something you would be able to share at all? It sounds like it is almost certainly possible to build an improved event generating stage for the parser which may make a big difference to the performance of the parser. Even if this can only be used as you suggest for simple regular RDF/XML having that option available to users would be quite valuable. In the meantime there are a couple of things you could try: 1 ? Do you need full indexes? Are you queries primarily on single terms of the triple? If so setting Options.FullTripleIndexing to false and then creating a Graph and loading should be faster than full indexing but still gives you partial indexes. Compound lookups are still partial linear scans but will be faster than the full linear scans the NonIndexedGraph has to do. Alternatively would the ability to select which indexes you need be valuable so that only those were built? This is certainly a feature we could add for the next release. 2 ? Use a custom IRdfHandler If you can handle your queries with some simpler data structures then perhaps you can use a custom IRdfHandler and pass this to the parser instead. This interface gives you control over what happens to triples and whether the parser should continue each time you see a triple. You can extend BaseRdfHandler to get most of the implementation for free. See http://www.dotnetrdf.org/content.asp?pageID=Handlers%20API for more documentation on this Hope this helps, please let us know if you need more information, Rob From: <mar...@ko...> Reply-To: dotNetRDF User Help and Support < dot...@li...> Date: Tuesday, February 12, 2013 10:12 AM To: <dot...@li...> Subject: [dotNetRDF-Support] Load performance I'm wondering how to best optimize the load performance of dotNetRDF. I have an RDF/XML (test) file containing the equivalent of about 316000 n-triples statements pertaining to about 21000 resources. The RDF is highly regular, and limited to a subset of full RDF/XML, having the following structure: <rdf:Description rdf:about="...."> <rdf:type rdf:resource="...."> <dc:subject> ... </dc:subject> ... {small but variable number of other properties } </rdf:Description> ... My program reads the RDF and does some LINQ-based queries against it. It takes about 11 seconds to load the RDF/XML into a Graph; given the loaded graph, the LINQ queries take about 24 milliseconds. As a comparison point, though, I tried to see what the performance would be if I used the .NET XElement.Load function, exploiting the fact that my XML has a very regular structure (no lists/blank nodes/nested resources). In that case, it takes about 400 milliseconds to load the XML into a simple homebrew triple class structure (no indices); my equivalent LINQ queries then take about 200 milliseconds. Of course, that approach only works for a particular RDF/XML structure, and it will start to break down as I do more & more queries. Clearly, if I were to do lots of query operations, the cost of the initial load by the dotNetRDF library would be better amortized, and I would start to reap the benefits of having the Graph structure. However, given that I only want to do a relatively small number of queries, I'm wondering if there's anything I can do to improve the load performance to close the gap. I tried a few things: using NonIndexedGraph (reduced load time down to around 8.6 seconds, while bringing my query time up to 1.1 seconds) and using Turtle w/ NonIndexGraph (reduced load time to 5.6 seconds), but I'd like to get within a small multiplier of the XElement.Load time if possible, while preserving the benefit of indexing. -Mark ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb_______________________________________________ dotNetRDF-Support mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ dotNetRDF-Support mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Rob V. <rv...@do...> - 2013-02-12 22:44:24
|
Hey Mark I am not sure that we can really provide you with that much help on this but I will try anyway. I think with the existing parser architecture it will be quite hard to get within a small multiplier of the XElement.Load() time. RDF/XML parsing is a two stage process based upon the RDF/XML specification, we first convert the XML into parser events (either via XmlReader or XmlDocument depending on configuration) and then we process those events to generate triples. There is also an awful lot of verification and parsing steps that go on in the RDF/XML parser. Is the XElement.Load based code something you would be able to share at all? It sounds like it is almost certainly possible to build an improved event generating stage for the parser which may make a big difference to the performance of the parser. Even if this can only be used as you suggest for simple regular RDF/XML having that option available to users would be quite valuable. In the meantime there are a couple of things you could try: 1 Do you need full indexes? Are you queries primarily on single terms of the triple? If so setting Options.FullTripleIndexing to false and then creating a Graph and loading should be faster than full indexing but still gives you partial indexes. Compound lookups are still partial linear scans but will be faster than the full linear scans the NonIndexedGraph has to do. Alternatively would the ability to select which indexes you need be valuable so that only those were built? This is certainly a feature we could add for the next release. 2 Use a custom IRdfHandler If you can handle your queries with some simpler data structures then perhaps you can use a custom IRdfHandler and pass this to the parser instead. This interface gives you control over what happens to triples and whether the parser should continue each time you see a triple. You can extend BaseRdfHandler to get most of the implementation for free. See http://www.dotnetrdf.org/content.asp?pageID=Handlers%20API for more documentation on this Hope this helps, please let us know if you need more information, Rob From: <mar...@ko...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Tuesday, February 12, 2013 10:12 AM To: <dot...@li...> Subject: [dotNetRDF-Support] Load performance > I'm wondering how to best optimize the load performance of dotNetRDF. > > I have an RDF/XML (test) file containing the equivalent of about 316000 > n-triples statements pertaining to about 21000 resources. The RDF is highly > regular, and limited to a subset of full RDF/XML, having the following > structure: > > <rdf:Description rdf:about="...."> > <rdf:type rdf:resource="...."> > <dc:subject> ... </dc:subject> > ... {small but variable number of other properties } > > </rdf:Description> > ... > > My program reads the RDF and does some LINQ-based queries against it. > > It takes about 11 seconds to load the RDF/XML into a Graph; given the loaded > graph, the LINQ queries take about 24 milliseconds. > > As a comparison point, though, I tried to see what the performance would be if > I used the .NET XElement.Load function, exploiting the fact that my XML has a > very regular structure (no lists/blank nodes/nested resources). In that > case, it takes about 400 milliseconds to load the XML into a simple homebrew > triple class structure (no indices); my equivalent LINQ queries then take > about 200 milliseconds. Of course, that approach only works for a particular > RDF/XML structure, and it will start to break down as I do more & more > queries. > > Clearly, if I were to do lots of query operations, the cost of the initial > load by the dotNetRDF library would be better amortized, and I would start to > reap the benefits of having the Graph structure. However, given that I only > want to do a relatively small number of queries, I'm wondering if there's > anything I can do to improve the load performance to close the gap. I tried > a few things: using NonIndexedGraph (reduced load time down to around 8.6 > seconds, while bringing my query time up to 1.1 seconds) and using Turtle w/ > NonIndexGraph (reduced load time to 5.6 seconds), but I'd like to get within a > small multiplier of the XElement.Load time if possible, while preserving the > benefit of indexing. > > -Mark > > > > > > > > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before > the end March 2013 and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb____________________________________________ > ___ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: altaf h. <alt...@ya...> - 2013-02-12 18:57:14
|
Hi Mark, Hope support team will give a you a good answer. They are the perfect ones to provide the answers. However, I think you can use Parallel Linq (PLINQ). This will clearly reduce the some queries on your XML. Look Here, http://msdn.microsoft.com/en-us/library/dd997425.aspx Kind Regards, Altaf Hussain Graduate Student Researcher Centre for Logic and Information Graduate Student (CS) and Teaching Assistant St. Francis Xavier University Alumni' 02 Batch, Dept. of Computer Science and Engineering Shah Jalal University of Science and Technology Blog: http://altafhussainbd.wordpress.com ________________________________ From: "mar...@ko..." <mar...@ko...> To: dot...@li... Sent: Tuesday, February 12, 2013 2:12 PM Subject: [dotNetRDF-Support] Load performance I'm wondering how to best optimize the load performance of dotNetRDF. I have an RDF/XML (test) file containing the equivalent of about 316000 n-triples statements pertaining to about 21000 resources. The RDF is highly regular, and limited to a subset of full RDF/XML, having the following structure: <rdf:Description rdf:about="...."> <rdf:type rdf:resource="...."> <dc:subject> ... </dc:subject> ... {small but variable number of other properties } </rdf:Description> ... My program reads the RDF and does some LINQ-based queries against it. It takes about 11 seconds to load the RDF/XML into a Graph; given the loaded graph, the LINQ queries take about 24 milliseconds. As a comparison point, though, I tried to see what the performance would be if I used the .NET XElement.Load function, exploiting the fact that my XML has a very regular structure (no lists/blank nodes/nested resources). In that case, it takes about 400 milliseconds to load the XML into a simple homebrew triple class structure (no indices); my equivalent LINQ queries then take about 200 milliseconds. Of course, that approach only works for a particular RDF/XML structure, and it will start to break down as I do more & more queries. Clearly, if I were to do lots of query operations, the cost of the initial load by the dotNetRDF library would be better amortized, and I would start to reap the benefits of having the Graph structure. However, given that I only want to do a relatively small number of queries, I'm wondering if there's anything I can do to improve the load performance to close the gap. I tried a few things: using NonIndexedGraph (reduced load time down to around 8.6 seconds, while bringing my query time up to 1.1 seconds) and using Turtle w/ NonIndexGraph (reduced load time to 5.6 seconds), but I'd like to get within a small multiplier of the XElement.Load time if possible, while preserving the benefit of indexing. -Mark ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ dotNetRDF-Support mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: <mar...@ko...> - 2013-02-12 18:12:52
|
I'm wondering how to best optimize the load performance of dotNetRDF. I have an RDF/XML (test) file containing the equivalent of about 316000 n-triples statements pertaining to about 21000 resources. The RDF is highly regular, and limited to a subset of full RDF/XML, having the following structure: <rdf:Description rdf:about="...."> <rdf:type rdf:resource="...."> <dc:subject> ... </dc:subject> ... {small but variable number of other properties } </rdf:Description> ... My program reads the RDF and does some LINQ-based queries against it. It takes about 11 seconds to load the RDF/XML into a Graph; given the loaded graph, the LINQ queries take about 24 milliseconds. As a comparison point, though, I tried to see what the performance would be if I used the .NET XElement.Load function, exploiting the fact that my XML has a very regular structure (no lists/blank nodes/nested resources). In that case, it takes about 400 milliseconds to load the XML into a simple homebrew triple class structure (no indices); my equivalent LINQ queries then take about 200 milliseconds. Of course, that approach only works for a particular RDF/XML structure, and it will start to break down as I do more & more queries. Clearly, if I were to do lots of query operations, the cost of the initial load by the dotNetRDF library would be better amortized, and I would start to reap the benefits of having the Graph structure. However, given that I only want to do a relatively small number of queries, I'm wondering if there's anything I can do to improve the load performance to close the gap. I tried a few things: using NonIndexedGraph (reduced load time down to around 8.6 seconds, while bringing my query time up to 1.1 seconds) and using Turtle w/ NonIndexGraph (reduced load time to 5.6 seconds), but I'd like to get within a small multiplier of the XElement.Load time if possible, while preserving the benefit of indexing. -Mark |
From: Rob V. <rv...@do...> - 2013-02-08 17:46:47
|
You haven't really asked a proper question here? What is the query that works and what is the one that doesn't work? Also what is your data? It is quite possible that your query simply isn't querying the data you think it is, this is a result of how SPARQL deals with datasets. Try changing your code so instead of creating a TripleStore and adding a graph to it you call ExecuteQuery() on the graph directly. Another thing to try is to rewrite your query like so: PREFIX pre:<http://www.cbcs.com/ontologies/cbcs.owl#> SELECT ?X ?Y WHERE { GRAPH ?g { ?X pre:hasInstitutes ?Y . } } If you provide more information we may actually be able to help you properly Rob From: mital <kap...@gm...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Friday, February 8, 2013 4:58 AM To: <dot...@li...> Subject: [dotNetRDF-Support] sparql query with prefix in dotnetrdf doesnot work but without prefix it works > > my main function says-- > > static void Main(string[] args) > { > > Graph g = new Graph(); > FileLoader.Load(g, "\\cbcs.owl"); > > > TripleStore store = new TripleStore(); > store.Add(g); > //Object results = store.ExecuteQuery("SELECT * WHERE { { ?s ?p ?o > } UNION { GRAPH ?g { ?s ?p ?o } } }"); > > Object results = store.ExecuteQuery("PREFIX > pre:<http://www.cbcs.com/ontologies/cbcs.owl#>" + "SELECT ?X ?Y WHERE { ?X > pre:hasInstitutes ?Y .}"); > SparqlResultSet rset = (SparqlResultSet)results; > > //Enumerating via the Results property > foreach (SparqlResult result in rset.Results) > { > Console.WriteLine(result.ToString()); > } > > > Console.WriteLine("hello"); > Console.ReadLine(); > } > > > but it doesnt display the answer if my query is simple and without answer it > works but with prefix it doesnt please help > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before > the end March 2013 and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb____________________________________________ > ___ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: mital <kap...@gm...> - 2013-02-08 12:58:20
|
my main function says-- static void Main(string[] args) { Graph g = new Graph(); FileLoader.Load(g, "\\cbcs.owl"); TripleStore store = new TripleStore(); store.Add(g); //Object results = store.ExecuteQuery("SELECT * WHERE { { ?s ?p ?o } UNION { GRAPH ?g { ?s ?p ?o } } }"); Object results = store.ExecuteQuery("PREFIX pre:<http://www.cbcs.com/ontologies/cbcs.owl#>" + "SELECT ?X ?Y WHERE { ?X pre:hasInstitutes ?Y .}"); SparqlResultSet rset = (SparqlResultSet)results; //Enumerating via the Results property foreach (SparqlResult result in rset.Results) { Console.WriteLine(result.ToString()); } Console.WriteLine("hello"); Console.ReadLine(); } but it doesnt display the answer if my query is simple and without answer it works but with prefix it doesnt please help |
From: Yossi C. <yos...@li...> - 2013-02-07 19:39:16
|
Greate, Thanks. Date: Thu, 7 Feb 2013 10:17:22 -0800 From: rv...@do... To: dot...@li... Subject: Re: [dotNetRDF-Support] OntologyResource(INode resource, IGraph graph) Hi Yossi Answers inline: From: Yossi Cohen <yos...@li...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Tuesday, February 5, 2013 10:30 AM To: DotNetRDF mailing-list <dot...@li...> Subject: [dotNetRDF-Support] OntologyResource(INode resource, IGraph graph) Hi, Couple of (related?) questions: 1. Should an OntologyResource (represented by an INode) have a different graph then its representative resource? No but that is not forbidden per se, may just lead to unexpected behavior though. If you have a specific example where this can happen that would be useful 2. When working with StoreGraphPersistenceWrapper (that implements IGraph) one could do something like this: IGraph g = new StoreGraphPersistenceWrapper(...) INode resource = g.CreateUriNode(some uri) ... do somthing like: make a query which returns SparqlResult than, do: INode node2 = result[0].CopyNode(g) --> (which copies a node with the underlining graph and not with the wrapper.) Leading to tow nodes (resource & node2) which have a different graph! When I'm working with a wrapper graph it is an IGraph and I expect the xxx.CopyNode(g) to return a node within the graph (g) supplied in the argument. The problem is the way CopyNode() works is slightly funky, its not really a bug per se because it has to work the way it does or we run into all sorts of problems trying to do SPARQL updates properly. Ultimately the problem boils down to a somewhat ill-advised design decision to scope nodes to graphs 4 years ago when I originally started the project which then necessitates this CopyNode() behavior. Eventually in 2.0 this will be removed so the whole CopyNode() functionality will become defunct and nodes can be freely moved around wherever you want. Rob Thanks, Yossi. ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb_______________________________________________ dotNetRDF-Support mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ dotNetRDF-Support mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Rob V. <rv...@do...> - 2013-02-07 18:39:11
|
Hi Yossi Answers inline: From: Yossi Cohen <yos...@li...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Tuesday, February 5, 2013 10:30 AM To: DotNetRDF mailing-list <dot...@li...> Subject: [dotNetRDF-Support] OntologyResource(INode resource, IGraph graph) > Hi, > > Couple of (related?) questions: > > 1. Should an OntologyResource (represented by an INode) have a different > graph then its representative resource? No but that is not forbidden per se, may just lead to unexpected behavior though. If you have a specific example where this can happen that would be useful > > 2. When working with StoreGraphPersistenceWrapper (that implements IGraph) one > could do something like this: > IGraph g = new StoreGraphPersistenceWrapper(...) > INode resource = g.CreateUriNode(some uri) > ... > do somthing like: make a query which returns SparqlResult > than, do: > INode node2 = result[0].CopyNode(g) --> (which copies a node with the > underlining graph and not with the wrapper.) > > Leading to tow nodes (resource & node2) which have a different graph! > > When I'm working with a wrapper graph it is an IGraph and I expect the > xxx.CopyNode(g) to return a node > within the graph (g) supplied in the argument. The problem is the way CopyNode() works is slightly funky, its not really a bug per se because it has to work the way it does or we run into all sorts of problems trying to do SPARQL updates properly. Ultimately the problem boils down to a somewhat ill-advised design decision to scope nodes to graphs 4 years ago when I originally started the project which then necessitates this CopyNode() behavior. Eventually in 2.0 this will be removed so the whole CopyNode() functionality will become defunct and nodes can be freely moved around wherever you want. Rob > > Thanks, > Yossi. > > > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before > the end March 2013 and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb____________________________________________ > ___ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Yossi C. <yos...@li...> - 2013-02-05 18:30:33
|
Hi, Couple of (related?) questions: 1. Should an OntologyResource (represented by an INode) have a different graph then its representative resource? 2. When working with StoreGraphPersistenceWrapper (that implements IGraph) one could do something like this: IGraph g = new StoreGraphPersistenceWrapper(...) INode resource = g.CreateUriNode(some uri) ... do somthing like: make a query which returns SparqlResult than, do: INode node2 = result[0].CopyNode(g) --> (which copies a node with the underlining graph and not with the wrapper.) Leading to tow nodes (resource & node2) which have a different graph! When I'm working with a wrapper graph it is an IGraph and I expect the xxx.CopyNode(g) to return a node within the graph (g) supplied in the argument. Thanks, Yossi. |
From: Yossi C. <yos...@li...> - 2013-02-05 18:06:12
|
Okay, Thanks. Date: Tue, 5 Feb 2013 09:43:07 +0000 From: rv...@do... To: dot...@li... Subject: Re: [dotNetRDF-Support] AllegroGraphConnector & IUpdateableStorage Yes I guess it should, the connector was developed for 3.x and then later updated for 4.0 at which point I don't believe it supported SPARQL update. It should be relatively easy to add support for updates, filed as CORE-308 Note that as a workaround you can use GenericUpdateProcessor to apply updates over an AllegroGraphConnector. Then once an updated version of dotNetRDF with IUpdateableStorage supported on AllegroGraphConnector is available you won't need to change your code since GenericUpdateProcessor defers to the provided update implementation if the IStorageProvider instance implements IUpdateableStorage Rob From: Yossi Cohen <yos...@li...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Tuesday, February 5, 2013 11:30 AM To: DotNetRDF mailing-list <dot...@li...> Subject: SPAM-LOW: [dotNetRDF-Support] AllegroGraphConnector & IUpdateableStorage Shouldn't AllegroGraphConnector implement IUpdateableStorage ? ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb_______________________________________________ dotNetRDF-Support mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ dotNetRDF-Support mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Rob V. <rv...@do...> - 2013-02-05 17:49:43
|
Your query appears to use several non-standard SPARQL features that I have never encountered before. Setting the syntax to Extended only enables syntax extensions we have implemented not arbitrary extensions. RULEBASE is not a standard feature and a quick Google search didn't tell me where it comes from? Also what is the following supposed to be? <ReadTagList>( ?oref1, ?oref1ts, ?o1, ?o1Status) It looks like some sort of extended syntax (again I don't know where from) which would also be rejected? What tools/product do your SPARQL queries originate from? We implement SPARQL 1.0 and SPARQL 1.1 per the standards (and are 100% compliant with those), the extras in the extended syntax are primarily leftovers from the transitional period when the features of SPARQL 1.1 were still under development and will most likely be removed in the long term. Rob From: Madhanmohan Savadamuthu <erm...@gm...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Sunday, February 3, 2013 12:59 PM To: <dot...@li...> Subject: [dotNetRDF-Support] RULEBASE support in Sparql Parser > Folks, > > I have written a small program to parse SPARQL query. I want to make sure that > SPARQL syntax is correct and also want to parse out all variables. Below is > the code I used. > > SparqlQueryParser > parser = new SparqlQueryParser(); > > parser.SyntaxMode = > SparqlQuerySyntax.Extended; > > SparqlQuery q = parser.ParseFromString(txtBoxSparql.Text.Trim()); > When I pass below SPARQL query, I am getting error that 'Rulebase' is not > valid. Below is my SPARQL query. Can some one help me? > > PREFIX rdf: <http://www.w3.org/2000/01/rdf-schema#> > RULEBASE <DefaultDataBindingRules> > SELECT <http://www.abc.com/on/sam#Le> ?acLabel ?o ?oLabel ?o1 ?o1Status > ?oref1 ?oref1Label ?oref1ts FROM <DataBinding> > WHERE { > OPTIONAL {<http://www.abc.com/on/sam#Le> rdf:label ?acLabel.} > <http://www.abc.com/on/sam#Le> <http://www.abc.com/on#cc.dd> ?o. > ?o rdf:label ?oLabel. > ?o <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?oType. > FILTER(?oType=<http://www.abc.com/on#PP_WW>). > OPTIONAL {?o <http://www.abc.com/on#ww.gg.rr> ?oref1 } > <ReadTagList>( ?oref1, ?oref1ts, ?o1, ?o1Status). > } > order by asc( ?o1) > > > > > -- > Thanks and Regards, > Madhanmohan S > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before > the end March 2013 and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb____________________________________________ > ___ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Rob V. <rv...@do...> - 2013-02-05 17:44:01
|
Yes I guess it should, the connector was developed for 3.x and then later updated for 4.0 at which point I don't believe it supported SPARQL update. It should be relatively easy to add support for updates, filed as CORE-308 <http://dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=308> Note that as a workaround you can use GenericUpdateProcessor to apply updates over an AllegroGraphConnector. Then once an updated version of dotNetRDF with IUpdateableStorage supported on AllegroGraphConnector is available you won't need to change your code since GenericUpdateProcessor defers to the provided update implementation if the IStorageProvider instance implements IUpdateableStorage Rob From: Yossi Cohen <yos...@li...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Tuesday, February 5, 2013 11:30 AM To: DotNetRDF mailing-list <dot...@li...> Subject: SPAM-LOW: [dotNetRDF-Support] AllegroGraphConnector & IUpdateableStorage > Shouldn't AllegroGraphConnector implement IUpdateableStorage ? > ------------------------------------------------------------------------------ > Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before > the end March 2013 and get the hardware for free! Learn more. > http://p.sf.net/sfu/sophos-d2d-feb____________________________________________ > ___ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Yossi C. <yos...@li...> - 2013-02-05 11:30:37
|
Shouldn't AllegroGraphConnector implement IUpdateableStorage ? |
From: Madhanmohan S. <erm...@gm...> - 2013-02-03 12:59:10
|
Folks, I have written a small program to parse SPARQL query. I want to make sure that SPARQL syntax is correct and also want to parse out all variables. Below is the code I used. SparqlQueryParser parser = new SparqlQueryParser(); parser.SyntaxMode = SparqlQuerySyntax.Extended; SparqlQuery q = parser.ParseFromString(txtBoxSparql.Text.Trim()); When I pass below SPARQL query, I am getting error that 'Rulebase' is not valid. Below is my SPARQL query. Can some one help me? PREFIX rdf: <http://www.w3.org/2000/01/rdf-schema#> RULEBASE <DefaultDataBindingRules> SELECT <http://www.abc.com/on/sam#Le> ?acLabel ?o ?oLabel ?o1 ?o1Status ?oref1 ?oref1Label ?oref1ts FROM <DataBinding> WHERE { OPTIONAL {<http://www.abc.com/on/sam#Le> rdf:label ?acLabel.} <http://www.abc.com/on/sam#Le> <http://www.abc.com/on#cc.dd> ?o. ?o rdf:label ?oLabel. ?o <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?oType. FILTER(?oType=<http://www.abc.com/on#PP_WW>). OPTIONAL {?o <http://www.abc.com/on#ww.gg.rr> ?oref1 } <ReadTagList>( ?oref1, ?oref1ts, ?o1, ?o1Status). } order by asc( ?o1) -- Thanks and Regards, Madhanmohan S |
From: Rob V. <rv...@do...> - 2013-01-31 14:47:57
|
We are pleased to announce the release of dotNetRDF 0.9.0 RC 4 available now from all the usual locations: Project Website - http://www.dotnetrdf.org/content.asp?pageID=Download%20dotNetRDF SoureForge - http://www.sourceforge.net/project/dotnetrdf CodePlex - http://dotnetrdf.codeplex.com BitBucket - http://bitbucket.org/dotnetrdf/dotnetrdf/downloads NuGet - http://nuget.org/packages/dotNetRDF/ This is primarily a maintenance release, it resolves a variety of bugs including various SPARQL bugs, some parser bugs and adds a workaround for HTTP servers which don't perform HTTP authentication nicely. It is intended to be a final release candidate before a stable 1.0.0 release in the next couple of months. We would appreciate it if people in the community could test this build as much as possible and report any issues they encounter. As always thanks to everyone in the community who reported issues or made suggestions for improvements. Also many thanks to our developers for their continued hard work. Rob Vesse |
From: Rob V. <rv...@do...> - 2013-01-31 12:15:02
|
Hi Jasmine At it stands your question is unanswerable since you haven't provided enough information: 1. What is your data? Please include it (if it is small) or a snippet of it containing some sample data you were expecting to match 2. You mention a query that works and one that doesn't please show these queries on their own separate from your code sample Rob From: Jasmine Sirja <jas...@gm...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Thursday, January 31, 2013 11:56 AM To: <dot...@li...> Cc: Jasmine Jha <jha...@gm...>, mital kapadia <kap...@gm...> Subject: [dotNetRDF-Support] sparql query with prefix doesnot work in dotnetrdf but without prefix works plz help > > > my main function says-- > > static void Main(string[] args) > { > > Graph g = new Graph(); > FileLoader.Load(g, "\\cbcs.owl <file://\\cbcs.owl> "); > > > TripleStore store = new TripleStore(); > store.Add(g); > //Object results = store.ExecuteQuery("SELECT * WHERE { { ?s ?p ?o > } UNION { GRAPH ?g { ?s ?p ?o } } }"); > > Object results = store.ExecuteQuery("PREFIX > pre:<http://www.cbcs.com/ontologies/cbcs.owl#>" + "SELECT ?X ?Y WHERE { ?X > pre:hasInstitutes ?Y .}"); > SparqlResultSet rset = (SparqlResultSet)results; > > //Enumerating via the Results property > foreach (SparqlResult result in rset.Results) > { > Console.WriteLine(result.ToString()); > } > > > Console.WriteLine("hello"); > Console.ReadLine(); > } > > > but it doesnt display the answer if my query is simple and without answer it > works but with prefix it doesnt please help > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. Make your web apps faster with > AppDynamics Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_jan____________________________________________ > ___ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Jasmine S. <jas...@gm...> - 2013-01-31 11:56:29
|
my main function says-- static void Main(string[] args) { Graph g = new Graph(); FileLoader.Load(g, "\\cbcs.owl"); TripleStore store = new TripleStore(); store.Add(g); //Object results = store.ExecuteQuery("SELECT * WHERE { { ?s ?p ?o } UNION { GRAPH ?g { ?s ?p ?o } } }"); Object results = store.ExecuteQuery("PREFIX pre:< http://www.cbcs.com/ontologies/cbcs.owl#>" + "SELECT ?X ?Y WHERE { ?X pre:hasInstitutes ?Y .}"); SparqlResultSet rset = (SparqlResultSet)results; //Enumerating via the Results property foreach (SparqlResult result in rset.Results) { Console.WriteLine(result.ToString()); } Console.WriteLine("hello"); Console.ReadLine(); } but it doesnt display the answer if my query is simple and without answer it works but with prefix it doesnt please help |
From: Yossi C. <yos...@li...> - 2013-01-29 11:05:10
|
Understood,Thanks. Date: Tue, 29 Jan 2013 10:09:49 +0000 From: rv...@do... To: dot...@li... Subject: Re: [dotNetRDF-Support] Bug in VDS.RDF.Graph.Retract(IEnumerable<Triple> ts)? Hi Yossi This behavior is by design, we don't explicitly materialize the enumerable that comes in because we don't know (or want to know) where it came from and we don't want to waste memory materializing the list unnecessarily. If you are retracting some enumerable of triples returned by one of the other methods of the graph you are trying to retract from then you need to ensure you materialize that list by calling ToList() on the enumerable you pass in. Rob From: Yossi Cohen <yos...@li...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Tuesday, January 29, 2013 8:37 AM To: DotNetRDF mailing-list <dot...@li...> Subject: [dotNetRDF-Support] Bug in VDS.RDF.Graph.Retract(IEnumerable<Triple> ts)? I think there is a bug in Graph.cs: public override bool Retract ( IEnumerable<Triple> ts){ bool retracted = false; foreach (Triple t in ts) { retracted = this.Retract(t) || retraced; } return retracted;} The 'ts' collectionis modified while enumerated. ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d_______________________________________________ dotNetRDF-Support mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ dotNetRDF-Support mailing list dot...@li... https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Rob V. <rv...@do...> - 2013-01-29 10:11:37
|
Hi Yossi This behavior is by design, we don't explicitly materialize the enumerable that comes in because we don't know (or want to know) where it came from and we don't want to waste memory materializing the list unnecessarily. If you are retracting some enumerable of triples returned by one of the other methods of the graph you are trying to retract from then you need to ensure you materialize that list by calling ToList() on the enumerable you pass in. Rob From: Yossi Cohen <yos...@li...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Tuesday, January 29, 2013 8:37 AM To: DotNetRDF mailing-list <dot...@li...> Subject: [dotNetRDF-Support] Bug in VDS.RDF.Graph.Retract(IEnumerable<Triple> ts)? > I think there is a bug in Graph.cs: > > public override bool Retract ( IEnumerable<Triple> ts) > { > bool retracted = false; > > foreach (Triple t in ts) > { > retracted = this.Retract(t) || retraced; > } > > return retracted; > } > > The 'ts' collectionis modified while enumerated. > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, > Windows 8 Apps, JavaScript and much more. Keep your skills current with > LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and > experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnnow-d2d______________________________________________ > _ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Yossi C. <yos...@li...> - 2013-01-29 08:37:33
|
I think there is a bug in Graph.cs: public override bool Retract ( IEnumerable<Triple> ts){ bool retracted = false; foreach (Triple t in ts) { retracted = this.Retract(t) || retraced; } return retracted;} The 'ts' collectionis modified while enumerated. |
From: Rob V. <rv...@do...> - 2013-01-24 10:07:42
|
Hi Rene dotNetRDF comes with a variety of writers that can be used to write graphs back out to files, see the Writing RDF [1] documentation for an overview. See the IRdfWriter documentation [2] for a list of available implementations. For your specific question I suspect you likely want to use the CompressingTurtleWriter [3], I don't know exactly what the Protégé Turtle export looks like but this writer should give you fairly nice and compact Turtle. You may want to turn up the compression level to get the best out of this. Hope this helps, Rob [1] http://www.dotnetrdf.org/content.asp?pageID=Writing%20RDF [2] http://www.dotnetrdf.org/api/index.asp?Topic=VDS.RDF.IRdfWriter [3] http://www.dotnetrdf.org/api/index.asp?Topic=VDS.RDF.Writing.CompressingTurt leWriter From: Raynier van Egmond <ra...@xb...> Organization: XBRL Consulting Partners LLC Reply-To: <ra...@xb...>, dotNetRDF User Help and Support <dot...@li...> Date: Wednesday, January 23, 2013 9:47 PM To: <dot...@li...> Subject: [dotNetRDF-Support] Ontology printer output like Protege > Hi All, > > I have started using dotNetRDF for a prototype ontology server and wondered if > there is a ³writer-class² that formats the output of the content of a graph > like the turtle export from Protégé? Since I use both (Protégé to confirm that > my manual modeling is done correctly) it would be very helpful to be able to > round-trip the two files (into and out-of Protégé and the dotNetRDF > application). > > If there is no such thing (yet) would I need to create my own formatter to > achieve this? Which wouldn¹t be a problem but if it¹s not needed > > Kind regards, > > > René > Vashon (WA), USA > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, > Windows 8 Apps, JavaScript and much more. Keep your skills current with > LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and > experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnnow-d2d______________________________________________ > _ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Raynier v. E. <ra...@xb...> - 2013-01-23 21:48:14
|
Hi All, I have started using dotNetRDF for a prototype ontology server and wondered if there is a writer-class that formats the output of the content of a graph like the turtle export from Protégé? Since I use both (Protégé to confirm that my manual modeling is done correctly) it would be very helpful to be able to round-trip the two files (into and out-of Protégé and the dotNetRDF application). If there is no such thing (yet) would I need to create my own formatter to achieve this? Which wouldnt be a problem but if its not needed Kind regards, René Vashon (WA), USA |
From: Rob V. <rv...@do...> - 2013-01-23 10:39:43
|
Hey Ryan What exactly do you want to do here? You can easily parse this RDF/XML as triples into dotNetRDF like so: Graph g = new Graph(); g.LoadFromFile("your-file.rdf"); And then you can find the expression string either with a SPARQL query or using the Graph API to select the relevant pieces of data e.g. IEnumerable<ILiteralNode> ns = g.GetTriplesWithPredicate(g.CreateUriNode("kb:expression_string")).Select(t => t.Object).OfType<ILiteralNode>(); foreach (ILiteralNode n in ns) { //The variable n holds the literal representing your let expression //Access it's value like so String exprStr = n.Value; //Do something with the expression string } However there is no support for parsing these let expressions, I assume these are some sort of Protégé specific feature? You can easily access this data as I demonstrated but I'm afraid you would be on your own for parsing it and interpreting it. If you have more specific questions we may be able to provide you with more specific answers, Regards, Rob From: Ryan Minor <mi...@ya...> Reply-To: Ryan Minor <mi...@ya...>, dotNetRDF User Help and Support <dot...@li...> Date: Wednesday, January 23, 2013 12:07 AM To: "dot...@li..." <dot...@li...> Subject: [dotNetRDF-Support] parsing RDF > Hi there > > I am new to RDF. I am trying to use dotnetrdf to parse a file creating using > Protege (Stanford). > > The following is an excerpt from my file: > > <?xml version='1.0' encoding='UTF-8'?> > <!DOCTYPE rdf:RDF [ > <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> > <!ENTITY a 'http://protege.stanford.edu/system#'> > <!ENTITY kb 'http://protege.stanford.edu/kb#'> > <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'> > ]> > > <rdf:RDF xmlns:rdf="&rdf;" > xmlns:a="&a;" > xmlns:kb="&kb;" > xmlns:rdfs="&rdfs;"> > > <kb:Let_Expression rdf:about="&kb;CoughStudy3_00730" > kb:identifier="coughStartTime" > kb:name="Current cough start time" > rdfs:label="Current cough start time"> > <kb:expression_string>selectAttribute("low", selectAttribute("critical_time", > selectAttribute("value", latest cough where time of it >= > now)))</kb:expression_string> > </kb:Let_Expression> > > > The last paragraph is describing something called a Let_Expression. > > Any suggestions on parsing this in dotnetrdf? > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, > Windows 8 Apps, JavaScript and much more. Keep your skills current with > LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and > experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnnow-d2d______________________________________________ > _ dotNetRDF-Support mailing list dot...@li... > https://lists.sourceforge.net/lists/listinfo/dotnetrdf-support |
From: Ryan M. <mi...@ya...> - 2013-01-23 00:07:46
|
Hi there I am new to RDF. I am trying to use dotnetrdf to parse a file creating using Protege (Stanford). The following is an excerpt from my file: <?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE rdf:RDF [ <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> <!ENTITY a 'http://protege.stanford.edu/system#'> <!ENTITY kb 'http://protege.stanford.edu/kb#'> <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'> ]> <rdf:RDF xmlns:rdf="&rdf;" xmlns:a="&a;" xmlns:kb="&kb;" xmlns:rdfs="&rdfs;"> <kb:Let_Expression rdf:about="&kb;CoughStudy3_00730" kb:identifier="coughStartTime" kb:name="Current cough start time" rdfs:label="Current cough start time"> <kb:expression_string>selectAttribute("low", selectAttribute("critical_time", selectAttribute("value", latest cough where time of it >= now)))</kb:expression_string> </kb:Let_Expression> The last paragraph is describing something called a Let_Expression. Any suggestions on parsing this in dotnetrdf? |
From: Yossi C. <yos...@li...> - 2013-01-21 12:15:08
|
------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 |