Elamur Research

Conversion between Scripts of Punjabi: Beyond Simple Transliteration

Paper · 2012 · Gurpreet Singh Lehal and Tejinder Singh Saini

Summary

Punjabi readers in India and Pakistan may understand one another in conversation and still be unable to read one another’s books. Punjabi is generally written in Gurmukhi in India and in Shahmukhi, a Perso-Arabic script, in Pakistan. Converting between the scripts can make the same writing accessible to readers on either side of that divide. The difficulty is that a written word in either script may allow several spellings in the other. Shahmukhi frequently leaves short vowels unwritten, while Gurmukhi can write with the same letter sounds for which Shahmukhi offers different spellings. The way Shahmukhi uses spaces can also make the boundary between adjacent words hard to identify.

The authors build a converter in each direction. They prepare the input, consult dictionaries for common words and difficult spellings, and remove common endings when a whole word is missing from the dictionary. For the remaining words, rules propose target spellings from the source characters and their surroundings. In the Shahmukhi-to-Gurmukhi direction, the rules also supply possible short vowels. Frequencies from Punjabi text help choose among the resulting spellings. After this word-by-word work, a final pass uses the preceding words to choose among known alternatives whose suitability depends on the sentence.

In a staged test of 1,422 Shahmukhi words, word accuracy rose from 47.63% with the rule-based approach to 97.04% with the full converter. In the staged test in the other direction, on 906 Gurmukhi words, accuracy rose from 75.42% to 98.03%. A broader evaluation gave a headline word accuracy of 97% for Shahmukhi-to-Gurmukhi and 98.6% for Gurmukhi-to-Shahmukhi. Among Shahmukhi inputs the system could identify through its resources, the broader evaluation’s table reports 96.94% accuracy. For correctly written inputs outside those resources, the reported average was 63.04%.

The staged experiments show where the largest gains appeared. Adding the dictionary produced the biggest improvement in the reverse direction, with further gains from vowel recovery and character choice, then from segmentation and suffix handling. In the forward direction, accuracy rose most when the dictionary, suffix handling and character disambiguation were introduced together. The final context pass improved both staged results. The most informative comparison is between the kinds of evidence each stage supplies. A common target spelling can settle many isolated words, while neighboring words matter when several legitimate spellings compete.

Deep dive: Conversion between Scripts of Punjabi: Beyond Simple Transliteration

How Punjabi script conversion uses spelling rules, dictionaries and sentence context to write Gurmukhi as Shahmukhi and Shahmukhi as Gurmukhi. · about 35 minutes to read

The problem and its context

The barrier is in writing

The practical aim is to let a reader recognize familiar Punjabi words in a script they know. The converter has to preserve which words the writer used and express them using the conventions of another writing system. A reader who knows only Gurmukhi may already understand the language of a Shahmukhi passage when it is spoken aloud. Their access to the written passage depends on recovering enough information from its spelling to represent it intelligibly in Gurmukhi.

This matters for access to older writing in particular. According to the authors, over 60 percent of medieval Punjabi literature is available only in Shahmukhi. They describe most modern Punjabi writing as available in both scripts. In their account, the consequences of the divide thus vary with the material a reader wants. A second-script edition may exist for a modern work. For much older literature, the script of the available text itself determines who can read it directly.

The scripts have distinct origins and conventions. In the account given by the authors, Shahmukhi descends from the Phoenician tradition and Gurmukhi from the Brahmi tradition. They differ in writing direction and character inventory. These facts explain why conversion needs rules for handling the text in each direction. The deeper problem is that the scripts differ in which details they make explicit, so the inventory and direction alone give no recipe for reconstructing all the words.

A word can be missing information the other script needs

In Shahmukhi, writers can leave out the signs for short vowels. A reader of the script can recognize a familiar undiacritized word or work out which reading makes sense in a sentence. A converter to Gurmukhi faces a different requirement. The output needs to write distinctions that the reader of Shahmukhi may have supplied mentally. Several readings can share the same visible Shahmukhi spelling and each can give rise to a viable Gurmukhi word. When that happens, the source letters alone underdetermine the answer.

The paper compares the incidence of short-vowel signs in corpora for the scripts. It reports 1.66% coverage for the Shahmukhi short vowels it counts and 6.13% usage for the corresponding Gurmukhi signs it discusses. These are corpus observations about written signs. They illustrate the different amounts of vowel information the scripts tend to show on the page. On an actual input, a converter must work with whichever signs the writer supplied. Where a sign is absent, the system can consult possible target words and the surrounding text.

Ambiguity can also arise from a letter that is clearly present. The paper singles out Shahmukhi Vav, Yeh and noon as characters whose Gurmukhi representations can vary. Depending on the character and its surroundings, the alternatives can involve vowel or consonant readings, or different consonants. Some Shahmukhi symbols have no straightforward independent Gurmukhi counterpart. The authors give Hamza and Aen among their examples. A whole sequence can still have a suitable Gurmukhi spelling, so the operation may need to recognize a group of characters before producing any part of the output.

In the other direction, a Gurmukhi letter such as ਸ can have several similar-sounding Shahmukhi counterparts. The preferred choice depends on the established spelling of the word. A source word can also allow more than one valid reading, each with its own target spelling. For instance, the paper uses ਅਰਬ, which can refer to Arabia or someone from Arabia, or express the number sense of one billion. The Gurmukhi form is shared. Shahmukhi distinguishes the readings in writing, which makes sense part of the spelling decision even though the task is script conversion. Word sense disambiguation

