# -*- coding: utf-8 -*-
"""r351：CMU SCS/INI 5 条 + UChicago 3 条，按官网原文重建详情页（detail_render 专用 spec）。"""
import json, os, pathlib

BASE = pathlib.Path(r"D:\work buddy\2026-11-05-14-15-52")
OUT = BASE / "_r351_specs"
OUT.mkdir(exist_ok=True)

CMU_SCS_TUI = "https://www.cmu.edu/sfs/tuition/graduate/scs.html"
CMU_INI_TUI = "https://www.cmu.edu/ini/admissions/financial/tuition.html"
CMU_SCS_ADM = "https://www.cs.cmu.edu/academics/graduate-admissions"

SCS_FEE_ROWS = [
    {"k": "硕士学费（2026-27）", "v": "SCS Master's Program 学年 $62,200；秋季 $31,100、春季 $31,100；按学分 $864/unit（校方注明为参考费率，实际以院系账单为准）", "src": CMU_SCS_TUI},
    {"k": "学杂费（每学年）", "v": "Student Activities Fee $248（秋季 $124 + 春季 $124）；Technology Fee $490；Transportation Fee $302", "src": CMU_SCS_TUI},
    {"k": "住宿与餐饮", "v": "住宿 $14,752/学年；餐饮 $8,664/学年（校方 Cost of Attendance 口径）", "src": CMU_SCS_TUI},
    {"k": "书本与保险", "v": "书本与材料 $2,212/学年；健康保险 $3,352/学年（校内保险计划估算）", "src": CMU_SCS_TUI},
    {"k": "个人与交通", "v": "个人及杂项 $4,098/学年；旅行 $1,756/学年；贷款手续费 $1,500/学年（仅贷款学生）", "src": CMU_SCS_TUI},
    {"k": "非学费合计", "v": "校方列示 TOTAL 为 $37,374 + 学费/学年（秋季 $20,363 + 学费、春季 $17,011 + 学费）", "src": CMU_SCS_TUI},
    {"k": "资助口径", "v": "SCS 仅对博士生提供全额资助；硕士按自费口径准备（本条为校方 SFS 页面口径，非项目承诺）"},
]


def spec_base(i, out, cn, en, school, short, badges):
    return {
        "id": i, "out": out, "date": "2026-12-02",
        "cn": cn, "en": en, "school": school, "school_short": short,
        "ranks": [], "badges": badges, "cards": [], "links": [],
    }


# ---------------------------------------------------------------- 1. CMU MSIS
msis = spec_base(
    "cmu-msis", "details/cmu-msis.html",
    "信息安全硕士（M.S. in Information Security · MSIS · 123 units · 2026-27 课程表）",
    "M.S. in Information Security (MSIS), Information Networking Institute (INI), College of Engineering, Carnegie Mellon University",
    "卡内基梅隆大学 Carnegie Mellon University", "卡内基梅隆",
    ["123 units（核心 75 + 选修 48）", "INI · 工程学院", "2026-27 课程表 MS38", "GRE 不要求（Fall 2027）"],
)
msis["cards"] = [
    {"key": "req", "rows": [
        {"k": "学位与成绩要求", "v": "须持本科学位；GPA 不低于 3.0（4 分制）。INI 官网列此为申请门槛，未设专业限制", "src": "https://www.cmu.edu/ini/admissions/howtoapply.html"},
        {"k": "申请截止（2027 秋）", "v": "优先轮 2026-12-01；最终轮 2027-01-29；均为美东 23:59（官网注明后续轮次为暂定、可能调整）", "src": "https://www.cmu.edu/ini/admissions/howtoapply.html"},
        {"k": "语言要求", "v": "TOEFL（iBT/Home/Essentials/MyBest）0–120 制总分 ≥98，且阅读 22、听力 22、口语 20、写作 22；1–6 制总分 ≥5，小分阅读 4.5、听力 5、口语 4、写作 4.5；IELTS Academic 总分 ≥7.0；Duolingo ≥115，小分 Literacy 105 / Comprehension 115 / Production 90 / Conversation 95", "src": "https://www.cmu.edu/ini/admissions/howtoapply.html"},
        {"k": "语言豁免", "v": "在美国完成全部四年住校本科者豁免；持英国或加拿大国籍且母语为英语者豁免；成绩须两年内有效、由考试机构电子送分", "src": "https://www.cmu.edu/ini/admissions/howtoapply.html"},
        {"k": "标化要求", "v": "官网原文：当前不索取、也不审阅 GRE General 成绩（Fall 2027 申请周期）；未来学期可能变化", "src": "https://www.cmu.edu/ini/admissions/howtoapply.html"},
        {"k": "申请费", "v": "$75，不可退；参加宣讲会可获免申请费", "src": "https://www.cmu.edu/ini/admissions/howtoapply.html"},
        {"k": "先修课", "v": "MSIS 学生须修 14-513 Introduction to Computer Systems；它是全部 systems core 的先修，官网强烈建议第一学期修", "src": "https://www.cmu.edu/ini/academics/msis/curriculum_ms38.html"},
    ], "links": [{"label": "INI 申请说明", "url": "https://www.cmu.edu/ini/admissions/howtoapply.html"}]},
    {"key": "fee", "rows": [
        {"k": "学期学费（2026-27）", "v": "$30,755/学期（按学期计费，含夏季学期在内每学期注册即计）", "src": CMU_INI_TUI},
        {"k": "按学分费率", "v": "任一学期注册不足 36 units 时按学分计：2026-27 为 $855/unit", "src": CMU_INI_TUI},
        {"k": "入学前夏季", "v": "正式入学前夏季修课按 Visiting/Non-Degree 费率：Summer 2026 为 $559/unit", "src": CMU_INI_TUI},
        {"k": "校方固定杂费", "v": "Activity Fee 每学期 $122；Public Transportation Fee 每学期 $151（匹兹堡/硅谷本地学生均计）；Technology Fee 每学期 $245", "src": CMU_INI_TUI},
        {"k": "书本与保险", "v": "Books and Supplies $2,400/学年；Health Insurance $3,165/学年（估算，可按同等保险申请 waiver）", "src": CMU_INI_TUI},
        {"k": "生活成本", "v": "Living Expenses $32,590/学年（INI 官网 AY 估算口径）", "src": CMU_INI_TUI},
        {"k": "资助", "v": "INI 设奖学金（直接抵扣学费账户，不发放给学生本人）；国际生须提交 Financial Statement 证明最低估算成本", "src": CMU_INI_TUI},
    ], "links": [{"label": "INI 学费与杂费", "url": CMU_INI_TUI}]},
    {"key": "course", "rows": [
        {"k": "系统核心（12 units，五选一）", "v": "14-642 Introduction to Embedded Systems（秋）、14-736 Distributed Systems: Techniques, Infrastructure, and Services（春）、15-605 Operating System Design and Implementation、15-640 Distributed Systems、15-746/18-746 Storage Systems（秋）"},
        {"k": "网络核心（12 units，四选一）", "v": "14-740 Fundamentals of Telecommunications and Computer Networks、14-760 Advanced Real-World Data Networks（春）、15-641 Networking and the Internet、18-756 Packet Switching and Computer Networks（秋）"},
        {"k": "安全核心（24 units）", "v": "必修 14-741 Introduction to Information Security（12 units）；再从 14-742 Security in Networked Systems（春）、14-735 Secure Coding（秋）、14-828 Browser Security（春）、18-731 Network Security、18-732 Secure Software Systems（春）、18-733 Applied Cryptography（春）、18-734/17-731 Foundation of Privacy 中选 1 门（12 units）"},
        {"k": "商业与管理核心", "v": "14-817 Cyber Risk Modeling（12 units）"},
        {"k": "学位专属核心（12 units）", "v": "另修 1 门研究生层次安全课，须取自 MSIS 预批准安全课清单"},
        {"k": "学术与职业发展", "v": "14-601 Academic & Professional Development（3 units）"},
        {"k": "选修（48 units）", "v": "可选 INI、电子与计算机工程（ECE）、计算机科学学院（SCS）、工程与公共政策（EPP）、娱乐技术中心（ETC）、Integrated Innovation Institute（III）课程，以及经批准的 Heinz 与 Tepper 课程（有例外条款）"},
    ], "links": [{"label": "MSIS 2026-27 课程表（MS38）", "url": "https://www.cmu.edu/ini/academics/msis/curriculum_ms38.html"}]},
    {"key": "plan", "rows": [
        {"k": "总学分结构", "v": "核心 75 units + 项目选修 48 units = 123 units；另需满足 14-513 先修"},
        {"k": "入学学期", "v": "官网：MSIS 学生可秋季或春季入学；课程规划文档按秋季入学示例编排"},
        {"k": "网络安全取证与响应方向", "v": "CyFIR Track：以 48 units 选修组合完成，须先与导师确认选课顺序"},
        {"k": "学术导师", "v": "每名学生配一名专职教师学术导师；另有教务与学服团队提供注册与选课支持"},
        {"k": "开课免责", "v": "INI 不保证每学期或指定学期开课、也不保证选到某门课；须以 Schedule of Classes 为准（同样适用于 CMU 其他院系课程）", "src": "https://www.cmu.edu/ini/academics/msis/curriculum_ms38.html"},
    ], "links": [{"label": "MSIS 项目页", "url": "https://www.cmu.edu/ini/academics/msis/index.html"}]},
    {"key": "outcome", "rows": [
        {"k": "就业数据", "v": "INI 项目页与 2026-27 课程表未列就业率、起薪中位数与雇主名单，本页不估算"},
        {"k": "可查路径", "v": "INI 官网设 Career Services 与 Career and Internship Outcomes 栏目，具体数字以该栏目当年公布为准（本轮未取到可静态读取的数据页）"},
        {"k": "项目定位", "v": "官网：MSIS 属工程学院 INI，课程覆盖系统、网络与安全三条主线，并要求商业风险管理与职业发展课程"},
    ]},
    {"key": "city", "type": "text", "title": "院校与城市速览（供沟通参考）",
     "text": "INI 位于匹兹堡校区 4616 Henry Street（电话 412-268-7195），与 CMU 主校区相连；匹兹堡校区另设硅谷（Silicon Valley）授课点，MSIT-IS 与 MSMITE 为双城项目。官网同时提示：本地居住学生（匹兹堡或硅谷地区）无论住校内外均计交通费。校区与住宿安排以录取后通知为准，本段仅供沟通参考。"},
    {"key": "quote", "type": "text", "title": "官网原文要点摘录（英文原句，便于核对）",
     "text": "1) \"The following curriculum applies to MSIS students starting their INI program in the 2026-27 academic year (MS38 cohort).\" 2) \"MSIS students are required to take 14-513: Introduction to Computer Systems. This is a required prerequisite for all systems core courses.\" 3) \"Tuition for the 2026-27 academic years is set at $30,755/semester.\" 4) \"If students are registered for fewer than 36 units in any given semester ... they will be assessed tuition at the per unit tuition rate ... $855/unit.\" 5) \"All deadlines are 11:59 p.m. ET on the dates below.\" 6) \"We currently do not request or require Graduate Record Examination (GRE) General Test scores and will not review them during the admissions process for Fall 2027.\" 7) \"The INI cannot guarantee that courses will be offered each semester or in a specific semester as advertised on this page.\" 8) \"Students who receive tuition scholarships through the INI will not receive these funds directly. The INI will apply the tuition scholarship to the student's account.\""},
]
msis["links"] = [
    {"label": "MSIS 2026-27 课程表（MS38）", "url": "https://www.cmu.edu/ini/academics/msis/curriculum_ms38.html"},
    {"label": "INI 申请说明（截止/语言/标化）", "url": "https://www.cmu.edu/ini/admissions/howtoapply.html"},
    {"label": "INI 学费与杂费（2026-27）", "url": CMU_INI_TUI},
    {"label": "MSIS 项目页", "url": "https://www.cmu.edu/ini/academics/msis/index.html"},
    {"label": "INI 官网", "url": "https://www.cmu.edu/ini/"},
]

