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

feat: bnode relabelling param #1107

Merged
merged 8 commits into from
May 27, 2024
Merged

feat: bnode relabelling param #1107

merged 8 commits into from
May 27, 2024

Conversation

jeswr
Copy link
Member

@jeswr jeswr commented May 27, 2024

No description provided.

Copy link
Contributor

@phochste phochste left a comment

Choose a reason for hiding this comment

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

The option is --no-bnode-relabeling not --no-bnode-relabelling

@phochste

This comment was marked as off-topic.

Comment on lines 281 to 288

it('should execute the n3reasoner on surface query', async () => {
await expect(n3reasoner(surfaceQueryQuads)).rejects.toThrow(/inference_fuse/);
});

it('should execute the n3reasoner on surface query [bnodeRelabeling: false]', async () => {
await expect(n3reasoner(surfaceQueryQuads, undefined, { bnodeRelabeling: false })).rejects.toThrow(/inference_fuse/);
});
Copy link
Member Author

Choose a reason for hiding this comment

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

@phochste at the moment we are getting an inference fuse thrown regardless of whether or not bnodeRelabeling is enabled. Can you provide a test case that distinguishes between the two? Note the --pass-only-new flag is also enabled in this test due to

args.push('--pass-only-new');
.

@jeswr jeswr mentioned this pull request May 27, 2024
@phochste
Copy link
Contributor

phochste commented May 27, 2024

The inference fuse can be tested with :

@prefix : <https://example.org/ns#> .
@prefix log: <http://www.w3.org/2000/10/swap/log#> .

:ABC a :DepartmentPreference .
:ABC a :ResearcherPreference .

(_:WHAT) log:onNegativeSurface {
    _:WHAT a :DepartmentPreference .
    _:WHAT a :ResearcherPreference .
} .

With bnodeRelabeling: false it should fuse, without it should pass.

@jeswr jeswr enabled auto-merge (squash) May 27, 2024 14:36
Comment on lines 305 to 306
// see https://github.com/rdfjs/N3.js/issues/332
.map(quad => mapTerms(quad, term => term.termType === 'BlankNode' ? DataFactory.blankNode(term.value.replace(/\./g, '__dot__')) : term))
Copy link
Member Author

Choose a reason for hiding this comment

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

We should get rid of this once rdfjs/N3.js#332 is resolved.

@jeswr jeswr merged commit f4bae87 into main May 27, 2024
19 checks passed
@jeswr jeswr deleted the feat/bnode-relabelling-param branch May 27, 2024 15:15
@jeswr
Copy link
Member Author

jeswr commented May 27, 2024

🎉 This PR is included in version 16.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jeswr jeswr added the released label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants