# -*- coding: utf-8 -*-
import sys, io, re, pathlib, html as H
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8", errors="replace")
CACHE = pathlib.Path(r"D:\work buddy\2026-11-05-14-15-52\cache")

def txt(x):
    x = re.sub(r"<[^>]+>", " ", x)
    return re.sub(r"\s+", " ", H.unescape(x)).strip()

raw = (CACHE / "bursar-fall26.html").read_text(encoding="utf-8", errors="ignore")
t = txt(raw)
for kw in ["Analytics", "Computing", "Bioinformatics", "Mechanical", "Statistics", "Human-Computer"]:
    print(kw, [t[max(0, m.start()-90):m.start()+120] for m in re.finditer(kw, t)][:2])
