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

Method relation

pattern/text/tree.py:329–333  ·  view source on GitHub ↗

Yields the first relation id of the chunk.

(self)

Source from the content-addressed store, hash-verified

327
328 @property
329 def relation(self):
330 """ Yields the first relation id of the chunk.
331 """
332 # [(2,OBJ), (3,OBJ)])] => 2
333 return len(self.relations) > 0 and self.relations[0][0] or None
334
335 @property
336 def role(self):

Callers 1

test_queryMethod · 0.80

Calls 1

lenFunction · 0.85

Tested by 1

test_queryMethod · 0.64