SiPaKosa: A Comprehensive Corpus of Canonical and Classical Buddhist Texts in Sinhala and Pali
Organizations: School of Computing, Informatics Institute of Technology, Sri Lanka · Department of Computer Science & Engineering, University of Moratuwa, Sri Lanka
Abstract
SiPaKosa is a comprehensive corpus of Sinhala and Pali doctrinal texts comprising approximately 786K sentences and 9.25M words, incorporating 16 copyright-cleared historical Buddhist documents alongside the complete web-scraped Tripitaka canonical texts. The corpus was created through high-quality OCR using Google Document AI on historical manuscripts, combined with systematic web scraping of canonical repositories, followed by rigorous quality control and metadata annotation. The corpus is organised into language-specific subcorpora: Sinhala and Mixed Sinhala-Pali. We evaluate the performance of language models using ten pretrained models, with perplexity scores ranging from 1.09 to 189.67 on our corpus. This analysis shows that proprietary models significantly outperform open-source alternatives by factors of three to six times. This corpus supports the pretraining of domain-adapted language models, facilitates historical language analysis, and aids in the development of information retrieval systems for Buddhist scholarship while preserving Sinhala cultural heritage.
Figures & tables
| Corpus | Language(s) | Tradition | Tokens | Units | Annotation | Alignment |
|---|---|---|---|---|---|---|
| Bible 100 ( 2015 ) | 100 langs | Christian | varies | 31K verses/lang | None | Verse |
| CBETA ( 2002 ) | Classical Chinese | Buddhist | 100M+ chars | 5,320+ texts | TEI XML | - |
| GRETIL ( 2020 ) | 10+ Indic | Multi | GBs (raw) | 1,000+ texts | Raw text | - |
| Quranic Arabic ( 2010 ) | Arabic | Islamic | 77,430 words | 6,236 āyahs | Morph+Syn+Sem | Verse |
| Tanzil ( 2007 ) | 40+ langs | Islamic | varies | 6,236 verses/lang | None | Verse |
| DCS ( 2020 ) | Sanskrit | Multi | 2.5M+ items | 650K sents | Lemma+POS+Morph | - |
| Source | Metric | Count |
|---|---|---|
| Historical PDF Corpus | Documents (books) | 16 |
| Content pages | 7,064 | |
| Sentences | 247,513 | |
| Web-Scraped Canonical Texts | Nikayas covered | 5 |
| Sentences | 539,326 | |
| Total | Sentences | 786,344 |
| Type | Metric | Sinhala | Mixed |
|---|---|---|---|
| Sentences | PDF corpus | 111,632 | 135,386 |
| Web-scraped | 353,907 | 185,419 | |
| Total Count | 465,539 | 320,805 | |
| % of corpus | 59.2% | 40.8% | |
| Tokens | Total Count | 5,418,716 | 3,831,076 |
| % of corpus | 58.6% | 41.4% |
| Model | Buddhist | Mixed | General | BS/G | M/G |
|---|---|---|---|---|---|
| Sinhala | Si-Pa | Sinhala | Ratio | Ratio | |
| GPT-3.5-Turbo | 1.09 | 1.11 | 1.08 | 1.01 | 1.03 |
| GPT-4o-mini | 1.23 | 1.15 | 1.31 | 0.94 | 0.88 |
| GPT-4-Turbo | 1.56 | 1.59 | 1.48 | 1.05 | 1.07 |
| GPT-4o | 1.62 | 1.77 | 1.68 | 0.96 | 1.06 |
| Llama-3.1-8B-Instruct | 3.29 | 4.18 | 3.26 | 1.01 | 1.28 |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| No. | Title | Author | Published |
| Books Related to Tipitaka (5 books) | |||
| 1 | Maithree Buddha Wanshaya nohoth anagatha wanshaya | Ven. Wilgammula Sangharaja Thero | 2015 |
| 2 | Milind Prashna | Ven. Heenatikubure Sumangala Nahimi | 2015 |
| 3 | Pretha Wasthu | Dhammapala Thero | 2015 |
| 4 | Vimana Wasthu | Dhammapala Thero | 2015 |
| 5 | Wishuddhi Margaya | Buddhaghosa Maha Thero | 2015 |