#!/usr/bin/env python3
"""Suggest a learning pathway for each refugee or migrant learner and group them into classes by pathway and time.
CSV columns: name, english (pre-A1, A1, A2, B1, B2), l1_literacy (none, basic, fluent), l1_script (roman / other),
schooling_years, goal (work, school-children, health, study, daily-life), availability (mornings, evenings,
weekends), childcare (y/n)
Pathways:
Foundation literacy little or no L1 literacy or under 4 years of schooling, English pre-A1/A1
Script transition literate in a non-Roman script, English pre-A1/A1
Settlement ESOL English A1-A2 (or literate beginners in a Roman script)
Work / study English B1+; vocational or academic depending on the goal
Only learning information is used; do not record trauma, asylum status or other sensitive details in this file.
Usage:
python learner_pathways.py intake.csv [--max-class 12]
Exit codes: 0 printed, 2 read error or missing columns.
"""
import argparse
import csv
import sys
from collections import Counter, defaultdict
HOURS = {"Foundation literacy": "6-10 h/week, small class (max 10), oral English + phonics + functional literacy",
"Script transition": "6-8 h/week, Roman alphabet, sound-letter links, then settlement topics",
"Settlement ESOL": "4-8 h/week, settlement topics (health, housing, transport, school, work)",
"Work / study": "4-6 h/week, vocational English or academic preparation; link to training providers"}
def pathway(r):
eng = r["english"].strip().upper()
lit = r.get("l1_literacy", "").strip().lower()
school = float(r.get("schooling_years") or 0)
beginner = eng in ("PRE-A1", "A1")
if beginner and (lit in ("none", "basic") or school < 4):
return "Foundation literacy"
if beginner and r.get("l1_script", "").strip().lower() not in ("roman", "latin"):
return "Script transition"
if eng in ("PRE-A1", "A1", "A2"):
return "Settlement ESOL"
return "Work / study"
def main():
ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
ap.add_argument("csv")
ap.add_argument("--max-class", type=int, default=12)
a = ap.parse_args()
try:
with open(a.csv, newline="", encoding="utf-8-sig") as fh:
rows = list(csv.DictReader(fh))
if not rows or not {"name", "english"} <= set(rows[0]):
raise ValueError("needs at least name and english columns")
groups = defaultdict(list)
for r in rows:
r["pathway"] = pathway(r)
groups[(r["pathway"], (r.get("availability") or "any").strip().lower())].append(r)
except (OSError, csv.Error, ValueError) as e:
print(f"error: {e}", file=sys.stderr)
return 2
print(f"{len(rows)} learners\n")
print("| Learner | English | L1 literacy | Schooling | Pathway | Goal |\n|---------|---------|-------------|-----------|---------|------|")
for r in rows:
print(f"| {r['name']} | {r['english']} | {r.get('l1_literacy', '')} | {r.get('schooling_years', '')} | "
f"{r['pathway']} | {r.get('goal', '')} |")
print("\nClasses:")
for (path, when), members in sorted(groups.items()):
cap = 10 if path == "Foundation literacy" else a.max_class
for i in range(0, len(members), cap):
chunk = members[i:i + cap]
print(f" {path} ({when}), {len(chunk)} learner{'s' if len(chunk) > 1 else ''}: " + ", ".join(m["name"] for m in chunk))
print("\nPathway guidance:")
for path in sorted({r["pathway"] for r in rows}):
print(f" {path}: {HOURS[path]}")
care = sum((r.get("childcare") or "").strip().lower() in ("y", "yes") for r in rows)
goals = Counter((r.get("goal") or "").strip().lower() for r in rows if r.get("goal"))
if care:
print(f"\nChildcare needed by {care} learner(s): arrange a creche or schedule in school hours")
if goals:
print("Goals: " + ", ".join(f"{g} {n}" for g, n in goals.most_common()) + " - weight settlement topics accordingly")
return 0
if __name__ == "__main__":
sys.exit(main())
academic-english-eap-course-planner
Plan English for Academic Purposes (EAP) courses: pre-sessional, in-sessional, foundation, IELTS preparation and discipline-specific EAP, with syllabus strands (academic reading, lecture listening and note-taking, essay and report writing, paraphrase, summary and synthesis, referencing and plagiarism, seminars and presentations, academic vocabulary, critical thinking), a 10-week pre-sessional outline, exit assessment, IELTS-CEFR alignment and academic style (formality, hedging, cohesion, reporting verbs). Estimates study hours and weeks to close an IELTS gap from overall or per-skill scores (IELTS rounding, minimum per skill, priority skills, feasibility before a deadline), and checks learner texts for contractions, informal words with academic alternatives, unhedged claims, 'you', And/But/So starts, rhetorical questions and missing citations.
actfl-proficiency-curriculum-mapper
Map world language curricula to the ACTFL framework: proficiency levels (Novice, Intermediate, Advanced, Superior, Distinguished with sublevels), functions, contexts, text types and accuracy, proficiency vs performance, the three modes of communication (interpretive, interpersonal, presentational), the 5 Cs World-Readiness Standards, backward-designed thematic units with Integrated Performance Assessments, typical programme targets and FSI time estimates. Looks up approximate ACTFL-CEFR-ILR equivalences with what each level can do, and checks a unit map for missing modes, rehearsed skits mislabelled as interpersonal, translation or word lists as interpretive tasks, and units without an integrated performance assessment.
adult-literacy-esl-lesson-builder
Build lessons for adult ESL learners who are developing literacy (LESLLA learners: pre-literate, non-literate, semi-literate, literate in a non-Roman script): learner profiles and sensitive initial assessment, principles (oral language first, known to new, systematic phonics with adult-relevant text, repetition, classroom skills, respect for experience), a lesson routine (oral warm-up, review, new grapheme, blending, segmenting, decodable text, writing, functional literacy, Language Experience Approach), a phonics sequence for adults, sight words, functional literacy targets (forms, signs, medicine labels) and portfolio assessment. Checks whether a reading text is decodable with the letter-sound patterns and sight words taught so far, catching untaught digraphs, listing non-decodable words with the untaught part, and suggesting the most useful next patterns.
authentic-material-lesson-adapter
Turn authentic material (news articles, podcasts, videos, songs, menus, timetables, adverts, social media posts, forms, infographics) into language lessons by grading the task rather than the text. Selects texts for interest, relevance, exploitability, coverage, cultural load and rights; finds the 4-6 words to pre-teach, words to gloss on the page and words learners can ignore, plus names and cultural references to explain, with reading time by level; and builds a lesson shape (lead-in, pre-teach, gist or scanning, graded detail task, language focus on chunks and register, response) with task ideas per material type and level from A1 to C1. Covers copyright, fair dealing and fair use, Creative Commons and attribution.
can-do-statement-writer
Write and review can-do statements for language courses, units, lessons and learner self-assessment, CEFR or NCSSFL-ACTFL style: action (observable verb) + text or situation + level-specific conditions, learner ('I can') and descriptor ('Can') versions, progressions of one activity from A1 to C1, and coverage of reception, production, interaction and mediation. Includes a verb bank by mode and level and condition and text-type banks. Lints statements for teacher-centred phrasing, knowledge instead of use (learn, know, understand the passive), missing context, two skills in one statement, vague quality words, grammar items as outcomes, overlong statements and missing modes in a set.
cefr-aligned-syllabus-builder
Build language course syllabuses aligned to the CEFR (A1-C2, plus levels, Companion Volume 2020): entry and exit levels, guided learning hours and course length (with an L1-distance adjustment), syllabus type (topic, functional-notional, task-based, skills-based, multi-strand), unit-by-unit can-do outcomes, grammar from a core inventory by level, vocabulary, functions, pronunciation, balance of reception, production, interaction and mediation, recycling and assessment points. Checks a syllabus for units without can-do statements, core grammar for the level not covered, items above the course level, skills missing from most units and units with no vocabulary or functions.