# ---------------------------------------------------------------- 2. CMU MSML
ml = spec_base(
    "cmu-ml", "details/cmu-ml.html",
    "机器学习硕士（M.S. in Machine Learning · 6 核心 + 3 选修 + 1 实习 · MLD/SCS）",
    "Master of Science in Machine Learning (MSML), Machine Learning Department, School of Computer Science, Carnegie Mellon University",
    "卡内基梅隆大学 Carnegie Mellon University", "卡内基梅隆",
    ["6 门核心 + 3 门选修 + 1 学期实习", "3 学期可完成", "SCS 统一截止", "GRE 可选（2027 秋入学）"],
)
ml["cards"] = [
    {"key": "req", "rows": [
        {"k": "申请节奏", "v": "官网：每年只在 12 月受理申请，全部学生 8 月入学；不接受其他入学季", "src": "https://ml.cmu.edu/academics/primary-ms-machine-learning-masters"},
        {"k": "申请截止（2027 秋）", "v": "SCS 统一口径：提前轮 2026-11-18、最终轮 2026-12-09（均美东 15:00）；申请费提前轮 $80/项目、之后 $100", "src": CMU_SCS_ADM},
        {"k": "语言要求", "v": "TOEFL（首选）/ IELTS / Duolingo 三选一，非母语不豁免；SCS 列近年录取区间：TOEFL iBT 105–114、IELTS 7–8、Duolingo 130–155", "src": CMU_SCS_ADM},
        {"k": "标化要求", "v": "Fall 2026 申请（2027 年 8 月入学）GRE 为可选；官网不要求 GRE Subject", "src": "https://ml.cmu.edu/academics/primary-ms-machine-learning-masters"},
        {"k": "录取画像（官网示例）", "v": "本科总 GPA 3.9/4.0（或 9.5/10）；GRE Quant 169（88 百分位）、Verbal 160（80 百分位）、Analytical Writing 4.1（63 百分位）；TOEFL 111（官网标注为近年录取者画像，不是最低门槛）", "src": "https://ml.cmu.edu/academics/primary-ms-machine-learning-masters"},
        {"k": "背景要求", "v": "官网：欢迎不同背景申请者，本科不必是计算机专业；但需较强数学、统计与编程能力"},
        {"k": "在读方式", "v": "国际学生签证要求全日制并在第三学期（12 月）前完成；本地学生可 part-time 但须到校上课", "src": "https://ml.cmu.edu/academics/primary-ms-machine-learning-masters"},
    ], "links": [{"label": "MSML 项目页", "url": "https://ml.cmu.edu/academics/primary-ms-machine-learning-masters"}]},
    {"key": "fee", "rows": SCS_FEE_ROWS, "links": [{"label": "CMU SCS 2026-27 学费与成本", "url": CMU_SCS_TUI}]},
    {"key": "course", "rows": [
        {"k": "核心一（机器学习入门，二选一）", "v": "10-701 Introduction to Machine Learning 或 10-715 Advanced Introduction to Machine Learning"},
        {"k": "核心二（深度学习，三选一）", "v": "10-617 Intermediate Deep Learning、10-703 Deep Reinforcement Learning、10-707 Advanced Deep Learning"},
        {"k": "核心三", "v": "10-708 Probabilistic Graphical Models"},
        {"k": "核心四", "v": "10-718 Machine Learning in Practice"},
        {"k": "核心五", "v": "10-725 Optimization for Machine Learning（原 Convex Optimization）"},
        {"k": "核心六（统计，二选一）", "v": "36-700 Probability and Mathematical Statistics 或 36-705 Intermediate Statistics"},
        {"k": "选修（3 门，须来自不同课程行）", "v": "10-605/10-805 Machine Learning With Large Datasets、10-623/10-723 Generative AI、10-714 Deep Learning Systems、10-716 Advanced ML、11-611/11-711 NLP、11-741 ML With Graphs、11-747 Neural Networks for NLP、11-777 Multimodal ML、11-868 Large Language Model Systems"},
        {"k": "选修续", "v": "15-642 Machine Learning Systems、15-750/15-850/15-853 Algorithms、15-780 Graduate AI、15-826 Multimedia Databases and Data Mining、16-720/16-820 Computer Vision、16-726 Learning-based Image Synthesis、16-824 Visual Learning and Recognition、36-707 Regression Analysis、36-709/36-710 Advanced Statistical Theory I/II"},
        {"k": "选修特殊条款", "v": "可用 1–3 门 10-620 Independent Study 抵选修（常见为跨两学期的同一研究项目）；Special Topics（10-7xx/10-8xx）可多门计入，但并非所有 10-XXX 课都被批准"},
    ], "links": [{"label": "MSML 课程页", "url": "https://ml.cmu.edu/academics/machine-learning-masters-curriculum"}]},
    {"key": "plan", "rows": [
        {"k": "结构", "v": "6 门核心 + 3 门选修 + 1 学期全日制实习（Practicum，通常暑期，与机器学习相关）"},
        {"k": "学制", "v": "官网：动机强、基础好的学生可在 3 学期完成（示例课表按秋季入学编排）", "src": "https://ml.cmu.edu/academics/primary-ms-machine-learning-masters"},
        {"k": "选课纪律", "v": "核心课必须来自不同课程行；10-703 与 10-707 同时修时，一门计核心、另一门计选修"},
        {"k": "科研机会", "v": "官网：项目以课程为主，但学生有机会参与研究；独立研究可作为选修"},
    ], "links": [{"label": "MSML 项目页", "url": "https://ml.cmu.edu/academics/primary-ms-machine-learning-masters"}]},
    {"key": "outcome", "rows": [
        {"k": "就业数据", "v": "MLD 项目页未列就业率、起薪与雇主名单（本轮未取到可静态读取的就业结果页），不估算"},
        {"k": "学位定位", "v": "官网：面向已持本科学位者，提供机器学习的进阶训练，偏课程型、可参与研究"},
        {"k": "国际生提示", "v": "官网：签证要求全日制且第三学期（12 月）前结业，因此不存在“延长到第四学期”的签证空间"},
    ]},
    {"key": "city", "type": "text", "title": "院校与城市速览（供沟通参考）",
     "text": "机器学习系（MLD）位于匹兹堡校区 5000 Forbes Avenue，属 Kenneth C. Griffin 计算机科学学院；CMU 另设硅谷与卡塔尔校区，MSML 为匹兹堡全日制项目。匹兹堡生活成本按 SCS 2026-27 成本表为住宿 $14,752 + 餐饮 $8,664 + 个人杂项 $4,098 等合计 $37,374/学年（不含学费）。具体住宿安排以录取后通知为准，本段供沟通参考。"},
    {"key": "quote", "type": "text", "title": "官网原文要点摘录（英文原句，便于核对）",
     "text": "1) \"The curriculum for the master's degree in machine learning requires six core courses, three elective courses and a practicum.\" 2) \"M.S. students also complete a one-semester, full-time practicum (an internship or research related to machine learning), generally during the summer.\" 3) \"Applications are accepted only once a year. All students begin the program in August, having applied the previous December.\" 4) \"For applicants applying to the MS in Machine Learning program in Fall 2026 for a start date of August 2027, GRE scores are optional.\" 5) \"Undergraduate Overall GPA: 3.9/4.0 or 9.5/10.0. GRE Quantitative: 169 (88th percentile) ... TOEFL: 111\" 6) \"International students should be aware that student visas require students to complete the program full-time and finish by the end of their third semester (in December).\" 7) \"SCS Master's Program $62,200 ... Fall $31,100 ... Spring $31,100 ... Per Unit $864\""},
]
ml["links"] = [
    {"label": "MSML 课程页（核心/选修课号）", "url": "https://ml.cmu.edu/academics/machine-learning-masters-curriculum"},
    {"label": "MSML 项目页（申请节奏/录取画像）", "url": "https://ml.cmu.edu/academics/primary-ms-machine-learning-masters"},
    {"label": "SCS 硕士招生（截止/语言/费用）", "url": CMU_SCS_ADM},
    {"label": "CMU SCS 2026-27 学费与成本", "url": CMU_SCS_TUI},
    {"label": "MLD 官网", "url": "https://ml.cmu.edu/"},
]

