Re: [Virtuoso-users] Best way to query a random sample?

2011-04-14 Thread Nguyen Mau Quoc Hoan
Hi all. I have an ontology model (ontModel) by loading some local ontologies via jena. Now i want to export this model into virtuoso graph for storing and querying? How could I do it? Thanks in advance.

Re: [Virtuoso-users] Best way to query a random sample?

2011-04-14 Thread Hugh Williams
Hi Hoan, What form are these local ontologies available in ? Are they available as file datasets in N3, RDF/XML or other formats or are they stored internal in this OntModel tool ? Best Regards Hugh Williams Professional Services OpenLink Software Web: http://www.openlinksw.com Support:

Re: [Virtuoso-users] Best way to query a random sample?

2011-04-14 Thread Hugh Williams
Hi Hoan, If they are available in RDF/XML form you can load them singularly if there are not many using the Conductor “RDF - Upload RDF” tab or using the RDF_LOAD_RDFXML_MT() [1] function and if there are many files the Virtuoso RDF Bulk loader [2] scripts can be used to upload them all at

Re: [Virtuoso-users] Best way to query a random sample?

2011-04-12 Thread Konrad Höffner
Thank you very much, I didn't know this method! In case I need not a specific number of triples but all triples for a specific number of resources, I would just use bif:rnd(10,?s) instead of bif:rnd(10,?s, ?p, ?o), is that correct? I'm also unsure what value to assign to the decimation

[Virtuoso-users] Best way to query a random sample?

2011-04-11 Thread Konrad Höffner
Hello, I would like to know the best method to get a random sample of all triples for a subset of all the resources of a SPARQL endpoint, e.g.: select ?s ?p ?o where {?s ?p ?o. {select ?s where {?s a dbpedia-owl:Settlement} limit 5}} The problem here is that the choice of resources

Re: [Virtuoso-users] Best way to query a random sample?

2011-04-11 Thread Ivan Mikhailov
Hello Konrad, The best, as usual, is decimation in its original style. E.g. select ?s ?p ?o from some-graph where { ?s ?p ?o . FILTER (1 bif:rnd (10, ?s, ?p, ?o)) } By tweaking first argument of bif:rnd() and the left side of the inequality you can tweak decimation ratio from 1/10 to the