feat(chunks): sentence-boundary flush, math incomplete detection, structure profile export
- chunker: estrai _flush_chunk() con estensione al confine di frase (max 120%) - verify: rileva chunk matematici incompleti come warning, gestisci hash hex e URL - conversione: esporta structure_profile.json nell'output dir
This commit is contained in:
@@ -1538,6 +1538,9 @@ def run(stem: str, project_root: Path, force: bool) -> bool:
|
||||
print(f" ✗ Permesso negato durante la scrittura: {e}")
|
||||
return False
|
||||
profile = analyze(clean_out)
|
||||
(out_dir / "structure_profile.json").write_text(
|
||||
json.dumps(profile, ensure_ascii=False, indent=2), encoding="utf-8"
|
||||
)
|
||||
|
||||
_LIVELLO_DESC = {3: "ricca (h3)", 2: "parziale (h2)", 1: "paragrafi", 0: "testo piatto"}
|
||||
print(f" ✅ Struttura: livello {profile['livello_struttura']} — {_LIVELLO_DESC[profile['livello_struttura']]}")
|
||||
|
||||
Reference in New Issue
Block a user