# ---------------------------------------------------------------- 3. CMU MSAII
msaii = spec_base(
    "cmu-msaii", "details/cmu-msaii.html",
    "人工智能与创新硕士（M.S. in Artificial Intelligence and Innovation · 195 units · 4 学期 · 含 36 units Capstone）",
    "Master of Science in Artificial Intelligence and Innovation (MSAII), Language Technologies Institute, School of Computer Science, Carnegie Mellon University",
    "卡内基梅隆大学 Carnegie Mellon University", "卡内基梅隆",
    ["4 学期", "核心 84 + 知识 72 + 选修 ≥36", "36 units Capstone", "强制暑期实习"],
)
msaii["cards"] = [
    {"key": "req", "rows": [
        {"k": "学位与成绩要求", "v": "须持本科学位；SCS 统一要求 GPA ≥3.0（官网要求报原始百分制/校方 GPA，不做换算）", "src": "https://lti.cmu.edu/academics/masters-programs/msaii.html"},
        {"k": "典型本科背景", "v": "官网：录取者一般持计算机科学、软件工程、生物信息或生物工程本科学位"},
        {"k": "申请截止（2027 秋）", "v": "申请开放 2026-09-09；提前轮 2026-11-18（美东 15:00）、最终轮 2026-12-09（美东 15:00）；申请费提前轮 $80、之后 $100", "src": "https://lti.cmu.edu/academics/masters-programs/msaii.html"},
        {"k": "语言要求", "v": "非英语母语者须交 TOEFL/IELTS/Duolingo 官方成绩，官网明确不豁免；SCS 近年录取区间 TOEFL 105–114、IELTS 7–8、Duolingo 130–155；托福机构码 4256、院系码 78", "src": CMU_SCS_ADM},
        {"k": "标化要求", "v": "GRE 必须提交（机构码 2074、院系码 0402）；官网未列最低分数", "src": "https://lti.cmu.edu/academics/masters-programs/msaii.html"},
        {"k": "申请材料", "v": "成绩单、简历、目的陈述（SOP，须说明选 MSAII 的理由与职业路径）、3 封推荐信、2–3 分钟自述视频（官网标注 REQUIRED）", "src": "https://lti.cmu.edu/academics/masters-programs/msaii.html"},
        {"k": "先修课", "v": "须通过本科课 15-513 Introduction to Computer Systems（6 units，通常在入学前暑期修，为 15-213 的远程版）；未通过则须在秋季/春季修 15-213，且该学分不计入学位 192/195 units", "src": "https://lti.cmu.edu/academics/masters-programs/msaii.html"},
    ], "links": [{"label": "MSAII 项目页（课程/招生）", "url": "https://lti.cmu.edu/academics/masters-programs/msaii.html"}]},
    {"key": "fee", "rows": SCS_FEE_ROWS, "links": [{"label": "CMU SCS 2026-27 学费与成本", "url": CMU_SCS_TUI}]},
    {"key": "course", "rows": [
        {"k": "核心课程序列（84 units，按序修）", "v": "11-651 Artificial Intelligence and Future Markets（12 units，第一学年秋）、17-762 Law of Computer Technology（12 units，第一学年秋）、11-695 AI Engineering（12 units，第一学年春）、11-654 AI Innovation（12 units，第二学年秋）、11-699 Capstone Project（36 units，第二学年春）"},
        {"k": "知识要求（72 units，6 门）", "v": "11-601 Coding Bootcamp、10-601 Machine Learning、11-785 Deep Learning、11-611 Natural Language Processing，以及 10-623 Generative AI 或 11-667 Large Language Models"},
        {"k": "知识要求第六门", "v": "另修 1 门 12 units 的 AI/NLP/ML 课：10-605 Machine Learning with Large Datasets、11-697 Introduction to Question Answering (with LLMs)、11-767 On-Device Machine Learning、11-777 Multimodal Machine Learning、11-851 Talking to Robots 等"},
        {"k": "选修（≥36 units，至少 3 门 12 units）", "v": "11-641 Machine Learning for Text Mining、11-642 Search Engines、11-747 Neural Networks for NLP、11-755 ML for Signal Processing、11-777 Advanced Multimodal ML、10-605、10-608 Conversational ML、10-716 Advanced ML"},
        {"k": "选修续", "v": "15-624 Foundations of Cyber-Physical Systems、15-645 Database Systems、15-688 Practical Data Science、15-719 Advanced Cloud Computing、15-780 Graduate AI、16-720 Computer Vision、16-725 Medical Image Analysis、16-722 Sensing and Sensors、16-824 Visual Learning and Recognition"},
        {"k": "选修续二", "v": "17-637 Web Application Development、17-639/17-653 Management of Software Development、17-766 Software Engineering for Startups、02-604 Fundamentals of Bioinformatics、02-718 Computational Medicine；其他课程须 MSAII 主任批准"},
    ], "links": [{"label": "MSAII 项目页（课程明细）", "url": "https://lti.cmu.edu/academics/masters-programs/msaii.html"}]},
    {"key": "plan", "rows": [
        {"k": "总学分", "v": "官网口径并存两处：Requirements 段写「192 eligible units」（含 84 core、72 knowledge、≥36 electives）；Curriculum 段写「195 eligible units」，多出 3 units 为 LTI Practicum。本页并列保留两处原文，不擅自合并", "src": "https://lti.cmu.edu/academics/masters-programs/msaii.html"},
        {"k": "实习（强制）", "v": "第一学年春与第二学年秋之间的暑期须完成行业实习，注册 11-934 MSAII Practicum Internship，实习不计学费"},
        {"k": "Capstone", "v": "11-699 Capstone（36 units）：团队把选题做成可用于企业内部落地或可融资的产品"},
        {"k": "学制", "v": "4 学期（第一学年秋/春 + 第二学年秋/春），官网称 core program lasts four semesters"},
        {"k": "选修节奏建议", "v": "官网建议：第一学年秋 1 门、第一学年春 1–2 门、第二学年秋 1–2 门、第二学年春 0–1 门"},
        {"k": "定位", "v": "官网：MSAII 是 M.S. in Biotechnology, Innovation and Computing（MSBIC）的后继项目，兼顾企业内部创业与独立创业训练"},
    ], "links": [{"label": "MSAII 项目页（结构说明）", "url": "https://lti.cmu.edu/academics/masters-programs/msaii.html"}]},
    {"key": "outcome", "rows": [
        {"k": "就业数据", "v": "LTI 项目页未列就业率、起薪与雇主名单（本轮未取到可静态读取的结果页），不估算"},
        {"k": "能力出口", "v": "官网：毕业生可创办初创公司，或在既有企业内部开辟新业务线；课程训练含说服性技术演讲、组建开发团队、评估新市场构想"},
    ]},
    {"key": "city", "type": "text", "title": "院校与城市速览（供沟通参考）",
     "text": "LTI 位于匹兹堡校区 5000 Forbes Avenue（TCS Hall），MSAII 项目办公室在 357 TCS Hall；属 SCS。匹兹堡生活成本按 SCS 2026-27 成本表：住宿 $14,752、餐饮 $8,664、个人杂项 $4,098、交通 $302、技术费 $490，合计非学费 $37,374/学年。具体住宿与校区安排以录取后通知为准，本段供沟通参考。"},
    {"key": "quote", "type": "text", "title": "官网原文要点摘录（英文原句，便于核对）",
     "text": "1) \"In total, you will complete 192 eligible units of study, including 84 units of Core Curriculum (including the 36-unit Capstone), 72 units of Knowledge Requirements and at least 36 units of approved Electives.\" 2) \"In total, you will complete 195 eligible units of study ... and the LTI Practicum (3 units, associated with your summer internship).\" 3) \"Every student is required to complete an industry internship during the summer between the first spring and second fall semesters. ... No tuition is charged for the internship.\" 4) \"The application window for the Fall 2027 admissions cycle will open on September 9, 2026.\" 5) \"Early Deadline: Nov. 18, 2026 (3 p.m. EST) Final Deadline: Dec. 9, 2026 (3 p.m. EST)\" 6) \"GRE scores: GRE is required. Our Institution Code is 2074; Department Code is 0402.\" 7) \"A short (2-3 minutes) video of yourself ... This is now a REQUIRED component of your application.\" 8) \"Failure to pass the course means that you have to take 15-213 during either the fall or spring semester, and the units will not count toward your 192 eligible units of study.\""},
]
msaii["links"] = [
    {"label": "MSAII 项目页（课程/招生/实习）", "url": "https://lti.cmu.edu/academics/masters-programs/msaii.html"},
    {"label": "SCS 硕士招生（截止/语言/费用）", "url": CMU_SCS_ADM},
    {"label": "CMU SCS 2026-27 学费与成本", "url": CMU_SCS_TUI},
    {"label": "LTI 官网", "url": "https://lti.cmu.edu/"},
    {"label": "MSAII Handbook（官网文件入口）", "url": "https://lti.cmu.edu/academics/masters-programs/msaii.html"},
]

# ---------------------------------------------------------------- 4. CMU MIIS
miis = spec_base(
    "cmu-miis", "details/cmu-miis.html",
    "智能信息系统硕士（M.S. in Intelligent Information Systems · MIIS-16 / MIIS-21 双轨）",
    "Master of Science in Intelligent Information Systems (MIIS), Language Technologies Institute, School of Computer Science, Carnegie Mellon University",
    "卡内基梅隆大学 Carnegie Mellon University", "卡内基梅隆",
    ["MIIS-16 16 个月 / MIIS-21 21 个月", "≥84 / 108 units", "定向研究 + Capstone", "GRE 必须提交"],
)
miis["cards"] = [
    {"key": "req", "rows": [
        {"k": "学位要求", "v": "SCS 统一要求：本科成绩单（全部就读院校，无论是否取得学位）、GPA 建议 3.0 以上；项目页未单列更高门槛", "src": "https://lti.cmu.edu/academics/masters-programs/miis.html"},
        {"k": "申请截止（2027 秋）", "v": "申请开放 2026-09-09；提前轮 2026-11-18（美东 15:00）、最终轮 2026-12-09（美东 15:00）；申请费 $80（提前轮）/ $100（之后）", "src": "https://lti.cmu.edu/academics/masters-programs/miis.html"},
        {"k": "语言要求", "v": "非英语母语者 TOEFL 必须提交、官网明确无例外；IELTS 或 Duolingo 可替代；在美取得本科/硕士学位者可交五年内过期成绩；2021-08-20 前的 TOEFL 不接受；托福机构码 4256、院系码 78", "src": "https://lti.cmu.edu/academics/masters-programs/miis.html"},
        {"k": "标化要求", "v": "GRE 必须提交，且成绩须五年内；GRE Subject 不要求但推荐；机构码 2074、院系码 0402", "src": "https://lti.cmu.edu/academics/masters-programs/miis.html"},
        {"k": "申请材料", "v": "成绩单、简历、目的陈述、3 封推荐信；附加 Video Essay（可选但强烈建议，1–3 分钟随机题，10 秒准备、最多 3 次机会；官网称条件相同时有视频者更有优势）", "src": "https://lti.cmu.edu/academics/masters-programs/miis.html"},
        {"k": "申请费", "v": "$80（提前轮）/ $100（提前轮之后）；经济困难可申请 fee waiver"},
    ], "links": [{"label": "MIIS 项目页（招生要求）", "url": "https://lti.cmu.edu/academics/masters-programs/miis.html"}]},
    {"key": "fee", "rows": SCS_FEE_ROWS, "links": [{"label": "CMU SCS 2026-27 学费与成本", "url": CMU_SCS_TUI}]},
    {"key": "course", "rows": [
        {"k": "课表口径", "v": "MIIS 项目页以「课名」给出示例课表，未在页面标注课号；下列课名为官网示例课程，按学期原样列出，不补造课号", "src": "https://lti.cmu.edu/academics/masters-programs/miis.html"},
        {"k": "示例课表一（文本挖掘/问答方向）", "v": "秋 1：Machine Learning、Search Engines、Language and Statistics；春：Natural Language Processing、Question Answering、Directed Study；夏：Internship（MIIS Capstone Planning Seminar）；秋 2：Machine Learning for Text Mining、MIIS Capstone Project"},
        {"k": "示例课表二（语音交互方向）", "v": "秋 1：Machine Learning、Algorithms for NLP、Applied Machine Learning；春：Speech Recognition and Understanding、Competitive Engineering、Directed Study；秋 2：Design and Implementation of Speech Recognition Systems、Conversational Interfaces、MIIS Capstone Project"},
        {"k": "示例课表三（免实习版）", "v": "以 Search Engines、Analysis of Social Media、Machine Learning、Natural Language Processing、Question Answering、Directed Study 组合完成，官方说明实习可凭充分 prior professional experience 申请豁免"},
        {"k": "广度要求", "v": "MIIS-16 至少 84 units（通常 7 门）须覆盖 human language、machine learning、language technology applications 三类广度要求"},
        {"k": "MIIS-21 加修", "v": "在选定方向（Human Language for Language Technologies / Language Technology Application / Machine Learning for Language Technologies）再加至少 2 门，总计 108 units（通常 9 门）"},
    ], "links": [{"label": "MIIS 项目页（示例课表）", "url": "https://lti.cmu.edu/academics/masters-programs/miis.html"}]},
    {"key": "plan", "rows": [
        {"k": "MIIS-16", "v": "16 个月轨：3 个学期（秋、春、秋）+ 暑期实习；至少 84 units 合格课与选修"},
        {"k": "MIIS-21（Advanced Study）", "v": "21 个月轨：4 个学期（秋、春、秋、春）+ 暑期实习；108 units，含方向深化课程"},
        {"k": "定向研究（Directed Study）", "v": "24 units（约两门课），由导师指导的软件开发项目"},
        {"k": "Capstone", "v": "42 units（约 3 门 12 units + 1 门 6 units），团队协作完成"},
        {"k": "实习", "v": "暑期实习；已有充分职业经验者可申请豁免（官网原文：can be waived）"},
        {"k": "在读方式", "v": "官网：个别情况下提供 part-time 选项", "src": "https://lti.cmu.edu/academics/masters-programs/miis.html"},
    ], "links": [{"label": "MIIS 项目页（双轨说明）", "url": "https://lti.cmu.edu/academics/masters-programs/miis.html"}]},
    {"key": "outcome", "rows": [
        {"k": "官网表述", "v": "原文：alumni 进入 Apple、IBM、Google 等公司，多数在毕业后六周内拿到 offer（官网未给出统计口径、样本量与年份，本页照录不作外推）", "src": "https://lti.cmu.edu/academics/masters-programs/miis.html"},
        {"k": "就业数据完整度", "v": "项目页未列就业率百分比、起薪中位数与雇主名单明细，不估算"},
        {"k": "能力定位", "v": "官网：聚焦从文本、口语与视频中识别并抽取语义，是 LTI 在内容分析与机器学习上最深入的硕士训练"},
    ]},
    {"key": "city", "type": "text", "title": "院校与城市速览（供沟通参考）",
     "text": "LTI 在匹兹堡校区 5000 Forbes Avenue，MIIS 项目办公室位于 5414 Gates & Hillman Centers。SCS 2026-27 成本表列住宿 $14,752、餐饮 $8,664、书本 $2,212、保险 $3,352、个人杂项 $4,098、旅行 $1,756、交通 $302、技术费 $490，非学费合计 $37,374/学年。具体住宿与到校安排以录取后通知为准，本段供沟通参考。"},
    {"key": "quote", "type": "text", "title": "官网原文要点摘录（英文原句，便于核对）",
     "text": "1) \"Option 1. Standard MIIS degree (MIIS-16) - A 16-month track that is completed in three academic semesters (fall, spring, fall) and a summer internship.\" 2) \"Option 2. MIIS: Advanced Study degree (MIIS-21) - A 21-month track that is completed in four academic semesters ... and a summer internship.\" 3) \"MIIS-16 students must take at least 84 units (typically 7 courses) of qualifying and elective courses that satisfy human language, machine learning, and language technology applications breadth requirements.\" 4) \"MIIS-21 students have to take at least two more courses from the selected concentration area ... making it total of 108 units (typically 9 courses).\" 5) \"software development supervised by their advisor (24 units equivalent to two courses); a summer internship (which can be waived ...); and a capstone project ... (42 units equivalent to three 12-unit courses and one 6-unit course).\" 6) \"GRE scores: MIIS applicants must submit their GRE scores. The scores must be less than five years old.\" 7) \"Most have job offers within six weeks of graduation.\""},
]
miis["links"] = [
    {"label": "MIIS 项目页（双轨/课表/招生）", "url": "https://lti.cmu.edu/academics/masters-programs/miis.html"},
    {"label": "SCS 硕士招生（截止/语言/费用）", "url": CMU_SCS_ADM},
    {"label": "CMU SCS 2026-27 学费与成本", "url": CMU_SCS_TUI},
    {"label": "LTI 官网", "url": "https://lti.cmu.edu/"},
    {"label": "SCS 硕士招生 FAQ", "url": "https://www.cs.cmu.edu/academics/graduate-admissions"},
]

# ---------------------------------------------------------------- 5. CMU MSE
mse = spec_base(
    "cmu-mse", "details/cmu-cedf8a2.html",
    "软件工程硕士（Master of Software Engineering · 198 units · 4 学期 · Studio Capstone）",
    "Master of Software Engineering (MSE), Software and Societal Systems Department (S3D), School of Computer Science, Carnegie Mellon University",
    "卡内基梅隆大学 Carnegie Mellon University", "卡内基梅隆",
    ["198 units / 4 学期", "$27,000/学期（2026-27）", "Studio Capstone 17-671/17-672", "GRE 可选"],
)
mse["cards"] = [
    {"key": "req", "rows": [
        {"k": "学位与背景", "v": "须持本科学位，优先计算机科学或其他理工科；非 CS 背景者须在 SOP/视频中说明数据结构与算法、离散数学等基础", "src": "https://mse.isri.cmu.edu/applicants/mse-as/apply.html"},
        {"k": "申请截止", "v": "项目页：2026-12-09（美东 15:00）；编程测评邀请次日前后 2026-12-11 发出，测评截止 2026-12-17", "src": "https://mse.isri.cmu.edu/applicants/mse-as/apply.html"},
        {"k": "截止口径冲突（原样保留）", "v": "SCS 招生总页把「Final and only deadline: January 15, 2027」列在 MHCI 名下，同时注明提前轮不适用于 MSE/MSE-ES/MSE-SS；与 MSE 项目页 2026-12-09 不一致。本页以项目页为准，并保留两处原文供核对", "src": CMU_SCS_ADM},
        {"k": "语言要求", "v": "持 F-1/J-1 且非英语母语者须提交 TOEFL（首选）/ IELTS / Duolingo；官网明确不发任何豁免（含在美读高中/大学、英语国家就读）；未持美国本科者成绩两年内有效（2024-09-01 前考试不接受），已持美国学位者可用五年内成绩", "src": "https://mse.isri.cmu.edu/applicants/mse-as/apply.html"},
        {"k": "标化要求", "v": "GRE 可选：官网原文称不交 GRE 不处于劣势，已考者鼓励提交；接受 GRE at Home", "src": "https://mse.isri.cmu.edu/applicants/mse-as/apply.html"},
        {"k": "编程测评", "v": "提交后获邀参加在线编程测评，约一周内完成，历史上有 3–4 道不同难度题；可用任意编程语言；官网称强/弱编程能力均可能被录取，但作弊必拒", "src": "https://mse.isri.cmu.edu/applicants/mse-as/apply.html"},
        {"k": "申请费", "v": "$100（SCS 注明 MSE/MSE-ES/MSE-SS/MHCI 不适用提前轮 $80 优惠）", "src": CMU_SCS_ADM},
    ], "links": [{"label": "MSE 申请页", "url": "https://mse.isri.cmu.edu/applicants/mse-as/apply.html"}]},
    {"key": "fee", "rows": [
        {"k": "学期学费（2026-27）", "v": "MSE 主轨 $27,000/学期（4 学期、198 units）；MSE-SS 与 MSE-ES 轨 $32,400/学期（4 学期、153 units）", "src": "https://mse.isri.cmu.edu/applicants/tuition.html"},
        {"k": "总学费（官网表按学期×学期数）", "v": "MSE 主轨 4 学期合计 $108,000（$27,000 × 4，仅为学费，不含杂费与生活成本）；MSE-SS/ES 为 $129,600", "src": "https://mse.isri.cmu.edu/applicants/tuition.html"},
        {"k": "在线轨对照", "v": "MSE Online 按学分 $590/unit（2026-27；2025-26 为 $570），6–8 学期、108 units；本项目页仅作对照，非全日制在校选项", "src": "https://mse.isri.cmu.edu/applicants/tuition.html"},
        {"k": "其他费用", "v": "官网：除住宿与生活费外，另有健康保险、交通费，以及每学年春秋两季的 CMU Technology Fee", "src": "https://mse.isri.cmu.edu/applicants/tuition.html"},
        {"k": "奖学金", "v": "James E. Tomayko Scholarship（完成一学期后评选，需经济需求）、CMU Rales Fellows、MSE Research Fellowship（一年期）、Director\'s List（前 5–10%）", "src": "https://mse.isri.cmu.edu/applicants/tuition.html"},
    ], "links": [{"label": "MSE 学费与资助", "url": "https://mse.isri.cmu.edu/applicants/tuition.html"}]},
    {"key": "course", "rows": [
        {"k": "软件工程 + AI", "v": "17-650 Fundamentals of AI for SE"},
        {"k": "规格说明", "v": "17-651 Software Specifications"},
        {"k": "需求", "v": "17-622 Agile Methods，或 17-619 Product Management Essentials I 且 17-626 Requirements for Information Sys，或 17-627 Requirements for Embedded Sys"},
        {"k": "管理与质量", "v": "17-653 Software Engineering Management（或 17-622 Agile Methods）；17-654 Software Quality Engineering"},
        {"k": "架构与设计", "v": "17-633 Advanced Software Architecture 或 17-655 Architecture and Design"},
        {"k": "沟通", "v": "17-603 Communications for Software Leaders I 且 17-604 Communications for Software Leaders II"},
        {"k": "Studio Capstone", "v": "17-671 MSE Studio I 且 17-672 MSE Studio II"},
        {"k": "软件工程选修（24–36 units）", "v": "17-616 AI Tools for Software Development、17-629 Product Management Essentials II、17-630 Context Engineering、17-636 DevOps、17-638 Engineering Embedded Systems、17-645 Machine Learning in Production、17-647 Scalable Systems Design、17-648 Sensor-based Systems、17-693 Negotiations for Software Leaders、17-716 Responsible AI and AI Governance、17-722 Human-AI Interaction Using Sensing Systems"},
        {"k": "通识选修（36 units）", "v": "任意 SCS 研究生课；其他课程须批准。Applied Study 轨另需 17-667 Internship for Software Engineers"},
        {"k": "条款", "v": "若用 17-622 Agile Methods 同时满足需求与管理两项，须多修一门软件工程选修以凑满 36 units"},
    ], "links": [{"label": "MSE 课程要求表", "url": "https://mse.isri.cmu.edu/applicants/mse-as/requirements.html"}]},
    {"key": "plan", "rows": [
        {"k": "学制与学分", "v": "4 学期、198 units（学费表口径）；Studio 项目跨两学期（17-671/17-672）", "src": "https://mse.isri.cmu.edu/applicants/tuition.html"},
        {"k": "Studio 模式", "v": "官网：以真实客户项目为主线，团队在教师指导下完成从需求到交付的完整工程周期"},
        {"k": "实习选项", "v": "仅 MSE-Applied Study 轨包含 17-667 实习；主轨以 Studio 替代", "src": "https://mse.isri.cmu.edu/applicants/mse-as/requirements.html"},
        {"k": "Concentrations", "v": "项目页设 Concentrations 栏目（本轮未逐条取到分方向课表，不臆造方向名称）"},
    ], "links": [{"label": "MSE 计划与 Studio", "url": "https://mse.isri.cmu.edu/applicants/mse-as/index.html"}]},
    {"key": "outcome", "rows": [
        {"k": "就业率", "v": "官网：2016–2021 届受访毕业生中 100% 在三个月内报告拿到 offer（基于自愿回复的问卷，非全员统计）", "src": "https://mse.isri.cmu.edu/applicants/tuition.html"},
        {"k": "薪资", "v": "官网：MSE 毕业生薪资较入门级程序员平均高 240%（数据源 Payscale 对 Computer Programmers 的汇总）", "src": "https://mse.isri.cmu.edu/applicants/tuition.html"},
        {"k": "口径提示", "v": "上两项均为校方页面自述的投资回报论据，样本与统计方法未披露；不与其他项目横向比较、不换算成绝对值"},
    ]},
    {"key": "city", "type": "text", "title": "院校与城市速览（供沟通参考）",
     "text": "MSE 由软件与社会系统系（S3D，原 ISR）开设，位于匹兹堡校区 5000 Forbes Avenue；项目页另设 Industry Field Trips、Recruiting Our Graduates 栏目对接企业。匹兹堡校区生活成本参考 SCS 2026-27 表（住宿 $14,752、餐饮 $8,664、个人杂项 $4,098 等，非学费合计 $37,374/学年），MSE 自身学费表未再列生活成本分项。本段供沟通参考。"},
    {"key": "quote", "type": "text", "title": "官网原文要点摘录（英文原句，便于核对）",
     "text": "1) \"Tuition per Semester $27,000\" / \"Program Length 4 semesters\" / \"Total Units 198\"（2026-27 MSE 列） 2) \"Unofficial GRE Scores (optional): GRE scores are optional. An application without GRE scores is not at a disadvantage\" 3) \"We do not issue waivers for non-native speakers of English. ... No amount of educational experience in English, regardless of which country it occurred in, will result in a test waiver.\" 4) \"Application Deadline December 9, 2026 (3pm EST)\" / \"Coding Assessment Deadline December 17, 2026\" 5) \"100% Average MSE grads who report job offers within three months (2016-2021)\" 6) \"240% Average increase in MSE salary over entry level programmer salary\" 7) \"If a student takes Agile Methods to fill those requirements, they take an additional Software Engineering elective course for a total of 36 units.\""},
]
mse["links"] = [
    {"label": "MSE 课程要求表（课号）", "url": "https://mse.isri.cmu.edu/applicants/mse-as/requirements.html"},
    {"label": "MSE 申请页（截止/语言/测评）", "url": "https://mse.isri.cmu.edu/applicants/mse-as/apply.html"},
    {"label": "MSE 学费与资助（2026-27）", "url": "https://mse.isri.cmu.edu/applicants/tuition.html"},
    {"label": "MSE 项目主页", "url": "https://mse.isri.cmu.edu/applicants/mse-as/index.html"},
    {"label": "SCS 硕士招生总页", "url": CMU_SCS_ADM},
]

