feat(kg): add markdown export format for knowledge graph
Some checks failed
tests / core (macos-latest, py3.11) (push) Has been cancelled
tests / core (macos-latest, py3.12) (push) Has been cancelled
tests / core (macos-latest, py3.13) (push) Has been cancelled
tests / core (ubuntu-latest, py3.11) (push) Has been cancelled
tests / core (ubuntu-latest, py3.12) (push) Has been cancelled
tests / core (ubuntu-latest, py3.13) (push) Has been cancelled
tests / doctor CLI smoke test (push) Has been cancelled

- Add kg_ocr/export/markdown_exporter.py with export_markdown()
- Cluster entity co-occurrences using Louvain community detection
- Wire -f markdown into `ocr-pipeline kg export` CLI command with KG_REPORT.md default
- Add unit and CLI tests in tests/test_graph.py
- Document markdown export in README.md
- Untrack pycache binaries and ignore graphify-out and KG_REPORT.md
This commit is contained in:
2026-09-18 16:40:21 +02:00
parent c5bf5d2b0c
commit 05aed7366d
12 changed files with 416 additions and 60 deletions

View File

@@ -1,3 +1,4 @@
from .markdown_exporter import export_markdown
from .neo4j_exporter import Neo4jExporter, export_graphml, export_json, load_json
__all__ = ["Neo4jExporter", "export_graphml", "export_json", "load_json"]
__all__ = ["Neo4jExporter", "export_graphml", "export_json", "export_markdown", "load_json"]