Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KnowledgeSpaceNet API 需求:外联知识节点查询方法 #7

Open
ben7th opened this issue Oct 12, 2013 · 1 comment
Open

KnowledgeSpaceNet API 需求:外联知识节点查询方法 #7

ben7th opened this issue Oct 12, 2013 · 1 comment

Comments

@ben7th
Copy link
Contributor

ben7th commented Oct 12, 2013

每个知识空间节点都有若干个外联知识节点。
外联知识节点的定义是:

从当前知识空间节点(ks)内包含的知识节点集合 K(k1, k2, k3 ...),取得这些知识节点的所有子节点集合 U
集合U中所有节点,符合以下条件的,是外联节点:
1 该子节点本身,不包含在 K 中。
2 该子节点所有的父节点,都包含在 K 中。

如果知识网络中的任何根节点,不包含在K中,那么该根节点也作为ks的外联节点。

举例:

  k1 ==> k2 ==> k4
           \
             \
  k3 =========> k5

当知识网络按照上述分布时。

如果当前存在知识空间节点 KS1{k1}
则 KS1 的外联节点为 [k2, k3]。
其中k2是k1的子节点,而k3是知识网络的根节点。

如果当前存在知识空间节点 KS1{k1,k3}
则 KS1 的外联节点为 [k2, k3]。
其中k2是k1的子节点,且k2的所有父节点[k1]都在KS1中。
而k3是知识网络的根节点。
注意,k5不是KS1的外联节点,因为 k5 的父节点 k2 现在不在KS1中

如果当前存在知识空间节点 KS1{k1,k2,k3}
则 KS1 的外联节点为 [k4, k5]。


综上,根据以上规则,在 KnowledgeSpaceNode上实现实例方法

outer_nodes = konwledge_space_node.outer_nodes

此方法返回当前知识空间节点的外联知识节点。

@pimgeek
Copy link

pimgeek commented Feb 20, 2014

outer_nodes = konwledge_space_node.outer_nodes 中,= 右侧应该写作 knowledge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants