diff --git a/graphify/build.py b/graphify/build.py index 655820c0..0975d7a5 100644 --- a/graphify/build.py +++ b/graphify/build.py @@ -25,6 +25,9 @@ def build_from_json(extraction: dict) -> nx.Graph: attrs["_src"] = src attrs["_tgt"] = tgt G.add_edge(src, tgt, **attrs) + hyperedges = extraction.get("hyperedges", []) + if hyperedges: + G.graph["hyperedges"] = hyperedges return G diff --git a/graphify/export.py b/graphify/export.py index e733221d..92991793 100644 --- a/graphify/export.py +++ b/graphify/export.py @@ -55,6 +55,58 @@ def _html_styles() -> str: """ +def _hyperedge_script(hyperedges_json: str) -> str: + return f"""""" + + def _html_script(nodes_json: str, edges_json: str, legend_json: str) -> str: return f"""