CoolFace
Datasetpublic

somukandula/maskara-indian-pii-200k

Maskara Indian PII Dataset (Phase 2) Synthetic Indian PII dataset for training the Maskara NER model. This version has been expanded and diversified for Phase 2 training. Splits Split Rows Purpose train ~250,000 Model training template_disjoint_eval 15,000 Generalization evaluation: entire template families held out real_world_eval ~2,600 Manually curated real-world Indian text evaluation Schema Column Type Description… See the full description on the dataset page: https://huggingface.co/datasets/somukandula/maskara-indian-pii-200k.

sourceHugging Facemitupdated 3mo agoView on Hugging Face
2likes207downloads
Dataset Card

Maskara Indian PII Dataset (Phase 2)

Synthetic Indian PII dataset for training the Maskara NER model. This version has been expanded and diversified for Phase 2 training.

Dataset Description

  • —Repository: somukandula/maskara-indian-pii-200k
  • —Version: 2.0
  • —Language: English, Hinglish (Hindi-English code-mixed)
  • —License: MIT
  • —Task: Token classification / Named Entity Recognition (NER)

Splits

SplitRowsPurpose
train~250,000Model training
template_disjoint_eval15,000Generalization evaluation: entire template families held out
real_world_eval~2,600Manually curated real-world Indian text evaluation

Schema

ColumnTypeDescription
idstringUnique example identifier
textstringRaw text containing PII
entitieslist[dict]Character-level spans: {start, end, label}
domainstringSource domain (e.g. whatsapp, email, json, ocr)
localestringText locale (en-IN, en-US, hi-IN)
difficultystringeasy, medium, hard, hard_negative
generatorstringGenerator version (maskara-v2)
seedintPer-example random seed
template_familystringTemplate family for traceability

Supported Entities (17)

ADDRESS, API_KEY, CREDIT_CARD, DATE_OF_BIRTH, DRIVER_LICENSE, EMAIL, IP_ADDRESS, PASSWORD, PERSON_NAME, PHONE, SSN, USERNAME, AADHAAR, PAN_CARD, PASSPORT, UPI_ID, VEHICLE_REG.

Note: LOCATION was removed in Phase 2.

Diversity Improvements

  • —Templates: 150+ multi-entity templates, 80+ single-entity templates.
  • —Formatting variations: 6–10 per entity (plain, spaced, dashed, labelled, etc.).
  • —Hinglish / code-mixed: ~40% of examples.
  • —Hard negatives: ~15% of examples.
  • —Structured / noisy documents: ~20% of examples.
  • —Domains: WhatsApp, SMS, email, support tickets, HTML, Markdown, JSON, CSV, SQL, logs, OCR, bank statements, government forms, Aadhaar letters, PAN documents, resumes, configuration files.

Template-Disjoint Evaluation

The following template families are excluded from training and reserved for the template_disjoint_eval split:

  • —passport_application
  • —transport_challan
  • —json_payload
  • —config_yaml
  • —html_user
  • —api_request_json
  • —sms_link
  • —finance_pipe
  • —identity_kyc
  • —medical_record

Real-World Evaluation

A manually curated split containing realistic Indian text such as:

  • —Customer support conversations
  • —Hinglish chats
  • —OCR-noisy documents
  • —Government forms
  • —JSON payloads
  • —API request bodies
  • —Log lines
  • —Bank statements
  • —Emails
  • —Transport challans

This split is never used during training.

Usage

python
from datasets import load_dataset

dataset = load_dataset("somukandula/maskara-indian-pii-200k")
print(dataset["train"][0])

Generation

Generated using maskara_dataset_generator.py (Maskara Phase 2 generator). Each example is produced by filling placeholder-based templates with synthetic values and recording character-level entity spans.

Phase 2 Error-Analysis Augmentation

After the first Phase 2 training run, targeted synthetic examples were added for entities that underperformed on real-world and template-disjoint evaluation:

  • —CREDIT_CARD
  • —PASSWORD
  • —DRIVER_LICENSE
  • —USERNAME
  • —ADDRESS
  • —IP_ADDRESS
  • —PHONE
  • —AADHAAR
  • —PAN_CARD

These examples live in phase2/targeted_augmentation.py and are merged into the train split before retraining.

Files in this repository

FileDescription
maskara_dataset_generator.pyFull synthetic dataset generator
generate_maskara_phase2_dataset.pyScript that generates and pushes all splits
phase2/targeted_augmentation.pyTargeted augmentation for weak entities
phase2/train_maskara.pyTraining pipeline
phase2/evaluate_maskara.pyEvaluation pipeline
phase2/error_analysis_loop.pyError analysis and actionable report generator
phase2/retrain_with_augmentation.pyEnd-to-end retraining with augmentation

Citation

bibtex
@misc{maskara_dataset2026,
  title={Maskara Indian PII Dataset},
  author={Somu Kandula},
  year={2026},
  howpublished={\url{https://huggingface.co/datasets/somukandula/maskara-indian-pii-200k}}
}

<!-- ml-intern-provenance -->

Generated by ML Intern

This dataset repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.

  • —Try ML Intern: https://smolagents-ml-intern.hf.space
  • —Source code: https://github.com/huggingface/ml-intern