Download scripts/build_intent_dataset.py from Estarcode/campusdesk-ai: direct link, hf CLI and curl.
- Browser
- Download file 18 kB
-
https://huggingface.co/Estarcode/campusdesk-ai/resolve/main/scripts/build_intent_dataset.py
- Command line
-
hf download hf://Estarcode/campusdesk-ai/scripts/build_intent_dataset.py
-
curl -L -o build_intent_dataset.py https://huggingface.co/Estarcode/campusdesk-ai/resolve/main/scripts/build_intent_dataset.py
18 kB
| """Build the 136-example bilingual (English + Nigerian Pidgin) family-grouped intent dataset.""" | |
| import csv | |
| from typing import Dict, List, Tuple | |
| from src.config import DATA_DIR, INTENT_DATASET_PATH | |
| # Format: (family_id, split, intent, [(language, text), ...]) | |
| # Splits: 10 train families/intent (22 items/intent = 88), 3 val (6/intent = 24), 3 test (6/intent = 24). | |
| FAMILIES: List[Tuple[str, str, str, List[Tuple[str, str]]]] = [ | |
| # ======================== DEADLINES (16 families, 34 items) ======================== | |
| ("DL-01", "train", "deadlines", [ | |
| ("English", "When is the final closing date to submit the bursary application?"), | |
| ("Nigerian Pidgin", "Wetin be di final date wey person fit submit dis bursary form?"), | |
| ("English", "What deadline did the bursary office set for closing portal entries?"), | |
| ]), | |
| ("DL-02", "train", "deadlines", [ | |
| ("English", "What date does the bursary portal open for 2026 applicants?"), | |
| ("Nigerian Pidgin", "Which day dem go open portal make students start to apply?"), | |
| ("Nigerian Pidgin", "When di online bursary application window go begin?"), | |
| ]), | |
| ("DL-03", "train", "deadlines", [ | |
| ("English", "What exact time on the closing day does the portal lock submissions?"), | |
| ("Nigerian Pidgin", "Na which time for night portal go close on di last day?"), | |
| ]), | |
| ("DL-04", "train", "deadlines", [ | |
| ("English", "By what date must shortlisted students confirm their bank account details?"), | |
| ("Nigerian Pidgin", "When be di deadline to confirm bank account after shortlist don comot?"), | |
| ]), | |
| ("DL-05", "train", "deadlines", [ | |
| ("English", "How many working days after shortlisting does disbursement take?"), | |
| ("Nigerian Pidgin", "How many working days e dey take before dem pay shortlist students?"), | |
| ]), | |
| ("DL-06", "train", "deadlines", [ | |
| ("English", "When is the supplementary batch scheduled if I miss bank confirmation?"), | |
| ("Nigerian Pidgin", "Which month next payout batch go happen if I confirm my account late?"), | |
| ]), | |
| ("DL-07", "train", "deadlines", [ | |
| ("English", "What are the opening hours for physical verification at Block B Room 14?"), | |
| ("Nigerian Pidgin", "Which time bursary desk for Block B Room 14 dey open and close daily?"), | |
| ]), | |
| ("DL-08", "train", "deadlines", [ | |
| ("English", "Does the June 8 amendment shorten the application deadline to June 10?"), | |
| ("Nigerian Pidgin", "True true say new notice don shift closing date back to 10 June?"), | |
| ]), | |
| ("DL-09", "train", "deadlines", [ | |
| ("English", "Are late portal submissions accepted after the regular cycle closes?"), | |
| ("Nigerian Pidgin", "If portal don lock after closing date, dem still dey collect late form?"), | |
| ]), | |
| ("DL-10", "train", "deadlines", [ | |
| ("English", "When does physical verification desk support stop for this cycle?"), | |
| ("Nigerian Pidgin", "Wetin be di last day wey I fit go Block B for physical paper check?"), | |
| ]), | |
| ("DL-11", "val", "deadlines", [ | |
| ("English", "Can I request an application unlock before the official closing date?"), | |
| ("Nigerian Pidgin", "I fit still unlock my form make I correct mistake before deadline reach?"), | |
| ]), | |
| ("DL-12", "val", "deadlines", [ | |
| ("English", "How long does the express CGPA audit take once requested?"), | |
| ("Nigerian Pidgin", "How many hours express transcript verification dey take for Exams office?"), | |
| ]), | |
| ("DL-13", "val", "deadlines", [ | |
| ("English", "On which days of the week is the physical bursary helpdesk open?"), | |
| ("Nigerian Pidgin", "Na which days for week dem dey open bursary office for verification?"), | |
| ]), | |
| ("DL-14", "test", "deadlines", [ | |
| ("English", "Did the latest notice change the bursary closing date from 14 June to 10 June?"), | |
| ("Nigerian Pidgin", "Di new amendment don carry di bursary closing date go 10 June instead of 14 June?"), | |
| ]), | |
| ("DL-15", "test", "deadlines", [ | |
| ("English", "How recent must an LGA indigency letter be before submission?"), | |
| ("Nigerian Pidgin", "LGA indigency letter gats be within how many months before I upload am?"), | |
| ]), | |
| ("DL-16", "test", "deadlines", [ | |
| ("English", "Is the physical verification desk open on public holidays?"), | |
| ("Nigerian Pidgin", "Bursary verification desk dey open on public holiday or dem dey close?"), | |
| ]), | |
| # ======================== ELIGIBILITY (16 families, 34 items) ======================== | |
| ("EL-01", "train", "eligibility", [ | |
| ("English", "Can 100-level first-year students apply for the 2026 ZIT bursary?"), | |
| ("Nigerian Pidgin", "Fresher wey dey 100 level fit apply for dis ZIT bursary?"), | |
| ("English", "Are newly admitted 100-level undergraduates eligible for this grant?"), | |
| ]), | |
| ("EL-02", "train", "eligibility", [ | |
| ("English", "Which academic levels are eligible to receive the undergraduate bursary?"), | |
| ("Nigerian Pidgin", "Na from which level reach which level fit apply for dis bursary?"), | |
| ("Nigerian Pidgin", "Na only 200 to 500 level students dem allow for dis grant?"), | |
| ]), | |
| ("EL-03", "train", "eligibility", [ | |
| ("English", "Are part-time evening students qualified for the 2026 bursary?"), | |
| ("Nigerian Pidgin", "Part-time evening student fit collect dis bursary money?"), | |
| ]), | |
| ("EL-04", "train", "eligibility", [ | |
| ("English", "Can postgraduate students submit an application for this hardship grant?"), | |
| ("Nigerian Pidgin", "Masters or postgraduate student qualify for dis bursary cycle?"), | |
| ]), | |
| ("EL-05", "train", "eligibility", [ | |
| ("English", "What minimum CGPA is required for non-STEM arts and social science faculties?"), | |
| ("Nigerian Pidgin", "Wetin be di minimum CGPA for person wey no dey Engineering or Computing?"), | |
| ]), | |
| ("EL-06", "train", "eligibility", [ | |
| ("English", "What is the amended CGPA cutoff for Engineering and Computing students?"), | |
| ("Nigerian Pidgin", "Which CGPA Engineering and Computing students need get after di new amendment?"), | |
| ]), | |
| ("EL-07", "train", "eligibility", [ | |
| ("English", "Am I disqualified if I hold an external scholarship worth 250,000 naira?"), | |
| ("Nigerian Pidgin", "If I don get external scholarship pass 200k, I still qualify for ZIT bursary?"), | |
| ]), | |
| ("EL-08", "train", "eligibility", [ | |
| ("English", "Can a student with an uncleared library fine receive the bursary payout?"), | |
| ("Nigerian Pidgin", "If I get overdue library fine wey I never clear, dem go pay me bursary?"), | |
| ]), | |
| ("EL-09", "train", "eligibility", [ | |
| ("English", "Are Vocational Technology students covered by the 2.20 CGPA amendment?"), | |
| ("Nigerian Pidgin", "Vocational Technology people join inside di 2.20 CGPA rule?"), | |
| ]), | |
| ("EL-10", "train", "eligibility", [ | |
| ("English", "Does an unresolved hostel damage hold block my bursary eligibility for payout?"), | |
| ("Nigerian Pidgin", "Hostel damage hold fit stop person make e no collect bursary alert?"), | |
| ]), | |
| ("EL-11", "val", "eligibility", [ | |
| ("English", "Can I qualify if my current external corporate award is 150,000 naira?"), | |
| ("Nigerian Pidgin", "If corporate award wey I get be 150,000 naira, I still fit apply?"), | |
| ]), | |
| ("EL-12", "val", "eligibility", [ | |
| ("English", "Which semester results are used to compute the CGPA eligibility cutoff?"), | |
| ("Nigerian Pidgin", "Na first semester result dem dey use check CGPA for dis bursary?"), | |
| ]), | |
| ("EL-13", "val", "eligibility", [ | |
| ("English", "Are students with laboratory breakage charges cleared automatically?"), | |
| ("Nigerian Pidgin", "Person wey get lab breakage charge gats clear am first before payout?"), | |
| ]), | |
| ("EL-14", "test", "eligibility", [ | |
| ("English", "Does a 2.30 CGPA qualify a full-time 300-level Computing student?"), | |
| ("Nigerian Pidgin", "300 level Computing student wey get 2.30 CGPA qualify apply for dis grant?"), | |
| ]), | |
| ("EL-15", "test", "eligibility", [ | |
| ("English", "Is a full-time 400-level student in Humanities with 2.40 CGPA eligible?"), | |
| ("Nigerian Pidgin", "Full-time 400 level student for Arts with 2.40 CGPA fit apply?"), | |
| ]), | |
| ("EL-16", "test", "eligibility", [ | |
| ("English", "Does the amended 2.20 CGPA rule apply only to full-time undergraduates?"), | |
| ("Nigerian Pidgin", "Di 2.20 CGPA rule na only for full-time undergraduate students e dey work?"), | |
| ]), | |
| # ======================== REQUIRED_DOCUMENTS (16 families, 34 items) ======================== | |
| ("RD-01", "train", "required_documents", [ | |
| ("English", "What three mandatory documents must every applicant attach to the form?"), | |
| ("Nigerian Pidgin", "Which three compulsory papers everybody must attach for bursary form?"), | |
| ("English", "List the required supporting documents needed by all bursary applicants."), | |
| ]), | |
| ("RD-02", "train", "required_documents", [ | |
| ("English", "Do I need a signed HOD attestation letter to complete my submission?"), | |
| ("Nigerian Pidgin", "HOD attestation letter dey compulsory make I submit my form?"), | |
| ("Nigerian Pidgin", "If HOD never sign my letter, portal go accept my application?"), | |
| ]), | |
| ("RD-03", "train", "required_documents", [ | |
| ("English", "Which additional document is required for the Indigent or Orphaned tier?"), | |
| ("Nigerian Pidgin", "Which extra paper orphan or indigent student gats add join normal documents?"), | |
| ]), | |
| ("RD-04", "train", "required_documents", [ | |
| ("English", "Can I upload a parent bank account instead of my own BVN-linked account?"), | |
| ("Nigerian Pidgin", "I fit drop my mama bank account number or na my own BVN account dem want?"), | |
| ]), | |
| ("RD-05", "train", "required_documents", [ | |
| ("English", "What file format and maximum size limit apply to uploaded documents?"), | |
| ("Nigerian Pidgin", "Na only PDF file dem allow, and how many MB e no must pass?"), | |
| ]), | |
| ("RD-06", "train", "required_documents", [ | |
| ("English", "Can I submit a High Court sworn affidavit instead of an LGA indigency letter?"), | |
| ("Nigerian Pidgin", "Sworn affidavit from High Court fit replace LGA letter for indigent tier?"), | |
| ]), | |
| ("RD-07", "train", "required_documents", [ | |
| ("English", "What happens if I upload a blurred scan or an unsigned HOD letter?"), | |
| ("Nigerian Pidgin", "Wetin go happen if my scan blur or signature no dey my HOD paper?"), | |
| ]), | |
| ("RD-08", "train", "required_documents", [ | |
| ("English", "Did the June 8 deadline amendment remove the tuition fee receipt requirement?"), | |
| ("Nigerian Pidgin", "Since dem amend closing date, fee receipt still dey among wetin I go carry?"), | |
| ]), | |
| ("RD-09", "train", "required_documents", [ | |
| ("English", "What can I upload if my original ZIT Student ID card is missing?"), | |
| ("Nigerian Pidgin", "If my school ID card don loss, which replacement paper dem go collect?"), | |
| ]), | |
| ("RD-10", "train", "required_documents", [ | |
| ("English", "Which session tuition fee receipt is accepted as valid proof?"), | |
| ("Nigerian Pidgin", "Na 2025/2026 school fees receipt dem want or old session own fit work?"), | |
| ]), | |
| ("RD-11", "val", "required_documents", [ | |
| ("English", "Who is authorized to sign an indigency letter if I do not have an affidavit?"), | |
| ("Nigerian Pidgin", "Who fit sign indigency paper for me if I no carry sworn affidavit?"), | |
| ]), | |
| ("RD-12", "val", "required_documents", [ | |
| ("English", "Must the commercial bank account match my exact legal name on the portal?"), | |
| ("Nigerian Pidgin", "My bank account name gats match my legal name wey dey school portal?"), | |
| ]), | |
| ("RD-13", "val", "required_documents", [ | |
| ("English", "Are expired fee receipts accepted for the 2026 hardship grant?"), | |
| ("Nigerian Pidgin", "Dem dey collect expired fee receipt during bursary screening?"), | |
| ]), | |
| ("RD-14", "test", "required_documents", [ | |
| ("English", "Which documents must an orphaned applicant attach along with the ID card?"), | |
| ("Nigerian Pidgin", "Which papers orphan student need attach join student ID card?"), | |
| ]), | |
| ("RD-15", "test", "required_documents", [ | |
| ("English", "Can a Word document or JPEG image be uploaded instead of a PDF file?"), | |
| ("Nigerian Pidgin", "I fit upload picture JPEG or Word doc instead of PDF on portal?"), | |
| ]), | |
| ("RD-16", "test", "required_documents", [ | |
| ("English", "Does every applicant need the 2025/2026 tuition receipt issued by the Bursary?"), | |
| ("Nigerian Pidgin", "Everybody must carry 2025/2026 tuition fee receipt from Bursary?"), | |
| ]), | |
| # ======================== FEES (16 families, 34 items) ======================== | |
| ("FE-01", "train", "fees", [ | |
| ("English", "How much is the online bursary application processing fee?"), | |
| ("Nigerian Pidgin", "How much dem dey collect to submit bursary application online?"), | |
| ("English", "Do students have to pay an administrative charge to apply for the bursary?"), | |
| ]), | |
| ("FE-02", "train", "fees", [ | |
| ("English", "What is the fee for a late Student ID card re-issuance slip?"), | |
| ("Nigerian Pidgin", "How much be late ID card replacement fee at Bursary Block B?"), | |
| ("Nigerian Pidgin", "If I wan collect replacement slip for lost student ID, how much e cost?"), | |
| ]), | |
| ("FE-03", "train", "fees", [ | |
| ("English", "How much does the optional 48-hour express CGPA verification cost?"), | |
| ("Nigerian Pidgin", "How much dem dey charge for express 48-hour transcript verification?"), | |
| ]), | |
| ("FE-04", "train", "fees", [ | |
| ("English", "What is the administrative fee to unlock and correct a submitted application?"), | |
| ("Nigerian Pidgin", "How much I go pay to unlock and re-upload document on portal?"), | |
| ]), | |
| ("FE-05", "train", "fees", [ | |
| ("English", "What is the maximum award amount under Grant Tier A Tuition Relief?"), | |
| ("Nigerian Pidgin", "How much be di highest money wey Tuition Relief Tier A dey pay?"), | |
| ]), | |
| ("FE-06", "train", "fees", [ | |
| ("English", "How much is the Books, Studio and Lab Equipment Stipend under Tier B?"), | |
| ("Nigerian Pidgin", "How much be Tier B money for books and lab equipment?"), | |
| ]), | |
| ("FE-07", "train", "fees", [ | |
| ("English", "Does standard departmental CGPA verification through the HOD cost anything?"), | |
| ("Nigerian Pidgin", "Normal CGPA verification with HOD na free or dem dey collect fee?"), | |
| ]), | |
| ("FE-08", "train", "fees", [ | |
| ("English", "Is the Tuition Relief Tier A grant paid as cash or credited to my fee ledger?"), | |
| ("Nigerian Pidgin", "Dem dey send Tier A tuition money enter bank account or straight to fee ledger?"), | |
| ]), | |
| ("FE-09", "train", "fees", [ | |
| ("English", "What is the maximum external scholarship amount allowed before losing eligibility?"), | |
| ("Nigerian Pidgin", "External scholarship wey student fit get no must pass how much naira?"), | |
| ]), | |
| ("FE-10", "train", "fees", [ | |
| ("English", "Where do students pay the 3,000 naira ID replacement fee?"), | |
| ("Nigerian Pidgin", "Where I go pay di 3,000 naira fee for lost student ID replacement?"), | |
| ]), | |
| ("FE-11", "val", "fees", [ | |
| ("English", "Is the Tier B equipment stipend paid directly into the student's bank account?"), | |
| ("Nigerian Pidgin", "Na inside my bank account dem go pay di 45,000 naira Tier B stipend?"), | |
| ]), | |
| ("FE-12", "val", "fees", [ | |
| ("English", "How much does it cost if I do not need express transcript verification?"), | |
| ("Nigerian Pidgin", "If I no do express verification, I go still pay 2,500 naira?"), | |
| ]), | |
| ("FE-13", "val", "fees", [ | |
| ("English", "Is there any fee charged to correct an application after initial lock?"), | |
| ("Nigerian Pidgin", "Dem dey charge money if person wan fix document after e don lock form?"), | |
| ]), | |
| ("FE-14", "test", "fees", [ | |
| ("English", "How much does it cost to submit a regular ZIT bursary application?"), | |
| ("Nigerian Pidgin", "Na how much dem dey pay to apply for ZIT bursary form?"), | |
| ]), | |
| ("FE-15", "test", "fees", [ | |
| ("English", "What is the total amount awarded for the Tier B books and lab stipend?"), | |
| ("Nigerian Pidgin", "How much Tier B grant dey give student for books and lab tools?"), | |
| ]), | |
| ("FE-16", "test", "fees", [ | |
| ("English", "How much is the admin fee for unlocking a portal upload before the deadline?"), | |
| ("Nigerian Pidgin", "How much be portal document correction fee before deadline reach?"), | |
| ]), | |
| ] | |
| def build_intent_csv() -> None: | |
| DATA_DIR.mkdir(parents=True, exist_ok=True) | |
| rows: List[Dict[str, str]] = [] | |
| idx = 1 | |
| for family_id, split, intent, examples in FAMILIES: | |
| for language, text in examples: | |
| rows.append( | |
| { | |
| "request_id": f"REQ-{idx:03d}", | |
| "family_id": family_id, | |
| "split": split, | |
| "language": language, | |
| "intent": intent, | |
| "text": text, | |
| } | |
| ) | |
| idx += 1 | |
| with INTENT_DATASET_PATH.open("w", encoding="utf-8", newline="") as f: | |
| writer = csv.DictWriter( | |
| f, | |
| fieldnames=["request_id", "family_id", "split", "language", "intent", "text"], | |
| ) | |
| writer.writeheader() | |
| writer.writerows(rows) | |
| print(f"Wrote {len(rows)} labelled requests across {len(FAMILIES)} families to {INTENT_DATASET_PATH}") | |
| if __name__ == "__main__": | |
| build_intent_csv() | |