n10s.inference.nodesInCategory: How to define multiple relationships for inCatRel?

Hi all,
I am working with neosemantics nodesInCategory algorithm to drive inferences. I have only seen examples where one relationship label for inCatRel was specified. My problem is, that I have two distinct relationship types that need to be considered for inCatRel (one relationship with label “is_a” and a second relationship with label “belongs_to”). I tried to list the two distinct relationship labels like this – but it doesn’t work:

MATCH (n:Resource {label: “test”}) 
CALL n10s.inference.nodesInCategory(n, {inCatRel, subCatRel: "subClassOf"}) WHERE inCatRel="is_a" XOR "belongs_to" yield node return node

Does anyone have an idea how multiple relationships can be defined for inCatRel? Thanks in advance!

Hi @johanna, I'm not sure I understand the structure of the graph you describe.
Is it something like this?


instances connecting to their class via belongs_to and classes organized hierarchically via is_a ?
Or am I getting it wrong?

Maybe you can post a cypher fragment to recreate a bit of your graph so we can try to reproduce it?