# ---------------------------------------------------------------- 6. UChicago MS Statistics
stats = spec_base(
    "uchicago-stats", "details/uchicago-statistics.html",
    "统计学硕士（MS in Statistics · 1–2 年 · 理论/应用双方向 · 硕士论文 + 咨询实践）",
    "Master of Science in Statistics, Department of Statistics, Physical Sciences Division, The University of Chicago",
    "芝加哥大学 The University of Chicago", "芝加哥大学",
    ["1–2 年完成", "系排名全美 #3（院系自述）", "硕士论文 + 结业 seminar", "GRE 可选"],
)
stats["cards"] = [
    {"key": "req", "rows": [
        {"k": "申请截止（2027 入学）", "v": "三轮：2026-11-02；2027-02-01；2027-05-03（官网列三轮日期，未标轮次名称；招满可能提前关闭）", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/admission-requirements/"},
        {"k": "学位与先修", "v": "须具备强量化背景；先修微积分与线性代数、概率与数理统计；实分析（推荐）、编程或计算经验（推荐）", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/admission-requirements/"},
        {"k": "语言要求", "v": "需证明英语能力时提交 TOEFL 或 IELTS；项目页未公布最低分数门槛，不估算", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/admission-requirements/"},
        {"k": "标化要求", "v": "GRE 可选（Optional）：不要求，但可提交以增强申请", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/admission-requirements/"},
        {"k": "申请材料", "v": "线上申请（物理科学部申请门户）、全部就读院校成绩单、3 封推荐信（须熟悉量化能力）、目的陈述、简历/CV", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/admission-requirements/"},
        {"k": "申请费", "v": "$90，不可退", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/admission-requirements/"},
        {"k": "适合背景", "v": "官网：数学、计算机、经济、物理、工程等相关专业，且满足先修要求者均可申请；竞争性申请者通常已修高年级统计或数据分析课", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/admission-requirements/"},
    ], "links": [{"label": "MS Statistics 招生要求", "url": "https://stat.uchicago.edu/academics/ms-in-statistics/admission-requirements/"}]},
    {"key": "fee", "rows": [
        {"k": "学费", "v": "项目页未列项目级学费费率或总额；芝大 Bursar 费率页本轮返回 403，未取到可静态核对的分项，按「官网未披露」处理，不估算"},
        {"k": "申请费", "v": "$90（不可退）", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/admission-requirements/"},
        {"k": "奖学金", "v": "项目页：录取者自动纳入部分学费 merit 奖学金评审（无需单独申请），其余可申 grant/fellowship/政府奖学金/贷款"},
        {"k": "行业薪资参考（官网引用 BLS）", "v": "Data Scientist 中位年薪 $112,590；Operations Research Analyst 中位年薪 $91,290；硕士及以上学历者收入高约 20–29%（官网 Careers 页引用 BLS 口径，非本项目毕业生统计）", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/careers-in-statistics/"},
        {"k": "口径提示", "v": "上述为美国劳工统计局职业中位数，不等于本校毕业生起薪；本页照录口径来源，不做外推"},
    ], "links": [{"label": "MS Statistics 职业页（BLS 口径）", "url": "https://stat.uchicago.edu/academics/ms-in-statistics/careers-in-statistics/"}]},
    {"key": "course", "rows": [
        {"k": "选课范围", "v": "官网：芝大所有研究生层次统计课均对硕士生开放，可按研究兴趣与职业目标选课；硕士生与博士生一起参与系内学术活动", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/statistics-masters-courses/"},
        {"k": "理论研究方向", "v": "统计方法论（methodology）、决策理论（decision theory）、高维统计（high dimensional statistics）、概率（probability）"},
        {"k": "应用与交叉方向", "v": "遗传与生物统计（genetics and biostatistics）、数理金融与计量经济（mathematical finance and econometrics）、环境统计、计算神经科学与化学、模式识别、科学计算、机器学习"},
        {"k": "课号说明", "v": "系课程页按研究方向组织，未逐门列出 STAT 课号；课号以芝大课程目录为准，本轮目录页为动态渲染、未取到可静态核对的课号，故不补造"},
        {"k": "咨询实践（Statistics Consulting）", "v": "与统计博士生组队（全系 4–5 支团队），每周设统计门诊时段对接校内研究者；每周组会由教师主持、团队汇报当周咨询项目，并向客户提交书面建议", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/statistics-masters-courses/"},
    ], "links": [{"label": "MS Statistics 课程页", "url": "https://stat.uchicago.edu/academics/ms-in-statistics/statistics-masters-courses/"}]},
    {"key": "plan", "rows": [
        {"k": "学制", "v": "官网：依背景与学习计划，可在 1 年或 2 年完成（1–2 academic years）", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/"},
        {"k": "方向选择", "v": "可选理论研究型或应用统计型硕士；再按职业目标配置选修与研究重点"},
        {"k": "硕士论文", "v": "须完成 master's paper：与导师商定题目、深入研究；结业时全体硕士生就论文做 seminar 报告", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/statistics-masters-courses/"},
        {"k": "博士衔接", "v": "官网：项目定位为职业训练和/或博士预备，不以独立研究为核心（与 PhD 项目对比表口径）", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/admission-requirements/"},
        {"k": "排名表述", "v": "院系页自述「#3 in the Nation」（US News 研究生排名口径），属院系自述，非第三方独立核验数字", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/"},
    ], "links": [{"label": "MS Statistics 项目主页", "url": "https://stat.uchicago.edu/academics/ms-in-statistics/"}]},
    {"key": "outcome", "rows": [
        {"k": "典型岗位", "v": "官网：数据科学家、量化分析师、生物统计师、研究分析师；行业覆盖金融、医疗、科技、公共政策", "src": "https://stat.uchicago.edu/academics/ms-in-statistics/careers-in-statistics/"},
        {"k": "校友去向", "v": "官网列 Employer Network 与 PhD Destinations 两块（具体雇主名单与读博去向名单在页面以图表模块呈现，本轮未逐条取到文本，不臆造）"},
        {"k": "就业率/起薪", "v": "系里未公布本项目毕业生就业率与起薪中位数；官网仅引用 BLS 职业中位数作行业参考"},
    ]},
    {"key": "city", "type": "text", "title": "院校与城市速览（供沟通参考）",
     "text": "统计学系位于芝加哥大学 Hyde Park 校区 George Herbert Jones Laboratory（Suite 222，5747 South Ellis Avenue，Chicago, IL 60637），电话 773-702-8333。Hyde Park 距芝加哥市中心约 20–30 分钟车程，校园周边以住宿与学术社区为主。具体住宿与通勤方案以录取后通知为准，本段供沟通参考。"},
    {"key": "quote", "type": "text", "title": "官网原文要点摘录（英文原句，便于核对）",
     "text": "1) \"You can complete the program in one or two academic years, depending on your background and study plan.\" 2) \"GRE Scores (Optional) - Not required, but may be submitted to strengthen your application.\" 3) \"There is non-refundable $90 fee to apply\" 4) \"November 2, 2026 / February 1, 2027 / May 3, 2027\"（三轮截止） 5) \"At UChicago, all graduate-level statistics courses are open to master's students ...\" 6) \"You and several Statistics PhD students will form one of the 4-5 teams, holding weekly statistics clinic office hours ...\" 7) \"All Master's students give a seminar on their paper on completion of the program.\" 8) \"Median pay is strong in adjacent roles your MS qualifies you for—Data Scientist: $112,590 and Operations Research Analyst: $91,290.\""},
]
stats["links"] = [
    {"label": "MS Statistics 招生要求（截止/先修/材料）", "url": "https://stat.uchicago.edu/academics/ms-in-statistics/admission-requirements/"},
    {"label": "MS Statistics 课程页（方向/咨询/论文）", "url": "https://stat.uchicago.edu/academics/ms-in-statistics/statistics-masters-courses/"},
    {"label": "MS Statistics 项目主页（1–2 年/#3）", "url": "https://stat.uchicago.edu/academics/ms-in-statistics/"},
    {"label": "MS Statistics 职业页（BLS 薪资）", "url": "https://stat.uchicago.edu/academics/ms-in-statistics/careers-in-statistics/"},
    {"label": "芝大统计系官网", "url": "https://stat.uchicago.edu/"},
]

# ---------------------------------------------------------------- 7. UChicago MS-AAI
aai = spec_base(
    "uchicago-aai", "details/uchicago-applied-ai.html",
    "应用人工智能硕士（MS in Applied Artificial Intelligence · 9 门课 / 3 个 quarter · 4 核心 + 5 选修）",
    "MS in Applied Artificial Intelligence (MS-AAI), Data Science Institute (DSI), The University of Chicago",
    "芝加哥大学 The University of Chicago", "芝加哥大学",
    ["9 门课 · 3 个 quarter", "4 核心 + 5 选修", "预计 $67,500（9 门）", "Downtown Chicago 授课"],
)
aai["cards"] = [
    {"key": "req", "rows": [
        {"k": "学位要求", "v": "须持本科学位（官网原文：a bachelor's degree is required to apply）；申请阶段只交非官方成绩单，录取后寄官方成绩单（须学校密封信封）", "src": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/application-process/"},
        {"k": "申请截止（Autumn 2027）", "v": "第一优先 2026-11-09；第二优先 2026-12-07；最终 2027-01-26；官网提示招满可能提前关闭门户", "src": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/application-process/"},
        {"k": "语言要求", "v": "TOEFL 最低 102（旧口径）或 5（现行口径，无小分要求）；IELTS 7（无小分要求）；满足研究生院豁免条件者可免", "src": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/application-process/"},
        {"k": "标化要求", "v": "官网申请页未把 GRE/GMAT 列为必须项；DSI 口径以材料综合评审为主（页面未列分数门槛，不估算）"},
        {"k": "申请材料", "v": "线上申请、成绩单、简历、目的陈述；可附相关论文/出版物（可选）"},
        {"k": "背景偏好", "v": "官网：多数录取者具 STEM 背景，AI/数据科学学位且修过机器学习课程者最契合；无绝对 GPA 门槛"},
    ], "links": [{"label": "MS-AAI 申请流程", "url": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/application-process/"}]},
    {"key": "fee", "rows": [
        {"k": "学费（预计）", "v": "$7,500/门 × 9 门 = $67,500（Autumn 2027 / Winter 2028 / Spring 2028 预计口径，官网标注为 projected tuition）", "src": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/tuition-financial-aid/"},
        {"k": "录取押金", "v": "$1,500，不可退，抵扣第一学期学费", "src": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/tuition-financial-aid/"},
        {"k": "涨幅提示", "v": "官网：学费预计每财年上涨 3–7%（财年自夏季至春季 quarter）", "src": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/tuition-financial-aid/"},
        {"k": "其他成本", "v": "学费之外另有直接与间接成本（住宿、餐饮、保险等），官网指向研究生资助办公室的 Cost of Attendance 页；项目页未逐项列出金额"},
        {"k": "奖学金", "v": "对优秀申请者提供部分学费奖学金（partial tuition scholarships），无需单独申请；官网建议赶早轮提交以提高机会", "src": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/tuition-financial-aid/"},
        {"k": "贷款", "v": "符合条件者可申请联邦贷款；也支持雇主学费福利，细则见 Bursar 与资助页", "src": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/tuition-financial-aid/"},
    ], "links": [{"label": "MS-AAI 学费与资助", "url": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/tuition-financial-aid/"}]},
    {"key": "course", "rows": [
        {"k": "项目结构", "v": "9 门课、3 个 quarter（各 10 周）：4 门核心 + 5 门选修（首届 8 门选修中选 5，三大支柱各至少 1 门）", "src": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/applied-ai-curriculum/"},
        {"k": "核心 1（Q1）", "v": "Artificial Intelligence I: Foundations and Principles —— 覆盖监督/无监督/半监督、概率推理、搜索与优化，强调从零实现"},
        {"k": "核心 2（Q1）", "v": "Value Creation and Leadership with Artificial Intelligence —— 评估 AI 机会、重构核心工作流、对齐业务目标、组织变革与 ROI 框架"},
        {"k": "核心 3（Q1）", "v": "Artificial Intelligence Security, Safety, and Governance —— 模型鲁棒性、对齐策略、风险评估与可审计性，兼及 LLM/智能体/多模态的伦理与监管"},
        {"k": "核心 4（Q2）", "v": "Artificial Intelligence II: Advanced Architectures and Applications —— CNN、LSTM、Transformer、扩散模型、GNN，以及迁移/强化/因果/对比学习与部署实践"},
        {"k": "选修（Q2–Q3，5 门）", "v": "官网列往届开设：Quantum Computation & Applications、Production AI in the Cloud、AI in Asset Management、Enterprise AI Systems、Agentic AI Ops、AI in Biomedicine、AI Innovation Practicum、Multi-Modal Agents"},
        {"k": "课号说明", "v": "官网课程页只给课名与课程描述，未附课号；课号以芝大目录为准，本轮未取到可静态核对结果，不补造"},
    ], "links": [{"label": "MS-AAI 课程页", "url": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/applied-ai-curriculum/"}]},
    {"key": "plan", "rows": [
        {"k": "学制与校区", "v": "3 个 quarter 全日制在校（in-person），授课地点为芝加哥市中心（BC Tower 一带）；无在线、混合或 part-time 选项"},
        {"k": "课程节奏", "v": "Q1 三门核心 + Q2 一门核心与选修 + Q3 选修，官网给出 10 周/quarter 的示例课表"},
        {"k": "毕业形式", "v": "以 9 门课程结业，官网未设论文或独立 capstone；实践性通过 AI Innovation Practicum 等选修承载"},
        {"k": "选修支柱", "v": "选修按三大支柱组织（行业应用、智能体与新兴系统、AI 基础设施与部署），须每支柱至少 1 门"},
        {"k": "定位", "v": "官网：兼顾共同基础与个性化专精，培养可落地、可治理的 AI 应用能力"},
    ], "links": [{"label": "MS-AAI 课程页", "url": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/applied-ai-curriculum/"}]},
    {"key": "outcome", "rows": [
        {"k": "首届就业数据", "v": "官网：MS-AAI 是 DSI 最新的硕士项目，首届 cohort 尚未毕业，暂无本项目就业统计", "src": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/graduate-outcomes/"},
        {"k": "可参考口径", "v": "官网：学生共享 DSI 硕士群体的职业网络，历届 DSI 硕士毕业生进入人工智能、机器学习、数据科学、咨询等领域", "src": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/graduate-outcomes/"},
        {"k": "提示", "v": "本页不把 DSI 其他项目的就业数据折算为本项目数据"},
    ]},
    {"key": "city", "type": "text", "title": "院校与城市速览（供沟通参考）",
     "text": "DSI 办公与教学地址为 Lorraine and Yuji Suzuki Center，5460 S University Ave, Chicago, IL 60615（Hyde Park 校区）；MS-AAI 授课在芝加哥市中心。市中心校区周边为金融与科技企业密集区，通勤以地铁/通勤铁路为主。具体上课地点与住宿安排以录取后通知为准，本段供沟通参考。"},
    {"key": "quote", "type": "text", "title": "官网原文要点摘录（英文原句，便于核对）",
     "text": "1) \"The MS in Applied Artificial Intelligence is a 9-course program completed over three quarters, including 4 core courses and 5 electives.\" 2) \"Electives are organized across three pillars, and students take at least one course from each.\" 3) \"Projected tuition for the 9-course MS in AAI program: $7,500 per course*/$67,500, 9 courses\" 4) \"Program Enrollment Deposit (non-refundable): $1,500 (credited toward your first quarter's tuition balance)\" 5) \"Tuition is expected to increase 3-7% per fiscal year\" 6) \"Autumn 2027 November 9, 2026 – First Priority Application Deadline / December 7, 2026 – Second Priority ... / January 26, 2027 – Final Application Deadline\" 7) \"Minimum scores for the Master's in Applied AI program: TOEFL: 102 (prior requirement) or 5 (current requirement; no subscore requirement); IELTS, 7\" 8) \"While the inaugural MS-AAI cohort has not yet graduated, students join a broader DSI community ...\""},
]
aai["links"] = [
    {"label": "MS-AAI 课程页（9 门/3 quarter）", "url": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/applied-ai-curriculum/"},
    {"label": "MS-AAI 申请流程（截止/语言）", "url": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/application-process/"},
    {"label": "MS-AAI 学费与资助（$67,500）", "url": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/tuition-financial-aid/"},
    {"label": "MS-AAI 毕业生走向", "url": "https://datascience.uchicago.edu/education/masters-programs/masters-in-applied-artificial-intelligence/graduate-outcomes/"},
    {"label": "DSI 官网", "url": "https://datascience.uchicago.edu/"},
]

# ---------------------------------------------------------------- 8. UChicago MSDS
msds = spec_base(
    "uchicago-msds", "details/uchicago-data-science.html",
    "数据科学硕士（MS in Data Science · 5 核心 + 4 选修 + 结业研究项目 · CODAS）",
    "MS in Data Science (MSDS), Committee on Data Science (CODAS), Physical Sciences Division, The University of Chicago",
    "芝加哥大学 The University of Chicago", "芝加哥大学",
    ["5 门核心 + 4 门选修", "结业研究项目", "GPA 3.0 / 核心+选修 3.3", "GRE 不要求"],
)
msds["cards"] = [
    {"key": "req", "rows": [
        {"k": "申请截止（Fall 2027）", "v": "Round 1：2026-11-02（回复日 2027-01-15）；Round 2：2027-02-01（回复日 2027-04-15）；Round 3：2027-05-03；仅招秋季入学，不招其他学期", "src": "https://codas.uchicago.edu/how-to-apply/"},
        {"k": "学位与背景", "v": "须持认证高校本科学位；不限专业；委员会通过成绩单评估线性代数、统计、微积分等量化课程熟练度", "src": "https://codas.uchicago.edu/how-to-apply/"},
        {"k": "语言要求", "v": "TOEFL 或 IELTS 仅在不满足研究生院英语水平要求时提交；项目页未列总分/小分门槛，不估算", "src": "https://codas.uchicago.edu/how-to-apply/"},
        {"k": "标化要求", "v": "物理科学部（PSD）不要求 GRE 或其他标化成绩；已考者可自愿提交（须五年内有效，ETS 机构码 1832）", "src": "https://codas.uchicago.edu/how-to-apply/"},
        {"k": "申请材料", "v": "成绩单（全部已修与在修课程）、简历、目的陈述、推荐信（按申请门户要求）、英语成绩（如需）", "src": "https://codas.uchicago.edu/how-to-apply/"},
        {"k": "申请费", "v": "$90，不可退", "src": "https://codas.uchicago.edu/how-to-apply/"},
    ], "links": [{"label": "MSDS 申请说明", "url": "https://codas.uchicago.edu/how-to-apply/"}]},
    {"key": "fee", "rows": [
        {"k": "学费", "v": "项目页与 FAQ 均未列项目级学费；官网指引用 Office of the University Bursar 费率页，该页本轮返回 403，按「官网未披露」处理，不估算"},
        {"k": "申请费", "v": "$90（不可退）", "src": "https://codas.uchicago.edu/how-to-apply/"},
        {"k": "预备课程", "v": "入学前开设的线上基础课程（foundational courses）全部免费且可选，不计入学位要求", "src": "https://codas.uchicago.edu/frequently-asked-questions/"},
        {"k": "奖学金", "v": "官网：MSDS 新录取学生自动纳入 DSI 的部分 merit 奖学金评审，金额按个案确定", "src": "https://codas.uchicago.edu/frequently-asked-questions/"},
        {"k": "其他成本", "v": "官网指向 Cost of Attendance 页查看直接与间接成本分项；本轮该页不可达（404），未取到数字"},
    ], "links": [{"label": "MSDS 常见问题（费用/资助）", "url": "https://codas.uchicago.edu/frequently-asked-questions/"}]},
    {"key": "course", "rows": [
        {"k": "核心 1", "v": "DATA 30100 Introduction to Data Science"},
        {"k": "核心 2", "v": "DATA 31500 Data Interaction"},
        {"k": "核心 3（二选一）", "v": "DATA 34100 Introduction to Data Systems & Data Design 或 DATA 34200 Data Engineering & Scalable Computing"},
        {"k": "核心 4", "v": "DATA 35900 Responsible Use of Data & Algorithms"},
        {"k": "核心 5（二选一）", "v": "DATA 37000 Introduction to Machine Learning & Neural Networks 或 DATA 37711 Foundations of Machine Learning & AI – Part I"},
        {"k": "选修（4 门）", "v": "可从数据科学、计算机科学、统计学及全校各系研究生课中选；官网另提供 required/elective 课程清单页"},
        {"k": "结业研究项目", "v": "须完成综合研究项目（capstone 性质），展示数据科学方法掌握度、独立研究与结果表达能力；形式与导师协商确定"},
        {"k": "授课方式", "v": "官网：5 门核心课均在 Hyde Park 校区线下（in-person）完成"},
    ], "links": [{"label": "MSDS 课程页（DATA 课号）", "url": "https://codas.uchicago.edu/academics/ms-data-science/"}]},
    {"key": "plan", "rows": [
        {"k": "学分与成绩规则", "v": "核心与选修课须 C 或更好；全部课程累计 GPA ≥3.0；核心加选修累计 GPA ≥3.3", "src": "https://codas.uchicago.edu/academics/ms-data-science/"},
        {"k": "学制", "v": "官网学术政策页把细则放在 Student Handbook（Program Structure & Degree Requirements）；项目页未列固定月数，本页不写死学制"},
        {"k": "课程结构", "v": "5 门核心 + 4 门研究生选修 + 结业研究项目，核心课由数据科学、统计、计算机等系教师授课"},
        {"k": "入学准备", "v": "可选线上基础课（免费、不计学分）帮助补齐技术基础"},
        {"k": "定位", "v": "官网：面向希望在数据科学领域从事研究的学生，课程由多系教师共同开设"},
    ], "links": [{"label": "MSDS 课程与学术政策", "url": "https://codas.uchicago.edu/academics/ms-data-science/"}]},
    {"key": "outcome", "rows": [
        {"k": "就业数据", "v": "项目页与 FAQ 未公布就业率、起薪中位数与雇主名单；不估算"},
        {"k": "资助与读博说明", "v": "官网 FAQ：博士录取提供五年保证资助（覆盖学费与 U-SHIP 保险），硕士不适用该口径", "src": "https://codas.uchicago.edu/frequently-asked-questions/"},
        {"k": "职业资源", "v": "CODAS 与 DSI 共用职业服务与校友网络（具体服务清单以官网为准）"},
    ]},
    {"key": "city", "type": "text", "title": "院校与城市速览（供沟通参考）",
     "text": "CODAS 位于芝加哥大学 Hyde Park 校区 John Crerar Library Building（Suite 150，5730 South Ellis Avenue, Chicago, IL 60637）。Hyde Park 距市中心约 20–30 分钟车程，校园周边以住宿与学术社区为主，核心课要求到校上课。具体住宿与通勤以录取后通知为准，本段供沟通参考。"},
    {"key": "quote", "type": "text", "title": "官网原文要点摘录（英文原句，便于核对）",
     "text": "1) \"Students must complete 5 required core classes, 4 additional elective options, and a comprehensive final research project in order to be eligible for degree completion.\" 2) \"All students in the MSDS program will take 5 required core classes below. Each course is designed to be completed in-person here at our Hyde Park campus\" 3) \"Minimum cumulative GPA for all courses is 3.0\" / \"Minimum cumulative GPA for all core plus elective courses is 3.3\" / \"Core and Elective Courses should receive a 'C' or better grade\" 4) \"The Physical Sciences Division (PSD) does not require the GRE or other standardized test scores for admission into the MSDS or PhD programs.\" 5) \"There is a $90.00 non-refundable application fee.\" 6) \"Round 1 Deadline: November 2, 2026 / Reply Date: January 15, 2027 ... Round 2 Deadline: February 1, 2027 ... Round 3 Deadline: May 3, 2027\" 7) \"Foundational courses are offered at no cost and are optional to all incoming students\" 8) \"Newly admitted students to the MSDS program are automatically eligible for partial, merit-based scholarships on behalf of the Data Science Institute (DSI).\""},
]
msds["links"] = [
    {"label": "MSDS 课程页（核心课号）", "url": "https://codas.uchicago.edu/academics/ms-data-science/"},
    {"label": "MSDS 申请说明（截止/GRE/费用）", "url": "https://codas.uchicago.edu/how-to-apply/"},
    {"label": "MSDS 常见问题（费用/资助）", "url": "https://codas.uchicago.edu/frequently-asked-questions/"},
    {"label": "芝大研究生院英语要求", "url": "https://grad.uchicago.edu/admissions/apply/english-language-requirements/"},
    {"label": "CODAS 官网", "url": "https://codas.uchicago.edu/"},
]

SPECS = [msis, ml, msaii, miis, mse, stats, aai, msds]
for s in SPECS:
    fp = OUT / (s["id"] + ".json")
    fp.write_text(json.dumps(s, ensure_ascii=False, indent=1), encoding="utf-8")
    print("spec ->", fp)
