INNER CODE UNIT · Python

_load_graph_ka_for_export

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

def _load_graph_ka_for_export(ka_path: str):
    """Load a graph-family KA for GraphML / CSV export."""
    path = validate_ka_with_data(ka_path)
    template, lang = get_template_from_ka(path)

    validate_config()

    with console.status("[bold blue]Loading Knowledge Abstract..."):
        try:
            ka = Template.create(template, lang)
            ka.load(path)
        except Exception as e:
            console.print(f"[red]Error loading Knowledge Abstract:[/red] {e}")
            raise typer.Exit(1)

    from hyperextract.utils.exporters.ka import (
        GRAPH_TYPE_ERROR,
        GraphTypeError,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…