I've been Thea for a while now. And I think that the following two
features would make Thea much nicer to use.
Firstly, when loading an OWL file and querying the model, full URIs
are used in the abstract syntax. If instead the namespaces (as defined
in the OWL file) would be used, the querying from the prolog terminal
can be easier. E.g. annotationAssertion('rdfs:label', A, B).
Furthermore, there would be no need to convert namespaces to full URIs
in the application code.
Secondly, assert_axiom currently requires a second argument to
indicate to which ontology axioms are asserted. It would probably be
nicer to be have a function in which the current ontology could be set
(similar to setting the current output stream).
Best regards,
Jochem
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Jochem Liem, MSc.
Informatics Institute
Faculty of Science
University of Amsterdam
http://www.science.uva.nl/~jliem/
Phone: +31 (0)20 525 6801
Mobile: +31 (0)6 4321 9992
Fax: +31 (0)20 525 7490
Visitor address:
Science Park 904, C2.248
1098 XH Amsterdam
Mailing address:
Postbus 94323
1090 GH Amsterdam
The Netherlands
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Dear Vangelis/Chris,
>
> I've been Thea for a while now. And I think that the following two
> features would make Thea much nicer to use.
>
> Firstly, when loading an OWL file and querying the model, full URIs
> are used in the abstract syntax. If instead the namespaces (as defined
> in the OWL file) would be used, the querying from the prolog terminal
> can be easier. E.g. annotationAssertion('rdfs:label', A, B).
> Furthermore, there would be no need to convert namespaces to full URIs
> in the application code.
Hi Jochem
I agree that specifying full URIs can be tedious. The problem with allowing 'rdfs:label' is that you either have to disallow the full URL (and privilege a certain namespace abbreviation), or you have to dynamically expand the URIs.
If you have a look on the branch 'newrdf' (or the branch 'pkb', which has 'newrdf' merged into it) you'll see there is a module 'owl2_rdf.pl' which does live mapping of the owl predicates to an rdf_db database. You need to specify 'rdf_direct' as the format.
In principle it should be easy to use the auto-expansion features of the rdf_db module. However, it would be necessary to add rdf_meta directives for all predicates, and I haven't done this on this branch yet. This would make portability of the core difficult, but then perhaps that's an unattainable goal. If this sounds useful, I can develop this further.
> Secondly, assert_axiom currently requires a second argument to
> indicate to which ontology axioms are asserted. It would probably be
> nicer to be have a function in which the current ontology could be set
> (similar to setting the current output stream).
My preference is to keep this sort of impure access out of the core, and have this sort of thing in a wrapper modules. however, this isn't consistently adhered to - owl2_reasoner makes use of an nb global.
> I agree that specifying full URIs can be tedious. The problem with allowing 'rdfs:label' is that you either have to disallow the full URL (and privilege a certain namespace abbreviation), or you have to dynamically expand the URIs.
>
> If you have a look on the branch 'newrdf' (or the branch 'pkb', which has 'newrdf' merged into it) you'll see there is a module 'owl2_rdf.pl' which does live mapping of the owl predicates to an rdf_db database. You need to specify 'rdf_direct' as the format.
>
> In principle it should be easy to use the auto-expansion features of the rdf_db module. However, it would be necessary to add rdf_meta directives for all predicates, and I haven't done this on this branch yet. This would make portability of the core difficult, but then perhaps that's an unattainable goal. If this sounds useful, I can develop this further.
I would very much like a form of dynamic expansion of the URIs. But
wouldn't Thea in general benefit of such a feature? Perhaps I'm using
Thea in a non-optimal way, in which I would very much appreciate some
guidance.
I'm exporting qualitative reasoning models and simulations to OWL
using Thea. During this process I assert URIs using the namespaces
notation (although I can imagine people using a mixture of namespace
and full URIs). When querying the abstract syntax I can use, for
example, annotationAssertion('rdfs:label', X, Y), but not
annotationAssertion('http://www.w3.org/2000/01/rdf-schema#label', X,
Y).
When saving the file to OWL and loading it again using Thea, the full
URIs are used in the abstract syntax. As such, I can use the full URI
query, but not the one with the namespace notation. Consequently, it
seems non-trivial to use the same code to query the abstract syntax
after asserting and after loading a file.
Perhaps this can be solved by assuring that the asserted abstract
syntax always uses full URIs by dynamically expanding the URIs during
assertions. When posing queries the URIs can then also be expanded,
which would allow querying using both the URIs with namespaces and
full URIs.
An additional feature would be to use the portray mechanism to show
the namespace version of the URI when queries are posed as Jan does in
(semweb/rdf_portray) [1].
Many thanks for the support,
Jochem
[1] http://www.swi-prolog.org/howto/UseRdfMeta.html