我在试着从grakn中输出边缘。我可以通过Python客户机这样做:
edge_query = "match $c2c($c1, $c2) isa c2c; $c1 has id $id1; $c2 has id $id2;get $id1,$id2;"
with open(f"grakn.edgelist","w") as outfile:
with GraknClient(uri="localhost:48555") as client:
with client.session(keyspace=KEY
我在Windows 10上使用grakn core 1.8.4。grakn服务器和grakn存储正常启动,但在尝试加载模式时,Grakn返回以下错误消息: Unable to create connection to Grakn instance at localhost:48555
Cause: io.grpc.StatusRuntimeException
UNKNOWN: ID block allocation on partition(30)-namespace(0) timed out in 2.000 min. Please check server logs for the st
根据
Grakn知识图中的属性与关系数据库中的列建模不同。在本例中,属性开始日期的值为(例如2019-01-01 ),在知识图中只存在一次,并且在可能拥有它的任意多个实例之间共享。当我们需要查询任何具有值为2019-01-01的开始日期属性的知识图时,这是非常有用的。在这种情况下,我们将获得从2019年第一天开始的所有住宿和旅行。在对属性类型的实例执行写操作时,记住这一点很重要。
这会让我认为grakn.ai基本上只在其数据库中存储一个属性值一次。
现在我已经运行了以下两次
define unit sub attribute, datatype string;
define mass
我正在浏览一些文档,。
我很好奇,为什么Grakn选择用名词语义而不是动词语义来表示关系呢?在我讨论过的大多数其他图表工作和研究中,通常认为两个实体(名词)通过动词(例如person worked at company )联系在一起是有意义的。实际上,对于我正在处理的几个实体来说,将关系作为名词进行推理有点困难--例如,如果是artist remixed track。
我倾向于使用动词作为关系,但我想知道,在Grakn设置中,这是不是我应该考虑的问题。如果我决定使用动词语义学,最终会遇到困难吗?
我使用的是Grakn 1.8.1、python 3.6.8、grakn-client 1.8.1和grpcio 1.24.1。
我定义了一个简单的模式(schema.gql)来执行测试:
define
nome sub attribute,
value string;
cpf_srfb sub attribute,
value string;
id_srfb sub attribute,
value string;
hops_de_contraparte sub attribute,
value string;
pessoa_fisica sub en
我希望使用Python客户机获得集群(或连接组件)。我可以用graql做这件事:
compute cluster in [company, c2c], using connected-component, where contains=V86179944;
我也可以使用Python运行查询:
query = "compute cluster in [company, c2c], using connected-component, where contains=V86179944;"
with GraknClient(uri="localhost:48555")