---
abstract: 'Segmentation is a fundamental step for most Natural Language Processing tasks. The Kurdish language is a multi-dialect, under-resourced language which is written in different scripts. The lack of various segmented corpora is one of the major bottlenecks in Kurdish language processing. We used *Punkt*, an unsupervised machine learning method, to segment a Kurdish corpus of Sorani dialect, written in Persian-Arabic script. According to the literature, studies on using *Punkt* on non-Latin data are scanty. In our experiment, we achieved an F1 score of 91.10% and had an Error Rate of 16.32%. The high Error Rate is mainly due to the situation of abbreviations in Kurdish and partly because of ordinal numerals. The data is publicly available at <https://github.com/KurdishBLARK/KTC-Segmented> for non-commercial use under the CC BY-NC-SA 4.0 licence.'
author:
- |
    Roshna Omer Abdulrahman, Hossein Hassani\
    Department of Computer Science and Engineering\
    University of Kurdistan Hewlêr\
    Kurdistan Region - Iraq\
    `{roshna.abdulrahman,hosseinh}@ukh.edu.krd`\
bibliography:
- 'iclr2020\_conference.bib'
title: 'Using Punkt for Sentence Segmentation in non-Latin Scripts: Experiments on Kurdish (Sorani) Texts'
---

Introduction {#Intro}
============

Kurdish is a multi-dialect, Indo-European language which is written in several scripts and spoken by approximately 30 million people in different countries [@hassani2018blark]. It is considered an under-resourced language, particularly due to the lack of digital sources for language processing [@ahmadi2019lex].

We use *Punkt* [@kiss2006unsupervised], an unsupervised machine learning approach, to segment Kurdish Textbook Corpus - KTC [@abdulrahman2019developing], which is in Sorani dialect, written in Persian-Arabic script. The Sentence Boundary Detection (SBD) has some issues in Sorani [@esmaili2012challenges], and to the best of our knowledge, currently, there is no publicly available segmented corpus for Sorani.

We show that Punkt performs appropriately on non-Latin scripts, which suggests that it could be used to expedite the segmentation process not only for Kurdish texts in Persian-Arabic but also for languages that hold a similar situation.

The rest of this paper is organized as follows. Section 2 presents the segmentation method. Section 3 presents the experiments, results, and discussion. Finally, Section 4 concludes the paper and suggests future work on the topic.

 Method
=======

Three main approaches to SBD exist, rule-based, supervised, and unsupervised machine learning [@read2012sentence]. Through using *Punkt* on KTC, we take the latter approach because it does not require an annotated corpus.

KTC includes 12 educational subjects of K-12 textbooks containing 693,800 tokens (110,297 types). We divide the corpus into a 90-10% for the development (dev) and test set, respectively. The division covers each subject per level. We train *Punkt* sentence segmenter on the corpus’s dev set.

To make the segmentation task more accurate, in addition to the traditional definition, we assume a sentence also could be a series of words (tokens) on a single line that is not followed by an end of sentence punctuation, such as **.**, **?**, and **!**. For instance, book title pages do not end in punctuation. We also identify abbreviations to let *Punkt* do the SBD with less ambiguity.

We test our approach on the test set manually by separating 10% of the newly segmented sentences. We evaluate the performance measures, precision, recall, error rate, and F1 score.

Results and Discussion
======================

We tokenized the dev set using NLTK’s [@bird2009natural] word tokenizer, and trained a custom *Punkt* sentence segmenter on the dev set. We fed the tokenized test set into the custom sentence segmenter and saved each file as an XML file of sentences tagged with the start and the end of sentence tags &lt;s&gt; and &lt;/s&gt;, respectively (see Figure \[SegExamplef\]).

We tested the sentence segmenter on the test set, and manually checked it by adding the attribute “type” to each segmented sentence with the values: *tp* (true positive), *tn* (true negative), *fp* (false positive), and *fn* (false negative).

We observed that abbreviations[^1] such as [([د. &gt;]{}]{} Dr.), as well as ordinal numbers, cause a sentence to be split. As Figure \[SegExamplef\] shows, the punctuation mark after the numbers vary, it changes from a dot to a dash, and an underscore (*.*,*-*,*\_*), which confuses the segmenter and creates more false positives.

We tested the same test set with five abbreviation accounted for ([[د. &gt;]{}]{} Dr.; [[پ. &gt;]{}]{} professor; [[د.خ &gt;]{}]{} S.W; [[م. &gt;]{}]{} teacher; [پ‌.‌ز &gt;]{} A.D). We obtained new results that showed identifying abbreviations would enhance the outcome. When only using *Punk* without parameters, Precision (80.64%) was lower compared to (83.67%), while recall stayed unchanged at (100%). The error rate difference was discernible; it dropped from (19.35%) to (16.32%). Finally, the F1 score was increased from (89.28%) to (91.10%)

![Ordinal numerals sentence segmentation example.[]{data-label="SegExamplef"}](bothimgs2.png){width="10cm" height="4cm"}

Conclusion
==========

We segmented Kurdish Sorani text into sentences using *Punkt*, which follows an unsupervised machine learning approach. The experiments showed an F1 score of 91.10% and an Error Rate of 16.32% when giving abbreviations as parameters, but we received 19.35% accuracy otherwise. The data set could be considered as part of the Kurdish BLARK.

In the future, we are interested in applying other methods and, where is applicable, in merging the current one with rule-based methods to improve the accuracy of the approach.

[^1]: Abbreviations in Kurdish, particularly in texts written in Persian-Arabic script, are far less common compared to acronyms [@centralkurdishstyleguide2020].
