Hostname: page-component-77f85d65b8-g4pgd Total loading time: 0 Render date: 2026-03-28T23:14:18.458Z Has data issue: false hasContentIssue false

UNLT: Urdu Natural Language Toolkit

Published online by Cambridge University Press:  19 January 2022

Jawad Shafi*
Affiliation:
School of Computer and Communication (SCC), Lancaster University, Lancaster, UK COMSATS University Islamabad, Lahore Campus, Pakistan
Hafiz Rizwan Iqbal
Affiliation:
Information Technology University, Lahore, Pakistan
Rao Muhammad Adeel Nawab
Affiliation:
COMSATS University Islamabad, Lahore Campus, Pakistan
Paul Rayson
Affiliation:
School of Computer and Communication (SCC), Lancaster University, Lancaster, UK
*
*Corresponding author. E-mail: jawadshafi@cuilahore.edu.pk
Rights & Permissions [Opens in a new window]

Abstract

This study describes a Natural Language Processing (NLP) toolkit, as the first contribution of a larger project, for an under-resourced language—Urdu. In previous studies, standard NLP toolkits have been developed for English and many other languages. There is also a dire need for standard text processing tools and methods for Urdu, despite it being widely spoken in different parts of the world with a large amount of digital text being readily available. This study presents the first version of the UNLT (Urdu Natural Language Toolkit) which contains three key text processing tools required for an Urdu NLP pipeline; word tokenizer, sentence tokenizer, and part-of-speech (POS) tagger. The UNLT word tokenizer employs a morpheme matching algorithm coupled with a state-of-the-art stochastic n-gram language model with back-off and smoothing characteristics for the space omission problem. The space insertion problem for compound words is tackled using a dictionary look-up technique. The UNLT sentence tokenizer is a combination of various machine learning, rule-based, regular-expressions, and dictionary look-up techniques. Finally, the UNLT POS taggers are based on Hidden Markov Model and Maximum Entropy-based stochastic techniques. In addition, we have developed large gold standard training and testing data sets to improve and evaluate the performance of new techniques for Urdu word tokenization, sentence tokenization, and POS tagging. For comparison purposes, we have compared the proposed approaches with several methods. Our proposed UNLT, the training and testing data sets, and supporting resources are all free and publicly available for academic use.

Information

Type
Article
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution, and reproduction in any medium, provided the original work is properly cited.
Copyright
© The Author(s), 2022. Published by Cambridge University Press
Figure 0

Table 1. Example text for various types of space omission problems

Figure 1

Table 2. Examples showing Sentence Boundary Markers (SBM) and Non-Sentence Boundary Markers (NSBM) for Urdu text

Figure 2

Algorithm 1 UNLT-WT approach

Figure 3

Table 3. Domain wise statistics of the UNLT-WT-Test data set

Figure 4

Table 4. Statistics of three different training/testing data sets for evaluating the performance of Urdu POS taggers

Figure 5

Table 5. Statistics of most frequent POS tags of UNLT-POS testing data set

Figure 6

Table 6. Results obtained on UNLT-WT-Test data set using various techniques

Figure 7

Table 7. Results obtained by using various sentence tokenization approaches on UNLT-ST-Train/Test data set

Figure 8

Table 8. Results obtained using various POS tagging models based on several approaches on different POS test data sets

Figure 9

Table 9. Accuracies of open class tags on UNLT-POS testing data set using T-HMM-KN-Suf-MA and MEn-Suf-MA