简体   繁体   English

如何在Cayley图中获取谓词列表

[英]How to get a list of predicates in Cayley graph

I have been playing around with the functionalities of open source Knowledge Graph implementation - Cayley https://github.com/cayleygraph/cayley/blob/master/docs/Quickstart-As-Application.md 我一直在研究开源知识图实现的功能-Cayley https://github.com/cayleygraph/cayley/blob/master/docs/Quickstart-As-Application.md

It is interesting to know the queries are formulated naturally such as 有趣的是,查询是自然形成的,例如

  // Let's get the list of actors in the film gV().Has("<name>","Casablanca") .Out("</film/film/starring>").Out("</film/performance/actor>") .Out("<name>").All() 

I would like to understand how can I get the list of all "predicates" that is valid for a node? 我想了解如何获取对节点有效的所有“谓词”列表? One way I can think about is to manually go through the data dump (triplets). 我可以考虑的一种方法是手动进行数据转储(三胞胎)。 Is there any programatic way? 有什么编程方式吗? or any schema querying tool available for this? 或任何可用的模式查询工具?

I have found out that the answer is straight forward but linked deep under the documentation of Gremlin API docs. 我发现答案很简单,但是在Gremlin API文档的文档中却有很深的联系。

The Gremlin API provides, path.OutPredicates() path.InPredicates() Gremlin API提供了path.OutPredicates()path.InPredicates()

https://github.com/cayleygraph/cayley/blob/master/docs/GremlinAPI.md#pathoutpredicates https://github.com/cayleygraph/cayley/blob/master/docs/GremlinAPI.md#pathoutpredicates

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM