Skip to content

Foaf reading#167

Merged
phillord merged 12 commits intodevelfrom
fix/parser-fail-on-foaf
Oct 31, 2025
Merged

Foaf reading#167
phillord merged 12 commits intodevelfrom
fix/parser-fail-on-foaf

Conversation

@phillord
Copy link
Owner

@phillord phillord commented Oct 7, 2025

Starts to address #164

Internally, this parser uses a lax option and I think I want to
maintain strict as the default. So it makes more sense to reverse the
semantics.
The old methods conflated several different things -- include methods
that worked by side-effect and those that did not. The new naming
scheme distinguishes these.
@phillord
Copy link
Owner Author

With this version FOAF now parses without error, but does not parse completely.

This has involved a fairly radical overhaul of the RDF parser, meaning that it does not check the declared type of an entity where it can infer what it should be, which is invalid in some profiles of OWL2.

This introduces new methods for distinguish properties pairs, using
guesswork if only one of the pair is declared.

The mechanisms for detecting OWL/RDF vocabulary is also updated,
meaning that (mostly) only the predicates are checked.
@phillord
Copy link
Owner Author

This now parses all but four triples in foaf. I am still trying to work out how we know the type of "isPrimaryTypeOf"

Previously, the RDF parser refused to parse triples where the property
type was unknown. It will now use the ObjectProperty as a default.
@phillord
Copy link
Owner Author

This now parsers foaf without error in lax mode. It has to use unsupported guesswork to do so as FOAF is not fully specified as an ontology. Some clean ups needed, but comments welcome.

Fixing this has resulted in a rather cleaner RDF parser, so I am very glad for the original bug report!

@phillord phillord changed the title DRAFT: Foaf reading Foaf reading Oct 24, 2025
@phillord phillord merged commit 82e5c2b into devel Oct 31, 2025
1 check passed
@filippodebortoli filippodebortoli deleted the fix/parser-fail-on-foaf branch November 4, 2025 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant