INNER CODE UNIT · Python

export_cypher_cmd

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

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

    Binary edges become relationships. N-ary edges become Hyperedge nodes
    with IN membership (not a pairwise clique).
    """
    from hyperextract.utils.exporters.common import resolve_export_file
    from hyperextract.utils.exporters.ka import GraphTypeError, export_ka_cypher

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

    output_path = Path(output)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…