On 17/06/11 07:18, Paolo Castagna wrote:
Hi Andy
Andy Seaborne wrote:
On 15/06/11 17:08, Paolo Castagna wrote:
Hi,
today, I needed to use RIOT infer command with an N-Quads file.
This is what I did to being able to use an N-Quads instead of
an N-Triples file:
- Sink<Triple> sink = new SinkTripleOutput(System.out) ;
- sink = InfFactory.infTriples(sink, vocab) ;
- LangRIOT parser = RiotReader.createParserNTriples(System.in, sink) ;
+ Sink<Quad> sink = new SinkQuadOutput(System.out) ;
+ sink = InfFactory.infQuads(sink, vocab) ;
+ LangRIOT parser = RiotReader.createParserNQuads(System.in, sink) ;
Everything was already there, thank you Andy.
Could we do this and support N-Quads with RIOT infer command?
Sure - file a JIRA so it doesn't get lost.
Committed (see: http://markmail.org/thread/wmvhh6ambpxairvn).
There is a big and interesting comment on the infer command. :-)
Do you think these can be done in streaming over the A-Box?
What do you think?
* owl:sameAs (in T-Box, not A-Box)
Yes - but rather less point.
owl:sameAs has domain and range owl:Thing
The other problem with owl:sameAs is that expansion grows much faster
for a colelction of owl:sameAs's compared to subClassof.
(owl:sameAs isn't mentioned in the OWL2 primer!)
* owl:equivalentClass, owl:equivalentProperty
Yes.
* owl:TransitiveProperty, owl:SymmetricProperty
No, Yes
The expansions can cope with any rule involving as much of the ontology
as you like but one one triple from the data stream.
For transitive, apply: this might work:
INSERT { ?s :p ?o }
WHERE
{ ?s :p+ ?o }
after loading.
There may be various other expansions possible using post-load SPARQL
Updates. If the original data is keep, they can be reapplied, say, once
a day.
I might have a go at it (since a colleague at Talis asked me explicitly
if RIOT infer command supports owl:sameAs).
Also, another question (from another colleague) was: "is it possible to
do the same when a SPARQL Update request is processed?"
I am not sure about this, in particular if the update has deletions.
If the updates are adding A-box the triples, then yes.
If the updates are deleting A-box the triples, then no.
If the updates are modifying the T-box, then no.
Inference-by-expansion is not reversible very easily.
Inference-by-SPARQL Update is, as it unsubtly reapplies everything.
Andy
Paolo
NQ is a superset of NT.
(Actually, infQuads is a post inf expansion engine addition)
Andy
Paolo