Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Illustrative work on Lark-based RDFLib parser implementations, available transiently as a draft PR.
NQuads disclaimer
I haven't back-ported the NQuads parser implementation/tests to use ConjunctiveGraph, they work ust fine with the revamped Dataset codebase which I'm using by pragmatic preference. fwiw
The Lark-based TrIG parser is still W-I-P, as is the Lark-based Notation3 parser (still working out whether the 2020 grammar is backward-compatible).
In-place vs Post-parse processing
Of interest, wall-clock performance results for the larkturtle parser, comparing in-place vs "classic" post-parse (as per pymantic's implementation) graph update, with and without lark-cython plugin vs the extant RDFLib turtle parser on 50k triples produced by sp2b:
Overall State of play
NTriples
NQuads
Turtle
Parse vs Process
Additionally, I did some experimental probing of the parsing/processing situation, taking advantage of tgbugs' implementation of librdf, a wrapper for RDFLib and the Redland C-implemented RDF/XML and Turtle parsers and found some illuminating results for the Redland Turtle parser with 500k triples:
Comparative stats on 500k triples for RDFLib Turtle parsers:
Sorry it's such a scrappy interim report, I'm only in the middle of it all atm.