Where Does One Sanskrit Word End and the Next Begin?

NEUROSYMBOLIC INTELLIGENCE · GRAMMAR AND NEURAL LEARNING

The Sanskrit sequence śvetodhāvati can be read as śvetaḥ dhāvati, “the white one runs”. At the boundary, the end of the first word is written differently from the form a reader recovers. In the published example, a grammatical analyser also admits the sequence śveta ūdhā avati. What should a computer do with two possible readings of the same letters? TransLIST, Figure 2 and § 2.1.

TransLIST brings a symbolic analyser and a trained neural network together in the same prediction. Sanskrit Heritage applies a lexicon and explicit rules of sound combination to generate possible words and locate them in the written sequence. A transformer receives those words and positions alongside the characters. It learns from segmented sentences to predict word boundaries and restore sounds. This exchange of information during prediction is what makes the version using Sanskrit Heritage a case of neurosymbolic AI. TransLIST, §§ 2.1–2.2.

What a grammar gives the model

Several candidates may cover the same character. The position of each candidate helps the network direct attention to the relevant stretch of text, while surrounding characters can still influence the prediction. The output is a segmentation. A grammatical derivation could explain why a reading is possible. The network’s preference for it is a separate decision, and the study does not produce a rule-by-rule explanation of that preference. TransLIST, §§ 2.1–2.3.

On 4,200 SIGHUM test sentences, five versions of the system were compared with the final reranking stage switched off. The character model recovered 72.33% of sentences in full. Cues from sound-change rules gave 75.71%, a vocabulary gave 85.65%, short character sequences gave 86.52%, and candidates from Sanskrit Heritage gave 88.47%. Each was a separate addition to the character model. A single misplaced boundary could cost the system an otherwise correctly analysed sentence. TransLIST, Table 2.

Complete sentence accuracy ranges from 72.33% with characters alone to 88.47% with Sanskrit Heritage candidates. The character-sequence comparison reaches 86.52%.
Five versions of TransLIST on the same 4,200 SIGHUM sentences, with final reranking disabled. Each bar gives the percentage of sentences recovered in full. Data from TransLIST, Table 2. Original chart by The Bible of AI (BAI), CC BY-SA 4.0.

The gain over characters was 16.14 percentage points for the analyser with its lexicon and rules together. Against short character sequences, its advantage was 1.95 points. The vocabulary comparison leaves a further question open because the two vocabularies came from different sources. To learn how much the rules contribute, we would need to give both systems the same words and vary what they can do with them. TransLIST, § 4.

How well does the result travel?

In 2024 a separate team evaluated ByT5-Sanskrit, a model pretrained on Sanskrit text that can segment a sentence without consulting an external lexicon. It scored 93.83% on SIGHUM, close to the published 93.97% for the complete TransLIST system. On the Hackathon corpus the corresponding figures were 94.29% and 85.47%. The later paper took the TransLIST figures from the earlier publication. The comparison establishes that a model can do well without consulting Sanskrit Heritage. The variation across corpora leaves room for several explanations, including differences in training and in the forms covered by the analyser. ByT5-Sanskrit, § 5.1 and Table 3.

A separate experiment with Gemma 3 illustrates what a misplaced boundary can conceal. The model split tasyedam into tasye and dam. The reference reading is tasya and idam. The final a and initial i combine into a single e, so recovering the words requires restoring two sounds. Gemma recovered 1,754 of 2,000 individual forms exactly (87.7%). TransLIST was assessed on whole sentences. Another study separated two outcomes within one test. Among 2,640 compounds requiring multiple splits, its model located the boundaries correctly in 1,775 cases and recovered the exact forms in 1,664. The Gemma Sutras, § 4.4 · Joint modelling of compound splitting, § 6.4.

What would count as an explanation?

Consider Aupagava, a name formed from Upagu to designate a descendant. In a rule-based study, the system was given both the name and the intended relationship. A specialist can point to a particular step in the derivation. Rule 7.2.117 of Pāṇini’s grammar accounts for the strengthening of the first vowel from u to au. Specialists checked the final form and the sequence of rules for 175 selected kinship derivatives. All 175 passed both checks. A reader encountering such a name in a text faces the problem in the other direction. An earlier study used the same pair to illustrate how grammatical restrictions could narrow 137 possible suffixes to at most four within its analysis. The restrictions help identify what to consider. The passage still matters when deciding what the name means. Rule-based derivation, § 4 · Learning relations between bases and derivatives.

