neosemantics
neosemantics copied to clipboard
Feature Request: n10s.inference.isTypeRel function (similar to n10s.inference.hasLabel)
When I reverse a graph looking for a path MATCH (from), (to), p = shortestPath((from) - [*..15] - (to)), usually I can filter the relationships found along the way by (using the movie ontology example):
WHERE all(r IN relationships(path) WHERE type(r) = "ACTED_IN")
However, if along the path, I do not care if the relationship is "ACT_IN" or "PRODUCED" or "DIRECTED", I hope to be able to apply the filter based on a broader concept "WORKED_IN", such as:
WHERE all(r IN relationships(path) WHERE n10s.inference.isTypeRel(r) = "WORK_IN")
Could you please design a function that can perform inference on hierarchy of relations?
I'm wondering if this feature request is clear or does it make sense? Many thanks!