| from __future__ import annotations | |
| import random | |
| import sys | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parent.parent | |
| sys.path.insert(0, str(ROOT)) | |
| from app.pipeline.orchestrator import _require_visible_rewrite, _try_restructure_unit | |
| from app.pipeline.restructure import restructure_sentence | |
| samples = [ | |
| "Ram went to school yesterday happily.", | |
| "Nowadays many people are living an unhealthy life because they don't have enough time.", | |
| "Online learning makes education more accessible for students in remote areas.", | |
| "Sleeping is still an important thing.", | |
| "Climate change is causing more extreme weather events around the world.", | |
| "Without enough sleep, the brain cannot work properly.", | |
| ] | |
| for s in samples: | |
| rr = restructure_sentence(s) | |
| print("SRC:", s) | |
| print(" rr:", None if not rr else (rr.template_id, rr.text)) | |
| print(" try:", _try_restructure_unit(s)) | |
| print(" vis:", _require_visible_rewrite(s, s, "Neutral", random.Random(1))) | |
| print() | |