CoolFace
Modelpublic

chuuhtetnaing/myanmar-text-segmentation-model

sourceHugging Faceapache-2.0updated 9mo agoView on Hugging Face
4likes81downloads
Model Card

Myanmar Text Segmentation Model

Fine-tuned FacebookAI/xlm-roberta-base for Myanmar text segmentation (word boundary detection) using token classification.

Training Results

StepTraining LossValidation LossPrecisionRecallF1Accuracy
10000.11330.11450.77040.74640.75820.9564
20000.11150.11510.76200.76440.76320.9566
30000.10850.11630.75140.77240.76180.9558
40000.10760.11680.77910.73600.75690.9568
50000.10560.11180.77200.76040.76610.9576
60000.11410.11200.77510.76130.76820.9581
70000.11540.11080.76560.77170.76860.9576
80000.11280.10920.77440.76620.77030.9584
90000.10820.10950.78100.76200.77140.9589
100000.11010.10740.78170.76280.77210.9591
110000.11010.10790.77690.77210.77450.9591
120000.10580.10930.76720.78000.77350.9585
130000.10700.10750.78560.76220.77380.9596
140000.10550.10660.78240.77140.77690.9599
150000.10540.10650.77780.77240.77510.9593
160000.10380.10620.77750.77490.77620.9595
170000.10520.10530.78840.76350.77580.9600
180000.10610.10620.77960.77670.77810.9599
190000.10380.10630.77530.78110.77820.9597
200000.10170.10480.78480.77340.77910.9603
210000.10290.10460.78270.77740.78000.9603
220000.10180.10430.78440.77530.77980.9604
230000.10070.10430.78890.76890.77870.9605
240000.10080.10480.78590.77470.78030.9605
250000.10150.10390.78620.77590.78100.9607
260000.10080.10630.78320.77520.77920.9602
270000.10030.10390.78890.77280.78080.9608
280000.09980.10300.78300.78390.78340.9608
290000.09910.10380.78440.78170.78310.9608
300000.09710.10450.78910.77610.78250.9610
310000.09610.10470.78820.77610.78210.9609
320000.09580.10300.78690.78040.78370.9611
330000.09630.10370.78570.78010.78290.9609
340000.09720.10360.79100.77590.78340.9612
350000.09660.10300.78800.78040.78420.9612
360000.09720.10240.79000.77850.78420.9613
370000.09610.10360.78980.77800.78380.9613
380000.09680.10240.78920.78080.78500.9614
390000.09560.10320.78920.78100.78500.9614
400000.09460.10320.78660.78340.78500.9613
410000.09330.10280.79040.78060.78540.9615
420000.09280.10310.79230.77680.78450.9615
430000.09240.10340.78470.78740.78600.9613
440000.09390.10410.78300.78970.78630.9612
450000.09460.10290.79030.78280.78650.9617
460000.09390.10220.79010.78200.78600.9616
470000.09310.10260.79070.77990.78530.9615
480000.09270.10240.79160.78040.78600.9617
490000.09420.10220.79090.78310.78690.9618
500000.09300.10210.79100.78230.78660.9617
510000.09020.10350.78870.78540.78700.9617
520000.09070.10320.79170.78140.78650.9617
530000.09030.10340.79050.78300.78670.9617
540000.09080.10290.79040.78280.78660.9617

Training Details

ParameterValue
Base ModelFacebookAI/xlm-roberta-base
Total Steps54000
Epochs4.961867132224571
Final Training Loss0.090800
Best Checkpointmyanmartextsegmentation_model/checkpoint-50000
Best F1 Score0.1021
Learning Rate2e-5
Batch Size25
Weight Decay0.01

Usage

Using Pipeline

python
from transformers import pipeline

nlp = pipeline("token-classification", model="chuuhtetnaing/myanmar-text-segmentation-model", grouped_entities=True)
segments = nlp("အချစ်ဆိုတာလူတွေရှင်သန်ဖို့သဘာဝကပေးတဲ့လက်နက်လား၊ဒါမှမဟုတ်ယဉ်ကျေးမှုအရတီထွင်ထားတဲ့စိတ်ကူးယဉ်မှုသက်သက်လား။")

segmented_text = []
for segment in segments:
    if segment["entity_group"] == "B":
        segmented_text.append(segment["word"])
    else:  # 'I' - append to previous word
        segmented_text[-1] += segment["word"]
segmented_text = " ".join(segmented_text)

print(segmented_text)

# အချစ်ဆိုတာ လူတွေရှင်သန်ဖို့ သဘာဝကပေးတဲ့လက်နက်လား၊ ဒါမှမဟုတ် ယဉ်ကျေးမှုအရ တီထွင်ထားတဲ့ စိတ်ကူးယဉ်မှုသက်သက်လား။

Label Mapping

  • B: Beginning of a word/segment
  • I: Inside a word/segment (continuation)

Dataset

Trained on chuuhtetnaing/myanmar-text-segmentation-dataset dataset.