Datasets:
dataset_info:
features:
- name: tokens
list: string
- name: segment_tags
list:
class_label:
names:
'0': B
'1': I
splits:
- name: train
num_bytes: 618033522
num_examples: 544133
- name: test
num_bytes: 32877176
num_examples: 28639
download_size: 62316691
dataset_size: 650910698
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
- split: test
path: data/test-*
task_categories:
- token-classification
language:
- my
tags:
- myanmar
- burmese
- nlp
- sequence-labeling
- text-segmentation
- chunk-segmentation
pretty_name: Myanmar Text Segmentation Dataset
size_categories:
- 100K<n<1M
Please visit to the GitHub repository for other Myanmar Langauge datasets.
Myanmar Text Segmentation Dataset
A token classification dataset for Myanmar (Burmese) chunk segmentation, formatted for sequence labeling tasks using the BIO tagging scheme.
π Dataset Creation Notebook: myanmar-text-segmentation-dataset.ipynb
π Fine-Tuning Notebook: myanmar-text-segmentation-fine-tuning.ipynb (based on the HuggingFace Token Classification Guide)
π Try it out: Myanmar Text Segmentation Demo
Dataset Description
This dataset is designed for chunk segmentation of Myanmar text. The input tokens are syllables (for Myanmar) or characters (for English), and the labels indicate chunk boundaries using B (Beginning) / I (Inside) tags.
For example, the unsegmented text ααΌααΊαα¬ααα―ααΊααΆαα½ααΊ is first broken into syllables ["ααΌααΊ", "αα¬", "ααα―ααΊ", "ααΆ", "αα½ααΊ"], then labeled as [B, I, B, I, I] to produce the segmented output ααΌααΊαα¬ ααα―ααΊααΆαα½ααΊ.
Source Data
Derived from chuuhtetnaing/myanmar-wikipedia-dataset.
Processing Pipeline
Paragraph extraction: Each Wikipedia article is split by newlines, preserving full paragraphs as individual rows rather than sentence-by-sentence. This design allows models to handle multi-sentence inputs without requiring line-by-line splitting at inference time.
Language filtering: Each paragraph is classified using Facebook's fastText language identification model. Only paragraphs identified as Myanmar (
__label__mya_Mymr) are retained.Tokenization: Myanmar text is tokenized into syllables using regex-based rules that handle consonants, subscripts (αΉ), and asat (αΊ) markers. English text is tokenized into individual characters.
Chunk boundary labeling: Original spacing from the Wikipedia source text is converted to B/I sequence labels, where
Bmarks the first token of each chunk andImarks continuation tokens.Deduplication: Duplicate token sequences are removed from the final dataset.
Dataset Statistics
| Split | Examples |
|---|---|
| Train | 544,133 |
| Test | 28,639 |
Data Format
{
"tokens": ["ααΌααΊ", "αα¬", "ααα―ααΊ", "ααΆ", "αα½ααΊ"], # List of tokens
"segment_tags": [0, 1, 0, 1, 1] # 0 = B (chunk start), 1 = I (chunk continuation)
}
Features
tokens:Sequence[string]- Input tokens (Myanmar syllables or English characters)segment_tags:Sequence[ClassLabel]- Chunk boundary labels (B=0,I=1)
Usage
from datasets import load_dataset
ds = load_dataset("chuuhtetnaing/myanmar-text-segmentation-dataset")
ds["train"].features["segment_tags"].feature.names
# ['B', 'I']
def reconstruct(tokens, labels):
result = []
for token, label in zip(tokens, labels):
if label == 0 and result: # B tag (chunk boundary)
result.append(" ")
result.append(token)
return "".join(result)
ds["test"][1018]['tokens']
# ['αα»αΎααΊ', 'α
α
αΊ', 'αα«αΈ', 'ααΎ', 'αα·αΊ', '(Electrophorus)', 'αααΊ', 'αα»αα―αΈ', 'αααΊαΈ', 'Gymnotidae', 'ααΎα', 'αα±', 'αα»αα―', 'αα±', 'αα«αΈ', 'ααΎ', 'αα·αΊ', 'αα»αα―αΈ', 'α
α―', 'α', 'αα―', 'ααΌα
αΊ', 'αααΊ', 'α', ...]
ds["test"][1018]['segment_tags']
# [0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, ...]
reconstruct(ds["test"][1018]['tokens'], ds["test"][1018]['segment_tags'])
# 'αα»αΎααΊα
α
αΊαα«αΈααΎαα·αΊ (Electrophorus) αααΊ αα»αα―αΈαααΊαΈ Gymnotidae ααΎα αα±αα»αα―αα± αα«αΈααΎαα·αΊ αα»αα―αΈα
α―ααα―ααΌα
αΊαααΊα ...'
Intended Use
- Training chunk segmentation models for Myanmar NLP
- Token classification / sequence labeling experiments (HuggingFace Token Classification Training Example).
- Myanmar language processing research