Gurmukhi spelling creates a separate problem when writers omit the nukta, a mark used to extend certain consonant letters for sounds found in words from Urdu and Persian. The authors describe declining use of several of the marked forms and single out ਸ਼ as an exception. If a writer leaves the mark out, the converter may initially take the remaining letter at face value and choose an unsuitable Shahmukhi spelling. The authors therefore treat some source spellings as candidates for correction before trying to convert them.

Pronunciation and established spelling can diverge even when the source is written as intended. The paper illustrates this with a Gurmukhi word written with a short vowel where the authors give a long vowel in its pronunciation and in the corresponding Shahmukhi spelling. The converter needs to preserve the word through that change. The difference calls for knowledge of how the word is written and pronounced, alongside rules for how letters generally correspond.

Spacing and conventional spellings

Shahmukhi spacing introduces a problem before any word can be looked up. The paper describes writing in Nastalique, where letters may join and spaces can affect the shape displayed inside a word. Some boundaries between words can also go unmarked, particularly after a character that does not join to what follows. A piece of text set apart by spaces may therefore be only part of a word. Conversely, a continuous string may contain several words. The converter has to decide which units it will convert, a task known as tokenization.

That decision affects the steps that follow. An unwanted space may keep a dictionary from recognizing an otherwise ordinary word. A missing space may make a sequence of recognizable words look like an unfamiliar one. A character rule can still operate on the string, but it will be working with the wrong unit. The paper treats the recovery of word boundaries as part of the conversion procedure because the plausibility of individual word conversions can help determine how to divide the input.

Izafat constructions present a related difference even where the source spelling is well formed. The authors give examples such as vazīr-ē-āzam and katal-ē-ām, where the Gurmukhi rendering has a multiword structure and makes the linking element visible. The converter needs to know the conventional representation of the expression as a whole. Foreign words and other words with difficult spellings also motivate storing whole-word information. The paper groups examples such as words for school and studio with cases whose target spelling can be difficult to recover by ordinary letter alignment.

These issues can occur together. A string that looks unfamiliar could be a real word absent from the dictionary, a common word divided by a space, a word from another language, or a known word obscured by its source spelling. An ordinary-looking string can pose the opposite difficulty, with several familiar interpretations that all survive the initial checks. The first kind of case calls for recovering or recognizing a word. The second calls for choosing which interpretation fits. The converter handles those decisions at different points.

The approaches the authors build on

The paper situates its work alongside earlier Punjabi transliteration systems. It cites Malik’s work on Punjabi machine transliteration, work by Saini and colleagues on conversion from Shahmukhi to Gurmukhi, a corpus-based approach by Saini and Lehal, and earlier work by Lehal on conversion in the other direction. The paper identifies these lines of work and frames its own contribution around problems left open by straightforward rule-based conversion. It gives more detail about its own converter than about the procedures or outcomes of those earlier systems.

For short vowels, the authors connect Shahmukhi with a difficulty recognized in work on Arabic diacritization. For spacing, they refer to Urdu research on inserted and omitted spaces and to their earlier work on Shahmukhi segmentation through transliteration. The connection to Urdu also informs the treatment of character normalization. These precedents concern separate aspects of preparing or interpreting written text. The Punjabi converter brings those aspects together because an input can raise spelling, character encoding and boundary problems at once.

The paper draws on another field for the final choice among word spellings. It borrows a way to estimate contextual probabilities from Thede and Harper’s work on part-of-speech tagging. That work is relevant because the probability of a choice can depend on what precedes it. In Punjabi transliteration, the alternatives are words or spellings in the target script. The authors use counts of individual words and word sequences to estimate which of those alternatives fits the context.

The method, step by step

From the original text to a target sentence

The authors organize the converter around preparation, conversion and a final contextual decision. Preparation puts the text into a consistent character representation and adjusts relevant spellings. The conversion engine uses dictionaries where it can and builds spellings from character rules where it has to. In Shahmukhi input, it addresses unwanted spaces before the main word conversion and missing spaces towards the end of the engine. The last pass revisits known ambiguities with information from the target sentence.

At each point, the material available to the system changes. Before preparation, the same written character may be represented in forms that a dictionary would treat differently. During conversion, the engine can ask whether a candidate looks like a word that occurs in the target script. As words on either side of a decision acquire target spellings, there is also evidence about which candidates commonly follow the preceding words. The architecture brings in these kinds of evidence where they can do different work.

From Punjabi input text to target-script output

The steps in order.

From Punjabi input text to target-script outputStep 1: Convert the source text to Unicode1. Convert the source text to UnicodeStep 2: Normalize characters and correct Gurmukhi spelling2. Normalize characters and correct Gurmukhi spellingStep 3: Join Shahmukhi word fragments across unwanted spaces3. Join Shahmukhi word fragments across unwanted spacesStep 4: Look up whole words or match stems4. Look up whole words or match stemsStep 5: Generate and rank spellings with character rules5. Generate and rank spellings with character rulesStep 6: Recover missing Shahmukhi word boundaries6. Recover missing Shahmukhi word boundariesStep 7: Resolve remaining ambiguity using preceding words7. Resolve remaining ambiguity using preceding words

Preparing letters and spellings for conversion

The input can arrive in forms that require a change of encoding. For Shahmukhi, the authors provide for text from InPage. For Gurmukhi, they provide for text in traditional fonts, with an ASCII-to-Unicode conversion path shown in the architecture. Both routes lead to Unicode text. The conversion engine can then work with the character representations its rules and dictionaries expect.

