Blog · 2026

Searching the SARIT and GRETIL Corpora

This post is one of a series on the items in the Assets menu of this website, which I have written over the last two months together with Claude.

What it is

SARIT and GRETIL Corpus Search is a search page for two large collections of electronic texts in Sanskrit and other Indian languages.

One can search for a phrase, for all or any of a set of words, or with a regular expression. The search can be told to ignore diacritics, word division, and the difference between anusvāra and the class nasals, which matters a great deal when the same word may have been typed saṃkhyā in one text and saṅkhyā in another. The search term can be typed in IAST, Devanāgarī, Harvard-Kyoto, Velthuis, SLP1 or ITRANS, and the results shown in IAST or Devanāgarī.

Every hit comes with a scholarly reference to the text and the place in it, ready to be copied into a footnote. The results can be downloaded as a table.

Background

SARIT (“Search and Retrieval of Indic Texts”) is a library of Indian texts, mainly in Sanskrit, encoded according to the guidelines of the Text Encoding Initiative. I started it a long time ago, with technical help from Richard Mahoney. In 2013 Birgit Kellner and Sheldon Pollock joined, and the project grew considerably with support from the NEH/DFG Bilateral Digital Humanities Programme and the work of Patrick McAllister, Andrew Ollett, Jens Østergaard Petersen, Liudmila Olalde, Claudius Teodorescu, Dheepa Sundaram and others. The SARIT library includes several of the texts closest to our project, including the Carakasaṃhitā with Cakrapāṇidatta’s Āyurvedadīpikā, the Aṣṭāṅgahṛdaya and the Aṣṭāṅgasaṅgraha.

GRETIL, the Göttingen Register of Electronic Texts in Indian Languages, was started by Reinhold Grünendahl in 2001 and is much the larger of the two collections. Since 2016, Maximilian Mehner and colleagues produced TEI/XML versions of its texts, “Corpus TEI.” Support for GRETIL was withdrawn by Göttingen University after 2020 and it is now a static collection.

The texts of both collections have always been freely available. The difficulty has been the search. SARIT’s own search interface depended on a database server that somebody had to keep running, and such services are fragile once project funding has ended. For the Suśruta Project we need to be able to ask whether an unusual word or phrase in our manuscripts occurs anywhere else in Sanskrit literature, and we need the answer in a form that can be cited.

How it works

The new page has no server behind it. The texts are prepared for searching when the site is built, and the search itself is done in the reader’s browser. Because it is a static website it can be hosted free of charge and copied anywhere.

The page is built from my fork of the SARIT repository, github.com/wujastyk/SARIT-corpus, and from a copy of the GRETIL TEI files. The licence of each text is given in its own header and should be consulted before reuse. The About page of the site gives fuller credits for both collections. Bugs and corrections to Issues please.