kg: graph build, traversal queries, neo4j export - kg_ocr.graph builds a networkx graph (docs, chunks, entities, citations, co-occurrence) from chunk markdown - analyzer for summaries, top entities/citations, anomaly checks - traversal: chunks_for_entity/citation, related_entities, expand_context - export: JSON round-trip, GraphML, batched MERGE into neo4j - new CLI: ocr-pipeline kg build|stats|query|export - lazy kg_ocr imports, networkx/neo4j behind extras - dropped dead watch.py shim, added KgConfig stub - trimmed README, updated TODO
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

This commit is contained in:
2026-07-20 19:50:38 +02:00
parent 39655fc35f
commit 7503a441c2
29 changed files with 1343 additions and 160 deletions

View File

@@ -0,0 +1,39 @@
from .analyzer import (
Anomaly,
detect_anomalies,
summary,
top_citations,
top_cooccurrences,
top_entities,
)
from .builder import (
ChunkRecord,
build_from_directory,
build_graph,
find_chunk_files,
parse_chunk_file,
)
from .traversal import (
chunks_for_citation,
chunks_for_entity,
expand_context,
related_entities,
)
__all__ = [
"Anomaly",
"ChunkRecord",
"build_from_directory",
"build_graph",
"chunks_for_citation",
"chunks_for_entity",
"detect_anomalies",
"expand_context",
"find_chunk_files",
"parse_chunk_file",
"related_entities",
"summary",
"top_citations",
"top_cooccurrences",
"top_entities",
]