MCPcopy Index your code
hub / github.com/clips/pattern / properties

Function properties

pattern/graph/commonsense.py:58–62  ·  view source on GitHub ↗
(concept, depth=2, centrality=BETWEENNESS)

Source from the content-addressed store, hash-verified

56 return concept.flatten(depth=depth)
57
58def properties(concept, depth=2, centrality=BETWEENNESS):
59 g = concept.graph.copy(nodes=halo(concept, depth))
60 p = (n for n in g.nodes if n.id in concept.graph.properties)
61 p = [n.id for n in reversed(sorted(p, key=lambda n: getattr(n, centrality)))]
62 return p
63
64#--- RELATION --------------------------------------------------------------------------------------
65

Callers

nothing calls this directly

Calls 2

haloFunction · 0.85
copyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…