Encoding conversion and normalization address different parts of that preparation. Text can already be in Unicode and still contain distinct code-point representations for characters that look alike. The authors base their Shahmukhi normalization rules on the Urdu Normalization Utility. The aim is to make equivalent representations behave consistently when the system compares character sequences. This matters both to dictionary lookup and to rules that look for a particular character next to another one.

The Gurmukhi route includes a spell checker that addresses omitted nukta marks. Placing it before the converter gives the system a chance to restore a distinction that a later mapping might need. If a marked consonant is expected in a word and the text lacks the mark, a correction can change the Shahmukhi candidates the engine considers. The character rules can then work with the more informative Gurmukhi spelling.

The authors also normalize some Gurmukhi words after spell checking to account for pronunciation and target orthography. In this part of the pipeline, the desired Shahmukhi rendering informs how a Gurmukhi form is prepared. The short-vowel spelling with a long-vowel pronunciation illustrates the purpose. The spell checker addresses a distinction missing from a source word that the system can recognize. Normalization can also prepare a correctly written Gurmukhi word for a different convention in Shahmukhi.

Together, these operations make the results of lookup easier to interpret. If a dictionary fails on a normalized form, the engine can proceed to methods that handle a different spelling or an unseen word. Without preparation, that same failure might simply reflect an expected character written in another encoding. The architecture uses both general character preparation and adjustments specific to the script being read.

Addressing Shahmukhi spacing at different points

The early segmentation pass handles unwanted spaces inside Shahmukhi words. Its job is to bring fragments together so that the lexical part of the system has a chance to see a whole word. A fragment alone may accidentally resemble a different word or may have no dictionary match at all. The recovered whole can present a clearer unit for conversion.

The late pass addresses missing spaces. It runs near the end of the conversion engine. The placement matters for understanding the architecture. The authors do not describe segmentation as a single pass that resolves all boundaries before the conversion begins. Instead, an early operation repairs words that spacing has split, and a later operation treats strings that can contain a boundary that was never written.

The paper refers to the authors’ earlier work for the segmentation approach. In this system description, the main details are which types of spacing problem are handled and when. The article gives no scoring procedure for choosing among competing splits or joins. The staging nonetheless explains how the converter can obtain help from lexical processing while still leaving room to revise the word boundaries. The authors use no corresponding segmentation stage for Gurmukhi in this architecture.

Looking up the word or finding a stem

The authors build direct dictionaries in both directions from frequently occurring words. Each dictionary supplies a target form for a looked-up source word. A lookup can save the engine from generating and weighing multiple character-level candidates for a familiar word. It can also provide a conventional spelling for a word whose target form is difficult to derive by ordinary letter correspondence.

The dictionaries are a way to store a decision that applies at the level of a whole word. For instance, knowing that a Gurmukhi consonant has several plausible Shahmukhi correspondences does not establish which one belongs in a particular word. A dictionary entry can supply the established combination of characters. The overall architecture still has a way to distinguish target alternatives in context. The direct lookup and contextual pass serve different purposes.

For Izafat, the authors build a separate Shahmukhi-to-Gurmukhi parallel resource based on word pairs. A pair here gives the engine a unit larger than a single word. It can register a conventional rendering in which the components and the relation between them appear explicitly in Gurmukhi. This is useful where treating each element as an independent dictionary entry would miss part of the construction.

A whole-word dictionary has finite coverage. An inflected form may be missing even though a base form is present. The authors therefore compile lists of common suffixes in the scripts and use a lightweight stemmer. Its main operation is to remove a listed ending in the hope of reaching a form the dictionary can recognize. It extends the use of existing entries to related forms. The paper describes the suffix-removal idea and gives examples of endings. It leaves the full rules for treating every resulting inflection unspecified.

What determines the next step is whether the lexical resources can usefully process the form. If they can, the system gains information about a whole word or its stem. For unresolved forms, the engine falls back on character correspondences. This ordering is important for words whose spelling is already known. It also keeps the system able to produce an output for input beyond its dictionary.

Converting character sequences

The authors manually align consonants and vowels across the scripts. Some alignments can be handled directly. Others use the characters around a letter, or its position in the word, to decide how to render it. The paper calls these dependency rules. They account for cases where a character has several correspondences and cases where no independent target letter captures its role in the source sequence.

For example, the paper gives word-initial Shahmukhi Alef-Madda followed by Vav with Hamza as a pattern yielding ਆਊ in Gurmukhi. It illustrates the result with ਆਊਟ, āūṭ. With a different form of Vav following Alef-Madda, the rule produces ਆਵ, as in ਆਵਾਜ਼, āvāz. The contrast is in what the second character and its marking tell the converter about the group. A rule that inspects the sequence can write the suitable Gurmukhi beginning before moving on.

A further example recognizes a longer Shahmukhi sequence around Hamza and Yeh and converts it to the Gurmukhi ending illustrated in ਵਧਾਈਆਂ, vadhāīāṃ. Here the unit of the rule is a sequence corresponding to part of a word. The recognizer can account for the function of the individual source signs through the Gurmukhi spelling it emits for the group. It needs no independent target letter for each sign.

For Gurmukhi input, the authors also construct rules motivated by pronunciation. Their examples include adjacent vowel elements in forms such as lāiā and vāliō, along with a nasal sign followed by a consonant in pamp. A combination can carry information that a single-letter rule would overlook. Such rules handle predictable interactions before any remaining spelling alternatives are ranked.

