* local question answering over analysis notebooks with LightRAG, Neo4j, Qdrant and Ollama * RAGAS evaluation with a generator x judge comparison matrix, fully local * docs in README and OKF
25 lines
871 B
Python
25 lines
871 B
Python
"""Quick sanity check for the extractor — prints stats only, no content."""
|
|
from pathlib import Path
|
|
from askme.ingestion.extract import extract, supported_suffixes
|
|
|
|
archive = Path("/usr/askme/data/notebook_archive")
|
|
|
|
_SKIP = {"site-packages", "__pycache__", "x86_64-pc-linux-gnu-library"}
|
|
|
|
for suffix in sorted(supported_suffixes()):
|
|
files = [
|
|
p for p in archive.rglob("*")
|
|
if p.suffix.lower() == suffix
|
|
and not any(s in p.parts for s in _SKIP)
|
|
]
|
|
if not files:
|
|
print(f"{suffix}: no files found")
|
|
continue
|
|
sample = files[0]
|
|
try:
|
|
text = extract(sample)
|
|
lines = text.splitlines() if text else []
|
|
print(f"{suffix}: {len(files)} files | sample '{sample.name}' → {len(text)} chars, {len(lines)} lines")
|
|
except Exception as e:
|
|
print(f"{suffix}: ERROR on '{sample.name}': {e}")
|