| 15 | |
| 16 | class PaperNode: |
| 17 | def __init__(self, attrs): |
| 18 | self.title = attrs.get("title", "") |
| 19 | self.arxiv_id = attrs.get("arxiv_id", "") |
| 20 | self.depth = attrs.get("depth", -1) |
| 21 | self.child = {k: [PaperNode(i) for i in v] for k, v in attrs.get("child", {}).items()} |
| 22 | self.abstract = attrs.get("abstract", "") |
| 23 | self.sections = attrs.get("sections", "") # section name -> list of citation papers |
| 24 | self.source = attrs.get("source", "Root") # Root, Search, Expand |
| 25 | self.select_score = attrs.get("select_score", 0.0) # the result of the selecte model |
| 26 | self.extra = attrs.get("extra", {}) |
| 27 | |
| 28 | def todic(self): |
| 29 | return { |