This use of immediate character context is distinct from the later use of sentence context. A dependency rule asks how the neighboring characters affect the rendering of part of a word. The post-processing stage asks which completed word fits after other completed words. The system may need both answers for the same input. A correct letter sequence can leave several real words possible, and the sentence decision depends on having those alternatives available.

Supplying short vowels in Gurmukhi

The authors describe a specific procedure for Shahmukhi words that reach the rule-based stage. It starts by applying the pre-defined character correspondences and the rules that inspect the surroundings of each character. The output at this point is a preliminary Gurmukhi spelling. It may contain choices for an ambiguous consonant, and it may still need short vowels omitted by the source writer.

The preliminary spelling is then formatted as Gurmukhi Unicode. Among the paper’s examples, the combination of ਅ and the dependent sign ◌ਾ is rewritten as ਆ. This step makes the candidate use the forms expected in Gurmukhi text before a frequency lookup. A sequence represented differently from the words in the frequency resource could otherwise fail to match even if it expressed the same spelling.

Next, the system tries short vowels at valid positions in the formatted word. It combines these possibilities with the available character alternatives and looks up the resulting complete forms. It assigns a weight using each form’s frequency as an individual word in the target corpus. An individual item is a unigram, one kind of n-gram. Ranking by unigram frequency asks how familiar each candidate is anywhere in the corpus before the wording of the current sentence comes into play.

The worked example starts from a Shahmukhi form the authors give as saṅgh. Its consonant mapping supplies alternatives around the nasal, and the short-vowel step supplies alternatives at eligible positions. A range of resulting spellings has no recorded occurrence in the resource. The paper shows candidate occurrence counts of 547, 45 and 55,338 for the forms remaining in its valid-unigram list. The candidate with 55,338 occurrences is siṅgh, written ਸਿੰਘ, and it wins the frequency comparison.

The example shows that consonant choice and vowel recovery can be decided together. A consonant mapping that looks plausible in isolation may produce an unattested word when combined with the other letters. A different nasal representation paired with a supplied vowel may produce a common word. The whole-form count gives the converter a way to weigh those combinations without assigning a separate score to each possible letter decision.

The distinction between generation and ranking also explains why this step cannot always settle the spelling. The rules determine which candidates are available. The frequency resource gives a preference among those candidates. When a less frequent form is the right word in a particular sentence, general word frequency can put the common alternative first. The authors reserve a final pass for recognized cases where context can change that choice.

Choosing among possible Shahmukhi consonants

A related procedure works from Gurmukhi to Shahmukhi. The paper illustrates it with ਸਾਹਿਬ. In this word, the Gurmukhi ਸ can correspond to س, ص or ث, and ਹ can correspond to ه or ح. Those choices can be combined into candidate whole-word spellings. The authors report that the selected form had a count of 6432 in the Shahmukhi unigram resource.

The parallel with vowel recovery is in the ranking operation. In both directions, the system enumerates alternatives made possible by the rules and prefers an attested target form with greater frequency. The source of the alternatives differs. The Shahmukhi-to-Gurmukhi procedure can supply vowel information absent from the spelling. For ਸਾਹਿਬ, the Gurmukhi letters are present and the procedure must select which Shahmukhi equivalents represent them in that word.

The target script matters to the choice. The relevant count for ਸਾਹਿਬ is a Shahmukhi word count. A Gurmukhi corpus could show whether the input form was common, but the competitors share that input. Counts in the target script can distinguish how often the rival spellings occur. This is one reason the architecture includes resources drawn from both scripts.

Using sentence context for the remaining choices

The paper’s word-level examples explain why a valid spelling can still be wrong for its sentence. An undiacritized Shahmukhi form can be interpreted as mull, mil, mill or mall in Gurmukhi. All are presented as viable readings in appropriate contexts. In the other direction, ਹਾਲ can yield a Shahmukhi spelling for a state or condition, or a different spelling for a large room. The source form alone leaves a real choice in each example.

The post-processing stage uses a second-order hidden Markov approach, abbreviated HMM in the paper. The second-order part refers to the use of the preceding pair of words when estimating how likely a candidate is at the current position. The paper describes the contextual probability by adapting the method of Thede and Harper. Counts from raw corpora in the relevant script provide estimates for the candidate by itself, following the most recent word, and following both preceding words.

Each of those estimates has a different amount of context. A trigram is a sequence of three items, here the two preceding words and the candidate. A bigram uses the immediately preceding word and the candidate. The unigram uses the candidate alone. In a corpus, a candidate may be familiar even if its exact sequence with the preceding words is rare. The authors combine the estimates so that the procedure can use the longer context when it is informative and still retain evidence from shorter sequences. This weighted combination is called interpolation.

The contextual probability in detail

The paper’s main equation can be written as follows.

P(τₚ = wₖ | τₚ₋₁ = wⱼ, τₚ₋₂ = wᵢ) = k₃ · (N₃ / C₂) + (1 − k₃) · k₂ · (N₂ / C₁) + (1 − k₃) · (1 − k₂) · (N₁ / C₀)

Here P denotes probability, and the vertical bar means that the probability is conditional on the words listed after it. The position p is where the converter must choose a word. The symbols p − 1 and p − 2 refer to the immediately preceding position and the one before it, respectively. The symbol τ with a position subscript represents the target word at that position. The candidate is wₖ, the immediately preceding word is wⱼ, and the earlier word is wᵢ. The subscripts k, j and i identify those word forms, while = associates the position on its left with the word on its right.

