""" Master Domain Extractor & Generator across the 20 Exhaustive Knowledge Pillars. Covers: 1. ALL NCERT (Class 1-12: Science, Math, SST, Geography, CS, Polity) 2. Complete Indian History (Ancient, Medieval, Modern, Freedom Movement) 3. Constitution & Complete Law (Articles, BNS, CrPC, RTI, Consumer, Cyber) 4. Electronics Engineering & Manufacturing (PCB, SMT, MI, Reflow, AOI) 5. Industrial Quality Systems (QMS, ISO 9001, IATF 16949, APQP, FMEA, PPAP, SPC) 6. Failure Analysis (FA) & Reliability (8D RCA, 5-Whys, SEM/EDX, IMC layer) 7. Complete Tech, CS & Coding (Python, Linux, Networking, Databases, Git) 8. Corporate & Professional Emails (Leave, Appraisal, MOM, Escalation, PO) 9. Cinema & All Movies (Bollywood, South, Hollywood, Classics, Awards) 10. Everyday Math & Logic with (Arithmetic, Dukan Hisaab, Unitary) 11. Personal Finance, Banking & Tax (ITR, Mutual Funds, CIBIL, Insurance) 12. Healthcare, Medicine & First Aid (CPR, Burns, Lab Reports, Ayurveda) 13. Sports, Cricket & Athletics (World Cups, IPL, Rules, Legends) 14. Competitive Exams & Sarkari Jobs (UPSC, SSC, Banking, Railways) 15. Automobile & Maintenance (Petrol/Diesel/EV, Oil, Mileage, RTO) 16. Rasoi, Cooking & Nutrition (Regional Indian Cuisines, Masalas, Diet) 17. Soft Skills & Interview Prep (HR frameworks, Confidence, Time management) 18. World Geography & International Affairs (UN, G20, Major Wars) 19. Sanskriti, Sangeet, Kala & Dharam (Classical Music, Folk, Epics) 20. Massive Bol-Chal Hinglish & Dialogue (Colloquial conversations) Usage: python data/scripts/collect_domains.py --output /tmp/domain_samples.jsonl --limit 5000 """ import argparse import json from pathlib import Path import random SEED = 42 DOMAIN_KNOWLEDGE_PACKS = { "electronics_smt_pcb": [ # PCB Fabrication ("PCB fabrication me FR-4 substrate sabse common glass-reinforced epoxy laminate material hai. High frequency RF designs me Rogers ya Teflon use hota hai, jabki high heat dissipation applications (jaise LED drivers) me Aluminum / Metal Core PCB use ki jaati hai.", "hinglish"), ("IPC-2221 PCB design ka generic standard hai, jabki IPC-A-600 printed boards ki acceptability aur quality inspection criteria define karta hai.", "hinglish"), ("PCB vias teen tarah ke hote hain: Through-hole vias jo top se bottom tak penetrate karte hain, Blind vias jo outer layer ko inner layer se jodte hain, aur Buried vias jo sirf inner layers ke beech connect hote hain. High density interconnect (HDI) me laser drilled micro-vias use hote hain.", "hinglish"), ("Surface finish selection: HASL (Hot Air Solder Leveling) sasta hota hai par flat surface nahi deta. ENIG (Electroless Nickel Immersion Gold) flat surface deta hai aur fine-pitch BGA/QFN ke liye best hai. OSP (Organic Solderability Preservative) lead-free aur environmentally friendly option hai.", "hinglish"), # SMT Line ("SMT line me solder paste printing pehla critical step hai. Stencil thickness aam taur par 100 se 150 microns hoti hai. Squeegee angle 45 to 60 degrees rakha jata hai. Paste inspection ke liye 3D SPI use hota hai jo volume, height aur area measure karta hai.", "hinglish"), ("Lead-free soldering me SAC305 (96.5% Tin, 3% Silver, 0.5% Copper) alloy sabse zyada use hota hai. Iska melting point lagbhag 217°C hota hai.", "hinglish"), ("Reflow oven thermal profile me 4 zones hote hain: Preheat zone (1-3°C/sec ramp rate), Soak zone (flux activate karne ke liye 150-180°C), Reflow peak zone (TAL - Time Above Liquidus 45-75 sec, peak temp 235-250°C), aur Cooling zone (rapid grain structure crystallization).", "hinglish"), ("Tombstoning defect tab hota hai jab component ke dono pads par wetting forces unequal hoti hain. Causes: unequal pad size, uneven solder paste deposition, ya thermal mass imbalance.", "hinglish"), ("Head-in-Pillow (HiP) defect BGA components me tab banta hai jab BGA ball aur solder paste proper coalesce nahi hote, aksar BGA warpage ya paste oxidation ki wajah se.", "hinglish"), ("IPC-A-610 Class 3 electronic assemblies life-support systems aur aerospace ke liye mandatory hai jaha high reliability aur zero failure rate expected hoti hai.", "english"), ], "quality_qms_fa": [ # QMS & Standards ("IATF 16949 automotive quality management system standard hai jo ISO 9001:2015 ke uper base hai. Iska main focus defect prevention, variation reduction aur supply chain waste elimination par hota hai.", "hinglish"), ("Automotive ke 5 Core Quality Tools hain: APQP (Product development planning), FMEA (Risk analysis), PPAP (Production approval), MSA (Measurement error analysis), aur SPC (Process capability monitoring).", "hinglish"), ("Process capability index Cpk calculate karne ke liye formula hai: Cpk = min((USL - Mean)/(3*sigma), (Mean - LSL)/(3*sigma)). Six-sigma capability ke liye Cpk >= 1.33 ya 1.67 hona zaroori hai.", "hinglish"), ("Measurement System Analysis (MSA) me Gage R&R percentage < 10% hona acceptable maana jata hai. 10% se 30% conditional acceptance hai, aur > 30% measurement system reject ho jata hai.", "hinglish"), ("5S system shop floor cleanliness aur standardization ke liye 5 Japanese words se bana hai: Seiri (Sort), Seiton (Set in order), Seiso (Shine), Seiketsu (Standardize), aur Shitsuke (Sustain).", "hinglish"), # Failure Analysis ("Failure Analysis (FA) me 8D problem solving methodology use hoti hai: D1 Team formation, D2 Problem description, D3 Interim containment action (ICA), D4 Root cause analysis (RCA via 5-Whys/Fishbone), D5 Permanent corrective action (PCA), D6 Validate PCA, D7 Prevent recurrence, D8 Congratulate team.", "hinglish"), ("Microsectioning destructive testing me sample ko epoxy resin me pot kiya jata hai, fir diamond abrasive se grind aur polish karke chemical etchant lagaya jata hai taaki intermetallic compound (IMC layer Cu6Sn5 / Cu3Sn) thickness inspect ki ja sake. Ideal IMC thickness 1 to 3 microns hoti hai.", "hinglish"), ("Scanning Electron Microscopy (SEM) high magnification surface imaging ke liye use hota hai, aur EDX/EDS (Energy Dispersive X-ray Spectroscopy) micro-area ka elemental composition batata hai (jaise solder joint me contamination ya gold embrittlement).", "hinglish"), ("Electrostatic Discharge (ESD) prevention ke liye ESD S20.20 standard follow hota hai. Wrist straps, ESD footwear, dissipative floor mats (< 10^9 ohms), aur ionizers static charge build-up prevent karte hain.", "hinglish"), ], "law_and_constitution": [ ("Bharat ka Samvidhan duniya ka sabse bada likhit samvidhan hai. Iske Preamble me Bharat ko ek Sovereign, Socialist, Secular, Democratic Republic ghoshit kiya gaya hai.", "hindi"), ("Article 21 Jeevan aur Niji Swatantrata ka Adhikar (Right to Life and Personal Liberty) deta hai. Maneka Gandhi case me Supreme Court ne kaha ki isme sammanjanak jeevan jeene ka adhikar shamil hai.", "hindi"), ("Article 32 ko Dr. B.R. Ambedkar ne Samvidhan ki Aatma (Heart and Soul) kaha tha. Iske tehat Supreme Court 5 tarah ki Writs jaari kar sakta hai: Habeas Corpus, Mandamus, Prohibition, Quo Warranto, aur Certiorari.", "hindi"), ("Zero FIR kisi bhi police station me darj karwayi ja sakti hai chahe apradh us thane ke jurisdiction me na hua ho. Baad me use sambandhit thane transfer kar diya jata hai.", "hinglish"), ("Consumer Protection Act 2019 ke tehat agar koi product defective hai ya service me kami hai, toh consumer District Commission (50 lakh tak claim) me seedhe complaint file kar sakta hai.", "hinglish"), ("Right to Information (RTI) Act 2005 ke tehat aam nagrik 10 rupaye ki fee dekar sarkari vibhag se jaankari mang sakta hai. PIO ko 30 din ke andar jawab dena anivarya hota hai.", "hinglish"), ("Cheque bounce hone par Negotiable Instruments Act ke Section 138 ke tehat legal notice cheque return memo aane ke 30 din ke andar bhejna zaroori hai. Notice milne ke 15 din me payment na hone par criminal complaint file hoti hai.", "hinglish"), ("Bharatiya Nagarik Suraksha Sanhita (BNSS) ke anusaar police kisi mahila ko suryast ke baad aur suryoday se pehle bina mahila magistrate ki prior permission ke arrest nahi kar sakti.", "hinglish"), ("Police remand lene ke liye accused ko arrest ke 24 ghante ke andar nearest Judicial Magistrate ke samne physical ya video conference se pesh karna mandatory hota hai.", "hinglish"), ], "ncert_and_science": [ ("Photosynthesis wo prakriya hai jisme hare paudhe chlorophyll, surya ke prakash, jal (H2O) aur carbon dioxide (CO2) ka upyog karke glucose banate hain aur oxygen gas chhodte hain: 6CO2 + 6H2O -> C6H12O6 + 6O2.", "hindi"), ("Newton ka doosra niyam kehta hai ki kisi vastu ke samveg parivartan ki dar uspar lagaye gaye bal ke samanupatik hoti hai: F = m * a.", "hindi"), ("Manav sharir me blood circulation double circulatory system hota hai. Right ventricle se ashuddh rakt pulmonary artery dwara lungs me oxygenate hone jata hai, aur shuddh rakt left atrium me lautata hai.", "hindi"), ("Prakash ka apvartan (Refraction of Light) tab hota hai jab prakash ki kiran ek transparent madhyam se doosre madhyam me jaati hai aur apni disha badal leti hai. Snell ka niyam: sin(i) / sin(r) = refractive index.", "hindi"), ("Periodic table me modern periodic law kehta hai ki tatvon ke rasayanik aur bhautik gun unke parmanu kramank (atomic number) ke aavarti falan hote hain.", "hindi"), ("Ecosystem me energy ka flow humesha unidirectional hota hai aur 10% law follow karta hai — har trophic level par sirf 10% energy hi transfer hoti hai, baaki heat ke roop me dissipate hoti hai.", "english"), ], "tech_and_coding": [ ("Python me list mutable hoti hai jabki tuple immutable hota hai. Dictionary key-value pairs store karti hai aur internal hash table ki wajah se O(1) average lookup time deti hai.", "hinglish"), ("TCP/IP suite me TCP connection-oriented protocol hai jo 3-way handshake (SYN, SYN-ACK, ACK) se reliable data transfer sunishchit karta hai, jabki UDP connectionless aur fast hota hai.", "hinglish"), ("Linux me file permissions teen tarah ke users ke liye set hoti hain: Owner, Group, aur Others. Chmod 755 ka matlab hai owner ko Read/Write/Execute (7) aur baki sabhi ko Read/Execute (5).", "hinglish"), ("Git me `git rebase` commit history ko linear banata hai jabki `git merge` ek naya merge commit create karke do branches ko jodata hai.", "hinglish"), ("SQL me INNER JOIN sirf matching rows return karta hai, LEFT JOIN left table ki saari rows aur right table ki matching rows deta hai, aur NULLs jahan match na ho.", "hinglish"), ("Docker containerization lightweight virtualization provide karta hai jo host operating system ke kernel ko share karta hai, unlike full Virtual Machines jo separate OS run karti hain.", "english"), ], "everyday_math_cot": [ ("<|user|>\nEk dukandar 500 rupaye ki shirt par 20% discount deta hai. Shirt kitne me milegi?\n<|assistant|>\n\nShirt ki original kimat = 500 rupaye.\nDiscount percentage = 20%.\nDiscount amount = 500 * (20 / 100) = 100 rupaye.\nFinal selling price = 500 - 100 = 400 rupaye.\n\nDiscount ke baad shirt aapko 400 rupaye me milegi.", "hinglish"), ("<|user|>\nAgar 5 mazdoor kisi deewar ko 10 din me banate hain, toh 10 mazdoor usi deewar ko kitne din me banayenge?\n<|assistant|>\n\nKul kaam (Work) = Mazdoor * Din.\nWork = 5 * 10 = 50 man-days.\nAb mazdoor hain 10.\nTime = Total Work / Mazdoor = 50 / 10 = 5 din.\n\n10 mazdoor us deewar ko sirf 5 din me bana lenge.", "hinglish"), ("<|user|>\nEk train 72 km/h ki raftaar se chal rahi hai. Wo 500 meter lambe platform ko kitne second me paar karegi agar train ki lambai 200 meter hai?\n<|assistant|>\n\nKul doori (Distance) = Train ki lambai + Platform ki lambai = 200 + 500 = 700 meter.\nSpeed = 72 km/h. Meter/sec me badalne ke liye 5/18 se multiply karein:\nSpeed = 72 * (5/18) = 20 m/s.\nTime = Distance / Speed = 700 / 20 = 35 second.\n\nTrain ko platform paar karne me total 35 second lagenge.", "hinglish"), ], "corporate_emails": [ ("Subject: Leave Application - Sick Leave - [Your Name]\n\nDear [Manager Name],\n\nI am writing to inform you that I am unwell and suffering from fever since yesterday. My doctor has advised complete rest for two days.\n\nTherefore, I kindly request you to approve my sick leave for [Date] and [Date]. I will keep my team updated on urgent tasks, and [Colleague Name] has kindly agreed to handle critical escalations in my absence.\n\nThank you for your understanding.\n\nWarm regards,\n[Your Name]\n[Designation]", "english"), ("Subject: Minutes of Meeting (MOM) - SMT Line Quality Review - [Date]\n\nDear Team,\n\nThank you for attending today's quality review meeting. Below are the key discussion points and action items:\n\nKey Highlights:\n1. Reflow soldering defect rate decreased from 1.2% to 0.4% post profile optimization.\n2. SPI threshold for solder volume offset calibrated on Line 2.\n\nAction Items:\n- Complete 8D containment report on BGA voiding by Friday (Owner: Quality Engg).\n- Routine maintenance of Pick and Place vacuum nozzles by tomorrow morning (Owner: Maintenance Team).\n\nRegards,\n[Your Name]", "english"), ], "cinema_and_entertainment": [ ("Sholay (1975) Ramesh Sippy dwara nirdeshit ek aitihasik film hai jisme Amitabh Bachchan, Dharmendra, Sanjeev Kumar, Hema Malini aur Amjad Khan ne acting ki thi. Salim-Javed ke likhe dialogues jaise 'Kitne aadmi the' aur 'Yeh haath mujhe de de Thakur' Bhartiya cinema ka hissa ban gaye.", "hinglish"), ("Satyajit Ray ki Pather Panchali (1955) ne Bhartiya cinema ko antarrashtriya manch par sthapit kiya. Cannes Film Festival me is film ko Best Human Document ka award mila tha.", "hindi"), ("Christopher Nolan ki Inception (2010) dreams ke andar dreams (shared dreaming) ke concept par aadharit science fiction masterpiece hai, jisme Leonardo DiCaprio ne Dom Cobb ka role play kiya tha.", "english"), ], "personal_finance_and_tax": [ ("Income Tax me New Tax Regime standard default regime hai jisme lower tax rates hain par HRA aur 80C exemptions nahi milti. Old Tax Regime unke liye behtar hai jinke paas home loan interest aur high deductions hain.", "hinglish"), ("Mutual Funds me Systematic Investment Plan (SIP) rupee cost averaging ka benefit deta hai — jab market girta hai toh zyada units milti hain, aur jab badhta hai toh wealth compound hoti hai.", "hinglish"), ("CIBIL score 300 se 900 ke beech hota hai. 750 se upar ka score loans aur credit cards ke liye best mana jata hai. Time par EMI pay karna aur credit utilization ratio < 30% rakhna score ko high rakhta hai.", "hinglish"), ], "health_and_first_aid": [ ("Aag se jalne (burns) par pehla kadam hai jale huye sthan par 10 se 15 minute tak behate huye thande paani (cold running water) se dhona. Kabhi bhi barf (ice) ya toothpaste na lagayein.", "hindi"), ("Cardiopulmonary Resuscitation (CPR) me 30 chest compressions ke baad 2 rescue breaths di jaati hain (30:2 ratio). Compressions ki depth 2 inches honi chahiye aur rate 100-120 compressions per minute.", "hinglish"), ("Complete Blood Count (CBC) report me Hemoglobin (normal 12-16 g/dL for females, 13.5-17.5 for males), Total WBC (normal 4,000-11,000 /mcL), aur Platelet count (normal 1.5-4.5 lakh /mcL) critical markers hote hain.", "hinglish"), ], "cooking_and_cuisines": [ # Indian Regional Cuisines ("Dal Makhani ka authentic swaad lene ke liye sabut urad dal aur rajma ko 8-10 ghante bhigone ke baad dheemi aanch par 4-5 ghante pakaya jata hai, jisme fresh makkhan, tomato puree aur kasuri methi ka tadka lagta hai.", "hinglish"), ("South Indian Dosa aur Idli ke liye chawal aur dhuli urad dal ka anupaat 3:1 rakha jata hai. Batter ko 8 se 12 ghante warm jagah par ferment hone diya jata hai taaki lactic acid aur carbon dioxide se fluffy texture bane.", "hinglish"), ("Bengali Machher Jhol me sarson ke tel (mustard oil) aur Panch Phoron (methi, sarson, kalonji, saunf, jeera) ka tadka sabse mahatvapurna hota hai.", "hindi"), ("Rajasthani Dal Baati Churma me baati ko kande (cow dung cakes) ya traditional oven me sek kar desi ghee me dubaaya jata hai, aur churma baati ko pees kar ghee aur boora/gur mila kar banta hai.", "hinglish"), # Foreign & International Cuisines ("Authentic Italian Neapolitan Pizza dough ke liye Type 00 flour, 60-65% hydration, yeast aur salt use hota hai. Dough ko 24 se 48 ghante cold fermentation diya jata hai aur 450-500°C wood-fired oven me sirf 60-90 second bake kiya jata hai.", "hinglish"), ("Traditional Italian Pasta Carbonara me cream bilkul nahi dali jaati; iska creamy sauce egg yolks, grated Pecorino Romano cheese, crispy Guanciale (ya pancetta), aur freshly cracked black pepper ko pasta ke starch water ke sath emulsion bana kar banta hai.", "english"), ("Pan-Asian Wok cooking me 'Wok Hei' (breath of the wok) high heat par oil vapor droplets ke aerosolize hone aur intense searing se aane wala smoky aroma hota hai. Continuous tossing zaroori hoti hai.", "english"), ("Mexican cuisine me authentic Guacamole ripe Hass avocados, fresh lime juice, finely chopped onions, cilantro (dhaniya), aur jalapeños ko molcajete (stone mortar) me halka mash karke banaya jata hai.", "hinglish"), ("Middle Eastern Hummus ko super-creamy banane ke liye boiled chickpeas ke chhilke (skins) nikaal kar unhe high-grade Tahini (sesame paste), garlic, lemon juice aur chilled ice water ke sath high-speed food processor me blend kiya jata hai.", "hinglish"), ("French Culinary Arts me 5 Mother Sauces hoti hain: Béchamel (white roux + milk), Velouté (white roux + white stock), Espagnole (brown roux + brown stock), Sauce Tomat (tomato based), aur Hollandaise (egg yolks + melted butter emulsion).", "english"), ], "translation_and_transliteration": [ # 3-Way Parallel Pairs (English <-> Hindi <-> Hinglish) ("English: Could you please tell me where the nearest pharmacy is located?\nHindi: क्या आप मुझे बता सकते हैं कि सबसे नजदीकी मेडिकल स्टोर कहाँ है?\nHinglish: Kya aap mujhe bata sakte hain ki sabse paas wala medical store kaha hai?", "hinglish"), ("English: Ensure the reflow oven temperature does not exceed 250 degrees Celsius to prevent thermal damage to sensitive SMD components.\nHindi: सुनिश्चित करें कि रिफ्लो ओवन का तापमान 250 डिग्री सेल्सियस से अधिक न हो ताकि संवेदनशील एसएमडी घटकों को थर्मल क्षति न पहुंचे।\nHinglish: Ensure karein ki reflow oven ka temperature 250 degree Celsius se upar na jaye taaki sensitive SMD components ko heat damage na ho.", "hinglish"), ("English: Every citizen has the fundamental right to freedom of speech and expression subject to reasonable restrictions.\nHindi: प्रत्येक नागरिक को युक्तिसंगत प्रतिबंधों के अधीन वाक् और अभिव्यक्ति की स्वतंत्रता का मौलिक अधिकार प्राप्त है।\nHinglish: Har nagrik ke paas reasonable restrictions ke tehat bolne aur apne vichar vyakt karne ka maulik adhikar hai.", "hinglish"), ("English: Please review the attached quarterly performance report and share your feedback by Friday.\nHindi: कृपया संलग्न तिमाही प्रदर्शन रिपोर्ट की समीक्षा करें और शुक्रवार तक अपनी प्रतिक्रिया साझा करें।\nHinglish: Kripya attached quarterly performance report ko review karein aur Friday tak apna feedback share karein.", "hinglish"), ("English: The train was delayed by two hours due to dense fog in northern India.\nHindi: उत्तर भारत में घने कोहरे के कारण ट्रेन दो घंटे देरी से चल रही थी।\nHinglish: North India me ghane kohre ki wajah se train do ghante late chal rahi thi.", "hinglish"), ], "stories_and_literature": [ ("Munshi Premchand ki prasiddh kahani 'Idgah' me 4-5 saal ka anath bachha Hamid mela ghoomne jata hai. Jab uske dost khilone aur mithaaiyan khareedte hain, toh Hamid apni dadi Ameena ke liye 3 paise me ek chimta khareedta hai taaki roti banate waqt dadi ki ungliyan na jalein. Premchand ne is kahani me bachpan ki masoomiyat aur niswarth prem ko amar bana diya.", "hindi"), ("Panchatantra ki kahani 'Sher aur Chalaak Khargosh' me jungle ka raja sher Bhasurak har roz ek janwar ko maarta tha. Ek din chalaak khargosh ki baari aayi. Usne sher ko ek gehre kuve ke paas le jakar bola ki kuve me ek doosra balwan sher rehta hai. Sher ne paani me apni parchhai dekhi aur gusse me dahad kar kuve me kood gaya aur mar gaya. Shiksha: Bal se bada dimaag hota hai.", "hindi"), ("Vikram-Betal ki kahaniyon me Raja Vikramaditya ko Betal ko ped se utaar kar laana hota tha, par shart thi ki raaste me bina bole chalna hai. Betal har baar ek jatil nyay aur neeti ki kahani sunata tha aur aakhri me sawaal poochta tha. Agar Raja jawab jaante huye na bole toh uska sar phat jayega, aur agar bole toh Betal wapas ped par chala jayega.", "hinglish"), ], "movie_plots_and_songs": [ ("Drishyam (2015) film me Vijay Salgaonkar (Ajay Devgn) ek aam cable operator hota hai jiska parivar achanak ek apradh me fans jata hai. Vijay 2 aur 3 October ki jhoothi kahani (Panaji ashram, Swami Chinmayananda satsang, hotel me pav bhaji, movie tickets) itni baar sabko sunata hai ki logon ki visual memory us jhooth ko sach maan leti hai, aur aakhir me body ko naye ban rahe police station ke farsh ke neeche dafna deta hai.", "hinglish"), ("Lagaan (2001) me British Captain Russell ne gaon walon ko cricket match khelne ki chunauti di: agar gaon wale jeete toh 3 saal ka lagaan maaf, haare toh teen guna lagaan. Bhuvan ne sabhi gaon walon (Kachra, Deva, Goli) ko jod kar ek team banayi aur aakhri gend par sixer maar kar British team ko haraya.", "hinglish"), ("Kishore Kumar ka gaana 'Zindagi ke safar mein guzar jaate hain jo makaam, wo phir nahi aate' Anand Bakshi ke geet aur R.D. Burman ke sangeet ka shikar hai jo insani zindagi ke lamhon aur yaadon ki keemat samjhata hai.", "hinglish"), ("Gulzar ki kalam se nikli nazm 'Tujhse naraaz nahi zindagi hairan hu main, tere masoom sawaalon se pareshan hu main' zindagi ki kashmakash aur dukh ko bohot gehrai se darshati hai.", "hindi"), ], "mobile_tech_android_ios": [ ("Android OS me Android Runtime (ART) Dalvik runtime ki jagah aaya tha. ART Ahead-of-Time (AOT) aur Just-in-Time (JIT) compilation ka hybrid use karta hai jo apps ke execution speed ko 2x boost karta hai aur battery efficiency badhata hai.", "hinglish"), ("Android Debug Bridge (ADB) developer tool se computer se phone ko control kiya ja sakta hai: 'adb devices' se connected phone check karte hain, 'adb reboot bootloader' se Fastboot mode me jaate hain, aur bloatware hatane ke liye 'adb shell pm uninstall -k --user 0 ' command use hoti hai.", "english"), ("iPhone me DFU (Device Firmware Update) mode Recovery mode se deep hota hai. DFU mode me bootloader (iBoot) load nahi hota, jisse custom firmware restore ya corrupted iOS ko clean reinstall kiya ja sakta hai bina boot loop ke.", "english"), ("Smartphone battery life badhane ke liye 80-20 rule follow karein: battery ko 20% se neeche mat aane de aur 80-85% se zyada charge mat karein. Fast charging ke dauraan heavy gaming karne se phone overheat hota hai jisse Lithium-ion battery degrade ho jaati hai.", "hinglish"), ("eSIM (Embedded SIM) phone ke motherboard par soldered physical chip hoti hai jisme profile download karke carrier network activate kiya jata hai bina physical plastic SIM card daale.", "hinglish"), ], "jokes_and_humor": [ ("Hostel ke 4 dost baithe the. Pehla bola - 'Bhai kal exam hai aur abhi tak syllabus bhi nahi pata.' Doosra dost muskura ke bola - 'Tension mat le mere bhai, exam ke baad poori zindagi bachi hai syllabus dhoondne ke liye!'", "hinglish"), ("Doctor: Aapko daily 5 kilometer daudna hoga health fit rakhne ke liye.\nPatient: Subah daudu ya shaam ko doctor saab?\nDoctor: Jab colony ka kutta peeche pade tab daudo, speed bhi achhi aayegi!", "hinglish"), ("HR: Why do you want to join our company?\nCandidate: Bachpan se mera bas ek hi sapna tha ki subah 9 baje biometric punch karu aur shaam ko 6 baje tak dimaag ki dahi karwau!", "hinglish"), ("Pati: Shaadi ke baad se tumne meri har baat par sawaal uthana shuru kar diya hai.\nPatni: Haan toh shaadi se pehle tum kaunsa koi aklmandi ki baat karte the jo sawaal na uthati!", "hinglish"), ], "desi_roasts_and_street_slang": [ ("Abe dhakkan, jab dimaag me gobar bhara hai toh itna faltu gyaan kyu baant raha hai? Chupchaap baith aur sun le pehle.", "hinglish"), ("Bhai tu insaan hai ya chalte-phirte dimaag ki dahi? Ek seedha sawaal poocha tha, poori Mahabharat suna ke sar paka diya.", "hinglish"), ("Abe saale chirkut, khud se 2 rupaye ka hisaab hota nahi aur baatein aisi kar raha hai jaise Reliance ka CFO baitha ho yahan!", "hinglish"), ("Bakchodi band kar aur seedhe kaam ki baat par aa. Tere fukrapane dekhne ka time nahi hai kisi ke paas.", "hinglish"), ("Ek dost doosre se bola: 'Bhai usne WhatsApp pe dekha par reply nahi diya, kya karu?' Doosre ne bola: 'Abe champu, usko dimaag se delete kar aur aage badh, faltu rona mat ro yahan!'", "hinglish"), ("Ye jo tu hawa-bazi kar raha hai na, do minute me saari hawa nikal jayegi agar reality saamne aa gayi toh.", "hinglish"), ], "grammar_and_language_mechanics": [ # Hindi Vyakaran ("Hindi me Karta Karak ke sath 'Ne' chinh aane par kriya (verb) Karta ke anusaar nahi, balki Karm (object) ke ling aur vachan ke anusaar badalti hai. Udaharan: 'Ram ne roti khayi' (yahan roti striling hai isliye kriya 'khayi' hui, na ki 'khaya').", "hindi"), ("Hindi Vakya Shuddhi me aksar 'aneko' shabd ka ashuddh prayog kiya jata hai; 'anek' shabd swayam me hi bahuvachan hai, isliye 'anek log' kehna shuddh hai, 'aneko log' ashuddh hai.", "hindi"), ("Karak ke 8 bhed hote hain: Karta (ne), Karm (ko), Karan (se/ke dwara), Sampradan (ko/ke liye), Apadan (se prithak), Sambandh (ka/ke/ki), Adhikaran (me/par), aur Sambodhan (he/are).", "hindi"), ("Sandhi me do varnon ke mel se hone wale vikar ko sandhi kehte hain: Svar Sandhi (jaise Vidya + Aalay = Vidyalay), Vyanjan Sandhi (Sat + Jan = Sajjan), aur Visarga Sandhi (Manah + Har = Manohar).", "hindi"), ("Muhavara 'Id ka Chand hona' ka arth hai bohot dinon baad dikhayi dena. Vakya: 'Rohan jab se foreign gaya hai, tab se wo Id ka chand ho gaya hai.'", "hindi"), # English Grammar ("Subject-Verb Agreement rule: When two singular subjects are joined by 'neither...nor' or 'either...or', the verb agrees with the subject closest to it. Example: 'Neither the manager nor the employees were informed about the schedule change.'", "english"), ("Active to Passive Voice transformation: In passive voice, the object becomes the subject and the main verb is always in past participle (V3) form. Active: 'The technician calibrated the SMT machine.' -> Passive: 'The SMT machine was calibrated by the technician.'", "english"), ("Direct to Indirect Speech: In reporting statements, past tense in the reporting verb shifts the present tense of reported speech to past tense. Direct: He said, 'I am learning Python.' -> Indirect: He said that he was learning Python.", "english"), # Hinglish Syntax & Code-Switching ("Hinglish me English verbs ko Hindi auxiliary 'karna' ya 'hona' ke sath pair kiya jata hai: 'file upload karna', 'payment process hona'. Gender agreement Hindi noun/context ke hisaab se follow hota hai: 'Battery drain ho rahi hai' (striling battery ke anusaar), 'Server restart ho raha hai' (pulling server ke anusaar).", "hinglish"), ] } def generate_domain_samples(limit_per_domain: int = 50): """ Yields structured records across all 20 pillars. """ count = 0 domains = list(DOMAIN_KNOWLEDGE_PACKS.keys()) for d in domains: samples = DOMAIN_KNOWLEDGE_PACKS[d] for text, lang in samples: yield { "text": text, "lang": lang, "source": f"curated_pillar_{d}", "domain": d } count += 1 def main(): parser = argparse.ArgumentParser(description="Generate curated 20-pillar knowledge records") parser.add_argument("--output", type=str, default="/tmp/domain_curated.jsonl", help="Output JSONL path") parser.add_argument("--limit", type=int, default=1000, help="Max records to generate") args = parser.parse_args() out_p = Path(args.output) out_p.parent.mkdir(parents=True, exist_ok=True) n = 0 with open(out_p, "w", encoding="utf-8") as f: for rec in generate_domain_samples(): f.write(json.dumps(rec, ensure_ascii=False) + "\n") n += 1 if n >= args.limit: break print(f"[ok] Wrote {n} curated domain records to {out_p}") if __name__ == "__main__": main()