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

Allow distinct blank node contexts from one NTriples parser to the next (#980) #1107

Conversation

mwatts15
Copy link
Contributor

@mwatts15 mwatts15 commented May 31, 2020

Partial solution to #980. Allows to re-use a blank nodes across calls to parse while still allowing to keep the same context when desired.

Didn't touch derived parsers (NT, NQuads). Can do if the proposed interface is acceptable.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 75.802% when pulling 92f66b3 on mwatts15:feature/#980-ntriples-blank-node-collisions into 037ea51 on RDFLib:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 75.802% when pulling 92f66b3 on mwatts15:feature/#980-ntriples-blank-node-collisions into 037ea51 on RDFLib:master.

@nicholascar
Copy link
Member

Thanks @mwatts15, looks good! So, you're slowly chipping away at the long-standing RDFlib issue of BNodes? I do like the idea of passing a context to make BNs the same, if that's what a user wants. Or just to leave them defined per-graph by leaving out a context. Gives the users options.

@nicholascar nicholascar merged commit 6b5bd37 into RDFLib:master Jun 1, 2020
@mwatts15
Copy link
Contributor Author

mwatts15 commented Jun 1, 2020

So, you're slowly chipping away at the long-standing RDFlib issue of BNodes?

Eh. I don't really like blank nodes, but I think people will want to use them in what I'm building, so I'd like to make it less painful for myself. Also, have seen a few PRs on RDFLib that I could review, but it's easier for me to just give an example of what might be a better approach.

Going to make another PR since this one doesn't completely address #980 (doesn't handle the format='nt' option to parse). Will also cover NQuads. Implementation will be different to support that.

This was referenced Jun 1, 2020
@mwatts15 mwatts15 deleted the feature/rdflib/rdflib#980-ntriples-blank-node-collisions branch June 1, 2020 12:54
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.

None yet

3 participants