The quantities N₃, N₂ and N₁ are corpus frequencies. N₃ counts the full sequence wᵢ wⱼ wₖ. N₂ counts the shorter sequence wⱼ wₖ, and N₁ counts wₖ by itself. The denominator C₂ is the occurrence count for the preceding pair wᵢ wⱼ. The denominator C₁ is the occurrence count for wⱼ. The paper labels C₀ as the total vocabulary. The slashes indicate division, so each term starts with a target-candidate count divided by the corresponding denominator specified in the paper.

The multipliers k₃ and k₂ assign weight to context. The first fraction receives k₃. The factor 1 − k₃ is the weight available to the remaining fractions. Within that remainder, the second fraction receives the share k₂, and the third receives the complementary share 1 − k₂. The centered dots indicate multiplication, and the plus signs add the three weighted fractions. Parentheses group an estimate or a weight before it is multiplied.

The weight for the longest sequence is defined this way.

k₃ = (log₂(N₃ + 1) + 1) / (log₂(N₃ + 1) + 2)

The symbol k₃ is the weight on the trigram estimate. The input N₃ is the frequency of the trigram involving the candidate and the preceding pair of words. The notation log₂ means logarithm to base 2. The first + 1 inside the logarithm shifts the input count so that a zero count can be used in the logarithm. The numerator adds 1 to the logarithm, and the denominator adds 2. The slash divides the resulting numerator by the denominator.

The corresponding weight within the shorter-context portion is as follows.

k₂ = (log₂(N₂ + 1) + 1) / (log₂(N₂ + 1) + 2)

The symbol k₂ controls how much of the weight left by the trigram goes to the bigram estimate. The input N₂ counts the candidate and the immediately preceding word together. Again, log₂ is the base-2 logarithm. The count inside it is shifted by 1. The logarithm plus 1 is divided by the same logarithm plus 2. This weight affects the allocation between bigram and unigram evidence after the trigram has received its share.

As the count for a candidate sequence grows, the corresponding weight increases. This feature makes the allocation sensitive to what the corpus contains. An exact sequence with substantial support can matter more to that candidate than a sparse sequence. The estimate still includes the shorter sequences. Those shorter counts can provide information even when the same predecessor pair has seldom appeared with the candidate.

The authors illustrate the contextual choices with sentences where the alternatives give different meanings or identities. For Shahmukhi input, one example selects Tarn over turan in the name Tarn Taran. Another picks the appropriate form from the alternatives us and is. For Gurmukhi input, the paper shows contextual conversion of ਹਾਲ and ਅਰਬ into Shahmukhi. These are examples of choosing from possible readings instead of discovering a word from its characters. The contextual equation describes how the procedure values a candidate after preceding words. The examples show what that choice looks like in output.

Building and using the resources

The authors start with raw Punjabi corpora in the scripts and compile frequency tables for unigrams, bigrams and trigrams. The character-based stages consult single-word frequencies when ranking generated spellings. The context stage draws on word-sequence frequencies as well. The lexical resources provide a different kind of evidence through direct equivalents for frequent words and a parallel resource for Izafat. The suffix lists expand the range of forms for which those dictionaries can help.

The training procedure described in the paper centers on collecting these counts and constructing the lexicons and rules. The count-based weights in the equations vary with occurrences in the corpus. The authors describe preparing the consonant and vowel alignments manually and building rules for particular character groups and pronunciation patterns. Each resource therefore contributes a different judgment. The rules delimit plausible forms, the dictionaries record preferred conversions, and the corpus counts tell the system which valid possibilities are familiar in isolation or context.

Some correctly written inputs remain outside those resources. In the broader Shahmukhi-to-Gurmukhi evaluation, the authors call an item out of vocabulary when the system cannot recognize it in any form. It then produces an output through a hybrid of character rules and frequencies of character trigrams. The units here are characters, unlike the sequences of words used for contextual disambiguation. That fallback gives a way to attempt a spelling when there is no recognized word to select. Its output is evaluated separately from the output for items the system identifies.

Experiments and results

The staged tests

The authors evaluate the system in stages as well as on broader collections. The staged tests start with rule-based conversion and add resources or procedures to the same direction of conversion. Accuracy is measured at the word level. The Shahmukhi-to-Gurmukhi description specifies manual assessment of the output after each stage. A score in this experiment describes the accumulated system at that point, so the line for a later stage includes what was added earlier.

For Shahmukhi-to-Gurmukhi, the staged collection contains 1,422 words drawn from ten examples from online and offline sources. Individual examples range from 94 to 246 words. The rule-based configuration reaches 47.63% word accuracy. Adding the dictionary brings the score to 87.69%. Handling missing vowels and character ambiguity brings it to 92.44%. The stage adding word segmentation and the lightweight stemmer reaches 95.46%. The last stage adds contextual word disambiguation and reaches 97.04%.

Shahmukhi-to-Gurmukhi staged evaluation on 1,422 words

The dictionary produces the largest rise, and the full system gives the highest word accuracy.

Shahmukhi-to-Gurmukhi staged evaluation on 1,422 wordsRules: 47.63Rules47.63Add dictionary: 87.69Add dictionary87.69Add vowel recovery and character disambiguation: 92.44Add vowel recovery and characterdisambiguation92.44Add segmentation and stemming: 95.46Add segmentation and stemming95.46Add contextual word disambiguation (this paper): 97.04Add contextual word disambiguation (thispaper)97.04
The numbers
System or settingword accuracy %
Rules47.63
Add dictionary87.69
Add vowel recovery and character disambiguation92.44
Add segmentation and stemming95.46
Add contextual word disambiguation (this paper)97.04

