Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples with parsed ontology #104

Open
Corban-Dallas opened this issue Jun 12, 2024 · 6 comments
Open

Examples with parsed ontology #104

Corban-Dallas opened this issue Jun 12, 2024 · 6 comments
Labels
API This concerns horned as a library bug Something isn't working question Further information is requested

Comments

@Corban-Dallas
Copy link

Firstly, thank you for crate!

I'm not closely familiar with tooling for working with RDF/OWL, so it would be nice to have at least a couple of examples on how to work with a graph from RDF Ontology/Set Ontology after parsing. At the moment, it looks really confusing to me how to work with a parsed ontology to read relations between properties and classes.

Also, I encountered a problem with parsing OWL from here. The issue involved triples with the same type of object, predicate, and subject (ObjectProperty). I had to fork Horned-OWL and manually address this in order to successfully parse the file. It would be nice to have a method for handling incorrect or unimplemented cases without the need for forking and manual code editing.

@Corban-Dallas Corban-Dallas changed the title Examples with working with parsed ontology Examples with parsed ontology Jun 12, 2024
@filippodebortoli
Copy link
Collaborator

Hi, thanks for your interest in using this crate!

We are currently working on a refactoring of the RDF/XML parser (see e.g. #102 and #98) which is known to have a few rough spots. You can expect the next major version of this library to correctly handle a larger number of cases.
We also welcome PRs from external contributors: we would be happy to consider merging your patch to the codebase, especially if it can then help other users. :-)

The documentation also needs to be extended. What I can suggest for now is to look at the source code of the tools suite that comes with horned (you can find it under horned-bin/ in this repo). There, we address a few use cases, and there should be more than one example where an ontology is fully parsed and then used to e.g. display statistics. I hope this helps you in working with horned.

@filippodebortoli filippodebortoli added bug Something isn't working question Further information is requested API This concerns horned as a library labels Jun 12, 2024
@phillord
Copy link
Owner

Agree that we need tutorial documentation. Happy to get more details about your use case, perhaps we can work that in.

Likewise happy to fix broken parser issue if the ontology is public.

Error handling is too rigid at the moment. It will take a while.

@Corban-Dallas
Copy link
Author

We also welcome PRs from external contributors: we would be happy to consider merging your patch to the codebase, especially if it can then help other users. :-)

I would be glad to help, but I don't have significant experience with Rust and OWL/RDF syntax. I'm not sure how to correctly fix the problem. Maybe it's a problem with the ontology, not with the parser.

Happy to get more details about your use case, perhaps we can work that in.

Likewise happy to fix broken parser issue if the ontology is public.

It is public. I was trying to parse onthology from schema.org: https://github.com/schemaorg/schemaorg/blob/main/data/releases/27.0/schemaorg.owl
All fails were related to ITI - https://schema.org/supersededBy

@filippodebortoli
Copy link
Collaborator

We also welcome PRs from external contributors: we would be happy to consider merging your patch to the codebase, especially if it can then help other users. :-)

I would be glad to help, but I don't have significant experience with Rust and OWL/RDF syntax. I'm not sure how to correctly fix the problem. Maybe it's a problem with the ontology, not with the parser.

If it was a parser issue, I would assume that it is concerning horned::io::rdf::reader since the ontology you are trying to parse is written using the RDF/XML syntax of OWL.
The problem could be that the offending triple is treated in the wrong way.
Instead of filtering it away (which could be the right behavior) and leave it as an incomplete parse, it could have been parsed according to the OWL specification, which then would result in the wrong behavior.

Admittedly, working on that module might be complicated (we are aware of that and we are currently working on a refactoring).

@phillord
Copy link
Owner

How do you get the error to occur?

@phillord
Copy link
Owner

Got it. superceded is an object property that is being used to described a relation between two other object properties, which is, I think, OWL Full. Horned doesn't know how to handle it and, indeed, I will need to think about what it is supposed to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API This concerns horned as a library bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants