Re: RDFS inference in Fuseki w/ TDB

2016-03-07 Thread Dave Kolas

Andy,

Thanks for the reply.

By forward chain the data when loaded, I assume you mean manually doing 
so on the client side before inserting?


I think the use case follows the general parameters you outline below.  
The primary things really are just subClass and subProperty; I believe 
those are the only elements that we're depending on now. The schema is 
small, on the order of 50 classes.  I will check out the linked project.


Thanks!
--Dave--

On 3/6/2016 11:28 AM, Andy Seaborne wrote:

On 01/03/16 19:20, Dave Kolas wrote:

Hi there,

I'm currently using Fuseki to host a number of RDF datasets.  If one
wants basic RDFS inference around a graph with good query performance,
what is the suggested configuration?

I'm currently using a:



wrapped around a TDB graph and dataset.  However, this seems to (a)
dramatically increase the memory requirements and (b) destroy the query
optimizer.  Is there a different way to configure things to get RDFS
inference and better performance?  I don't actually have the need to
track / eliminate inferred statements, so it would be ok to just forward
chain on insertion into the same store.

Thanks,
--Dave--




Hi Dave,

In the current codebase the only two options are using there in-memory 
reasoner or forward-chaining the data when it is is loaded.  A 
combination, whereby some inferences are done ahead of time and others 
done via the in-memory reasoner at runtime is possible - I don't know 
how much memory that saves though and it still might do bad things to 
optimization.



Adding some support for RDFS to TDB would make a lot of sense.
I had a go with [1].

To scope that, could you give some background on your RDFS needs here, 
which as which parts of RDFS you use (and RDFS++ - all the single 
property inferences such as symmetric properties) and whether the 
assumption below fit your usage:


1/ It expands the subclass and subproperty chains once at startup so 
there is no path following at query time,  just one hope for rdf:type.


?x rdf:type :C
==>
?x rdf:type ?X. ?X rdfs:"transitiveSubClassOf" :C .

2/ The schema is small - the workspace is in memory.

3/ The schema is fixed - any change would need to rebuild the sub* 
data structures but also ...


4/ schema and data are separate (this is not a core assumption; I 
wanted) to be be sure that worked well.


5/ No "messing with the furniture" i.e sub-properties of 
rdfs:subClassOf, rdfs:subPropertyOf, rdf:type don't trigger inference. 
I don't think it is fundamental in the design.


Andy


[1]
https://github.com/afs/jena-inf-engine






Re: Problem Fuseki + TDB

2016-03-07 Thread A. Soroka
Sorry if this is a red herring or something you’ve already checked, but are you 
using s-query from the same machine that is running your Fuseki, and a browser 
on a different machine (like your workstation)? If so, the behavior you 
describe _might_ be ascribable to the default security settings for Fuseki.

---
A. Soroka
The University of Virginia Library

> On Mar 7, 2016, at 9:51 AM, Mikael Pesonen  wrote:
> 
> Sorry it works with s-query
> 
> bin/s-query --service=http://speechdev:3031/ds/query 'SELECT ?s ?p ?o WHERE { 
> GRAPH {?s ?p ?o}} LIMIT 2'
> 
> but www-ui does not work. Buttons under "manage datasets" do not do anything 
> and buttons under "dataset" say "Please select a dataset."
> 
> Br,
> Mikael



Re: Problem Fuseki + TDB

2016-03-07 Thread Andy Seaborne

On 07/03/16 13:39, Mikael Pesonen wrote:


Hi,

thanks for the help!

On 4.3.2016 16:09, Andy Seaborne wrote:

On 04/03/16 10:58, Mikael Pesonen wrote:


Hi,

I'm just learning to use these tools. I have successfully setup
jena-fuseki1-1.1.2 and am able to make SPARQL queries. But for some
reason jena-fuseki-2.3.1 does not find data when inserted in TDB. So I
am missing something but cannot spot what...

Here's the comparison of procedures. First one works, second one
doesn't. The test query is this:

/s-query --service=http://speechdev.lingsoft.fi:3030/ds/query 'SELECT ?s
?p ?o WHERE { GRAPH {?s ?p
?o}} LIMIT 2'


1)

cd jena-fuseki1-1.1.2

./fuseki-server --update --mem /ds

./s-put http://localhost:3030/ds/data
http://www.lingsoft.fi/LingsoftOntology/skosified.rdf


Unclear why that worked because s-put needs 3 command line arguments.

s-put datasetURI  graphname  file_for_data

Sorry missing space, so:
./s-put http://localhost:3030/ds/data
http://www.lingsoft.fi/LingsoftOntology/ skosified.rdf









2)


cd apache-jena-fuseki-2.3.1

mkdir ./DB

tdbloader2 --loc ./DB/ skosified.rdf


That loads data into the default graph.

Use tdbloader (not 2) and --graph or change the query as below ...





GRAPH {?s ?p ?o}

It's looking in a named graph , not the default graph.

You can remove the GRAPH part or change the load.

Andy



[2016-03-04 12:05:44] Fuseki INFO  [1] exec/select

[2016-03-04 12:05:44] Fuseki INFO  [1] 200 OK (214 ms)





Okay so If I want to load data to named graph like this

  tdbloader --loc ./DB/ --graph=http://www.lingsoft.fi/LingsoftOntology/
skosified.rdf


You now have a database "DB" with a single named graph 
http://www.lingsoft.fi/LingsoftOntology/




how should I start the server? I don't get what the /DatasetPathName means.

These won't work:
./fuseki-server --update --port 3030 --loc=DB /ds


That should work (if in the same directory as the load).

What do you mean by "won't work"


./fuseki-server --update --port 3030 --loc=DB
/http://www.lingsoft.fi/LingsoftOntology/


Fuseki publishes datasets with a name, here "/ds" so the query service 
will be http://<>:3030/ds/query




Br,
Mikael