The Gurmukhi-to-Shahmukhi staged collection consists of eight examples totaling 906 words. The rule-based configuration reaches 75.42% word accuracy. The authors report 97.46% after adding the dictionary, lightweight stemmer and character ambiguity handling as a group. With contextual disambiguation added to that configuration, word accuracy reaches 98.03%.

Gurmukhi-to-Shahmukhi staged evaluation on 906 words

Most of the improvement appears before contextual disambiguation, and the full system scores highest.

Gurmukhi-to-Shahmukhi staged evaluation on 906 wordsRules: 75.42Rules75.42Add dictionary, stemming and character disambiguation: 97.46Add dictionary, stemming and characterdisambiguation97.46Add contextual word disambiguation (this paper): 98.03Add contextual word disambiguation (thispaper)98.03
The numbers
System or settingword accuracy %
Rules75.42
Add dictionary, stemming and character disambiguation97.46
Add contextual word disambiguation (this paper)98.03

The rule-based configuration is the baseline supplied for each direction. These comparisons show how the tested additions change word accuracy relative to the authors’ own rule engine. The paper does not report a competing system run on these collections. The two baselines also operate on different source material, so their scores describe the difficulty of the respective test setups for that configuration. They do not give a controlled comparison of the scripts on matched writing.

The broader Shahmukhi-to-Gurmukhi evaluation

The broader evaluation in this direction uses collections from different sources. Set-1 is a Shahmukhi book containing 37,620 words. Set-2 contains 39,714 words from online articles, stories and writing about current issues. Set-3 contains 46,678 words from a mixed online collection that includes news, articles, stories, novels and poetry. The authors describe limited availability of Shahmukhi text as a constraint on assembling the material.

A native speaker of Punjabi who knows both scripts manually evaluates the output. The paper gives a headline word accuracy of 97% for this direction. Its detailed results classify input words into those the system recognizes and those it treats as out of vocabulary. The accuracy columns apply to those categories separately. That separation matters because a score for a category and the proportion of the input that belongs to it answer different questions.

Shahmukhi test collectionShare foundAccuracy for found wordsShare out of vocabularyAccuracy for out-of-vocabulary words
Set-1, book99.468%98.49%0.532%50.00%
Set-2, articles and stories98.927%96.64%1.073%50.00%
Set-3, mixed online collection99.595%95.68%0.405%87.5%
Total as reported99.33%96.94%0.67%63.04%

The paper reports a total of 1,24,012 words for the collections. In the table, found means that the system recognized a word through its resources in some form. The overall found share of 99.33% describes recognition according to that definition. The accuracy of 96.94% describes outputs for recognized words. Because a system can recognize a source form yet choose the wrong target interpretation, a high found share can coexist with errors in the recognized group.

The book has the highest reported accuracy among found words, followed by Set-2 and then Set-3. The authors suggest that frequent use of Pakistani Punjabi dialect in the writing in Set-3 could contribute to its result. They also point to that collection’s diversity of material as a possible factor. These are explanations proposed for the observed ordering. The evaluation does not give separate scores for dialect or genre that would allow their roles to be estimated.

The out-of-vocabulary figures describe how the fallback behaves for words the ordinary resources fail to identify. The authors say that these inputs commonly include words absent from the corpus, erroneous source forms and foreign words, especially from English or Urdu. They evaluate the outputs for out-of-vocabulary items with correct input and report an average word accuracy of 63.04% for them. That condition matters because the accompanying description of flagged words includes both genuine uncovered words and faulty input. The accuracy for the correctly written items cannot automatically be assigned to all items that raised the flag.

Set-3 shows why the categories are worth examining individually. It has the lowest reported accuracy among found items and the highest reported accuracy in the out-of-vocabulary column. A collection can contain recognized words that are comparatively hard to disambiguate and separately present fallback cases that the character procedure handles well. The table establishes that the observed rankings differ. It leaves the specific mix of fallback cases in each collection open.

The broader Gurmukhi-to-Shahmukhi evaluation

For Gurmukhi-to-Shahmukhi, the authors test on more than 100 pages assembled from newspapers, books and poetry. They report overall word accuracy of 98.6% in the system evaluation. This is a result for the broader collection. The figure of 98.03% belongs to the smaller staged evaluation on 906 words, which answers how performance changes as the system gains additional components.

The authors identify typical and multiple Shahmukhi spellings as major sources of remaining errors. This is consistent with the character and word examples. A pronounced form may admit several spellings, and a Gurmukhi word can stand for senses distinguished in Shahmukhi. A dictionary can store familiar target forms. Choosing among real alternatives in a sentence also requires corpus evidence for the spellings and contexts the system is likely to encounter.

The forward-direction system evaluation gives the collection size in pages and an overall accuracy. The reverse-direction evaluation gives word totals and separates recognition from the accuracy of the fallback. The headline results provide a measure of performance for each direction on its own material, while the staged experiments give the more direct view of which additions accompany better accuracy.

What the ablations show

The dictionary supplies most of the early gain

The paper uses cumulative stages in place of independent component removals from the full system. The clearest early comparison is in Shahmukhi-to-Gurmukhi. Word accuracy goes from 47.63% with rules to 87.69% when the dictionary is added. Because this stage adds the dictionary on top of the rule-based approach, it shows the benefit of that addition at that point in the sequence. The paper does not break the gain down by kinds of dictionary entry.

