(self, head, relation, tail)
| 9 | |
| 10 | class 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): |
nothing calls this directly
no outgoing calls
no test coverage detected