A technical report on SGram-14B describes a grammatical generator used to construct exercises for supervised training and to supply accepted answers for evaluation. SGram-14B’s first answer matched a form accepted by the Sanskrit generator Vidyut on 19,318 of 20,000 morphology exercises (96.59%). The public error record makes one disagreement easy to inspect. Given the root śudh and the suffix kta, the model returned śudhita. The expected form was śuddha. The average gives the four exercise types equal weight. In the public records, 318 of 5,000 verb inflections missed the accepted forms, compared with 62 of 5,000 noun or adjective inflections. Vidyut also supplied the reference forms used to construct the exercises. Matching one establishes agreement with that grammatical implementation. The score gives us no way to tell whether the model reached a correct form by a valid sequence of rules. SGram-14B project report · Error records · Research paper on Vidyut.

What changes for the reader?

There is already evidence about the time it takes to annotate a passage. In a separate study of the SHR++ interface, three Sanskrit specialists performed annotation tasks. For segmentation, the mean time per sentence, averaged over ten groups of three, was 53.93 seconds without suggestions and 43.06 seconds with them. The investigators began with 60 lines and retained the 30 sentences on which the annotators had made no mistakes. Those figures tell us how long a successful annotation took in that sample. To learn whether the suggestions helped readers avoid errors, we would also need the decisions that ended in error. SHR++, § 4 and Table 1.

A study of reading could start by asking independent scholars to identify the defensible readings of each passage. They could record why a second reading remains possible and where the surviving context leaves a question unresolved. For passages with an adjudicated reading, two observations about the machine would then become possible. How often does the analyser offer at least one acceptable complete reading? When it does, how often does the network select one? A reading missing from the dictionary and a reading overlooked despite being available call for different improvements.

The human experiment would keep the passage and the model’s initial suggestion fixed. One group would see the suggestion alone. A second would also see the alternatives in a fixed order. A third would see those same alternatives in that order, with the grammatical steps that support them. Every reader could enter a reading of their own. Readers would encounter each passage only once, and conditions would be balanced across readers and passages. Comparing the last two displays would isolate the value of being able to inspect the grounds for a suggestion. The measures would include corrections when the initial suggestion was wrong, errors introduced when it was right, and time spent even when the reader chose to withhold judgement.

A grammar can show how śvetaḥ dhāvati could have produced the written sequence śvetodhāvati. TransLIST shows how a network can use just such grammatical alternatives to read a sentence. Whether a scholar makes a better decision when shown the grounds for those alternatives remains an empirical question. It is a question about the reading the scholar ultimately adopts, including the occasions on which the machine’s first suggestion was wrong.

Sources and image credit

  1. TransLIST: A Transformer-Based Linguistically Informed Sanskrit Tokenizer (2022). Findings of the Association for Computational Linguistics: EMNLP 2022, pp. 6902–6912. Figure 2 describes the architecture. Tables 1 and 2 report the full model and the controlled comparisons, respectively.
  2. One Model is All You Need: ByT5-Sanskrit, a Unified Model for Sanskrit NLP Tasks (2024). Findings of the Association for Computational Linguistics: EMNLP 2024, pp. 13742–13751. Table 3 compares segmentation accuracy across corpora.
  3. The Gemma Sutras: Fine-Tuning Gemma 3 for Sanskrit Sandhi Splitting (2025). Proceedings of the 9th Widening NLP Workshop, pp. 235–241. Section 4.4 discusses the reading of tasyedam.
  4. Uncertainty-aware joint modeling for Sanskrit compound splitting and segmentation (2026). Frontiers in Artificial Intelligence, vol. 9, article 1873672.
  5. Computational Modelling of the Apatyādhikāra in the Aṣṭādhyāyī (2026). Proceedings of the 8th International Sanskrit Computational Linguistics Symposium, pp. 222–237.
  6. A Graph Based Semi-Supervised Approach for Analysis of Derivational Nouns in Sanskrit (2017). Proceedings of TextGraphs-11: the Workshop on Graph-based Methods for Natural Language Processing, pp. 66–75.
  7. Announcing Vidyut-Prakriya Bench and SGram-14B for verifiable Sanskrit tasks. Project technical report and accompanying error records, accessed 27 November 2026.
  8. A fast prakriyā generator (2024). Proceedings of the 7th International Sanskrit Computational Linguistics Symposium, pp. 84–101.
  9. SHR++: An Interface for Morpho-syntactic Annotation of Sanskrit Corpora (2020). Proceedings of the Twelfth Language Resources and Evaluation Conference, pp. 7069–7076. Table 1 reports annotation times.

Image credit

Cover illustration. The Bible of AI (BAI). The diagram shows how the written form tasyedam resolves into tasya and idam, the reference analysis in The Gemma Sutras, § 4.4.

Interior figure. The Bible of AI (BAI). The chart plots the percentage of complete sentences segmented correctly by five TransLIST variants on the same 4,200 SIGHUM test sentences, with final reranking disabled. The values come from TransLIST, Table 2.

Both original illustrations are licensed under Creative Commons Attribution–ShareAlike 4.0 International (CC BY-SA 4.0).

Liked this post? Follow this blog to get more.