There are several reasons, grounded in the method, why a whole-word resource can help early. It can recover a conventional spelling for an input whose characters could have generated several alternatives. It can also supply a short vowel the input leaves unwritten or give a complete form whose correspondence is difficult to express as a local rule. The staged result measures the combined effect of successful whole-word lookup. It leaves open how frequently each of those mechanisms was responsible.

The forward-direction jump from 75.42% to 97.46% applies to a broader package. The dictionary, lightweight stemmer and character ambiguity handling all enter together. The package clearly improves the tested rule-based system. Its score cannot tell how much of that gain would have appeared with the dictionary alone or how much the stemmer adds once the dictionary and character procedure are active. The reverse-direction dictionary stage offers more direct evidence about the dictionary itself, on that direction’s material.

Restoring vowels and recovering words add coverage

In Shahmukhi-to-Gurmukhi, the stage handling missing vowels and ambiguous characters brings word accuracy from 87.69% to 92.44%. It tests the combined benefit of those operations after the dictionary is already available. The siṅgh example explains how the operations can reinforce each other. The target corpus gives a frequency for a complete candidate after a nasal representation and a vowel have both been chosen. The aggregate score gives the effect of using that procedure. It does not separate the contribution of supplying vowels from the contribution of choosing character correspondences.

The next stage, at 95.46% word accuracy, adds segmentation and the lightweight stemmer together. Both can help the system reach a form its resources know. Segmentation changes what counts as an input word. Stemming can connect a legitimate inflected word with a recorded base. Because the experiment combines them, a successful final word could reflect a repaired boundary, a suffix match, or an interaction in which the boundary repair made the suffix match possible. There are no separate accuracy figures for the two spacing operations either.

The order matters when interpreting these results. Once a dictionary resolves a word, that word has less opportunity to benefit from the fallback that generates short-vowel candidates. Conversely, a boundary repair can make dictionary resources useful on inputs that previously looked unknown. A cumulative stage thus measures what the addition contributes in the presence of everything activated before it. The score for a component in another position in the pipeline could describe a different set of decisions.

Context helps after individual words have been processed

The final step is identifiable in each staged experiment. In Shahmukhi-to-Gurmukhi, adding contextual disambiguation takes word accuracy from 95.46% to 97.04%. In Gurmukhi-to-Shahmukhi, it takes the score from 97.46% to 98.03%. These comparisons show an aggregate gain when the final context procedure is applied after the other stages. The examples with ਹਾਲ, ਅਰਬ and Tarn Taran explain the class of error it is intended to fix. A good candidate can already exist after lexical or character conversion, while a neighboring word supplies evidence for choosing it.

The reference condition for this comparison is the whole preceding stage, which already uses lexical information and frequency-based character disambiguation. The experiment therefore gives evidence for a benefit from the contextual pass beyond that earlier work. It provides no comparison among trigram, bigram and unigram versions of the final pass. The results also leave open whether another weighting procedure, or a different amount of context, could resolve the same words.

The magnitude of a final improvement is measured over every word in the staged collection. Many of those words may already have been handled correctly before context is consulted. The authors do not report a denominator consisting only of ambiguous words that reach contextual selection. The scores support a statement about overall word accuracy. They give no separate success rate for the cases in which the post-processor had to choose among rival spellings.

Recognition and fallback are separate measurements

The broader reverse-direction evaluation distinguishes groups of test words based on what the engine could recognize. It is a descriptive analysis of the system’s output, rather than a component removal. The 96.94% accuracy for found words and the 63.04% average for correctly written out-of-vocabulary items show performance under different conditions. The vocabulary flag provides an indication that the converter has had to rely on characters for an unfamiliar form. It is not a direct measure of the character procedure’s contribution to words in the found group.

The reported found and fallback scores also help interpret the high headline accuracy. Most input words were in the found group on these collections. The fallback still had to handle a mixture of less familiar material, and the reported conditional accuracy for it varies across collections. The group comparison shows where the finished system is less dependable in the evaluation. An experiment that routed the same recognized words through the fallback would be needed to compare what the two paths do on matched inputs. The paper reports no such comparison.

Limitations

Limits the authors identify

The authors identify the limited availability of natural Shahmukhi text as a constraint on the broad reverse-direction evaluation. They assemble a book and online material of different kinds to obtain test collections. Those sources offer variety, but the paper’s own explanation for lower found-word accuracy on Set-3 shows how the mix can complicate interpretation. Dialect use and diversity of material are plausible contributors in the authors’ account. The evaluation gives no way to assign a share of the result to either cause.

They also emphasize the dependence of contextual choice on the training corpus. A spelling associated with a particular sense must occur often enough in suitable contexts for the procedure to learn something from the counts. A corpus that represents the common reading of a word much better than another reading can keep favoring the common form when the less familiar choice is correct. The authors suggest that a larger corpus covering more of the senses of ambiguous words could improve results. The paper offers this as an explanation and a prospect for improvement, with no corpus-size experiment to quantify it.

The authors note conventional and multiple Shahmukhi spellings among the main sources of forward-direction errors. A spelling error in output can persist even when the source word is recognized and the main consonants have plausible correspondences. The paper also distinguishes out-of-vocabulary inputs with valid spelling from faulty input, words absent from corpus resources, and foreign material. The fallback result is reported for correctly written cases. This restriction limits what the quoted accuracy says about noisy source text.

