Dataset Viewer
Auto-converted to Parquet Duplicate
Word
stringlengths
2
25
Error
stringlengths
2
34
ErrorType
stringclasses
14 values
Flag
int64
0
0
Mask
stringlengths
6
102
ErrorBlanks
stringlengths
10
170
MaskFlag
int64
1
1
নিত্যনৈমিত্তিক
নিত্যনৈনিত্তিক
Typo (Avro) Substituition
0
[0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0]
['ন', 'ি', 'ত', '্', 'য', 'ন', 'ৈ', '_', 'ি', 'ত', '্', 'ত', 'ি', 'ক']
1
প্রহরা
ফ্রহরা
Cognitive Error
0
[1, 0, 0, 0, 0, 0]
['_', '্', 'র', 'হ', 'র', 'া']
1
আবর্জিত
আবর্িজত
Typo Transposition
0
[0, 0, 0, 0, 1, 1, 0]
['আ', 'ব', 'র', '্', '_', '_', 'ত']
1
উভয়তোমুখ
উভযতোমুখ
Visual Error
0
[0, 0, 1, 0, 0, 0, 0, 0]
['উ', 'ভ', '_', 'ত', 'ো', 'ম', 'ু', 'খ']
1
ঐরাবতেরে
ঐরাবততেরে
Typo Insertion
0
[0, 0, 0, 0, 1, 0, 0, 0, 0]
['ঐ', 'র', 'া', 'ব', '_', 'ত', 'ে', 'র', 'ে']
1
সীমাতিরিক্ত
সীমািতরিক্ত
Typo Transposition
0
[0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0]
['স', 'ী', 'ম', 'া', '_', '_', 'র', 'ি', 'ক', '্', 'ত']
1
অন্নক্ষেত্র
অন্ন ক্ষেত্র
Split-word Error (Left)
0
[0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0]
['অ', 'ন', '্', 'ন', '_', '_', '্', 'ষ', 'ে', 'ত', '্', 'র']
1
সহপরিচালক
সহপরিচালকঘাসি
Run-on Error
0
[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]
['স', 'হ', 'প', 'র', 'ি', 'চ', 'া', 'ল', 'ক', '_', '_', '_', '_']
1
সারাৎসার
সানাৎসার
Typo (Bijoy) Substituition
0
[0, 0, 1, 0, 0, 0, 0, 0]
['স', 'া', '_', 'া', 'ৎ', 'স', 'া', 'র']
1
ক্বিপ
ক্বপ
Typo Deletion
0
[0, 0, 1, 0]
['ক', '্', '_', 'প']
1
জমানো
যমানো
Cognitive Error
0
[1, 0, 0, 0, 0]
['_', 'ম', 'া', 'ন', 'ো']
1
শুভ্রতা
শুভ্বতা
Visual Error
0
[0, 0, 0, 0, 1, 0, 0]
['শ', 'ু', 'ভ', '্', '_', 'ত', 'া']
1
গিতল্
গিকল্
Typo (Bijoy) Substituition
0
[0, 0, 1, 0, 0]
['গ', 'ি', '_', 'ল', '্']
1
চেয়াড়ি
ছেয়াড়ি
Cognitive Error
0
[1, 0, 0, 0, 0, 0]
['_', 'ে', 'য়', 'া', 'ড়', 'ি']
1
বিপিন্
বিপি্
Typo Deletion
0
[0, 0, 0, 0, 1]
['ব', 'ি', 'প', 'ি', '_']
1
রসজ্ঞা
রসয্ঞা
Cognitive Error
0
[0, 0, 1, 0, 0, 0]
['র', 'স', '_', '্', 'ঞ', 'া']
1
মণিবন্ধে
মণিবন্েধ
Typo Transposition
0
[0, 0, 0, 0, 0, 0, 1, 1]
['ম', 'ণ', 'ি', 'ব', 'ন', '্', '_', '_']
1
চুষিয়া
চু ষিয়া
Split-word Error (Random)
0
[0, 0, 1, 1, 0, 0, 0]
['চ', 'ু', '_', '_', 'ি', 'য়', 'া']
1
রাখাল্
এাখাল্
Typo (Avro) Substituition
0
[1, 0, 0, 0, 0, 0]
['_', 'া', 'খ', 'া', 'ল', '্']
1
পরমায়ুহন্ত্রী
পরমা য়ুহন্ত্রী
Split-word Error (Left)
0
[0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0]
['প', 'র', 'ম', 'া', '_', '_', '_', 'হ', 'ন', '্', 'ত', '্', 'র', 'ী']
1
প্রবোধ
প্রবোধধ
Typo Insertion
0
[0, 0, 0, 0, 0, 0, 1]
['প', '্', 'র', 'ব', 'ো', 'ধ', '_']
1
কাঙগই
ক্ঙগই
Typo (Bijoy) Substituition
0
[0, 1, 0, 0, 0]
['ক', '_', 'ঙ', 'গ', 'ই']
1
সত্বর
সর্বর
Typo (Avro) Substituition
0
[0, 1, 0, 0, 0]
['স', '_', '্', 'ব', 'র']
1
ফলিতার্থ
লফিতার্থ
Typo Transposition
0
[1, 1, 0, 0, 0, 0, 0, 0]
['_', '_', 'ি', 'ত', 'া', 'র', '্', 'থ']
1
হাসি
হাদি
Typo (Avro) Substituition
0
[0, 0, 1, 0]
['হ', 'া', '_', 'ি']
1
পেডেন্ডা
পেঢেন্ডা
Cognitive Error
0
[0, 0, 1, 0, 0, 0, 0, 0]
['প', 'ে', '_', 'ে', 'ন', '্', 'ড', 'া']
1
তলভূমি
তলবূমি
Cognitive Error
0
[0, 0, 1, 0, 0, 0]
['ত', 'ল', '_', 'ূ', 'ম', 'ি']
1
আসিতেছিল
আসসিতেছিল
Typo Insertion
0
[1, 1, 0, 0, 0, 0, 0, 0, 0]
['_', '_', 'স', 'ি', 'ত', 'ে', 'ছ', 'ি', 'ল']
1
গোল্লা
গোল্ লা
Split-word Error (Left)
0
[0, 0, 0, 1, 1, 0, 0]
['গ', 'ো', 'ল', '_', '_', 'ল', 'া']
1
ছাইতে
ছাইততে
Typo Insertion
0
[0, 0, 0, 1, 0, 0]
['ছ', 'া', 'ই', '_', 'ত', 'ে']
1
পরশমনির
পশরমনির
Typo Transposition
0
[0, 1, 1, 0, 0, 0, 0]
['প', '_', '_', 'ম', 'ন', 'ি', 'র']
1
গুনিতক্
গুননিতক্
Typo Insertion
0
[0, 0, 0, 1, 0, 0, 0, 0]
['গ', 'ু', 'ন', '_', 'ি', 'ত', 'ক', '্']
1
অগ্রসূচনা
অগ্রষূচনা
Cognitive Error
0
[0, 0, 0, 0, 1, 0, 0, 0, 0]
['অ', 'গ', '্', 'র', '_', 'ূ', 'চ', 'ন', 'া']
1
ভিক্তিযোগে
ভিক্তিয়োগে
Visual Error
0
[0, 0, 0, 0, 0, 0, 1, 0, 0, 0]
['ভ', 'ি', 'ক', '্', 'ত', 'ি', '_', 'ো', 'গ', 'ে']
1
পূজিল
পূজিলখাতাঞ্জি
Run-on Error
0
[0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]
['প', 'ূ', 'জ', 'ি', 'ল', '_', '_', '_', '_', '_', '_', '_', '_']
1
অর্পণীয়
অর্ পণীয়
Split-word Error (Random)
0
[0, 0, 0, 1, 0, 0, 0, 0]
['অ', 'র', '্', '_', 'প', 'ণ', 'ী', 'য়']
1
কাহে্
কা হে্
Split-word Error (Random)
0
[0, 0, 1, 0, 0, 0]
['ক', 'া', '_', 'হ', 'ে', '্']
1
বীণাবিশেষ
ববীণাবিশেষ
Typo Insertion
0
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0]
['_', 'ব', 'ী', 'ণ', 'া', 'ব', 'ি', 'শ', 'ে', 'ষ']
1
পুলোমার
ফুলোমার
Cognitive Error
0
[1, 0, 0, 0, 0, 0, 0]
['_', 'ু', 'ল', 'ো', 'ম', 'া', 'র']
1
দেখিআঁ
দেখিঅঁ
Visual Error
0
[0, 0, 0, 0, 1, 0]
['দ', 'ে', 'খ', 'ি', '_', 'ঁ']
1
ভ্রমণে
ভ্রম ণে
Split-word Error (Left)
0
[0, 0, 0, 1, 1, 0, 0]
['ভ', '্', 'র', '_', '_', 'ণ', 'ে']
1
চিরায়ুষ্মান
চিরায়ূষ্মান
Visual Error
0
[0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
['চ', 'ি', 'র', 'া', 'য়', '_', 'ষ', '্', 'ম', 'া', 'ন']
1
শুধাইল
শুধ্ইল
Typo (Bijoy) Substituition
0
[0, 0, 0, 1, 0, 0]
['শ', 'ু', 'ধ', '_', 'ই', 'ল']
1
জাহানে
জাহাণে
Visual Error
0
[0, 0, 0, 0, 1, 0]
['জ', 'া', 'হ', 'া', '_', 'ে']
1
শৈলরাজ
শৈনরাজ
Visual Error
0
[0, 0, 1, 0, 0, 0]
['শ', 'ৈ', '_', 'র', 'া', 'জ']
1
দুরারোহ
দুররারোহ
Typo Insertion
0
[0, 0, 0, 1, 0, 0, 0, 0]
['দ', 'ু', 'র', '_', 'া', 'র', 'ো', 'হ']
1
বেষ্টনরেখা
বে ষ্টনরেখা
Split-word Error (Random)
0
[1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0]
['_', '_', '_', 'ষ', '্', 'ট', 'ন', 'র', 'ে', 'খ', 'া']
1
পর্বদিবস
পর্রদিবস
Visual Error
0
[0, 0, 0, 1, 0, 0, 0, 0]
['প', 'র', '্', '_', 'দ', 'ি', 'ব', 'স']
1
অবিশুদ্ধ
অবিশূদ্ধ
Typo (Avro) Substituition
0
[0, 0, 0, 0, 1, 0, 0, 0]
['অ', 'ব', 'ি', 'শ', '_', 'দ', '্', 'ধ']
1
বংশলতা
ববংশলতা
Typo Insertion
0
[1, 0, 0, 0, 0, 0, 0]
['_', 'ব', 'ং', 'শ', 'ল', 'ত', 'া']
1
কটাক্ষে
ককটাক্ষে
Typo Insertion
0
[1, 0, 0, 0, 0, 0, 0, 0]
['_', 'ক', 'ট', 'া', 'ক', '্', 'ষ', 'ে']
1
খিড়কির
খেড়কির
Typo (Avro) Substituition
0
[0, 1, 0, 0, 0, 0]
['খ', '_', 'ড়', 'ক', 'ি', 'র']
1
পরাকো
পরা কো
Split-word Error (Random)
0
[0, 0, 0, 1, 0, 0]
['প', 'র', 'া', '_', 'ক', 'ো']
1
রুক্ম
রুক ্ম
Split-word Error (Random)
0
[0, 0, 0, 1, 0, 0]
['র', 'ু', 'ক', '_', '্', 'ম']
1
শ্রেয়ঃ
শরেয়ঃ
Typo Deletion
0
[1, 0, 0, 0, 0]
['_', 'র', 'ে', 'য়', 'ঃ']
1
ওদোন্
ওদোণ্
Cognitive Error
0
[0, 0, 0, 1, 0]
['ও', 'দ', 'ো', '_', '্']
1
আষাঢ়
আষাঢ়করকবলিত
Run-on Error
0
[0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]
['আ', 'ষ', 'া', 'ঢ়', '_', '_', '_', '_', '_', '_', '_']
1
ছুচন্
ছুচস্
Typo (Bijoy) Substituition
0
[0, 0, 0, 1, 0]
['ছ', 'ু', 'চ', '_', '্']
1
রজারাহ
রজজারাহ
Typo Insertion
0
[0, 0, 1, 1, 0, 0, 0]
['র', 'জ', '_', '_', 'র', 'া', 'হ']
1
তাপহীন
তাপহহীন
Typo Insertion
0
[0, 0, 0, 1, 0, 0, 0]
['ত', 'া', 'প', '_', 'হ', 'ী', 'ন']
1
পুঙ্খ
পুঙ ্খ
Split-word Error (Random)
0
[0, 0, 0, 1, 0, 0]
['প', 'ু', 'ঙ', '_', '্', 'খ']
1
উদ্বাহু
দউ্বাহু
Typo Transposition
0
[1, 1, 0, 0, 0, 0, 0]
['_', '_', '্', 'ব', 'া', 'হ', 'ু']
1
ভগ্নকন্ঠ
ভগনকন্ঠ
Typo Deletion
0
[0, 0, 1, 1, 0, 0, 0]
['ভ', 'গ', '_', '_', 'ন', '্', 'ঠ']
1
ঘাগরের
ঘাগররের
Typo Insertion
0
[0, 0, 0, 1, 0, 0, 0]
['ঘ', 'া', 'গ', '_', 'র', 'ে', 'র']
1
দূরস্মৃত
ধূরস্মৃত
Cognitive Error
0
[1, 0, 0, 0, 0, 0, 0, 0]
['_', 'ূ', 'র', 'স', '্', 'ম', 'ৃ', 'ত']
1
মৃত্যুবরণ
মুত্যুবরণ
Typo (Bijoy) Substituition
0
[0, 1, 0, 0, 0, 0, 0, 0, 0]
['ম', '_', 'ত', '্', 'য', 'ু', 'ব', 'র', 'ণ']
1
নাজনে
নানজে
Typo Transposition
0
[0, 0, 1, 1, 0]
['ন', 'া', '_', '_', 'ে']
1
দিপলি
দিফলি
Cognitive Error
0
[0, 0, 1, 0, 0]
['দ', 'ি', '_', 'ল', 'ি']
1
বুরহানী
বুহরানী
Typo Transposition
0
[0, 0, 1, 1, 0, 0, 0]
['ব', 'ু', '_', '_', 'া', 'ন', 'ী']
1
চন্দ্রপত্নী
চন্দ্রটত্নী
Typo (Bijoy) Substituition
0
[0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]
['চ', 'ন', '্', 'দ', '্', 'র', '_', 'ত', '্', 'ন', 'ী']
1
হওয়াদ
হওায়দ
Typo Transposition
0
[0, 0, 1, 1, 0]
['হ', 'ও', '_', '_', 'দ']
1
রুইকাতলার
রুইকাত লার
Split-word Error (Random)
0
[0, 0, 0, 0, 0, 1, 1, 0, 0, 0]
['র', 'ু', 'ই', 'ক', 'া', '_', '_', 'ল', 'া', 'র']
1
বাঁধাগৎ
নাঁধাগৎ
Typo (Avro) Substituition
0
[1, 0, 0, 0, 0, 0, 0]
['_', 'া', 'ঁ', 'ধ', 'া', 'গ', 'ৎ']
1
খ্রিস্টানদের
খ্রিশ্টানদের
Cognitive Error
0
[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]
['খ', '্', 'র', 'ি', '_', '্', 'ট', 'া', 'ন', 'দ', 'ে', 'র']
1
বেচিনু
বেিনু
Typo Deletion
0
[0, 0, 1, 0, 0]
['ব', 'ে', '_', 'ন', 'ু']
1
খতম্
খমত্
Typo Transposition
0
[0, 1, 1, 0]
['খ', '_', '_', '্']
1
তুকারামের
তুকাররামের
Typo Insertion
0
[0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
['ত', 'ু', 'ক', 'া', 'র', '_', '_', '_', '_', '_']
1
তৃষ্ণার্ত
তৃষ্ার্ত
Typo Deletion
0
[0, 0, 0, 0, 1, 1, 1, 1]
['ত', 'ৃ', 'ষ', '্', '_', '_', '_', '_']
1
প্রশংসার্হ
প্রশংসার্হআহেরিয়া
Run-on Error
0
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]
['প', '্', 'র', 'শ', 'ং', 'স', 'া', 'র', '্', 'হ', '_', '_', '_', '_', '_', '_', '_']
1
নথনাড়া
নথনাা
Typo Deletion
0
[0, 0, 0, 0, 1]
['ন', 'থ', 'ন', 'া', '_']
1
ন্যাংটো
ন্যাংটোভাবেতে
Run-on Error
0
[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]
['ন', '্', 'য', 'া', 'ং', 'ট', 'ো', '_', '_', '_', '_', '_', '_']
1
গনতি
নগতি
Typo Transposition
0
[1, 1, 0, 0]
['_', '_', 'ত', 'ি']
1
হামছায়া
হামছায়াআবিষ্কারক
Run-on Error
0
[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
['হ', 'া', 'ম', 'ছ', 'া', 'য়', 'া', '_', '_', '_', '_', '_', '_', '_', '_', '_']
1
লুপ্তযৌবন
লুপ্তযৌবনকুরিয়া
Run-on Error
0
[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]
['ল', 'ু', 'প', '্', 'ত', 'য', 'ৌ', 'ব', 'ন', '_', '_', '_', '_', '_', '_']
1
ভণয়ে
ভণয়েলগ্নে
Run-on Error
0
[0, 0, 0, 0, 1, 1, 1, 1, 1]
['ভ', 'ণ', 'য়', 'ে', '_', '_', '_', '_', '_']
1
চৈত্যপাল
চৈত্যপা
Typo Deletion
0
[0, 0, 0, 0, 0, 0, 0]
['চ', 'ৈ', 'ত', '্', 'য', 'প', 'া']
1
নিস্তনাবুদ
নিস্তন াবুদ
Split-word Error (Random)
0
[0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0]
['ন', 'ি', 'স', '্', 'ত', '_', '_', 'া', 'ব', 'ু', 'দ']
1
নোক্
নো্ক
Typo Transposition
0
[0, 0, 1, 1]
['ন', 'ো', '_', '_']
1
গুণবৈশিষ্ট্য
গুণবৈশি ষ্ট্য
Split-word Error (Random)
0
[0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0]
['গ', 'ু', 'ণ', 'ব', 'ৈ', 'শ', '_', '_', 'ষ', '্', 'ট', '্', 'য']
1
রোমহর্ষ
োরমহর্ষ
Typo Transposition
0
[1, 1, 0, 0, 0, 0, 0]
['_', '_', 'ম', 'হ', 'র', '্', 'ষ']
1
রগড়ানো
রগড়া নো
Split-word Error (Left)
0
[0, 0, 0, 1, 1, 0, 0]
['র', 'গ', 'ড়', '_', '_', 'ন', 'ো']
1
মূত্রকৃচ্ছতা
মূত্তকৃচ্ছতা
Typo (Avro) Substituition
0
[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0]
['ম', 'ূ', 'ত', '্', '_', 'ক', 'ৃ', 'চ', '্', 'ছ', 'ত', 'া']
1
রাজাসন
রাজাসণ
Cognitive Error
0
[0, 0, 0, 0, 0, 1]
['র', 'া', 'জ', 'া', 'স', '_']
1
কোরক
তোরক
Typo (Bijoy) Substituition
0
[1, 0, 0, 0]
['_', 'ো', 'র', 'ক']
1
কোব্
কো ব্
Split-word Error (Random)
0
[0, 0, 1, 0, 0]
['ক', 'ো', '_', 'ব', '্']
1
খ্বান্
খ্বাণ্
Cognitive Error
0
[0, 0, 0, 0, 1, 0]
['খ', '্', 'ব', 'া', '_', '্']
1
ভিশক্
খিশক্
Typo (Bijoy) Substituition
0
[1, 0, 0, 0, 0]
['_', 'ি', 'শ', 'ক', '্']
1
শিংযুক্ত
শি ংযুক্ত
Split-word Error (Random)
0
[0, 0, 1, 1, 1, 0, 0, 0, 0]
['শ', 'ি', '_', '_', '_', 'ু', 'ক', '্', 'ত']
1
অর্থবিষয়ক
অর্থ বিষয়ক
Split-word Error (both)
0
[0, 0, 0, 0, 1, 0, 0, 0, 0, 0]
['অ', 'র', '্', 'থ', '_', 'ব', 'ি', 'ষ', 'য়', 'ক']
1
দুহাঁকার
দুহাঁবার
Visual Error
0
[0, 0, 0, 0, 0, 1, 0, 0]
['দ', 'ু', 'হ', 'া', 'ঁ', '_', 'া', 'র']
1
End of preview. Expand in Data Studio

BanglaSEC

A 1.18M-pair parallel corpus for Bangla spelling error correction, with character-level error masks across 14 error types.

BanglaSEC is the corpus introduced in A transformer based spelling error correction framework for Bangla and resource scarce Indic languages (Bijoy, Hossain, Islam & Shatabda, Computer Speech & Language 89:101703, 2025). Each row pairs a correct Bangla word with an erroneous form, labelled by error type and annotated with a binary mask marking exactly which characters are wrong.

This repository provides the official train / validation / test splits used by DPCSpell.


Quick start

from datasets import load_dataset

ds = load_dataset("mehedihasanbijoy/BanglaSEC")

print(ds)
# DatasetDict({
#     train:      Dataset({num_rows: 957746, ...})
#     validation: Dataset({num_rows:  50414, ...})
#     test:       Dataset({num_rows: 177919, ...})
# })

print(ds["test"][0])
# {'Word': 'ঠানকা', 'Error': 'ঠনকা', 'ErrorType': 'Typo Deletion', 'Flag': 0,
#  'Mask': '[0, 1, 0, 0]', 'ErrorBlanks': "['ঠ', '_', 'ক', 'া']", 'MaskFlag': 1}

Stream it instead of downloading the full 184 MB:

ds = load_dataset("mehedihasanbijoy/BanglaSEC", split="train", streaming=True)
for row in ds.take(3):
    print(row["Error"], "→", row["Word"])

Dataset structure

Splits

Split Rows Share
train 957,746 80.75%
validation 50,414 4.25%
test 177,919 15.00%
Total 1,186,079

Fields

Field Type Description
Word string The correct Bangla word — the target.
Error string The misspelled form — the source.
ErrorType string One of 14 categories (see below).
Mask string Per-character binary mask over Word; 1 marks an incorrect character. Serialised as a Python list literal.
ErrorBlanks string Word as a character list with masked positions replaced by _. Serialised as a Python list literal.
Flag int Correctness flag. Always 0 — every row is an error pair.
MaskFlag int Mask-validity flag. Always 1.

Mask and ErrorBlanks are stored as strings for CSV round-tripping. Parse them with ast.literal_eval:

import ast

row = ds["train"][0]
mask   = ast.literal_eval(row["Mask"])         # [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0]
blanks = ast.literal_eval(row["ErrorBlanks"])  # ['ন', 'ি', 'ত', '্', 'য', 'ন', 'ৈ', '_', ...]

wrong_positions = [i for i, m in enumerate(mask) if m == 1]

Error types

Error type Count Example (Error → Word)
Split-word Error (Random) 124,895 চু ষিয়া → চুষিয়া
Run-on Error 124,895 পূজিলখাতাঞ্জি → পূজিল
Typo Insertion 124,807 ঐরাবততেরে → ঐরাবতেরে
Typo Transposition 123,245 আবর্িজত → আবর্জিত
Typo (Bijoy) Substituition 119,864 সানাৎসার → সারাৎসার
Typo (Avro) Substituition 119,573 এাখাল্ → রাখাল্
Visual Error 117,391 উভযতোমুখ → উভয়তোমুখ
Typo Deletion 115,767 ক্বপ → ক্বিপ
Cognitive Error 108,227 ফ্রহরা → প্রহরা
Split-word Error (Left) 62,890 গোল্ লা → গোল্লা
Visual Error (Combined Character) 17,617 ত্তস্তাদের → ওস্তাদের
Split-word Error (Right) 13,985 গৃহ গোধা → গৃহগোধা
Split-word Error (both) 12,800 নিন্ দিতা → নিন্দিতা
Homonym Error 123 স্ব:হিত → সহিত

Every error type appears in all three splits in proportion to its corpus share (within 0.01 percentage points).


Configurations

default — the full corpus

All seven columns, one row per error instance. Use this for almost everything.

ds = load_dataset("mehedihasanbijoy/BanglaSEC")

detector — DPCSpell detector-network format

Exactly what DPCSpell's detector.py writes to ./Dataset/{train,valid,test}.csv: two columns, space-separated at the character level, ready to drop into the detector's TabularDataset.

ds = load_dataset("mehedihasanbijoy/BanglaSEC", "detector")

print(ds["test"][0])
# {'Error': 'ঠ ন ক া', 'ErrorBlanks': 'ঠ _ ক া'}

The DPCSpell purificator and corrector networks train on detector_preds.csv and purificator_preds.csv, which are generated by running each preceding stage's trained model over the corpus. They cannot be derived from the corpus alone and are not included here — produce them by running detector.py and purificator.py from the DPCSpell repo.


Example usage

Fine-tune a seq2seq corrector (ByT5)

Character-level models suit this task well, since errors are character edits.

from datasets import load_dataset
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

ds = load_dataset("mehedihasanbijoy/BanglaSEC")
tok = AutoTokenizer.from_pretrained("google/byt5-small")
model = AutoModelForSeq2SeqLM.from_pretrained("google/byt5-small")

def preprocess(batch):
    enc = tok(batch["Error"], max_length=64, truncation=True)
    enc["labels"] = tok(batch["Word"], max_length=64, truncation=True)["input_ids"]
    return enc

tokenized = ds.map(preprocess, batched=True, remove_columns=ds["train"].column_names)

Evaluate per error type

The headline number hides a lot — split-word and run-on errors are much harder than single-character typos.

test = load_dataset("mehedihasanbijoy/BanglaSEC", split="test")

for etype in sorted(set(test["ErrorType"])):
    subset = test.filter(lambda r: r["ErrorType"] == etype)
    preds = my_model.correct(subset["Error"])
    acc = sum(p == g for p, g in zip(preds, subset["Word"])) / len(subset)
    print(f"{etype:<36} n={len(subset):>6}  exact-match={acc:.4f}")

Train on a single error type

typos = ds.filter(lambda r: r["ErrorType"].startswith("Typo"))
print(len(typos["train"]))  # 487,124

Use the character masks for error detection

Treat the task as token classification — predict which characters are wrong — rather than generation.

import ast

def to_tagging(row):
    return {
        "chars": list(row["Word"]),
        "labels": ast.literal_eval(row["Mask"]),   # 1 = character is misspelled
    }

tagging = ds["train"].map(to_tagging)

Few-shot prompting with an LLM

train = load_dataset("mehedihasanbijoy/BanglaSEC", split="train")
shots = train.shuffle(seed=0).select(range(8))

prompt = "Correct the Bangla spelling error.\n\n"
for s in shots:
    prompt += f"Input: {s['Error']}\nOutput: {s['Word']}\n\n"
prompt += f"Input: {test[0]['Error']}\nOutput:"

How the splits were made

Splitting follows train_valid_test_df in DPCSpell's utils.py, as called from detector.py:

train_valid_test_df(df, test_size=0.15, valid_size=0.05)

Within each ErrorType independently — so the split is stratified:

train_tmp, test  = train_test_split(etype_df, test_size=0.15)
train,     valid = train_test_split(train_tmp, test_size=0.05)

giving 0.85 × 0.95 = 80.75% train, 0.85 × 0.05 = 4.25% validation, 15% test.

The original code leaves train_test_split unseeded, so the exact row assignment of the published runs is unrecoverable. These files were generated with random_state=1234 (the seed DPCSpell sets for torch) so the split is reproducible from here on. Proportions and stratification match the paper exactly; row-level membership is a fresh draw. Regenerate with the included make_splits.py.


Limitations and caveats

Please read these before reporting numbers on this dataset.

  • Duplicate pairs straddle splits. The corpus contains 51,732 duplicate (Word, Error) rows, because different error-generation processes can land on the same surface form. The paper's procedure splits rows, not unique pairs, so 12,511 test rows (7.0% of the test split) have an identical pair somewhere in train. This is preserved for comparability with published results — deduplicate yourself if you want a stricter evaluation.
  • Word-level overlap is by design. Each correct word appears with many different errors, so 97,712 of the 98,090 distinct test words also occur in train. This benchmarks error correction, not generalisation to unseen vocabulary.
  • Split-word and run-on errors contain spaces. 214,570 Error strings contain a space. DPCSpell's word2char + whitespace tokenizer silently drops it, so the detector config does not preserve the word boundary. The default config keeps raw strings intact — prefer it if boundaries matter to you.
  • Homonym Error is tiny — 123 rows, splitting to 98 / 6 / 19. Per-type metrics for this category are very noisy; don't read much into them.
  • Errors are synthetically generated, not harvested from human writing. The generation processes are modelled on real Bangla error patterns (Avro/Bijoy keyboard layouts, visual confusability, cognitive substitution), but the distribution is not a natural error distribution.
  • Flag and MaskFlag are constant (0 and 1). They are retained for schema compatibility with the DPCSpell codebase and carry no information.

Citation

@article{hossain2024panini,
  title={Panini: a transformer-based grammatical error correction method for bangla},
  author={Hossain, Nahid and Bijoy, Mehedi Hasan and Islam, Salekul and Shatabda, Swakkhar},
  journal={Neural Computing and Applications},
  volume={36},
  number={7},
  pages={3463--3477},
  year={2024},
  publisher={Springer}
}

License

MIT, matching the DPCSpell reference implementation.

Downloads last month
165