Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-10-2022 05:36 AM - edited 11-10-2022 06:20 AM
Hi Folks, currently, I want to use the ontology function of the NEO4j. According to the tutorials, https://neo4j.com/labs/neosemantics/4.0/inference/. I can use this to do reasoning.
MATCH (cat:LCSHTopic { authoritativeLabel: "Crystallography"}) CALL n10s.inference.nodesInCategory(cat, { inCatRel: "HAS_SUBJECT", subCatRel: "NARROWER_THAN"}) yield node return node.title as work;
But in my case, there are two paths of reaching the entity I want. Red color is the ontology, blue color is the instances. How do I inference with from 'Pressing' in red color to PressToolFunction in blue color?
The tutorials from the internet only show one path in the ontology side. But in my case, I have two paths in the onlogy side, how do I do this? My following code doesn't work.
call n10s.graphconfig.init({ handleVocabUris: "IGNORE", classLabel: "Concept", subClassOfRel: "SCO"});
MATCH (x:Concept { name: "Pressing"})
CALL n10s.inference.nodesInCategory(x, { inCatRel: "InstanceCapability", subCatRel: "SCO" ,"SCO_RESTRICTION"}) yield node AS capability
WITH capability, d MATCH (capability)-[:isTheCapabilityOf]->(dev:Devices)
RETURN *
Besides, when I firstly define the relationship in ontology, all of the relationship will be called either 'SCO' or 'SCO_RESTRICTION', is there any specific command to choose part of the relationship? For example, I only want to choose the 'SCO_RESTRICTION‘ with the 'onPropertyName' hasInputCapability
All the sessions of the conference are now available online