INNER CODE UNIT · Python

export_graphml_cmd

yifanfeng97/Hyper-Extract · hyperextract/cli/cli.py:612

def export_graphml_cmd(
    ka_path: str = typer.Argument(..., help="Knowledge Abstract directory"),
    output: str = typer.Option(..., "--output", "-o", help="Output GraphML file"),
    force: bool = typer.Option(
        False, "--force", "-f", help="Overwrite an existing GraphML file"
    ),
):
    """Export a knowledge graph to GraphML.

    Binary edges are written as `<edge source target>`. Edges with three
    or more endpoints are written as GraphML 1.0 `<hyperedge>` elements.
    """
    from hyperextract.utils.exporters import GraphMLHypergraphError
    from hyperextract.utils.exporters.common import resolve_export_file
    from hyperextract.utils.exporters.ka import GraphTypeError, export_ka_graphml

    logger.info("command=export-graphml ka_path=%s output=%s", ka_path, output)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…