Limits visible in the evaluation

The staged experiments compare configurations in an ordered build-up. They support statements about the changes that accompany the addition of a stage. They give limited evidence about interactions among stages, particularly when several additions enter together. The reverse-direction stage that combines stemming and segmentation cannot tell whether the gain comes mainly from suffixes, spacing, or cases where both help. The forward-direction stage that changes several lexical operations at once has the same interpretive limit.

The paper establishes the internal rule-based approaches as baselines. It discusses previous Punjabi transliteration work without reporting head-to-head results against those systems on the same material. The experiment therefore supports improvements within the authors’ pipeline. It leaves relative performance against the cited systems open. It also provides no comparison with a system trained and evaluated under a common protocol across both directions.

The broader tests use different collections for the two directions and describe their sizes differently. The Shahmukhi evaluation gives word counts by source. The Gurmukhi evaluation reports a collection size in pages and a headline accuracy. Accordingly, the cross-direction scores do not isolate the effect of changing the source script. As the authors explain, omitted short vowels and uneven spacing make the reverse conversion especially challenging. The evaluation demonstrates the performance of the implemented converters on their respective collections, while the linguistic evidence explains why the reverse problem presents additional kinds of uncertainty.

Word accuracy is a measure of individual output words. The paper does not report how many sentences can be converted without error or how readily readers can understand whole passages. A wrong name, vowel or boundary can matter more to a reader than another mistake counted the same way by the metric. The authors’ motivation is access to written material, but the experiments test conversion accuracy. They do not measure reading comprehension. Examples of proper names and Izafat show what the system is designed to handle, without establishing separate accuracy for names or compounds.

The broader Shahmukhi evaluation identifies a bilingual native speaker as the evaluator. The paper gives no procedure for resolving disagreements among evaluators or for deciding when several plausible orthographic variants should count as correct. It likewise supplies no separate boundary metric for inputs with inserted or omitted spaces. The word-level results record success under the authors’ assessment. They leave open how sensitive the scores are to another assessment of variant spellings or to decisions about counting words after a boundary is changed.

The distinction between coverage and accuracy is especially important for the reverse direction. The table’s 96.94% overall value in the found-word column is conditional on recognition. The 63.04% value is presented as an average for correctly written out-of-vocabulary cases. The paper gives a separate headline figure of 97%. It does not provide enough detail about aggregation and the treatment of faulty input to reconstruct a single overall score from those columns. The reported headline and conditional measurements can therefore be read as answering different questions.

Limits of the implementation description

The paper gives the architecture, sample rules, frequency estimates and worked outputs. Several details needed for a fully specified reimplementation are left implicit. The resource descriptions do not enumerate the dictionaries or provide a complete account of how entries were selected and paired. They do not give corpus sizes for the frequency tables, their composition by sense or domain, or a precise account of how those tables were kept separate from the evaluation material. These omissions leave the evidence for a particular candidate hard to reconstruct beyond the examples.

The contextual equation specifies C₀ as the total vocabulary, without clarifying whether that label refers to distinct forms or a total taken over corpus occurrences. The paper also leaves unspecified what happens when a contextual denominator is zero. Adding to a count inside the logarithm keeps the weight equations defined for an unseen sequence. It does not by itself specify how the separate count fractions are evaluated when the preceding word or pair has no recorded occurrence.

The description of contextual disambiguation supplies the probability estimate and illustrative decisions. It gives no complete decoding procedure for jointly resolving neighboring ambiguous words. That detail matters when an ambiguous preceding word can change the preference for the current one. The examples establish plausible uses of contextual evidence, and the staged results show a measured aggregate benefit from the implemented procedure. They do not establish the success of a particular undocumented search strategy.

Similar gaps apply to segmentation and fallback. The paper identifies which spacing problem each stage handles and points to earlier segmentation work. It does not give a complete decision rule for competing segmentations within this system description. For out-of-vocabulary words, it identifies the hybrid use of rules and character trigrams without specifying all the details of their combination. The findings support the effectiveness of the assembled converter on the tested material. The exact contribution and portability of the less fully described choices remain open.

What came after

A later citing work is Beyond Arabic: Software for Perso-Arabic Script Manipulation. Its subject places the Punjabi problem in the wider setting of software for Perso-Arabic writing. In Lehal and Saini’s study, that script family matters through Shahmukhi’s use for Punjabi. The converter has to account for character representations, optional vowel signs and spacing as part of working with actual text, and then use resources specific to Punjabi to choose a Gurmukhi output.

The citation connects a study of conversion between Punjabi’s scripts with later work whose stated scope is Perso-Arabic script manipulation. The later title establishes that broader software focus, while the citation alone leaves the form of any technical reuse unspecified. It does not establish that the later work adopted the Punjabi dictionaries, segmentation stages or contextual probability estimates.

Cite

Cite as Gurpreet Singh Lehal and Tejinder Singh Saini. 2012. Conversion between Scripts of Punjabi: Beyond Simple Transliteration. Proceedings of COLING 2012: Posters.

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{lehal2012conversion,
  title = {{Conversion between Scripts of Punjabi: Beyond Simple Transliteration}},
  author = {Gurpreet Singh Lehal and Tejinder Singh Saini},
  booktitle = {Proceedings of COLING 2012: Posters},
  year = {2012},
  url = {https://aclanthology.org/C12-2062/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/lehal-2012-conversion-between-scripts-punjabi-beyond/