MCPcopy Create free account
hub / github.com/KnowledgeXLab/LeanRAG / __init__

Method __init__

CommonKG/triple.py:11–14  ·  view source on GitHub ↗
(self, head, relation, tail)

Source from the content-addressed store, hash-verified

9
10class Triple:
11 def __init__(self, head, relation, tail):
12 self.head = head.strip().replace("<", "").replace(">", "")
13 self.relation = relation.strip().replace("<", "").replace(">", "")
14 self.tail = tail.strip().replace("<", "").replace(">", "")
15
16 # 可以使用str(Triple)方法来返回三元组,等同于__str__
17 def __str__(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected