(self)
| 15 | |
| 16 | # 可以使用str(Triple)方法来返回三元组,等同于__str__ |
| 17 | def __str__(self): |
| 18 | return f"<{self.head}>\t<{self.relation}>\t<{self.tail}>" |
| 19 | @classmethod |
| 20 | def triple_json_format(self, triple, doc_name="", source_id=""): |
| 21 | return {"triple": triple, "doc_name": doc_name, "source_id": source_id} |
nothing calls this directly
no outgoing calls
no test coverage detected