Skip to content

Add 'generalized statements' option inference based on format#164

Merged
niegrzybkowski merged 5 commits intomainfrom
GH-155/mark-generalized-statements-unused
Jul 21, 2025
Merged

Add 'generalized statements' option inference based on format#164
niegrzybkowski merged 5 commits intomainfrom
GH-155/mark-generalized-statements-unused

Conversation

@niegrzybkowski
Copy link
Contributor

Closes #155

I'm not sure how to handle NTriples and NQuads, since we have our own parser that supports generalized rdf. I pushed a failing test to demonstrate ("when input stream to output stream, generalized RDF (N-Quads)").
The simplest would be to set the inference to allow generalized RDF, but I feel like the better solution would be to validate whether we're not receiving generalized statements as part of the input and emit a warning if an invalid jelly file was produced.

The test for jelly-text option copying needs to call testMode otherwise the input stream is overwritten with an empty one. I have no idea why that happens, and why it doesn't happen anywhere else.

@niegrzybkowski niegrzybkowski self-assigned this Jul 18, 2025
@niegrzybkowski niegrzybkowski linked an issue Jul 18, 2025 that may be closed by this pull request
Copy link
Member

@Ostrzyciel Ostrzyciel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The simplest would be to set the inference to allow generalized RDF

This is a valid solution.

but I feel like the better solution would be to validate whether we're not receiving generalized statements as part of the input and emit a warning if an invalid jelly file was produced.

Unless you have a crystal ball, that's impossible :) this is a streaming algorithm, so we don't know what's coming, and we cannot peek ahead. The stream may be infinite, but your memory is finite.

@niegrzybkowski niegrzybkowski marked this pull request as ready for review July 18, 2025 13:44
@niegrzybkowski niegrzybkowski enabled auto-merge (squash) July 18, 2025 13:54
@niegrzybkowski niegrzybkowski merged commit 6abd764 into main Jul 21, 2025
7 checks passed
@niegrzybkowski niegrzybkowski deleted the GH-155/mark-generalized-statements-unused branch July 21, 2025 06:32
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.

Mark generalized statements as unused for most input formats

2 participants