There seems to be very limited Telugu Bhagavad Gita open source APIs and web apps; Added BG Telugu summaries to starter/test app

Last updated on 28 May 2024
My post: Bhagavad Gita and some other Hindu scripture websites/web apps with source code (Next.js, React, React Native, REST API, JSON, AI-ChatGPT) shares my pleasure at finding fair amount of open source web apps on Bhagavad Gita, and some details about them.

Over past few days, I am investing some time in going through code of one of the stand-out apps in the above. Related blog post: Notes on Next.js '"Frontend for BhagavadGita.io v2", gita-frontend-v2, open-source Github repo. The associated web app.: https://bhagavadgita.io/ is impressive. But it is limited to English and Hindi (and Sanskrit) language. It does not show the content in Telugu or Tamil or Marathi etc. 

I think the reason for above app to be limited to English and Hindi seems to be, I repeat seems to be, the bhagavadgita.io web app using data from https://www.gitasupersite.iitk.ac.in/ of IIT Kanpur. Note that IIT Kanpur does not seem to have publicly shared the data. Now this gitasupersite allows users to view the Bhagavad Gita (BG) verses in quite a few languages including Telugu. But it does not show the translation in Telugu nor any commentary in Telugu. The translation and commentary language options are limited to English, Hindi and Sanskrit.

But then are there other open-source web apps and APIs providing BG Telugu (translation and commentary)? Note that there are websites with BG in Telugu like  http://www.telugubhakti.com/telugupages/gita/gita.html but they don't render well on mobile (as they were probably developed before using mobiles to view Internet pages became common). That's where a web app. like bhagavadgita.io is significantly superior.

In my Google and Github search I could find only one BG Telugu public API which seems to be open-source. Its details:
  • Bhagavad Gita API in telugu and odia languages, https://publicapi.dev/bhagavad-gita-telugu-api led to: https://gita-api.vercel.app/ which stated: "Hi, I'm a GitaTeluguAPI running and powered by vercel." "Please check the source code at https://github.com/naveennamani/gita-telugu-api ..." It provided a docs link: https://gita-api.vercel.app/docs which shares API details including schema and also allows one to try out the APIs.
  • But the github link provided above is broken. Instead I found this github repo (by same author): https://github.com/naveennamani/gita-api-vercel which may be the code behind the API hosted at vercel.
  • Cursory examination of the code in the github repo shows that the BG Telugu data is stored as json files. It may be similar for Odia though I have not checked that out. The server code seems to be in Python.
I could not find attribution to any publisher and author for the above BG in Telugu data. Perhaps it is in Telugu somewhere in the data and as I read Telugu very slowly, I missed it. But the impression I get is that this API has been put up by an individual and the data may not be backed by an institution. That raises some doubts in my mind about using this BG in Telugu data.

A small point is that the above API provides verse data for chapters but does not seem to provide chapter overview summary (in Telugu).

I could not find open-source web apps. that use the above API. Perhaps they are around but I could not locate them. Note that I am limiting my search to web apps and not open-source Android or iOS apps.

Given the great reverence Hindus (and some people from other religions too) have for BG, I think once BG data is publicly made available in various languages (in addition to Sanskrit, English and Hindi) in whatever form (text, JSON or API), significant number of open-source web apps using this data will get created. If the BG data in various languages is publicly provided as text then some persons will step  forward to convert it to JSON, put it in a database etc., after which REST and GraphQL APIs can be written on top of that.

So the impetus has to come from various Hindu spiritual institutions that have Bhagavad Gita publications in various languages, to provide permission for that data to be used publicly by APIs and apps. Perhaps, due to its eminence, IIT Kanpur was able to get such permission easily for the various Sanskrit, English and Hindi translations and commentaries it provides on its Gita supersite.

I wonder which institution can do that for Telugu Bhagavad Gita data.

I wanted to test how cumbersome it may be to gather Telugu summaries data and use it in the small Nextjs app I wrote listing out BG chapter summaries in English and Hindi using the public BG GraphQL endpoint and Apollo client, mentioned in my Notes post.

I searched the Internet and found "Bhagavad Gita - Telugu - Word-to-Word meaning and translation PDF - Swami Nirvikalpananda", (link to chapter summaries pages) https://archive.org/details/geeta-telugu-with-word2word-meaning-and-translation/Front%20Pages/page/n9/mode/2up , with the usage specified as "Public Domain 1.0 ", "Creative Commons License". Now the chapter summaries in this book are different from the chapter summaries of the above GraphQL endpoint where the Hindi version seems to be a translation of the English version. Also there seems to be a number of verses mismatch for a few chapters between the Telugu book and the GraphQL endpoint data. But, for the purposes of a test, these are not big issues.

After I had identified the book and viewed its chapter summaries in Telugu, I think it took me around 1 to 2 hours to copy the data, and then create a JavaScript const object having an array of these Telugu chapter summaries objects. Note that my Telugu knowledge is quite limited and sometimes the copy-paste did not copy some Telugu character or half-character/modifier. Also I think the chapter summaries in the book itself seems to have at least one typo error (which I chose not to correct).

Then a little bit of programming to combine data from the GraphQL endpoint having English and Hindi summaries and from the JavaScript object having Telugu summaries, into one array of summary objects. Added code to render the Telugu summaries and add some introduction info. Had to write some Telugu text like chapter summary ('తెలుగు సారాంశం') for which I had to use Google search and a Telugu typing tool. I checked the Telugu words in the heading for Telugu chapter summaries  ('భగవద్గీత తెలుగు అధ్యాయం సారాంశాలు') and chapter summary from somebody who knows Telugu and he said it is accurate.

That's it. The program was ready and rendered BG English, Hindi and Telugu summaries!
The programming work was relatively minor. The main challenge was the data and Telugu text labels. I think it is clear that if public domain data is made available for Hindu scripture with translation and commentaries in various languages then interested persons can easily write front-end web apps. using that data thus making available easy to use web apps to view Hindu scripture in various languages.

Comments